mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #2411 from simonwelsh/circ_ref
Revert "Merge pull request #2390 from phptek/2389"
This commit is contained in:
commit
60bb9d81c5
@ -230,11 +230,6 @@ class GridFieldAddExistingAutocompleter
|
|||||||
|
|
||||||
$json = array();
|
$json = array();
|
||||||
foreach($results as $result) {
|
foreach($results as $result) {
|
||||||
// Prevent a circular reference and associated error in CMS/admin
|
|
||||||
$hideFromSearch = ($gridField->getForm()->getRecord() && ($result->ID == $gridField->getForm()->getRecord()->ID));
|
|
||||||
if($hideFromSearch) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$json[$result->ID] = SSViewer::fromString($this->resultsFormat)->process($result);
|
$json[$result->ID] = SSViewer::fromString($this->resultsFormat)->process($result);
|
||||||
}
|
}
|
||||||
return Convert::array2json($json);
|
return Convert::array2json($json);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user