MINOR: Fixed test execution for SubsitesVirtualPage

This commit is contained in:
Sam Minnee 2009-05-04 05:04:08 +00:00
parent b646a104f1
commit 1dcd84e098

View File

@ -31,9 +31,12 @@ class SubsitesVirtualPage extends VirtualPage {
"SiteTree"
);
$pageSelectionField->setFilterFunction(create_function('$item', 'return $item->ClassName != "VirtualPage";'));
$subsiteID = Controller::curr()->getRequest()->getVar('TreeDropdownField_Form_EditForm_CopyContentFromID_SubsiteID');
if($subsiteID) {
$pageSelectionField->setSubsiteID($subsiteID);
if(Controller::curr()->getRequest()) {
$subsiteID = Controller::curr()->getRequest()->getVar('TreeDropdownField_Form_EditForm_CopyContentFromID_SubsiteID');
if($subsiteID) {
$pageSelectionField->setSubsiteID($subsiteID);
}
}
$fields->replaceField('CopyContentFromID', $pageSelectionField);