disable source_file_comments in GridFieldAddExistingAutocompleter->doSearch() because they would be displayed as plaintext in the dropdown

This commit is contained in:
Zauberfisch 2013-11-08 08:34:22 +00:00
parent 54a58eff27
commit 2df5269ae5

View File

@ -229,9 +229,12 @@ class GridFieldAddExistingAutocompleter
->limit($this->getResultsLimit());
$json = array();
$originalSourceFileComments = Config::inst()->get('SSViewer', 'source_file_comments');
Config::inst()->update('SSViewer', 'source_file_comments', false);
foreach($results as $result) {
$json[$result->ID] = html_entity_decode(SSViewer::fromString($this->resultsFormat)->process($result));
}
Config::inst()->update('SSViewer', 'source_file_comments', $originalSourceFileComments);
return Convert::array2json($json);
}