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


PHP Revision::pageJoinCond方法代码示例

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


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

示例1: doQuery

 /**
  * @param IDatabase $db
  * @return mixed
  */
 public function doQuery($db)
 {
     $ids = array_map('intval', $this->ids);
     $queryInfo = array('tables' => array('revision', 'user'), 'fields' => array_merge(Revision::selectFields(), Revision::selectUserFields()), 'conds' => array('rev_page' => $this->title->getArticleID(), 'rev_id' => $ids), 'options' => array('ORDER BY' => 'rev_id DESC'), 'join_conds' => array('page' => Revision::pageJoinCond(), 'user' => Revision::userJoinCond()));
     ChangeTags::modifyDisplayQuery($queryInfo['tables'], $queryInfo['fields'], $queryInfo['conds'], $queryInfo['join_conds'], $queryInfo['options'], '');
     return $db->select($queryInfo['tables'], $queryInfo['fields'], $queryInfo['conds'], __METHOD__, $queryInfo['options'], $queryInfo['join_conds']);
 }
开发者ID:mb720,项目名称:mediawiki,代码行数:11,代码来源:ChangeTagsRevisionList.php

示例2: doQuery

 /**
  * @param $db DatabaseBase
  * @return mixed
  */
 public function doQuery($db)
 {
     $ids = array_map('intval', $this->ids);
     $live = $db->select(array('revision', 'page', 'user'), array_merge(Revision::selectFields(), Revision::selectUserFields()), array('rev_page' => $this->title->getArticleID(), 'rev_id' => $ids), __METHOD__, array('ORDER BY' => 'rev_id DESC'), array('page' => Revision::pageJoinCond(), 'user' => Revision::userJoinCond()));
     if ($live->numRows() >= count($ids)) {
         // All requested revisions are live, keeps things simple!
         return $live;
     }
     // Check if any requested revisions are available fully deleted.
     $archived = $db->select(array('archive'), '*', array('ar_rev_id' => $ids), __METHOD__, array('ORDER BY' => 'ar_rev_id DESC'));
     if ($archived->numRows() == 0) {
         return $live;
     } elseif ($live->numRows() == 0) {
         return $archived;
     } else {
         // Combine the two! Whee
         $rows = array();
         foreach ($live as $row) {
             $rows[$row->rev_id] = $row;
         }
         foreach ($archived as $row) {
             $rows[$row->ar_rev_id] = $row;
         }
         krsort($rows);
         return new FakeResultWrapper(array_values($rows));
     }
 }
开发者ID:Grprashanthkumar,项目名称:ColfusionWeb,代码行数:31,代码来源:RevisionDelete.php

