r84127 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84126‎ | r84127 | r84128 >
Date:22:21, 16 March 2011
Author:reedy
Status:ok
Tags:
Comment:
Fixup indenting
Modified paths:
  • /trunk/extensions/UserDailyContribs/api/ApiUserDailyContribs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UserDailyContribs/api/ApiUserDailyContribs.php
@@ -2,32 +2,30 @@
33
44 class ApiUserDailyContribs extends ApiBase {
55
6 -
76 public function execute() {
8 - $params = $this->extractRequestParams();
9 - $result = $this->getResult();
 7+ $params = $this->extractRequestParams();
 8+ $result = $this->getResult();
109
11 - $userName = $params['user'];
12 - $days = $params['daysago'];
13 - $user = User::newFromName($userName);
14 - $now = time();
15 - $result->addValue( array( 'query', $this->getModuleName() ),
16 - 'totalEdits',
17 - ($user->getEditCount() == NULL)?0:$user->getEditCount() );
18 - $result->addValue( array( 'query', $this->getModuleName() ),
19 - 'registration', $user->getRegistration() );
20 - $result->addValue( array( 'query', $this->getModuleName() ),
21 - 'timeFrameEdits', getUserEditCountSince( $now - ($days * 60 *60 *24) ));
22 -
 10+ $userName = $params['user'];
 11+ $days = $params['daysago'];
 12+ $user = User::newFromName($userName);
 13+ $now = time();
 14+ $result->addValue( array( 'query', $this->getModuleName() ),
 15+ 'totalEdits',
 16+ ($user->getEditCount() == NULL)?0:$user->getEditCount() );
 17+ $result->addValue( array( 'query', $this->getModuleName() ),
 18+ 'registration', $user->getRegistration() );
 19+ $result->addValue( array( 'query', $this->getModuleName() ),
 20+ 'timeFrameEdits', getUserEditCountSince( $now - ($days * 60 *60 *24) ));
2321 }
24 -
25 - public function getAllowedParams() {
 22+
 23+ public function getAllowedParams() {
2624 return array(
2725 'user' => null,
2826 'daysago' => null,
2927 );
30 - }
31 -
 28+ }
 29+
3230 public function getParamDescription() {
3331 return array(
3432 'user' => 'Username to query',
@@ -48,5 +46,4 @@
4947 }
5048 //2009-05-01-18-35-35
5149 //YYYY-MM-DD-HH-MM-SS
52 -
53 - }
\ No newline at end of file
 50+}
\ No newline at end of file

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r84119Added "userdailycontribs" API callnimishg19:54, 16 March 2011

Status & tagging log