本文整理匯總了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;
}