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:
Sean Harvey 2008-11-03 02:33:08 +00:00
parent e57b7651ef
commit 99589e626f

View File

@ -824,13 +824,19 @@ class ComplexTableField_ItemRequest extends RequestHandler {
global $_ALL_CLASSES;
$items = array();
$parents = $_ALL_CLASSES['parents'][$this->class];
foreach($parents as $parent) {
if(!in_array($parent,$_ALL_CLASSES['parents']["TableListField"])) $items[] = $parent . "_Popup";
}
$items[] = $this->class . "_Popup";
$parents = isset($_ALL_CLASSES['parents'][$this->class]) ? $_ALL_CLASSES['parents'][$this->class] : null;
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);
}