From: Antoine Musso Date: Tue, 6 Sep 2005 18:14:24 +0000 (+0000) Subject: Comments, code formatting. X-Git-Tag: 1.6.0~1705 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=44bac93fbbf5cbfed8a181be338ab69ed019ed2b;p=lhc%2Fweb%2Fwiklou.git Comments, code formatting. --- diff --git a/includes/ChangesList.php b/includes/ChangesList.php index aa3164b64d..89a6ec128a 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -53,7 +53,8 @@ class ChangesList { } /** - * Enhanced RC ungrouped line + * Enhanced RC ungrouped line. + * @return string a HTML formated line (generated using $r) */ function recentChangesBlockLine ( $rcObj ) { global $wgStylePath, $wgContLang ; @@ -62,9 +63,9 @@ class ChangesList { extract( $rcObj->mAttribs ) ; $curIdEq = 'curid='.$rc_cur_id; - # Spacer image $r = '' ; + # Spacer image $r .= '' ; $r .= '' ; @@ -75,25 +76,22 @@ class ChangesList { } # Timestamp - $r .= ' '.$rcObj->timestamp.' ' ; - $r .= '' ; + $r .= ' '.$rcObj->timestamp.' ' ; # Article link $link = $rcObj->link ; + // FIXME: should be handled with a css class if ( $rcObj->watched ) $link = ''.$link.'' ; $r .= $link ; # Diff - $r .= ' (' ; - $r .= $rcObj->difflink ; - $r .= '; ' ; + $r .= ' ('. $rcObj->difflink .'; ' ; # Hist $r .= $this->skin->makeKnownLinkObj( $rcObj->getTitle(), wfMsg( 'hist' ), $curIdEq.'&action=history' ); # User/talk - $r .= ') . . '.$rcObj->userlink ; - $r .= $rcObj->usertalklink ; + $r .= ') . . '.$rcObj->userlink . $rcObj->usertalklink ; # Comment if ( $rc_type != RC_MOVE && $rc_type != RC_MOVE_OVER_REDIRECT ) { @@ -256,14 +254,16 @@ class ChangesList { */ function recentChangesLine( &$rc, $watched = false ) { global $wgUser; - $usenew = $wgUser->getOption( 'usenewrc' ); - if ( $usenew ) + if ( $wgUser->getOption( 'usenewrc' ) ) $line = $this->recentChangesLineNew ( $rc, $watched ) ; else $line = $this->recentChangesLineOld ( $rc, $watched ) ; return $line ; } + /** + * Format a line using the old system (aka without any javascript). + */ function recentChangesLineOld( &$rc, $watched = false ) { global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgUseRCPatrol, $wgOnlySysopsCanPatrol, $wgSysopUserBans; @@ -407,6 +407,9 @@ class ChangesList { return $s; } + /** + * Format a line for enhanced recentchange (aka with javascript and block of lines). + */ function recentChangesLineNew( &$baseRC, $watched = false ) { global $wgTitle, $wgLang, $wgContLang, $wgUser, $wgUseRCPatrol, $wgOnlySysopsCanPatrol, $wgSysopUserBans;