mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
ENHANCEMENT Don't give an error if ContentController::childrenOf() can't find the parent page, since this error isn't that useful
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@80341 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2bbe7dc87d
commit
628a0b7b88
@ -66,12 +66,7 @@ class ContentController extends Controller {
|
||||
$parent = DataObject::get_one('SiteTree', "\"URLSegment\" = '$SQL_parentRef'");
|
||||
|
||||
if(!$parent && is_numeric($parentRef)) $parent = DataObject::get_by_id('SiteTree', $SQL_parentRef);
|
||||
if($parent) {
|
||||
return $parent->Children();
|
||||
} else {
|
||||
user_error("Error running <% control ChildrenOf($parentRef) %>: page '$parentRef' couldn't be found", E_USER_WARNING);
|
||||
}
|
||||
|
||||
if($parent) return $parent->Children();
|
||||
}
|
||||
|
||||
public function Page($url) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user