MINOR Fixed regression from r100774

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@100775 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-03-10 02:57:43 +00:00 committed by Sam Minnee
parent 470e53f2d1
commit 939ec09536

View File

@ -1080,7 +1080,12 @@ class ComplexTableField_Popup extends Form {
Requirements::javascript(SAPPHIRE_DIR . "/javascript/ComplexTableField_popup.js");
// 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);
// Append requirements from DataObject