示例#1
0
 /**
  *
  * @param WikiPage $article the article that was deleted. WikiPage in MW >= 1.18, Article in 1.17.x and earlier.
  * @param User $user the user that deleted the article
  * @param string $reason
  * @param int $id id of the article that was deleted (added in 1.13)
  * @return boolean true to continue hook processing or false to abort
  */
 public static function onArticleDeleteComplete(&$article, &$user, $reason, $id)
 {
     if (!WpPage::isInWikiplaceNamespaces($article->getTitle()->getNamespace())) {
         return true;
     }
     wfDebugLog('wikiplaces-debug', 'onArticleDeleteComplete() article=[' . $id . ']"' . $article->getTitle()->getPrefixedDBkey() . '"');
     if (!WpPage::delete($id)) {
         wfDebugLog('wikiplaces', 'onArticleDeleteComplete() ERROR: while deleting the Wikiplace page [' . $article->getTitle()->getPrefixedDBkey() . ']');
         throw new MWException('Error while deleting the Wikiplace page.');
     }
     return true;
 }