/**
  * @param $article WikiPage
  * @param bool $wgUser
  * @param bool $reason
  * @param bool $error
  * @return bool
  */
 public static function onArticleDelete(&$article, &$wgUser = false, &$reason = false, &$error = false)
 {
     $id = $article->mTitle->getArticleID();
     $dbr = wfGetDB(DB_SLAVE);
     if ((int) $id > 0) {
         $res = $dbr->select(array('imagelinks'), array('il_to'), array('il_from=' . $id), __METHOD__);
         while ($s = $res->fetchObject()) {
             $title = Title::newFromDBkey($s->il_to);
             if (!empty($title)) {
                 $mq = new self($title);
                 $mq->unsetCache();
             }
         }
     }
     return true;
 }
 /**
  * @static
  * @param WikiPage $article
  * @param $editInfo
  * @param $changed
  * @return bool
  */
 public static function onArticleEditUpdates(&$article, &$editInfo, $changed)
 {
     // article links are updated, so we invalidate the cache
     $title = $article->getTitle();
     $mqs = new self();
     $mqs->unsetCache($title);
     return true;
 }