Skip to content

Commit

Permalink
Merge pull request #3346 from NamelessMC/develop
Browse files Browse the repository at this point in the history
Update migrations for 2.1.0
  • Loading branch information
samerton authored May 1, 2023
2 parents c357a79 + 3cb4f74 commit f5e1a2e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/includes/updates/203.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ public function run(): void {
// Add all groups to member list selectable groups
Util::setSetting('member_list_viewable_groups', json_encode(array_map(static fn (Group $group) => $group->id, Group::all())), 'Members');

Config::set('core.installed', true);

// Ensure admin group has administrator perm
$admin_group = DB::getInstance()->query('SELECT permissions FROM nl2_groups WHERE id = 2')->first();
$perms = json_decode($admin_group->permissions, true);
$perms['administrator'] = 1;
DB::getInstance()->query('UPDATE nl2_groups SET permissions = ? WHERE id = 2', [json_encode($perms)]);

$this->setVersion('2.1.0');
}
};

0 comments on commit f5e1a2e

Please sign in to comment.