当前位置: 首页>>代码示例>>PHP>>正文


PHP WikiPage::doViewUpdates方法代码示例

本文整理汇总了PHP中WikiPage::doViewUpdates方法的典型用法代码示例。如果您正苦于以下问题:PHP WikiPage::doViewUpdates方法的具体用法?PHP WikiPage::doViewUpdates怎么用?PHP WikiPage::doViewUpdates使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WikiPage的用法示例。


在下文中一共展示了WikiPage::doViewUpdates方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showDiffPage

 /**
  * Show a diff page according to current request variables. For use within
  * Article::view() only, other callers should use the DifferenceEngine class.
  *
  * @todo: make protected
  */
 public function showDiffPage()
 {
     $request = $this->getContext()->getRequest();
     $user = $this->getContext()->getUser();
     $diff = $request->getVal('diff');
     $rcid = $request->getVal('rcid');
     $diffOnly = $request->getBool('diffonly', $user->getOption('diffonly'));
     $purge = $request->getVal('action') == 'purge';
     $unhide = $request->getInt('unhide') == 1;
     $oldid = $this->getOldID();
     $rev = $this->getRevisionFetched();
     if (!$rev) {
         $this->getContext()->getOutput()->setPageTitle(wfMessage('errorpagetitle'));
         $this->getContext()->getOutput()->addWikiMsg('difference-missing-revision', $oldid, 1);
         return;
     }
     $contentHandler = $rev->getContentHandler();
     $de = $contentHandler->createDifferenceEngine($this->getContext(), $oldid, $diff, $rcid, $purge, $unhide);
     // DifferenceEngine directly fetched the revision:
     $this->mRevIdFetched = $de->mNewid;
     $de->showDiffPage($diffOnly);
     if ($diff == 0 || $diff == $this->mPage->getLatest()) {
         # Run view updates for current revision only
         $this->mPage->doViewUpdates($user);
     }
 }
开发者ID:nischayn22,项目名称:mediawiki-core,代码行数:32,代码来源:Article.php

示例2: showDiffPage

 /**
  * Show a diff page according to current request variables. For use within
  * Article::view() only, other callers should use the DifferenceEngine class.
  *
  * @todo Make protected
  */
 public function showDiffPage()
 {
     $request = $this->getContext()->getRequest();
     $user = $this->getContext()->getUser();
     $diff = $request->getVal('diff');
     $rcid = $request->getVal('rcid');
     $diffOnly = $request->getBool('diffonly', $user->getOption('diffonly'));
     $purge = $request->getVal('action') == 'purge';
     $unhide = $request->getInt('unhide') == 1;
     $oldid = $this->getOldID();
     $rev = $this->getRevisionFetched();
     if (!$rev) {
         $this->getContext()->getOutput()->setPageTitle(wfMessage('errorpagetitle'));
         $this->getContext()->getOutput()->addWikiMsg('difference-missing-revision', $oldid, 1);
         return;
     }
     $contentHandler = $rev->getContentHandler();
     $de = $contentHandler->createDifferenceEngine($this->getContext(), $oldid, $diff, $rcid, $purge, $unhide);
     // DifferenceEngine directly fetched the revision:
     $this->mRevIdFetched = $de->mNewid;
     $de->showDiffPage($diffOnly);
     // Run view updates for the newer revision being diffed (and shown
     // below the diff if not $diffOnly).
     list($old, $new) = $de->mapDiffPrevNext($oldid, $diff);
     // New can be false, convert it to 0 - this conveniently means the latest revision
     $this->mPage->doViewUpdates($user, (int) $new);
 }
开发者ID:spring,项目名称:spring-website,代码行数:33,代码来源:Article.php

示例3: showDiffPage

 /**
  * Show a diff page according to current request variables. For use within
  * Article::view() only, other callers should use the DifferenceEngine class.
  */
 public function showDiffPage()
 {
     global $wgRequest, $wgUser;
     $diff = $wgRequest->getVal('diff');
     $rcid = $wgRequest->getVal('rcid');
     $diffOnly = $wgRequest->getBool('diffonly', $wgUser->getGlobalPreference('diffonly'));
     $purge = $wgRequest->getVal('action') == 'purge';
     $unhide = $wgRequest->getInt('unhide') == 1;
     $oldid = $this->getOldID();
     $de = new DifferenceEngine($this->getContext(), $oldid, $diff, $rcid, $purge, $unhide);
     // DifferenceEngine directly fetched the revision:
     $this->mRevIdFetched = $de->mNewid;
     $de->showDiffPage($diffOnly);
     if ($diff == 0 || $diff == $this->mPage->getLatest()) {
         # Run view updates for current revision only
         $this->mPage->doViewUpdates($wgUser);
     }
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:22,代码来源:Article.php


注:本文中的WikiPage::doViewUpdates方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。