r11967 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r11966‎ | r11967 | r11968 >
Date:20:51, 4 December 2005
Author:hashar
Status:old
Tags:
Comment:
* really comment commented live hack (some calls were still around)
* redundant ip=''
* code formatting
Modified paths:
  • /trunk/phase3/includes/RecentChange.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/RecentChange.php
@@ -132,20 +132,22 @@
133133
134134 # Update old rows, if necessary
135135 if ( $this->mAttribs['rc_type'] == RC_EDIT ) {
136 - $oldid = $this->mAttribs['rc_last_oldid'];
137 - $ns = $this->mAttribs['rc_namespace'];
138 - $title = $this->mAttribs['rc_title'];
139136 $lastTime = $this->mExtra['lastTimestamp'];
140 - $now = $this->mAttribs['rc_timestamp'];
141 - $curId = $this->mAttribs['rc_cur_id'];
 137+ #$now = $this->mAttribs['rc_timestamp'];
 138+ #$curId = $this->mAttribs['rc_cur_id'];
142139
143140 # Don't bother looking for entries that have probably
144141 # been purged, it just locks up the indexes needlessly.
145142 global $wgRCMaxAge;
146143 $age = time() - wfTimestamp( TS_UNIX, $lastTime );
147144 if( $age < $wgRCMaxAge ) {
148 - # live hack, will commit once tested - kate
 145+ # live hack, will commit once tested - kate
149146 # Update rc_this_oldid for the entries which were current
 147+ #
 148+ #$oldid = $this->mAttribs['rc_last_oldid'];
 149+ #$ns = $this->mAttribs['rc_namespace'];
 150+ #$title = $this->mAttribs['rc_title'];
 151+ #
150152 #$dbw->update( 'recentchanges',
151153 # array( /* SET */
152154 # 'rc_this_oldid' => $oldid
@@ -327,7 +329,7 @@
328330 }
329331
330332 /* static */ function notifyMoveOverRedirect( $timestamp, &$oldTitle, &$newTitle, &$user, $comment, $ip='' ) {
331 - RecentChange::notifyMove( $timestamp, $oldTitle, $newTitle, $user, $comment, $ip='', true );
 333+ RecentChange::notifyMove( $timestamp, $oldTitle, $newTitle, $user, $comment, $ip, true );
332334 }
333335
334336 # A log entry is different to an edit in that previous revisions are
@@ -451,11 +453,12 @@
452454
453455 if ( isset( $oldSize ) && isset( $newSize ) ) {
454456 $szdiff = $newSize - $oldSize;
455 - if ($szdiff < -500)
 457+ if ($szdiff < -500) {
456458 $szdiff = "\002$szdiff\002";
457 - else if ($szdiff >= 0)
458 - $szdiff = "+$szdiff";
459 - $szdiff = "($szdiff)";
 459+ } elseif ($szdiff >= 0) {
 460+ $szdiff = '+' . $szdiff ;
 461+ }
 462+ $szdiff = '(' . $szdiff . ')' ;
460463 } else {
461464 $szdiff = '';
462465 }

Status & tagging log