MINOR fix permissions

FEATURE add 'view site tree as' functionality.

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@98025 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Tom Rix 2010-02-03 00:57:45 +00:00 committed by Sam Minnee
parent f3d0a4f54a
commit 80b35d15f2
3 changed files with 4 additions and 2 deletions

View File

@ -28,7 +28,7 @@ abstract class CMSSiteTreeFilter extends Object {
}
$leftAndMain = new CMSMain();
$tree = $leftAndMain->getSiteTreeFor('SiteTree', isset($_REQUEST['ID']) ? $_REQUEST['ID'] : 0, null, null, array($this, 'includeInTree'));
$tree = $leftAndMain->getSiteTreeFor('SiteTree', isset($_REQUEST['ID']) ? $_REQUEST['ID'] : 0, null, null, array($this, 'includeInTree'), count($this->ids));
// Trim off the outer tag
$tree = ereg_replace('^[ \t\r\n]*<ul[^>]*>','', $tree);

View File

@ -57,6 +57,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
public function getEditForm($id) {
$record = null;
if (($id == 'root' || $id == 0) && $this->hasMethod('getRootForm')) return $this->getRootForm($this, 'EditForm');
if($id && $id != 'root') {
$record = DataObject::get_by_id($this->stat('tree_class'), $id);
}