mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
004a1a2f24
commit
c65c6f40b6
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user