mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX VirtualPages won't call SiteTree_Controller anymore.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@84079 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
63e2d4d72e
commit
fbbffb5f90
@ -193,7 +193,9 @@ class VirtualPage_Controller extends Page_Controller {
|
||||
}
|
||||
|
||||
function getViewer($action) {
|
||||
$name = get_class($this->CopyContentFrom())."_Controller";
|
||||
$originalClass = get_class($this->CopyContentFrom());
|
||||
if ($originalClass == 'SiteTree') $name = 'Page_Controller';
|
||||
else $name = $originalClass."_Controller";
|
||||
$controller = new $name();
|
||||
return $controller->getViewer($action);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user