$u->addRight( "sysop" );
$u->addRight( "bureaucrat" );
$u->saveSettings();
+
+ # Set up the new user in the sysop group
+ # This is a bit of an ugly hack
+ global $wgSysopGroupId, $wgBureaucratGroupId;
+ $groups = $u->getGroups();
+ $groups[] = $wgSysopGroupId;
+ $groups[] = $wgBureaucratGroupId;
+ $u->setGroups( $groups );
+ $u->saveSettings();
+
print "<li>Created sysop account <tt>" .
htmlspecialchars( $conf->SysopName ) . "</tt>.</li>\n";
} else {
if (wfRunHooks('ArticleProtect', $this, $wgUser, $limit == 'sysop', $reason, $moveonly)) {
$dbw =& wfGetDB( DB_MASTER );
- $dbw->update( 'cur',
+ $dbw->update( 'page',
array( /* SET */
- 'cur_touched' => $dbw->timestamp(),
- 'cur_restrictions' => $restrictions
+ 'page_touched' => $dbw->timestamp(),
+ 'page_restrictions' => $restrictions
), array( /* WHERE */
- 'cur_id' => $id
+ 'page_id' => $id
), 'Article::protect'
);
# default. A better interface should be coded [av]
$wgAnonGroupId = 1;
$wgLoggedInGroupId = 2;
+$wgSysopGroupId = 3;
+$wgBureaucratGroupId = 4;
/*
When translating messages with wfMsg(), it is not always clear what should