BUGFIX Using 'SiteTree' classname instead of 'Page' in UpgradeSiteTreePermissionSchemaTask to avoid clashes in schema when Page.php has its own tables

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@65538 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-11-10 18:59:01 +00:00
parent 1b65a6bf46
commit dc5dc6c1a2

View File

@ -30,7 +30,7 @@ class UpgradeSiteTreePermissionSchemaTask extends BuildTask {
// convert has_many to many_many
$pageIDs = DB::query("SELECT ID FROM SiteTree")->column('ID');
foreach($pageIDs as $pageID) {
$page = DataObject::get_by_id('Page', $pageID);
$page = DataObject::get_by_id('SiteTree', $pageID);
if($page->ViewersGroup) $page->ViewerGroups()->add($page->ViewersGroup);
if($page->EditorsGroup) $page->EditorGroups()->add($page->EditorsGroup);