/**
  * Handle the 'unapprove' action, defined for ApprovedRevs -
  * unset the previously-approved revision, log the change, and show
  * a message to the user.
  */
 static function unsetAsApproved($action, $article)
 {
     // return "true" if the call failed (meaning, pass on handling
     // of the hook to others), and "false" otherwise
     if ($action != 'unapprove') {
         return true;
     }
     $title = $article->getTitle();
     if (!$title->userCan('approverevisions')) {
         return true;
     }
     ApprovedRevs::unsetApproval($title);
     // the message depends on whether the page should display
     // a blank right now or not
     global $egApprovedRevsBlankIfUnapproved;
     if ($egApprovedRevsBlankIfUnapproved) {
         $successMsg = wfMsg('approvedrevs-unapprovesuccess2');
     } else {
         $successMsg = wfMsg('approvedrevs-unapprovesuccess');
     }
     global $wgOut;
     $wgOut->addHTML('		' . Xml::element('div', array('class' => 'successbox'), $successMsg) . "\n");
     $wgOut->addHTML('		' . Xml::element('p', array('style' => 'clear: both')) . "\n");
     // show the revision, instead of the history page
     $article->doPurge();
     $article->view();
     return false;
 }