mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00: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());
|
->limit($this->getResultsLimit());
|
||||||
|
|
||||||
$json = array();
|
$json = array();
|
||||||
|
$originalSourceFileComments = Config::inst()->get('SSViewer', 'source_file_comments');
|
||||||
|
Config::inst()->update('SSViewer', 'source_file_comments', false);
|
||||||
foreach($results as $result) {
|
foreach($results as $result) {
|
||||||
$json[$result->ID] = html_entity_decode(SSViewer::fromString($this->resultsFormat)->process($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);
|
return Convert::array2json($json);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user