mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Fix potential PHP notice opening a ComplexTableField popup
MINOR Code formatting in ComplexTableField git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65127 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
e57b7651ef
commit
99589e626f
@ -824,13 +824,19 @@ class ComplexTableField_ItemRequest extends RequestHandler {
|
|||||||
global $_ALL_CLASSES;
|
global $_ALL_CLASSES;
|
||||||
|
|
||||||
$items = array();
|
$items = array();
|
||||||
$parents = $_ALL_CLASSES['parents'][$this->class];
|
$parents = isset($_ALL_CLASSES['parents'][$this->class]) ? $_ALL_CLASSES['parents'][$this->class] : null;
|
||||||
foreach($parents as $parent) {
|
|
||||||
if(!in_array($parent,$_ALL_CLASSES['parents']["TableListField"])) $items[] = $parent . "_Popup";
|
|
||||||
}
|
|
||||||
$items[] = $this->class . "_Popup";
|
|
||||||
|
|
||||||
return implode(" ", $items);
|
if($parents) {
|
||||||
|
foreach($parents as $parent) {
|
||||||
|
if(!in_array($parent, $_ALL_CLASSES['parents']['TableListField'])) {
|
||||||
|
$items[] = $parent . '_Popup';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$items[] = $this->class . '_Popup';
|
||||||
|
|
||||||
|
return implode(' ', $items);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user