MINOR don't use 'SiteTree_Controller', but 'ContentController'

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@83967 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Tom Rix 2009-08-06 20:50:46 +00:00
parent 004a1a2f24
commit c65c6f40b6

View File

@ -233,7 +233,9 @@ class VirtualPage_Controller extends Page_Controller {
function hasMethod($method) {
$haveIt = parent::hasMethod($method);
if (!$haveIt) {
$name = get_class($this->CopyContentFrom())."_Controller";
$originalClass = get_class($this->CopyContentFrom());
if ($originalClass == 'SiteTree') $name = 'ContentController';
else $name = $originalClass."_Controller";
$controller = new $name($this->dataRecord->copyContentFrom());
$haveIt = $controller->hasMethod($method);
}