mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
disable source_file_comments in GridFieldAddExistingAutocompleter->doSearch() because they would be displayed as plaintext in the dropdown
This commit is contained in:
parent
54a58eff27
commit
2df5269ae5
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user