mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
FIX Correct case of CopyContentFrom method
This commit is contained in:
parent
80e8967308
commit
2ddb616829
@ -416,7 +416,7 @@ class VirtualPage extends Page {
|
|||||||
} else if(parent::hasField($field) || ($field === 'ID' && !$this->exists())) {
|
} else if(parent::hasField($field) || ($field === 'ID' && !$this->exists())) {
|
||||||
return $this->getField($field);
|
return $this->getField($field);
|
||||||
} else {
|
} else {
|
||||||
return $this->copyContentFrom()->$field;
|
return $this->CopyContentFrom()->$field;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -449,7 +449,7 @@ class VirtualPage extends Page {
|
|||||||
if(parent::hasMethod($method)) {
|
if(parent::hasMethod($method)) {
|
||||||
return parent::__call($method, $args);
|
return parent::__call($method, $args);
|
||||||
} else {
|
} else {
|
||||||
return call_user_func_array(array($this->copyContentFrom(), $method), $args);
|
return call_user_func_array(array($this->CopyContentFrom(), $method), $args);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -485,8 +485,8 @@ class VirtualPage extends Page {
|
|||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function castingHelper($field) {
|
public function castingHelper($field) {
|
||||||
if($this->copyContentFrom()) {
|
if($this->CopyContentFrom()) {
|
||||||
return $this->copyContentFrom()->castingHelper($field);
|
return $this->CopyContentFrom()->castingHelper($field);
|
||||||
} else {
|
} else {
|
||||||
return parent::castingHelper($field);
|
return parent::castingHelper($field);
|
||||||
}
|
}
|
||||||
@ -560,7 +560,7 @@ class VirtualPage_Controller extends Page_Controller {
|
|||||||
$originalClass = get_class($this->CopyContentFrom());
|
$originalClass = get_class($this->CopyContentFrom());
|
||||||
if ($originalClass == 'SiteTree') $name = 'ContentController';
|
if ($originalClass == 'SiteTree') $name = 'ContentController';
|
||||||
else $name = $originalClass."_Controller";
|
else $name = $originalClass."_Controller";
|
||||||
$controller = new $name($this->dataRecord->copyContentFrom());
|
$controller = new $name($this->dataRecord->CopyContentFrom());
|
||||||
$haveIt = $controller->hasMethod($method);
|
$haveIt = $controller->hasMethod($method);
|
||||||
}
|
}
|
||||||
return $haveIt;
|
return $haveIt;
|
||||||
@ -585,7 +585,7 @@ class VirtualPage_Controller extends Page_Controller {
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
$original = $this->copyContentFrom();
|
$original = $this->CopyContentFrom();
|
||||||
$controller = ModelAsController::controller_for($original);
|
$controller = ModelAsController::controller_for($original);
|
||||||
|
|
||||||
// Ensure request/response data is available on virtual controller
|
// Ensure request/response data is available on virtual controller
|
||||||
|
Loading…
Reference in New Issue
Block a user