MINOR Fixed regression from r100774 (from r100775)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@105650 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-05-25 05:01:46 +00:00
parent e78dc5273d
commit 1d80d77270

View File

@ -1082,7 +1082,12 @@ class ComplexTableField_Popup extends Form {
Requirements::javascript(SAPPHIRE_DIR . "/javascript/ComplexTableField_popup.js"); Requirements::javascript(SAPPHIRE_DIR . "/javascript/ComplexTableField_popup.js");
// Append requirements from instance callbacks // Append requirements from instance callbacks
$callback = $this->getParentController()->getParentController()->requirementsForPopupCallback; $parent = $this->getParentController();
if($parent instanceof ComplexTableField) {
$callback = $parent->requirementsForPopupCallback;
} else {
$callback = $parent->getParentController()->requirementsForPopupCallback;
}
if($callback) call_user_func($callback, $this); if($callback) call_user_func($callback, $this);
// Append requirements from DataObject // Append requirements from DataObject