From bd571944170f692d1e5b3d6f3e2892efeda199d8 Mon Sep 17 00:00:00 2001 From: Andrew O'Neil Date: Tue, 9 Feb 2010 03:13:33 +0000 Subject: [PATCH] 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 --- core/model/VirtualPage.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/core/model/VirtualPage.php b/core/model/VirtualPage.php index d7201ec2a..3cbb4f5f9 100755 --- a/core/model/VirtualPage.php +++ b/core/model/VirtualPage.php @@ -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 '

' . _t('VirtualPage.NOTFOUND', 'We could not find the content for this virtual page.') . '

'; } } @@ -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 '

'._t('VirtualPage.NOTFOUND', 'We could not find the content for this virtual page.').'

'; - } } /**