# Silently ignore EDIT_MINOR if not allowed
$isminor = ( $flags & EDIT_MINOR ) && $wgUser->isAllowed('minoredit');
- $bot = $wgUser->isBot() || ( $flags & EDIT_FORCE_BOT );
+ $bot = $wgUser->isAllowed( 'bot' ) || ( $flags & EDIT_FORCE_BOT );
$text = $this->preSaveTransform( $text );
$newId = 0)
{
if ( $bot == 'default' ) {
- $bot = $user->isBot();
+ $bot = $user->isAllowed( 'bot' );
}
if ( !$ip ) {
}
}
if ( $bot == 'default' ) {
- $bot = $user->isBot();
+ $bot = $user->isAllowed( 'bot' );
}
$rc = new RecentChange;
'rc_comment' => $comment,
'rc_this_oldid' => 0,
'rc_last_oldid' => 0,
- 'rc_bot' => $user->isBot() ? 1 : 0,
+ 'rc_bot' => $user->isAllowed( 'bot' ) ? 1 : 0,
'rc_moved_to_ns' => $newTitle->getNamespace(),
'rc_moved_to_title' => $newTitle->getDBkey(),
'rc_ip' => $ip,
'rc_comment' => $comment,
'rc_this_oldid' => 0,
'rc_last_oldid' => 0,
- 'rc_bot' => $user->isBot() ? 1 : 0,
+ 'rc_bot' => $user->isAllowed( 'bot' ) ? 1 : 0,
'rc_moved_to_ns' => 0,
'rc_moved_to_title' => '',
'rc_ip' => $ip,
*/
function isSysop() {
throw new MWException( "Call to deprecated (v1.7) User::isSysop() method\n" );
- #return $this->isAllowed( 'protect' );
}
/**
*/
function isDeveloper() {
throw new MWException( "Call to deprecated (v1.7) User::isDeveloper() method\n" );
- #return $this->isAllowed( 'siteadmin' );
}
/**
*/
function isBureaucrat() {
throw new MWException( "Call to deprecated (v1.7) User::isBureaucrat() method\n" );
- #return $this->isAllowed( 'makesysop' );
}
/**
* Whether the user is a bot
- * @todo need to be migrated to the new user level management sytem
+ * @deprecated
*/
function isBot() {
- $this->loadFromDatabase();
- return in_array( 'bot', $this->mRights );
+ return $this->isAllowed( 'bot' );
}
/**