예제 #1
0
 /**
  * @param $title Title
  */
 public static function onArticleEdit($title)
 {
     WikiPage::onArticleEdit($title);
 }
예제 #2
0
 /**
  * @param Title $title
  *
  * @deprecated since 1.24, use WikiPage::onArticleEdit() instead
  */
 public static function onArticleEdit($title)
 {
     wfDeprecated(__METHOD__, '1.24');
     WikiPage::onArticleEdit($title);
 }
예제 #3
0
function poArticleProtectComplete(&$article, &$user, $protect, $reason)
{
    // MediaWiki documentation indicates a fifth argument $moveonly (boolean whether it was
    // for move only or not), but there are only four args
    $title = $article->getTitle();
    wfDebugLog('ProtectOwn', 'ArticleProtectComplete: purging title cache' . ' title="' . $title->getPrefixedDBkey() . '"[' . $title->getArticleId() . ']');
    # purge page's restrictions
    $article->getTitle()->mRestrictions = array();
    $article->getTitle()->mRestrictionsLoaded = false;
    //$article->getTitle()->loadRestrictions();
    // Purge caches on page update etc
    WikiPage::onArticleEdit($title);
    // this put update in $wgDeferredUpdateList
    wfDoUpdates();
    // this execute all updates in $wgDeferredUpdateList
    // Update page_touched, this is usually implicit in the page update
    $title->invalidateCache();
    // ask mediawiki to reload search engine cache
    $u = new SearchUpdate($title->getArticleId(), $title->getPrefixedDBkey(), Revision::newFromTitle($title)->getText());
    $u->doUpdate();
    // will call wfRunHooks( 'SearchUpdate', array( $this->mId, $this->mNamespace, $this->mTitle, &$text ) );
    // continue hook processing
    return true;
}