diff --git a/code/model/SiteTree.php b/code/model/SiteTree.php
index f408b8a0..e7e85e33 100644
--- a/code/model/SiteTree.php
+++ b/code/model/SiteTree.php
@@ -1760,36 +1760,36 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
// Create a status message for multiple parents
if($this->ID && is_numeric($this->ID)) {
$linkedPages = $this->VirtualPages();
- }
-
- $parentPageLinks = array();
- if($linkedPages->Count() > 0) {
- foreach($linkedPages as $linkedPage) {
- $parentPage = $linkedPage->Parent;
- if($parentPage) {
- if($parentPage->ID) {
- $parentPageLinks[] = "ID\">{$parentPage->Title}";
- } else {
- $parentPageLinks[] = "ID\">" .
- _t('SiteTree.TOPLEVEL', 'Site Content (Top Level)') .
- "";
+ $parentPageLinks = array();
+
+ if($linkedPages->Count() > 0) {
+ foreach($linkedPages as $linkedPage) {
+ $parentPage = $linkedPage->Parent;
+ if($parentPage) {
+ if($parentPage->ID) {
+ $parentPageLinks[] = "ID\">{$parentPage->Title}";
+ } else {
+ $parentPageLinks[] = "ID\">" .
+ _t('SiteTree.TOPLEVEL', 'Site Content (Top Level)') .
+ "";
+ }
}
}
+
+ $lastParent = array_pop($parentPageLinks);
+ $parentList = "'$lastParent'";
+
+ if(count($parentPageLinks) > 0) {
+ $parentList = "'" . implode("', '", $parentPageLinks) . "' and "
+ . $parentList;
+ }
+
+ $statusMessage[] = sprintf(
+ _t('SiteTree.APPEARSVIRTUALPAGES', "This content also appears on the virtual pages in the %s sections."),
+ $parentList
+ );
}
-
- $lastParent = array_pop($parentPageLinks);
- $parentList = "'$lastParent'";
-
- if(count($parentPageLinks) > 0) {
- $parentList = "'" . implode("', '", $parentPageLinks) . "' and "
- . $parentList;
- }
-
- $statusMessage[] = sprintf(
- _t('SiteTree.APPEARSVIRTUALPAGES', "This content also appears on the virtual pages in the %s sections."),
- $parentList
- );
}
if($this->HasBrokenLink || $this->HasBrokenFile) {