BUGFIX: SiteTree#getCMSFields referenced $linkedPages even if $linkedPages wasnt set

This commit is contained in:
Hamish Friedlander 2012-02-17 12:06:12 +13:00
parent 3d7fb25ce1
commit 3b0ab9b0a0

View File

@ -1760,7 +1760,6 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
// Create a status message for multiple parents // Create a status message for multiple parents
if($this->ID && is_numeric($this->ID)) { if($this->ID && is_numeric($this->ID)) {
$linkedPages = $this->VirtualPages(); $linkedPages = $this->VirtualPages();
}
$parentPageLinks = array(); $parentPageLinks = array();
@ -1791,6 +1790,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$parentList $parentList
); );
} }
}
if($this->HasBrokenLink || $this->HasBrokenFile) { if($this->HasBrokenLink || $this->HasBrokenFile) {
$statusMessage[] = _t('SiteTree.HASBROKENLINKS', "This page has broken links."); $statusMessage[] = _t('SiteTree.HASBROKENLINKS', "This page has broken links.");