Index: trunk/phase3/includes/ChangesList.php |
— | — | @@ -218,7 +218,8 @@ |
219 | 219 | |
220 | 220 | protected function insertTimestamp( &$s, $rc ) { |
221 | 221 | global $wgLang; |
222 | | - $s .= $this->message['semicolon-separator'] . $wgLang->time( $rc->mAttribs['rc_timestamp'], true, true ) . ' . . '; |
| 222 | + $s .= $this->message['semicolon-separator'] . |
| 223 | + $wgLang->time( $rc->mAttribs['rc_timestamp'], true, true ) . ' . . '; |
223 | 224 | } |
224 | 225 | |
225 | 226 | /** Insert links to user page, user talk page and eventually a blocking link */ |
— | — | @@ -303,7 +304,7 @@ |
304 | 305 | $permission = ( $rc->mAttribs['rc_deleted'] & Revision::DELETED_RESTRICTED ) == Revision::DELETED_RESTRICTED |
305 | 306 | ? 'suppressrevision' |
306 | 307 | : 'deleterevision'; |
307 | | - wfDebug( "Checking for $permission due to $field match on $rc->mAttribs['rc_deleted']\n" ); |
| 308 | + wfDebug( "Checking for $permission due to $field match on {$rc->mAttribs['rc_deleted']}\n" ); |
308 | 309 | return $wgUser->isAllowed( $permission ); |
309 | 310 | } else { |
310 | 311 | return true; |
— | — | @@ -418,7 +419,8 @@ |
419 | 420 | $rc = RCCacheEntry::newFromParent( $baseRC ); |
420 | 421 | |
421 | 422 | # Extract fields from DB into the function scope (rc_xxxx variables) |
422 | | - // FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables. |
| 423 | + // FIXME: Would be good to replace this extract() call with something |
| 424 | + // that explicitly initializes variables. |
423 | 425 | extract( $rc->mAttribs ); |
424 | 426 | $curIdEq = 'curid=' . $rc_cur_id; |
425 | 427 | |
— | — | @@ -454,7 +456,8 @@ |
455 | 457 | } else if( $rc_type == RC_LOG ) { |
456 | 458 | if( $rc_log_type ) { |
457 | 459 | $logtitle = SpecialPage::getTitleFor( 'Log', $rc_log_type ); |
458 | | - $clink = '(' . $this->skin->makeKnownLinkObj( $logtitle, LogPage::logName($rc_log_type) ) . ')'; |
| 460 | + $clink = '(' . $this->skin->makeKnownLinkObj( $logtitle, |
| 461 | + LogPage::logName($rc_log_type) ) . ')'; |
459 | 462 | } else { |
460 | 463 | $clink = $this->skin->makeLinkObj( $rc->getTitle(), '' ); |
461 | 464 | } |
— | — | @@ -495,7 +498,8 @@ |
496 | 499 | $querycur = $curIdEq."&diff=0&oldid=$rc_this_oldid"; |
497 | 500 | $querydiff = $curIdEq."&diff=$rc_this_oldid&oldid=$rc_last_oldid$rcIdQuery"; |
498 | 501 | $aprops = ' tabindex="'.$baseRC->counter.'"'; |
499 | | - $curLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $this->message['cur'], $querycur, '' ,'', $aprops ); |
| 502 | + $curLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), |
| 503 | + $this->message['cur'], $querycur, '' ,'', $aprops ); |
500 | 504 | |
501 | 505 | # Make "diff" an "cur" links |
502 | 506 | if( !$showdifflinks ) { |
— | — | @@ -507,7 +511,8 @@ |
508 | 512 | } |
509 | 513 | $diffLink = $this->message['diff']; |
510 | 514 | } else { |
511 | | - $diffLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $this->message['diff'], $querydiff, '' ,'', $aprops ); |
| 515 | + $diffLink = $this->skin->makeKnownLinkObj( $rc->getTitle(), $this->message['diff'], |
| 516 | + $querydiff, '' ,'', $aprops ); |
512 | 517 | } |
513 | 518 | |
514 | 519 | # Make "last" link |
— | — | @@ -614,7 +619,8 @@ |
615 | 620 | array_push( $users, $text ); |
616 | 621 | } |
617 | 622 | |
618 | | - $users = ' <span class="changedby">[' . implode( $this->message['semicolon-separator'], $users ) . ']</span>'; |
| 623 | + $users = ' <span class="changedby">[' . |
| 624 | + implode( $this->message['semicolon-separator'], $users ) . ']</span>'; |
619 | 625 | |
620 | 626 | # ID for JS visibility toggle |
621 | 627 | $jsid = $this->rcCacheIndex; |
— | — | @@ -708,8 +714,9 @@ |
709 | 715 | $r .= '<div id="mw-rc-subentries-'.$jsid.'" class="mw-changeslist-hidden">'; |
710 | 716 | $r .= '<table cellpadding="0" cellspacing="0" border="0" style="background: none">'; |
711 | 717 | foreach( $block as $rcObj ) { |
712 | | - # Get rc_xxxx variables |
713 | | - // FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables. |
| 718 | + # Extract fields from DB into the function scope (rc_xxxx variables) |
| 719 | + // FIXME: Would be good to replace this extract() call with something |
| 720 | + // that explicitly initializes variables. |
714 | 721 | extract( $rcObj->mAttribs ); |
715 | 722 | |
716 | 723 | #$r .= '<tr><td valign="top">'.$this->spacerArrow(); |
— | — | @@ -828,8 +835,9 @@ |
829 | 836 | */ |
830 | 837 | protected function recentChangesBlockLine( $rcObj ) { |
831 | 838 | global $wgContLang, $wgRCShowChangedSize; |
832 | | - # Get rc_xxxx variables |
833 | | - // FIXME: Would be good to replace this extract() call with something that explicitly initializes local variables. |
| 839 | + # Extract fields from DB into the function scope (rc_xxxx variables) |
| 840 | + // FIXME: Would be good to replace this extract() call with something |
| 841 | + // that explicitly initializes variables. |
834 | 842 | extract( $rcObj->mAttribs ); |
835 | 843 | $curIdEq = "curid={$rc_cur_id}"; |
836 | 844 | |
— | — | @@ -852,13 +860,14 @@ |
853 | 861 | } |
854 | 862 | # Diff and hist links |
855 | 863 | if ( $rc_type != RC_LOG ) { |
856 | | - $r .= ' ('. $rcObj->difflink . $this->message['semicolon-separator']; |
857 | | - $r .= $this->skin->makeKnownLinkObj( $rcObj->getTitle(), wfMsg( 'hist' ), $curIdEq.'&action=history' ) . ')'; |
| 864 | + $r .= ' ('. $rcObj->difflink . $this->message['semicolon-separator']; |
| 865 | + $r .= $this->skin->makeKnownLinkObj( $rcObj->getTitle(), wfMsg( 'hist' ), |
| 866 | + $curIdEq.'&action=history' ) . ')'; |
858 | 867 | } |
859 | 868 | $r .= ' . . '; |
860 | 869 | # Character diff |
861 | | - if( $wgRCShowChangedSize ) { |
862 | | - $r .= ( $rcObj->getCharacterDifference() == '' ? '' : $rcObj->getCharacterDifference() . ' . . ' ) ; |
| 870 | + if( $wgRCShowChangedSize && ($cd = $rcObj->getCharacterDifference()) ) { |
| 871 | + $r .= "$cd . . "; |
863 | 872 | } |
864 | 873 | # User/talk |
865 | 874 | $r .= ' '.$rcObj->userlink . $rcObj->usertalklink; |