protected function showPageList()
 {
     if ($this->pager->getNumRows()) {
         $this->getOutput()->addHTML($this->pager->getNavigationBar());
         $this->getOutput()->addHTML($this->pager->getBody());
         $this->getOutput()->addHTML($this->pager->getNavigationBar());
     } else {
         $this->getOutput()->addWikiMsg('configuredpages-none');
     }
     # Purge expired entries on one in every 10 queries
     if (!mt_rand(0, 10)) {
         FRPageConfig::purgeExpiredConfigurations();
     }
 }
 /**
  * Submit the form parameters for the page config to the DB.
  * 
  * @return mixed (true on success, error string on failure)
  */
 public function doSubmit()
 {
     # Double-check permissions
     if (!$this->isAllowed()) {
         return 'stablize_denied';
     }
     # Parse and cleanup the expiry time given...
     $expiry = $this->getExpiry();
     if ($expiry === false) {
         return 'stabilize_expiry_invalid';
     } elseif ($expiry !== Block::infinity() && $expiry < wfTimestampNow()) {
         return 'stabilize_expiry_old';
     }
     # Update the DB row with the new config...
     $changed = FRPageConfig::setStabilitySettings($this->page, $this->getNewConfig());
     # Log if this actually changed anything...
     if ($changed) {
         $article = new FlaggableWikiPage($this->page);
         if (FlaggedRevs::useOnlyIfProtected()) {
             # Config may have changed to allow stable versions, so refresh
             # the tracking table to account for any hidden reviewed versions...
             $frev = FlaggedRevision::determineStable($this->page, FR_MASTER);
             if ($frev) {
                 $article->updateStableVersion($frev);
             } else {
                 $article->clearStableVersion();
             }
         }
         # Update logs and make a null edit
         $nullRev = $this->updateLogsAndHistory($article);
         # Null edit may have been auto-reviewed already
         $frev = FlaggedRevision::newFromTitle($this->page, $nullRev->getId(), FR_MASTER);
         $updatesDone = (bool) $frev;
         // stableVersionUpdates() already called?
         # Check if this null edit is to be reviewed...
         if ($this->reviewThis && !$frev) {
             $flags = null;
             # Review this revision of the page...
             $ok = FlaggedRevs::autoReviewEdit($article, $this->user, $nullRev, $flags, true);
             if ($ok) {
                 FlaggedRevs::markRevisionPatrolled($nullRev);
                 // reviewed -> patrolled
                 $updatesDone = true;
                 // stableVersionUpdates() already called
             }
         }
         # Update page and tracking tables and clear cache.
         if (!$updatesDone) {
             FlaggedRevs::stableVersionUpdates($this->page);
         }
     }
     # Apply watchlist checkbox value (may be NULL)
     $this->updateWatchlist();
     # Take this opportunity to purge out expired configurations
     FRPageConfig::purgeExpiredConfigurations();
     return true;
 }