本文整理汇总了PHP中WikiPage::onArticleEdit方法的典型用法代码示例。如果您正苦于以下问题:PHP WikiPage::onArticleEdit方法的具体用法?PHP WikiPage::onArticleEdit怎么用?PHP WikiPage::onArticleEdit使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WikiPage
的用法示例。
在下文中一共展示了WikiPage::onArticleEdit方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onArticleEdit
/**
* @param $title Title
*/
public static function onArticleEdit($title)
{
WikiPage::onArticleEdit($title);
}
示例2: onArticleEdit
/**
* @param Title $title
*
* @deprecated since 1.24, use WikiPage::onArticleEdit() instead
*/
public static function onArticleEdit($title)
{
wfDeprecated(__METHOD__, '1.24');
WikiPage::onArticleEdit($title);
}
示例3: poArticleProtectComplete
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;
}