Ejemplo n.º 1
0
 ############################
 case 36:
     $blockMessage = "Blocked (account is still eligible if only blocked on one wiki).";
     $blockMessageMultiple = "Blocked on more than one wiki.";
     $blockClass = "is-warn";
     $blockCount = 0;
     $editCount = 0;
     $editCountRecent = 0;
     $script->printWiki();
     do {
         $script->eligible = true;
         ########
         ## Not  blocked on more than one wiki
         ########
         $isBlocked = $script->currently_blocked();
         $script->condition(!$isBlocked, "not blocked...", $blockMessage, "", $blockClass);
         if ($isBlocked) {
             $blockCount++;
             $blockClass = "";
             $blockMessage = $blockMessageMultiple;
         }
         ########
         ## Not a bot
         ########
         $script->condition(!$script->has_role('bot'), "no bot flag...", "has a bot flag: this account is not eligible.", "", "is-fail");
         ########
         ## >=300 edits before 2015-04-15
         ########
         $edits = $script->edit_count(NULL, 20150415235959.0);
         $script->condition($edits >= 300, "has 300 edits before 15 April 2015 (has {$edits})...", "does not have 300 edits before 15 April 2015 (has {$edits}); edits can be combined across wikis.", "", "is-warn");
         $editCount += $edits;