BUGFIX Fixed undefined variable in CMSMain

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92821 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2009-11-21 03:19:49 +00:00
parent 343044e89c
commit 0c52d36846

View File

@ -1204,6 +1204,7 @@ JS;
return new HTTPResponse("Please pass an ID in the form content", 400);
}
$id = (int)$data['ID'];
$restoredPage = Versioned::get_latest_version("SiteTree", $id);
if(!$restoredPage) return new HTTPResponse("SiteTree #$id not found", 400);
@ -1416,7 +1417,7 @@ class CMSMainMarkingFilter {
break;
// Match against exact ClassName
case 'ClassName':
if($val != 'All') {
if($val && $val != 'All') {
$where[] = "\"ClassName\" = '$val'";
}
break;
@ -1429,7 +1430,7 @@ class CMSMainMarkingFilter {
}
$where = empty($where) ? '' : 'WHERE (' . implode(') AND (',$where) . ')';
$parents = array();
/* Do the actual search */