mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR: Replaced usage of the deprecated SiteTree::get_by_url() with get_by_link().
From: Andrew Short <andrewjshort@gmail.com> git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@88514 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
982d79e7e1
commit
0362821d7a
4
code/CMSMain.php
Normal file → Executable file
4
code/CMSMain.php
Normal file → Executable file
@ -229,7 +229,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
||||
$allowedChildren = $obj->allowedChildren();
|
||||
if($allowedChildren != "none") $def[$class]['allowedChildren'] = $allowedChildren;
|
||||
$def[$class]['defaultChild'] = $obj->defaultChild();
|
||||
$def[$class]['defaultParent'] = isset(SiteTree::get_by_url($obj->defaultParent())->ID) ? SiteTree::get_by_url($obj->defaultParent())->ID : null;
|
||||
$def[$class]['defaultParent'] = isset(SiteTree::get_by_link($obj->defaultParent())->ID) ? SiteTree::get_by_link($obj->defaultParent())->ID : null;
|
||||
|
||||
if(is_array($allowedChildren)) foreach($allowedChildren as $allowedChild) {
|
||||
$def[$allowedChild]['allowedParents'][] = $class;
|
||||
@ -479,7 +479,7 @@ JS;
|
||||
$suffix = isset($_REQUEST['Suffix']) ? "-" . $_REQUEST['Suffix'] : null;
|
||||
|
||||
if(!$parent && isset($_REQUEST['Parent'])) {
|
||||
$page = SiteTree::get_by_url($_REQUEST['Parent']);
|
||||
$page = SiteTree::get_by_link($_REQUEST['Parent']);
|
||||
if($page) $parent = $page->ID;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user