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:
Sean Harvey 2009-06-29 04:53:15 +00:00
parent 2bbe7dc87d
commit 628a0b7b88

View File

@ -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) {