/**
  * Set the text that's stored for the page for standard searches.
  */
 public static function setSearchText(&$article, &$user, $text, $summary, $flags, $unused1, $unused2, &$flags, $revision, &$status, $baseRevId)
 {
     if (is_null($revision)) {
         return true;
     }
     $title = $article->getTitle();
     if (!ApprovedRevs::pageIsApprovable($title)) {
         return true;
     }
     $revisionID = ApprovedRevs::getApprovedRevID($title);
     if (is_null($revisionID)) {
         return true;
     }
     // We only need to modify the search text if the approved
     // revision is not the latest one.
     if ($revisionID != $article->getLatest()) {
         $approvedArticle = new Article($title, $revisionID);
         $approvedText = $approvedArticle->getContent();
         ApprovedRevs::setPageSearchText($title, $approvedText);
     }
     return true;
 }