r39503 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39502‎ | r39503 | r39504 >
Date:21:16, 16 August 2008
Author:siebrand
Status:old
Tags:
Comment:
(bug 14468) Lines in classic RecentChanges and Watchlist now have classes "odd" and "even" to make colouring using css possible. Implemented in OldChangesList::recentChangesLine using an additional parameter, while keeping behaviour for other uses unchanged. Did not see any use adding this to ChangesList::recentChangesLine
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/ChangesList.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchanges.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWatchlist.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ChangesList.php
@@ -306,7 +306,7 @@
307307 /**
308308 * Format a line using the old system (aka without any javascript).
309309 */
310 - public function recentChangesLine( &$rc, $watched = false ) {
 310+ public function recentChangesLine( &$rc, $watched = false, $linenumber = NULL ) {
311311 global $wgContLang, $wgRCShowChangedSize, $wgUser;
312312
313313 $fname = 'ChangesList::recentChangesLineOld';
@@ -321,7 +321,17 @@
322322
323323 $this->insertDateHeader($s,$rc_timestamp);
324324
325 - $s .= '<li>';
 325+ // use even/odd class only if linenumber is given (feature from bug 14468)
 326+ if( $linenumber ) {
 327+ if( $linenumber & 1 ) {
 328+ $s .= '<li class="odd">';
 329+ }
 330+ else {
 331+ $s .= '<li class="even">';
 332+ }
 333+ } else {
 334+ $s .= '<li>';
 335+ }
326336
327337 // Moved pages
328338 if( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
Index: trunk/phase3/includes/specials/SpecialRecentchanges.php
@@ -378,7 +378,7 @@
379379 }
380380 $rc->numberofWatchingusers = $watcherCache[$obj->rc_namespace][$obj->rc_title];
381381 }
382 - $s .= $list->recentChangesLine( $rc, !empty( $obj->wl_user ) );
 382+ $s .= $list->recentChangesLine( $rc, !empty( $obj->wl_user ), $counter );
383383 --$limit;
384384 }
385385 }
Index: trunk/phase3/includes/specials/SpecialWatchlist.php
@@ -342,7 +342,7 @@
343343 $rc->numberofWatchingusers = 0;
344344 }
345345
346 - $s .= $list->recentChangesLine( $rc, $updated );
 346+ $s .= $list->recentChangesLine( $rc, $updated, $counter );
347347 }
348348 $s .= $list->endRecentChangesList();
349349
Index: trunk/phase3/RELEASE-NOTES
@@ -37,15 +37,15 @@
3838 Backwards compatibility is maintained.
3939 * $wgEnablePersistentCookies has been added. Setting to false disables the
4040 setting of persistent cookies. Defaults to true.
41 -
 41+
4242 === New features in 1.14 ===
4343
44 -* New URL syntaxes for Special:ListUsers - 'Special:ListUsers/USER' and
45 - 'Special:ListUsers/GROUP/USER', in addition to the older syntax
 44+* New URL syntaxes for Special:ListUsers - 'Special:ListUsers/USER' and
 45+ 'Special:ListUsers/GROUP/USER', in addition to the older syntax
4646 'Special:ListUsers/GROUP' where GROUP is a valid group name.
47 -* Configurable er-namespace and per-page notices for the edit form,
 47+* Configurable er-namespace and per-page notices for the edit form,
4848 respectively MediaWiki:Editnotice-# where # is the namespace number, and
49 - MediaWiki:Editnotice-#-PAGENAME where # is the page's namespace number and
 49+ MediaWiki:Editnotice-#-PAGENAME where # is the page's namespace number and
5050 PAGENAME is the page name minus the namespace prefix.
5151 * (bug 8068) New __INDEX__ and __NOINDEX__ magic words allow user control of
5252 search engine indexing on a per-article basis.
@@ -80,7 +80,7 @@
8181 * (bug 14929) removeUnusedAccounts.php now supports 'ignore-touched' and
8282 'ignore-groups'. Patch by Louperivois
8383 * (bug 15127) Work around minor display glitch in Opera.
84 -* By default, reject file uploads that look like ZIP files, to avoid the
 84+* By default, reject file uploads that look like ZIP files, to avoid the
8585 so-called GIFAR vulnerability.
8686 * (bug 15141) Give ability to only list protected pages with the cascading
8787 option enabled on Special:ProtectedPages
@@ -88,7 +88,9 @@
8989 Show/Hide logged in users, Show/Hide anonymous, Invert namespace selection
9090 * Added hook 'UserrightsChangeableGroups' to allow modification of what
9191 groups may be added or removed via the Special:UserRights interface.
92 -
 92+* (bug 14468) Lines in classic RecentChanges and Watchlist have classes "odd"
 93+ and "even" to make colouring using css possible.
 94+
9395 === Bug fixes in 1.14 ===
9496
9597 * (bug 14907) DatabasePostgres::fieldType now defined.

Follow-up revisions

RevisionCommit summaryAuthorDate
r39507Follow up on r39503. Add li.odd to common style sheet.siebrand22:06, 16 August 2008
r39622Revert r39503, 39507 "(bug 14468) Lines in classic RecentChanges and Watchlis...brion00:15, 19 August 2008
r47014* Recommit r39503. (bug 14468) Lines in classic RecentChanges and Watchlist n...siebrand15:55, 8 February 2009

Status & tagging log