]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/Autopromote.php
MediaWiki 1.16.0
[autoinstallsdev/mediawiki.git] / includes / Autopromote.php
index c8a4c03b278d0e2d306da1d7d172341885ec9b18..c0adff43a47779accb5e0d0f371322eeca376ee3 100644 (file)
@@ -1,5 +1,4 @@
 <?php
-
 /**
  * This class checks if user can get extra rights
  * because of conditions specified in $wgAutopromote
@@ -18,9 +17,9 @@ class Autopromote {
                        if( self::recCheckCondition( $cond, $user ) )
                                $promote[] = $group;
                }
-               
+
                wfRunHooks( 'GetAutoPromoteGroups', array( $user, &$promote ) );
-               
+
                return $promote;
        }
 
@@ -116,6 +115,8 @@ class Autopromote {
                                return $cond[1] == wfGetIP();
                        case APCOND_IPINRANGE:
                                return IP::isInRange( wfGetIP(), $cond[1] );
+                       case APCOND_BLOCKED:
+                               return $user->isBlocked();
                        default:
                                $result = null;
                                wfRunHooks( 'AutopromoteCondition', array( $cond[0], array_slice( $cond, 1 ), $user, &$result ) );