mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
BUGFIX: Fixed refactoring of getRecord() so that it can handle currentPage() calls properly.
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.3@75614 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d33c2869a7
commit
62f9202c00
@ -450,8 +450,10 @@ class LeftAndMain extends Controller {
|
||||
}
|
||||
|
||||
public function getRecord($id, $className = null) {
|
||||
if(!$className) $className = $this->stat('tree_class');
|
||||
return DataObject::get_by_id($className, $id);
|
||||
if($id && is_numeric($id)) {
|
||||
if(!$className) $className = $this->stat('tree_class');
|
||||
return DataObject::get_by_id($className, $id);
|
||||
}
|
||||
}
|
||||
|
||||
function getSiteTreeFor($className, $rootID = null) {
|
||||
|
Loading…
Reference in New Issue
Block a user