mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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:
parent
1b65a6bf46
commit
dc5dc6c1a2
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user