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,10 +31,13 @@ class SubsitesVirtualPage extends VirtualPage {
"SiteTree"
);
$pageSelectionField->setFilterFunction(create_function('$item', 'return $item->ClassName != "VirtualPage";'));
if(Controller::curr()->getRequest()) {
$subsiteID = Controller::curr()->getRequest()->getVar('TreeDropdownField_Form_EditForm_CopyContentFromID_SubsiteID');
if($subsiteID) {
$pageSelectionField->setSubsiteID($subsiteID);
}
}
$fields->replaceField('CopyContentFromID', $pageSelectionField);
// Create links back to the original object in the CMS