BUGFIX: Fix virtual pages not returning correct content

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98520 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2010-02-09 03:13:33 +00:00 committed by Sam Minnee
parent f6c710443c
commit bd57194417

View File

@ -226,6 +226,8 @@ class VirtualPage extends Page {
$return = $this->copyContentFrom()->$funcName();
} else if($this->copyContentFrom()->hasField($field)) {
$return = $this->copyContentFrom()->getField($field);
} else if($field == 'Content') {
return '<p>' . _t('VirtualPage.NOTFOUND', 'We could not find the content for this virtual page.') . '</p>';
}
}
@ -261,13 +263,6 @@ class VirtualPage extends Page {
if (!$haveIt) $haveIt = $this->copyContentFrom()->hasMethod($method);
return $haveIt;
}
/**
* If we ever get this far, it means that the VP failed.
*/
function Content() {
return '<p>'._t('VirtualPage.NOTFOUND', 'We could not find the content for this virtual page.').'</p>';
}
}
/**