BUGFIX: Don't show obsolete page if you refresh the CMS after deleting a page (from r94242)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@96818 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-01-13 00:08:13 +00:00
parent bef0f2f290
commit 7c6623373b

View File

@ -852,6 +852,11 @@ if(node && node.parentTreeNode) node.parentTreeNode.removeTreeNode(node);
$('Form_EditForm').closeIfSetTo($id);
JS;
FormResponse::add($response);
// If we have that page selected currently, then clear that info from the session
if(Session::get("{$this->class}.currentPage") == $id) {
$this->setCurrentPageID(null);
}
if ($this instanceof LeftAndMain) FormResponse::add($this->showSingleInstanceOnlyInCreateFieldJS($page));
return FormResponse::respond();