示例3: doQuery

 /**
  * @param IDatabase $db
  * @return mixed
  */
 public function doQuery($db)
 {
     $ids = array_map('intval', $this->ids);
     $queryInfo = ['tables' => ['revision', 'user'], 'fields' => array_merge(Revision::selectFields(), Revision::selectUserFields()), 'conds' => ['rev_page' => $this->title->getArticleID(), 'rev_id' => $ids], 'options' => ['ORDER BY' => 'rev_id DESC'], 'join_conds' => ['page' => Revision::pageJoinCond(), 'user' => Revision::userJoinCond()]];
     ChangeTags::modifyDisplayQuery($queryInfo['tables'], $queryInfo['fields'], $queryInfo['conds'], $queryInfo['join_conds'], $queryInfo['options'], '');
     $live = $db->select($queryInfo['tables'], $queryInfo['fields'], $queryInfo['conds'], __METHOD__, $queryInfo['options'], $queryInfo['join_conds']);
     if ($live->numRows() >= count($ids)) {
         // All requested revisions are live, keeps things simple!
         return $live;
     }
     $archiveQueryInfo = ['tables' => ['archive'], 'fields' => Revision::selectArchiveFields(), 'conds' => ['ar_rev_id' => $ids], 'options' => ['ORDER BY' => 'ar_rev_id DESC'], 'join_conds' => []];
     ChangeTags::modifyDisplayQuery($archiveQueryInfo['tables'], $archiveQueryInfo['fields'], $archiveQueryInfo['conds'], $archiveQueryInfo['join_conds'], $archiveQueryInfo['options'], '');
     // Check if any requested revisions are available fully deleted.
     $archived = $db->select($archiveQueryInfo['tables'], $archiveQueryInfo['fields'], $archiveQueryInfo['conds'], __METHOD__, $archiveQueryInfo['options'], $archiveQueryInfo['join_conds']);
     if ($archived->numRows() == 0) {
         return $live;
     } elseif ($live->numRows() == 0) {
         return $archived;
     } else {
         // Combine the two! Whee
         $rows = [];
         foreach ($live as $row) {
             $rows[$row->rev_id] = $row;
         }
         foreach ($archived as $row) {
             $rows[$row->ar_rev_id] = $row;
         }
         krsort($rows);
         return new FakeResultWrapper(array_values($rows));
     }
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:35,代码来源:RevDelRevisionList.php

示例4: getQueryInfo

 function getQueryInfo()
 {
     $conds = $this->mConds;
     $conds['rev_page'] = $this->articleID;
     $conds[] = "rev_timestamp < " . $this->mDb->addQuotes($this->maxTimestamp);
     return ['tables' => ['revision', 'page', 'user'], 'fields' => array_merge(Revision::selectFields(), Revision::selectUserFields()), 'conds' => $conds, 'join_conds' => ['page' => Revision::pageJoinCond(), 'user' => Revision::userJoinCond()]];
 }
开发者ID:paladox,项目名称:mediawiki,代码行数:7,代码来源:MergeHistoryPager.php

示例5: doQuery

 /**
  * @param IDatabase $db
  * @return mixed
  */
 public function doQuery($db)
 {
     $conds = ['rev_page' => $this->title->getArticleID()];
     if ($this->ids !== null) {
         $conds['rev_id'] = array_map('intval', $this->ids);
     }
     return $db->select(['revision', 'page', 'user'], array_merge(Revision::selectFields(), Revision::selectUserFields()), $conds, __METHOD__, ['ORDER BY' => 'rev_id DESC'], ['page' => Revision::pageJoinCond(), 'user' => Revision::userJoinCond()]);
 }
开发者ID:claudinec,项目名称:galan-wiki,代码行数:12,代码来源:RevisionList.php

示例6: getQueryInfo

 function getQueryInfo()
 {
     list($tables, $index, $userCond, $join_cond) = $this->getUserCond();
     $user = $this->getUser();
     $conds = array_merge($userCond, $this->getNamespaceCond());
     // Paranoia: avoid brute force searches (bug 17342)
     if (!$user->isAllowed('deletedhistory')) {
         $conds[] = $this->mDb->bitAnd('rev_deleted', Revision::DELETED_USER) . ' = 0';
     } elseif (!$user->isAllowed('suppressrevision')) {
         $conds[] = $this->mDb->bitAnd('rev_deleted', Revision::SUPPRESSED_USER) . ' != ' . Revision::SUPPRESSED_USER;
     }
     # Don't include orphaned revisions
     $join_cond['page'] = Revision::pageJoinCond();
     # Get the current user name for accounts
     $join_cond['user'] = Revision::userJoinCond();
     $queryInfo = array('tables' => $tables, 'fields' => array_merge(Revision::selectFields(), Revision::selectUserFields(), array('page_namespace', 'page_title', 'page_is_new', 'page_latest', 'page_is_redirect', 'page_len')), 'conds' => $conds, 'options' => array('USE INDEX' => array('revision' => $index)), 'join_conds' => $join_cond);
     ChangeTags::modifyDisplayQuery($queryInfo['tables'], $queryInfo['fields'], $queryInfo['conds'], $queryInfo['join_conds'], $queryInfo['options'], $this->tagFilter);
     wfRunHooks('ContribsPager::getQueryInfo', array(&$this, &$queryInfo));
     return $queryInfo;
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:20,代码来源:SpecialContributions.php

示例7: getQueryInfo

	function getQueryInfo() {
		$conds = $this->mConds;
		$conds['rev_page'] = $this->articleID;
		$conds[] = "rev_timestamp < {$this->maxTimestamp}";

		return array(
			'tables' => array( 'revision', 'page', 'user' ),
			'fields' => array_merge( Revision::selectFields(), Revision::selectUserFields() ),
			'conds' => $conds,
			'join_conds' => array(
				'page' => Revision::pageJoinCond(),
				'user' => Revision::userJoinCond() )
		);
	}
开发者ID:nahoj,项目名称:mediawiki_ynh,代码行数:14,代码来源:SpecialMergeHistory.php


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