Siebrand has uploaded a new change for review.
https://gerrit.wikimedia.org/r/95371
Change subject: Update formatting
......................................................................
Update formatting
Change-Id: I6087573dfdc6edcd63062508056ebcf3502e03f2
---
M includes/api/ApiQueryRevisions.php
M includes/api/ApiQuerySearch.php
M includes/api/ApiQuerySiteinfo.php
M includes/api/ApiQueryStashImageInfo.php
M includes/api/ApiQueryTags.php
M includes/api/ApiQueryUserContributions.php
M includes/api/ApiQueryUserInfo.php
M includes/api/ApiQueryUsers.php
M includes/api/ApiQueryWatchlist.php
M includes/api/ApiQueryWatchlistRaw.php
10 files changed, 91 insertions(+), 58 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core
refs/changes/71/95371/1
diff --git a/includes/api/ApiQueryRevisions.php
b/includes/api/ApiQueryRevisions.php
index 415288e..4be1594 100644
--- a/includes/api/ApiQueryRevisions.php
+++ b/includes/api/ApiQueryRevisions.php
@@ -41,8 +41,8 @@
}
private $fld_ids = false, $fld_flags = false, $fld_timestamp = false,
$fld_size = false, $fld_sha1 = false,
- $fld_comment = false, $fld_parsedcomment = false,
$fld_user = false, $fld_userid = false,
- $fld_content = false, $fld_tags = false,
$fld_contentmodel = false;
+ $fld_comment = false, $fld_parsedcomment = false, $fld_user =
false, $fld_userid = false,
+ $fld_content = false, $fld_tags = false, $fld_contentmodel =
false;
private $tokenFunctions;
@@ -65,6 +65,7 @@
'rollback' => array( 'ApiQueryRevisions',
'getRollbackToken' )
);
wfRunHooks( 'APIQueryRevisionsTokens', array(
&$this->tokenFunctions ) );
+
return $this->tokenFunctions;
}
@@ -79,6 +80,7 @@
if ( !$wgUser->isAllowed( 'rollback' ) ) {
return false;
}
+
return $wgUser->getEditToken(
array( $title->getPrefixedText(), $rev->getUserText() )
);
}
@@ -91,9 +93,9 @@
// Enumerating revisions on multiple pages make it extremely
// difficult to manage continuations and require additional SQL
indexes
$enumRevMode = ( !is_null( $params['user'] ) || !is_null(
$params['excludeuser'] ) ||
- !is_null( $params['limit'] ) || !is_null(
$params['startid'] ) ||
- !is_null( $params['endid'] ) || $params['dir']
=== 'newer' ||
- !is_null( $params['start'] ) || !is_null(
$params['end'] ) );
+ !is_null( $params['limit'] ) || !is_null(
$params['startid'] ) ||
+ !is_null( $params['endid'] ) || $params['dir'] ===
'newer' ||
+ !is_null( $params['start'] ) || !is_null(
$params['end'] ) );
$pageSet = $this->getPageSet();
$pageCount = $pageSet->getGoodTitleCount();
@@ -119,7 +121,8 @@
$params['diffto'] = 0;
}
if ( ( !ctype_digit( $params['diffto'] ) ||
$params['diffto'] < 0 )
- && $params['diffto'] != 'prev' &&
$params['diffto'] != 'next' ) {
+ && $params['diffto'] != 'prev' &&
$params['diffto'] != 'next'
+ ) {
$this->dieUsage( 'rvdiffto must be set to a
non-negative number, "prev", "next" or "cur"', 'diffto' );
}
// Check whether the revision exists and is readable,
@@ -349,7 +352,7 @@
$this->addOption( 'ORDER BY', array(
'rev_page',
'rev_id'
- ));
+ ) );
// assumption testing -- we should never get more then
$pageCount rows.
$limit = $pageCount;
@@ -364,7 +367,7 @@
$res = $this->select( __METHOD__ );
foreach ( $res as $row ) {
- if ( ++ $count > $limit ) {
+ if ( ++$count > $limit ) {
// We've reached the one extra which shows that
there are additional pages to be had. Stop here...
if ( !$enumRevMode ) {
ApiBase::dieDebug( __METHOD__, 'Got
more rows then expected' ); // bug report
@@ -518,8 +521,8 @@
$vals['parsetree'] = $xml;
} else {
$this->setWarning( "Conversion to XML
is supported for wikitext only, " .
-
$title->getPrefixedDBkey() .
-
" uses content model " . $content->getModel() );
+ $title->getPrefixedDBkey() .
+ " uses content model " .
$content->getModel() );
}
}
@@ -550,7 +553,7 @@
$name = $title->getPrefixedDBkey();
$this->dieUsage( "The requested format
{$this->contentFormat} is not supported " .
- "for
content model $model used by $name", 'badformat' );
+ "for content model $model used
by $name", 'badformat' );
}
$text = $content->serialize( $format );
@@ -588,12 +591,13 @@
$model = $title->getContentModel();
if ( $this->contentFormat
- &&
!ContentHandler::getForModelID( $model )->isSupportedFormat(
$this->contentFormat ) ) {
+ &&
!ContentHandler::getForModelID( $model )->isSupportedFormat(
$this->contentFormat )
+ ) {
$name =
$title->getPrefixedDBkey();
$this->dieUsage( "The requested
format {$this->contentFormat} is not supported for " .
-
"content model $model used by $name", 'badformat' );
+ "content model $model
used by $name", 'badformat' );
}
$difftocontent =
ContentHandler::makeContent( $this->difftotext, $title, $model,
$this->contentFormat );
@@ -614,6 +618,7 @@
$vals['diff']['notcached'] = '';
}
}
+
return $vals;
}
@@ -625,6 +630,7 @@
// formatComment() calls wfMessage() among other things
return 'anon-public-user-private';
}
+
return 'public';
}
@@ -700,6 +706,7 @@
public function getParamDescription() {
$p = $this->getModulePrefix();
+
return array(
'prop' => array(
'Which properties to get for each revision:',
@@ -819,17 +826,17 @@
return array_merge( parent::getPossibleErrors(), array(
array( 'nosuchrevid', 'diffto' ),
array( 'code' => 'revids', 'info' => 'The revids=
parameter may not be used with the list options '
- . '(limit, startid, endid, dirNewer,
start, end).' ),
+ . '(limit, startid, endid, dirNewer, start,
end).' ),
array( 'code' => 'multpages', 'info' => 'titles,
pageids or a generator was used to supply multiple pages, '
- . ' but the limit, startid, endid,
dirNewer, user, excludeuser, '
- . 'start and end parameters may only be
used on a single page.' ),
+ . ' but the limit, startid, endid, dirNewer,
user, excludeuser, '
+ . 'start and end parameters may only be used on
a single page.' ),
array( 'code' => 'diffto', 'info' => 'rvdiffto must be
set to a non-negative number, "prev", "next" or "cur"' ),
array( 'code' => 'badparams', 'info' => 'start and
startid cannot be used together' ),
array( 'code' => 'badparams', 'info' => 'end and endid
cannot be used together' ),
array( 'code' => 'badparams', 'info' => 'user and
excludeuser cannot be used together' ),
array( 'code' => 'nosuchsection', 'info' => 'There is
no section section in rID' ),
array( 'code' => 'badformat', 'info' => 'The requested
serialization format can not be applied '
-
. ' to the page\'s content model' ),
+ . ' to the page\'s content model' ),
) );
}
diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php
index 36b5597..8f094fa 100644
--- a/includes/api/ApiQuerySearch.php
+++ b/includes/api/ApiQuerySearch.php
@@ -112,12 +112,12 @@
$totalhits = $matches->getTotalHits();
if ( $totalhits !== null ) {
$apiResult->addValue( array( 'query',
'searchinfo' ),
- 'totalhits', $totalhits );
+ 'totalhits', $totalhits );
}
}
if ( isset( $searchInfo['suggestion'] ) &&
$matches->hasSuggestion() ) {
$apiResult->addValue( array( 'query', 'searchinfo' ),
- 'suggestion',
$matches->getSuggestionQuery() );
+ 'suggestion', $matches->getSuggestionQuery() );
}
// Add the search results to the result
@@ -127,7 +127,7 @@
$result = $matches->next();
while ( $result ) {
- if ( ++ $count > $limit ) {
+ if ( ++$count > $limit ) {
// We've reached the one extra which shows that
there are additional items to be had. Stop here...
$this->setContinueEnumParameter( 'offset',
$params['offset'] + $params['limit'] );
break;
@@ -184,7 +184,7 @@
// Add item to results and see whether it fits
$fit = $apiResult->addValue( array( 'query',
$this->getModuleName() ),
- null, $vals );
+ null, $vals );
if ( !$fit ) {
$this->setContinueEnumParameter(
'offset', $params['offset'] + $count - 1 );
break;
@@ -198,8 +198,8 @@
if ( is_null( $resultPageSet ) ) {
$apiResult->setIndexedTagName_internal( array(
- 'query', $this->getModuleName()
- ), 'p' );
+ 'query', $this->getModuleName()
+ ), 'p' );
} else {
$resultPageSet->populateFromTitles( $titles );
}
diff --git a/includes/api/ApiQuerySiteinfo.php
b/includes/api/ApiQuerySiteinfo.php
index ebd3fc0..57eb41e 100644
--- a/includes/api/ApiQuerySiteinfo.php
+++ b/includes/api/ApiQuerySiteinfo.php
@@ -106,7 +106,7 @@
// Abuse siprop as a query-continue parameter
// and set it to all unprocessed props
$this->setContinueEnumParameter( 'prop',
implode( '|',
- array_diff( $params['prop'],
$done ) ) );
+ array_diff( $params['prop'], $done ) )
);
break;
}
$done[] = $p;
@@ -114,9 +114,7 @@
}
protected function appendGeneralInfo( $property ) {
- global $wgContLang,
- $wgDisableLangConversion,
- $wgDisableTitleConversion;
+ global $wgContLang, $wgDisableLangConversion,
$wgDisableTitleConversion;
$data = array();
$mainPage = Title::newMainPage();
@@ -280,6 +278,7 @@
}
$this->getResult()->setIndexedTagName( $data, 'ns' );
+
return $this->getResult()->addValue( 'query', $property, $data
);
}
@@ -303,6 +302,7 @@
sort( $data );
$this->getResult()->setIndexedTagName( $data, 'ns' );
+
return $this->getResult()->addValue( 'query', $property, $data
);
}
@@ -318,6 +318,7 @@
}
}
$this->getResult()->setIndexedTagName( $data, 'specialpage' );
+
return $this->getResult()->addValue( 'query', $property, $data
);
}
@@ -334,6 +335,7 @@
$data[] = $arr;
}
$this->getResult()->setIndexedTagName( $data, 'magicword' );
+
return $this->getResult()->addValue( 'query', $property, $data
);
}
@@ -379,6 +381,7 @@
}
$this->getResult()->setIndexedTagName( $data, 'iw' );
+
return $this->getResult()->addValue( 'query', $property, $data
);
}
@@ -410,6 +413,7 @@
$result = $this->getResult();
$result->setIndexedTagName( $data, 'db' );
+
return $this->getResult()->addValue( 'query', $property, $data
);
}
@@ -450,7 +454,6 @@
if ( $group == 'user' ) {
$arr['number'] = SiteStats::users();
-
// '*' and autopromote groups have no size
} elseif ( $group !== '*' && !isset(
$wgAutopromote[$group] ) ) {
$arr['number'] =
SiteStats::numberInGroup( $group );
@@ -476,6 +479,7 @@
}
$result->setIndexedTagName( $data, 'group' );
+
return $result->addValue( 'query', $property, $data );
}
@@ -487,6 +491,7 @@
$data[] = array( 'ext' => $ext );
}
$this->getResult()->setIndexedTagName( $data, 'fe' );
+
return $this->getResult()->addValue( 'query', $property, $data
);
}
@@ -521,18 +526,19 @@
$ret['url'] = $ext['url'];
}
if ( isset( $ext['version'] ) ) {
- $ret['version'] =
$ext['version'];
+ $ret['version'] = $ext['version'];
} elseif ( isset( $ext['svn-revision'] ) &&
preg_match(
'/\$(?:Rev|LastChangedRevision|Revision): *(\d+)/',
- $ext['svn-revision'], $m ) )
- {
- $ret['version'] = 'r' . $m[1];
+ $ext['svn-revision'], $m )
+ ) {
+ $ret['version'] = 'r' . $m[1];
}
$data[] = $ret;
}
}
$this->getResult()->setIndexedTagName( $data, 'ext' );
+
return $this->getResult()->addValue( 'query', $property, $data
);
}
@@ -566,6 +572,7 @@
$data[] = $lang;
}
$this->getResult()->setIndexedTagName( $data, 'lang' );
+
return $this->getResult()->addValue( 'query', $property, $data
);
}
@@ -585,6 +592,7 @@
$data[] = $skin;
}
$this->getResult()->setIndexedTagName( $data, 'skin' );
+
return $this->getResult()->addValue( 'query', $property, $data
);
}
@@ -593,6 +601,7 @@
$wgParser->firstCallInit();
$tags = array_map( array( $this, 'formatParserTags' ),
$wgParser->getTags() );
$this->getResult()->setIndexedTagName( $tags, 't' );
+
return $this->getResult()->addValue( 'query', $property, $tags
);
}
@@ -601,12 +610,14 @@
$wgParser->firstCallInit();
$hooks = $wgParser->getFunctionHooks();
$this->getResult()->setIndexedTagName( $hooks, 'h' );
+
return $this->getResult()->addValue( 'query', $property, $hooks
);
}
public function appendVariables( $property ) {
$variables = MagicWord::getVariableIDs();
$this->getResult()->setIndexedTagName( $variables, 'v' );
+
return $this->getResult()->addValue( 'query', $property,
$variables );
}
@@ -615,6 +626,7 @@
// Make a copy of the global so we don't try to set the
_element key of it - bug 45130
$protocols = array_values( $wgUrlProtocols );
$this->getResult()->setIndexedTagName( $protocols, 'p' );
+
return $this->getResult()->addValue( 'query', $property,
$protocols );
}
@@ -639,6 +651,7 @@
}
$this->getResult()->setIndexedTagName( $data, 'hook' );
+
return $this->getResult()->addValue( 'query', $property, $data
);
}
@@ -687,6 +700,7 @@
public function getParamDescription() {
$p = $this->getModulePrefix();
+
return array(
'prop' => array(
'Which sysinfo properties to get:',
@@ -696,14 +710,14 @@
' specialpagealiases - List of special page
aliases',
' magicwords - List of magic words
and their aliases',
' statistics - Returns site
statistics',
- " interwikimap - Returns interwiki map
" .
+ ' interwikimap - Returns interwiki map
' .
"(optionally filtered, (optionally
localised by using {$p}inlanguagecode))",
' dbrepllag - Returns database
server with the highest replication lag',
' usergroups - Returns user groups
and the associated permissions',
' extensions - Returns extensions
installed on the wiki',
' fileextensions - Returns list of file
extensions allowed to be uploaded',
' rightsinfo - Returns wiki rights
(license) information if available',
- " languages - Returns a list of
languages MediaWiki supports" .
+ ' languages - Returns a list of
languages MediaWiki supports' .
"(optionally localised by using
{$p}inlanguagecode)",
' skins - Returns a list of all
enabled skins',
' extensiontags - Returns a list of
parser extension tags',
diff --git a/includes/api/ApiQueryStashImageInfo.php
b/includes/api/ApiQueryStashImageInfo.php
index 6899375..f714227 100644
--- a/includes/api/ApiQueryStashImageInfo.php
+++ b/includes/api/ApiQueryStashImageInfo.php
@@ -60,7 +60,7 @@
$result->addValue( array( 'query',
$this->getModuleName() ), null, $imageInfo );
$result->setIndexedTagName_internal( array(
'query', $this->getModuleName() ), $modulePrefix );
}
- //TODO: update exception handling here to understand current
getFile exceptions
+ // @todo Update exception handling here to understand current
getFile exceptions
} catch ( UploadStashNotAvailableException $e ) {
$this->dieUsage( "Session not available: " .
$e->getMessage(), "nosession" );
} catch ( UploadStashFileNotFoundException $e ) {
@@ -112,6 +112,7 @@
*/
public function getParamDescription() {
$p = $this->getModulePrefix();
+
return array(
'prop' => self::getPropertyDescriptions(
$this->propertyFilter, $p ),
'filekey' => 'Key that identifies a previous upload
that was stashed temporarily.',
@@ -137,5 +138,4 @@
'api.php?action=query&prop=stashimageinfo&siifilekey=b34edoe3|bceffd4&siiurlwidth=120&siiprop=url',
);
}
-
}
diff --git a/includes/api/ApiQueryTags.php b/includes/api/ApiQueryTags.php
index 732df9a..33116ce 100644
--- a/includes/api/ApiQueryTags.php
+++ b/includes/api/ApiQueryTags.php
@@ -38,7 +38,7 @@
private $limit;
private $fld_displayname = false, $fld_description = false,
- $fld_hitcount = false;
+ $fld_hitcount = false;
public function __construct( $query, $moduleName ) {
parent::__construct( $query, $moduleName, 'tg' );
@@ -97,6 +97,7 @@
if ( ++$count > $this->limit ) {
$this->setContinueEnumParameter( 'continue', $tagName );
+
return false;
}
@@ -121,6 +122,7 @@
$fit = $this->result->addValue( array( 'query',
$this->getModuleName() ), null, $tag );
if ( !$fit ) {
$this->setContinueEnumParameter( 'continue', $tagName );
+
return false;
}
diff --git a/includes/api/ApiQueryUserContributions.php
b/includes/api/ApiQueryUserContributions.php
index 9a9be7b..be08c8a 100644
--- a/includes/api/ApiQueryUserContributions.php
+++ b/includes/api/ApiQueryUserContributions.php
@@ -37,8 +37,8 @@
private $params, $prefixMode, $userprefix, $multiUserMode, $usernames,
$parentLens;
private $fld_ids = false, $fld_title = false, $fld_timestamp = false,
- $fld_comment = false, $fld_parsedcomment = false,
$fld_flags = false,
- $fld_patrolled = false, $fld_tags = false, $fld_size =
false, $fld_sizediff = false;
+ $fld_comment = false, $fld_parsedcomment = false, $fld_flags =
false,
+ $fld_patrolled = false, $fld_tags = false, $fld_size = false,
$fld_sizediff = false;
public function execute() {
// Parse some parameters
@@ -100,7 +100,7 @@
// Fetch each row
foreach ( $res as $row ) {
- if ( ++ $count > $limit ) {
+ if ( ++$count > $limit ) {
// We've reached the one extra which shows that
there are additional pages to be had. Stop here...
if ( $this->multiUserMode ) {
$this->setContinueEnumParameter(
'continue', $this->continueStr( $row ) );
@@ -195,7 +195,8 @@
if ( !is_null( $show ) ) {
$show = array_flip( $show );
if ( ( isset( $show['minor'] ) && isset(
$show['!minor'] ) )
- || ( isset( $show['patrolled'] ) &&
isset( $show['!patrolled'] ) ) ) {
+ || ( isset( $show['patrolled'] ) && isset(
$show['!patrolled'] ) )
+ ) {
$this->dieUsageMsg( 'show' );
}
@@ -220,7 +221,8 @@
) );
if ( isset( $show['patrolled'] ) || isset( $show['!patrolled']
) ||
- $this->fld_patrolled ) {
+ $this->fld_patrolled
+ ) {
if ( !$user->useRCPatrol() && !$user->useNPPatrol() ) {
$this->dieUsage( 'You need the patrol right to
request the patrolled flag', 'permissiondenied' );
}
@@ -439,6 +441,7 @@
public function getParamDescription() {
global $wgRCMaxAge;
$p = $this->getModulePrefix();
+
return array(
'limit' => 'The maximum number of contributions to
return',
'start' => 'The start timestamp to return from',
@@ -462,7 +465,7 @@
' tags - Lists tags for the edit',
),
'show' => array( "Show only items that meet this
criteria, e.g. non minor edits only: {$p}show=!minor",
- "NOTE: if {$p}show=patrolled or
{$p}show=!patrolled is set, revisions older than \$wgRCMaxAge ($wgRCMaxAge)
won't be shown", ),
+ "NOTE: If {$p}show=patrolled or
{$p}show=!patrolled is set, revisions older than \$wgRCMaxAge ($wgRCMaxAge)
won't be shown", ),
'tag' => 'Only list revisions tagged with this tag',
'toponly' => 'Only list changes which are the latest
revision',
);
diff --git a/includes/api/ApiQueryUserInfo.php
b/includes/api/ApiQueryUserInfo.php
index 3c85ea6..1d7ed63 100644
--- a/includes/api/ApiQueryUserInfo.php
+++ b/includes/api/ApiQueryUserInfo.php
@@ -152,6 +152,7 @@
$result->setIndexedTagName( $acceptLang, 'lang' );
$vals['acceptlang'] = $acceptLang;
}
+
return $vals;
}
@@ -188,6 +189,7 @@
}
}
}
+
return $retval;
}
diff --git a/includes/api/ApiQueryUsers.php b/includes/api/ApiQueryUsers.php
index dccfee6..78bf24e 100644
--- a/includes/api/ApiQueryUsers.php
+++ b/includes/api/ApiQueryUsers.php
@@ -58,6 +58,7 @@
'userrights' => array( 'ApiQueryUsers',
'getUserrightsToken' ),
);
wfRunHooks( 'APIQueryUsersTokens', array(
&$this->tokenFunctions ) );
+
return $this->tokenFunctions;
}
@@ -67,6 +68,7 @@
*/
public static function getUserrightsToken( $user ) {
global $wgUser;
+
// Since the permissions check for userrights is non-trivial,
// don't bother with it here
return $wgUser->getEditToken( $user->getName() );
@@ -90,10 +92,10 @@
if ( $n === false || $n === '' ) {
$vals = array( 'name' => $u, 'invalid' => '' );
$fit = $result->addValue( array( 'query',
$this->getModuleName() ),
- null, $vals );
+ null, $vals );
if ( !$fit ) {
$this->setContinueEnumParameter(
'users',
- implode( '|',
array_diff( $users, $done ) ) );
+ implode( '|', array_diff(
$users, $done ) ) );
$goodNames = array();
break;
}
@@ -244,10 +246,10 @@
}
$fit = $result->addValue( array( 'query',
$this->getModuleName() ),
- null, $data[$u] );
+ null, $data[$u] );
if ( !$fit ) {
$this->setContinueEnumParameter( 'users',
- implode( '|', array_diff(
$users, $done ) ) );
+ implode( '|', array_diff( $users, $done
) ) );
break;
}
$done[] = $u;
diff --git a/includes/api/ApiQueryWatchlist.php
b/includes/api/ApiQueryWatchlist.php
index 22843f5..2f784f4 100644
--- a/includes/api/ApiQueryWatchlist.php
+++ b/includes/api/ApiQueryWatchlist.php
@@ -45,8 +45,8 @@
}
private $fld_ids = false, $fld_title = false, $fld_patrol = false,
$fld_flags = false,
- $fld_timestamp = false, $fld_user = false, $fld_comment
= false, $fld_parsedcomment = false, $fld_sizes = false,
- $fld_notificationtimestamp = false, $fld_userid =
false, $fld_loginfo = false;
+ $fld_timestamp = false, $fld_user = false, $fld_comment =
false, $fld_parsedcomment = false, $fld_sizes = false,
+ $fld_notificationtimestamp = false, $fld_userid = false,
$fld_loginfo = false;
/**
* @param $resultPageSet ApiPageSet
@@ -121,7 +121,8 @@
'wl_user' => $userId,
'wl_namespace=rc_namespace',
'wl_title=rc_title'
- ) ) ) );
+ )
+ ) ) );
$this->addWhere( array(
'rc_deleted' => 0,
@@ -144,9 +145,9 @@
/* Check for conflicting parameters. */
if ( ( isset( $show['minor'] ) && isset(
$show['!minor'] ) )
- || ( isset( $show['bot'] ) && isset(
$show['!bot'] ) )
- || ( isset( $show['anon'] ) && isset(
$show['!anon'] ) )
- || ( isset( $show['patrolled'] ) &&
isset( $show['!patrolled'] ) )
+ || ( isset( $show['bot'] ) && isset(
$show['!bot'] ) )
+ || ( isset( $show['anon'] ) && isset(
$show['!anon'] ) )
+ || ( isset( $show['patrolled'] ) && isset(
$show['!patrolled'] ) )
) {
$this->dieUsageMsg( 'show' );
}
@@ -194,7 +195,7 @@
$res = $this->select( __METHOD__ );
foreach ( $res as $row ) {
- if ( ++ $count > $params['limit'] ) {
+ if ( ++$count > $params['limit'] ) {
// We've reached the one extra which shows that
there are additional pages to be had. Stop here...
$this->setContinueEnumParameter( 'start',
wfTimestamp( TS_ISO_8601, $row->rc_timestamp ) );
break;
@@ -205,7 +206,7 @@
$fit = $this->getResult()->addValue( array(
'query', $this->getModuleName() ), null, $vals );
if ( !$fit ) {
$this->setContinueEnumParameter(
'start',
- wfTimestamp(
TS_ISO_8601, $row->rc_timestamp ) );
+ wfTimestamp( TS_ISO_8601,
$row->rc_timestamp ) );
break;
}
} else {
@@ -348,6 +349,7 @@
foreach ( $type as $t ) {
$retval[] = $this->parseRCType( $t );
}
+
return $retval;
}
switch ( $type ) {
@@ -446,6 +448,7 @@
public function getParamDescription() {
$p = $this->getModulePrefix();
+
return array(
'allrev' => 'Include multiple revisions of the same
page within given timeframe',
'start' => 'The timestamp to start enumerating from',
@@ -488,6 +491,7 @@
public function getResultProperties() {
global $wgLogTypes;
+
return array(
'' => array(
'type' => array(
diff --git a/includes/api/ApiQueryWatchlistRaw.php
b/includes/api/ApiQueryWatchlistRaw.php
index ea4e724..4d97722 100644
--- a/includes/api/ApiQueryWatchlistRaw.php
+++ b/includes/api/ApiQueryWatchlistRaw.php
@@ -91,7 +91,7 @@
$this->addOption( 'ORDER BY', array(
'wl_namespace' . $sort,
'wl_title' . $sort
- ));
+ ) );
}
$this->addOption( 'LIMIT', $params['limit'] + 1 );
$res = $this->select( __METHOD__ );
@@ -109,8 +109,7 @@
if ( is_null( $resultPageSet ) ) {
$vals = array();
ApiQueryBase::addTitleInfo( $vals, $t );
- if ( isset( $prop['changed'] ) && !is_null(
$row->wl_notificationtimestamp ) )
- {
+ if ( isset( $prop['changed'] ) && !is_null(
$row->wl_notificationtimestamp ) ) {
$vals['changed'] = wfTimestamp(
TS_ISO_8601, $row->wl_notificationtimestamp );
}
$fit = $this->getResult()->addValue(
$this->getModuleName(), null, $vals );
--
To view, visit https://gerrit.wikimedia.org/r/95371
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6087573dfdc6edcd63062508056ebcf3502e03f2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits