dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Missing space between variable name and docstring"
[lhc/web/wiklou.git]
/
includes
/
api
/
ApiQueryInfo.php
diff --git
a/includes/api/ApiQueryInfo.php
b/includes/api/ApiQueryInfo.php
index
8a54c0b
..
276aafb
100644
(file)
--- a/
includes/api/ApiQueryInfo.php
+++ b/
includes/api/ApiQueryInfo.php
@@
-118,7
+118,7
@@
class ApiQueryInfo extends ApiQueryBase {
return $this->tokenFunctions;
}
return $this->tokenFunctions;
}
-
static protected
$cachedTokens = [];
+
protected static
$cachedTokens = [];
/**
* @deprecated since 1.24
/**
* @deprecated since 1.24
@@
-411,8
+411,8
@@
class ApiQueryInfo extends ApiQueryBase {
if ( $titleExists ) {
$pageInfo['touched'] = wfTimestamp( TS_ISO_8601, $this->pageTouched[$pageid] );
if ( $titleExists ) {
$pageInfo['touched'] = wfTimestamp( TS_ISO_8601, $this->pageTouched[$pageid] );
- $pageInfo['lastrevid'] =
intval( $this->pageLatest[$pageid] )
;
- $pageInfo['length'] =
intval( $this->pageLength[$pageid] )
;
+ $pageInfo['lastrevid'] =
(int)$this->pageLatest[$pageid]
;
+ $pageInfo['length'] =
(int)$this->pageLength[$pageid]
;
if ( isset( $this->pageIsRedir[$pageid] ) && $this->pageIsRedir[$pageid] ) {
$pageInfo['redirect'] = true;
if ( isset( $this->pageIsRedir[$pageid] ) && $this->pageIsRedir[$pageid] ) {
$pageInfo['redirect'] = true;
@@
-515,10
+515,8
@@
class ApiQueryInfo extends ApiQueryBase {
}
}
}
}
- if ( $this->fld_varianttitles ) {
- if ( isset( $this->variantTitles[$pageid] ) ) {
- $pageInfo['varianttitles'] = $this->variantTitles[$pageid];
- }
+ if ( $this->fld_varianttitles && isset( $this->variantTitles[$pageid] ) ) {
+ $pageInfo['varianttitles'] = $this->variantTitles[$pageid];
}
if ( $this->params['testactions'] ) {
}
if ( $this->params['testactions'] ) {
@@
-710,10
+708,11
@@
class ApiQueryInfo extends ApiQueryBase {
*/
private function getTSIDs() {
$getTitles = $this->talkids = $this->subjectids = [];
*/
private function getTSIDs() {
$getTitles = $this->talkids = $this->subjectids = [];
+ $nsInfo = MediaWikiServices::getInstance()->getNamespaceInfo();
/** @var Title $t */
foreach ( $this->everything as $t ) {
/** @var Title $t */
foreach ( $this->everything as $t ) {
- if (
MWNamespace::
isTalk( $t->getNamespace() ) ) {
+ if (
$nsInfo->
isTalk( $t->getNamespace() ) ) {
if ( $this->fld_subjectid ) {
$getTitles[] = $t->getSubjectPage();
}
if ( $this->fld_subjectid ) {
$getTitles[] = $t->getSubjectPage();
}
@@
-736,12
+735,12
@@
class ApiQueryInfo extends ApiQueryBase {
$this->addWhere( $lb->constructSet( 'page', $db ) );
$res = $this->select( __METHOD__ );
foreach ( $res as $row ) {
$this->addWhere( $lb->constructSet( 'page', $db ) );
$res = $this->select( __METHOD__ );
foreach ( $res as $row ) {
- if (
MWNamespace::
isTalk( $row->page_namespace ) ) {
- $this->talkids[
MWNamespace::
getSubject( $row->page_namespace )][$row->page_title] =
-
intval
( $row->page_id );
+ if (
$nsInfo->
isTalk( $row->page_namespace ) ) {
+ $this->talkids[
$nsInfo->
getSubject( $row->page_namespace )][$row->page_title] =
+
(int)
( $row->page_id );
} else {
} else {
- $this->subjectids[
MWNamespace::
getTalk( $row->page_namespace )][$row->page_title] =
-
intval
( $row->page_id );
+ $this->subjectids[
$nsInfo->
getTalk( $row->page_namespace )][$row->page_title] =
+
(int)
( $row->page_id );
}
}
}
}
}
}