r108859 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108858‎ | r108859 | r108860 >
Date:21:59, 13 January 2012
Author:reedy
Status:resolved (Comments)
Tags:
Comment:
Fix eaten hyphen from r108856

Quote timestamp (ping r100165)

Remove unused variable
Modified paths:
  • /trunk/extensions/CheckUser/CheckUser_body.php (modified) (history)
  • /trunk/extensions/CheckUser/api/ApiQueryCheckUser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CheckUser/CheckUser_body.php
@@ -1244,7 +1244,7 @@
12451245 }
12461246
12471247 /**
1248 - * @param Database $db
 1248+ * @param DatabaseBase $db
12491249 * @param string $ip
12501250 * @param string|bool $xfor
12511251 * @return mixed array/false conditions
Index: trunk/extensions/CheckUser/api/ApiQueryCheckUser.php
@@ -36,7 +36,7 @@
3737 $this->addTables( 'cu_changes' );
3838 $this->addOption( 'LIMIT', $limit + 1 );
3939 $this->addOption( 'ORDER BY', 'cuc_timestamp DESC' );
40 - $this->addWhere( "cuc_timestamp > $time" );
 40+ $this->addWhere( "cuc_timestamp > " . $db->addQuotes( $time ) );
4141
4242 switch ( $request ) {
4343 case 'userips':
@@ -54,7 +54,7 @@
5555 foreach ( $res as $row ) {
5656 $timestamp = wfTimestamp( TS_ISO_8601, $row->cuc_timestamp );
5757 $ip = strval( $row->cuc_ip );
58 - $xff = $row->cuc_xff;
 58+ //$xff = $row->cuc_xff;
5959
6060 if ( !isset( $ips[$ip] ) ) {
6161 $ips[$ip]['end'] = $timestamp;
@@ -85,7 +85,7 @@
8686 $this->addWhere( $cond );
8787 $log_type = array();
8888 if ( isset( $xff ) ) {
89 - $log_type[] = 'ipeditsxff';
 89+ $log_type[] = 'ipedits-xff';
9090 } else {
9191 $log_type[] = 'ipedits';
9292 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100165Adds API Module by cryptocoryne...johnduhart21:37, 18 October 2011
r108856Refactored some code (reducing duplication)reedy21:51, 13 January 2012

Comments

#Comment by Siebrand (talk | contribs)   22:01, 13 January 2012

This change was not addressed in the commit summary.

-					$xff = $row->cuc_xff;
+					//$xff = $row->cuc_xff;
#Comment by Siebrand (talk | contribs)   22:02, 13 January 2012

Oh, it was... Too much whitespace in your commit summary :).

#Comment by Reedy (talk | contribs)   22:02, 13 January 2012

Bah. That was supposed to be removed, not commented out

#Comment by Reedy (talk | contribs)   22:03, 13 January 2012

And I just marked it new again. Bad CR!

Status & tagging log