/**
  * If the user saving this page has approval power, and automatic
  * approvals are enabled, and the page is approvable, and either
  * (a) this page already has an approved revision, or (b) unapproved
  * pages are shown as blank on this wiki, automatically set this
  * latest revision to be the approved one - don't bother logging
  * the approval, though; the log is reserved for manual approvals.
  */
 public static function setLatestAsApproved(&$article, &$user, $text, $summary, $flags, $unused1, $unused2, &$flags, $revision, &$status, $baseRevId)
 {
     if (is_null($revision)) {
         return true;
     }
     $title = $article->getTitle();
     if (!self::userRevsApprovedAutomatically($title)) {
         return true;
     }
     if (!ApprovedRevs::pageIsApprovable($title)) {
         return true;
     }
     global $egApprovedRevsBlankIfUnapproved;
     if (!$egApprovedRevsBlankIfUnapproved) {
         $approvedRevID = ApprovedRevs::getApprovedRevID($title);
         if (empty($approvedRevID)) {
             return true;
         }
     }
     // save approval without logging
     ApprovedRevs::saveApprovedRevIDInDB($title, $revision->getID());
     return true;
 }