'createtalk',
'delete',
'deletedhistory',
+ 'deleterevision',
'edit',
'editinterface',
'editusercssjs',
+ 'hideuser',
'import',
'importupload',
'ipblock-exempt',
'proxyunbannable',
'purge',
'read',
+ 'reset-passwords',
'reupload',
'reupload-shared',
'rollback',
'siteadmin',
+ 'suppressionlog',
'suppressredirect',
+ 'suppressrevision',
'trackback',
'undelete',
'unwatchedpages',
'upload',
'upload_by_url',
'userrights',
+ 'userrights-interwiki',
+ 'writeapi',
);
/**
* \string Cached results of getAllRights()
$this->mDataLoaded = true;
if ( isset( $row->user_id ) ) {
- $this->mId = $row->user_id;
+ $this->mId = intval( $row->user_id );
}
$this->mName = $row->user_name;
$this->mRealName = $row->user_real_name;
wfRunHooks( 'UserToggles', array( &$extraToggles ) );
if( $wgUseRCPatrol ) {
$extraToggles[] = 'hidepatrolled';
+ $extraToggles[] = 'newpageshidepatrolled';
$extraToggles[] = 'watchlisthidepatrolled';
}
return array_merge( self::$mToggles, $extraToggles, $wgContLang->getExtraUserToggles() );
*/
public function isPingLimitable() {
global $wgRateLimitsExcludedGroups;
+ global $wgRateLimitsExcludedIPs;
if( array_intersect( $this->getEffectiveGroups(), $wgRateLimitsExcludedGroups ) ) {
// Deprecated, but kept for backwards-compatibility config
return false;
}
+ if( in_array( wfGetIP(), $wgRateLimitsExcludedIPs ) ) {
+ // No other good way currently to disable rate limits
+ // for specific IPs. :P
+ // But this is a crappy hack and should die.
+ return false;
+ }
return !$this->isAllowed('noratelimit');
}
return $this->mBlockreason;
}
+ /**
+ * If user is blocked, return the ID for the block
+ * @return \int Block ID
+ */
+ function getBlockId() {
+ $this->getBlockedStatus();
+ return ($this->mBlock ? $this->mBlock->mId : false);
+ }
+
/**
* Check if user is blocked on all wikis.
* Do not use for actual edit permission checks!
if( $action === 'patrol' || $action === 'autopatrol' ) {
global $wgUseRCPatrol, $wgUseNPPatrol;
if( !$wgUseRCPatrol && !$wgUseNPPatrol )
- return true;
+ return false;
}
# Use strict parameter to avoid matching numeric 0 accidentally inserted
# by misconfiguration: 0 == 'foo'