From 3abcb9db01839ac338129bf134e9ebb9137ab12e Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Sun, 8 Feb 2009 15:55:32 +0000 Subject: [PATCH] * Recommit r39503. (bug 14468) Lines in classic RecentChanges and Watchlist now have classes "mw-line-odd" and "mw-line-even" to make styling 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. * keep RELEASE-NOTES lines under 80 characters --- RELEASE-NOTES | 27 +++++++++++++--------- includes/ChangesList.php | 12 +++++++++- includes/specials/SpecialRecentchanges.php | 2 +- includes/specials/SpecialWatchlist.php | 2 +- 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d927d9e802..55eeb39504 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -74,9 +74,10 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Local redirects to foreign images are now displayed on the ImagePage when viewing on the local wiki. * (bug 8249) The magic words for namespaces and pagenames can now be used as - parser functions to return the desired namespace or normalized title/title part - for a given title. -* Styled #mw-data-after-content in cologneblue.css to match the rest of the font (bug 17110) + parser functions to return the desired namespace or normalized title/title + part for a given title. +* (bug 17110) Styled #mw-data-after-content in cologneblue.css to match the + rest of the font * (bug 7556) Time zone names in signatures lack i18n * (bug 3311) Automatic category redirects * (bug 17236) Suppress 'watch user page link' for IP range blocks @@ -88,6 +89,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN LanguageConverter class) * (bug 17379) Contributions-title is now parsed for magic words. * Preprocessor output now cached in memcached. +* (bug 14468) Lines in classic RecentChanges and Watchlist have classes + "mw-line-odd" and "mw-line-even" to make styling using css possible. === Bug fixes in 1.15 === * (bug 16968) Special:Upload no longer throws useless warnings. @@ -120,21 +123,23 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 15811) Re-upload form tweaks: license fields removed, destination locked, comment label uses better message * Whole HTML validation ($wgValidateAllHtml) now works with external tidy -* Parser tests no longer fail when $wgExternalLinkTarget is set in LocalSettings -* (bug 15391) catch DBQueryErrors on external storage insertion. This avoids error - messages on save were the edit in fact is saved. +* Parser tests no longer fail when $wgExternalLinkTarget is set in + LocalSettings +* (bug 15391) catch DBQueryErrors on external storage insertion. This avoids + error messages on save were the edit in fact is saved. * (bug 17184) Remove duplicate "z" accesskey in MonoBook * Parser tests no longer fail when $wgAlwaysUseTidy is set in LocalSettings.php * Removed redundant dupe warnings on reupload for the same title. Dupe warnings for identical files at different titles are still given. * Add 'change tagging' facility, where changes can be tagged internally with - certain designations, which are displayed on various summaries of changes, and - the entries can be styled with CSS. + certain designations, which are displayed on various summaries of changes, + and the entries can be styled with CSS. * (bug 17207) Fix regression breaking category page display on PHP 5.1 * Categoryfinder utility class no longer fails on invalid input or gives wrong results for category names that include pseudo-namespaces * (bug 17252) Galician numbering format -* (bug 17146) Fix for UTF-8 and short word search for some possible MySQL configs +* (bug 17146) Fix for UTF-8 and short word search for some possible MySQL + configs * (bug 7480) Internationalize database error message * (bug 16555) Number of links to mediawiki.org scaled back on post-installation * (bug 14938) Removing a section no longer leaves excess whitespace @@ -174,8 +179,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN performance concerns * Listing (semi-)deleted revisions and log entries as well in prop=revisions and list=logevents -* (bug 11430) BREAKING CHANGE: Modules may return fewer results than the limit and still - set a query-continue in some cases +* (bug 11430) BREAKING CHANGE: Modules may return fewer results than the limit + and still set a query-continue in some cases === Languages updated in 1.15 === diff --git a/includes/ChangesList.php b/includes/ChangesList.php index 1c6f4bdd20..9518ebd031 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -361,7 +361,7 @@ class OldChangesList extends ChangesList { /** * Format a line using the old system (aka without any javascript). */ - public function recentChangesLine( &$rc, $watched = false ) { + public function recentChangesLine( &$rc, $watched = false, $linenumber = NULL ) { global $wgContLang, $wgLang, $wgRCShowChangedSize, $wgUser; wfProfileIn( __METHOD__ ); # Should patrol-related stuff be shown? @@ -372,6 +372,16 @@ class OldChangesList extends ChangesList { $s = ''; $classes = array(); + // use mw-line-even/mw-line-odd class only if linenumber is given (feature from bug 14468) + if( $linenumber ) { + if( $linenumber & 1 ) { + $classes[] = 'mw-line-odd'; + } + else { + $classes[] = 'mw-line-even'; + } + } + // Moved pages if( $rc->mAttribs['rc_type'] == RC_MOVE || $rc->mAttribs['rc_type'] == RC_MOVE_OVER_REDIRECT ) { $this->insertMove( $s, $rc ); diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 3d7b4ba14f..83f6949f58 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -381,7 +381,7 @@ class SpecialRecentChanges extends SpecialPage { } $rc->numberofWatchingusers = $watcherCache[$obj->rc_namespace][$obj->rc_title]; } - $s .= $list->recentChangesLine( $rc, !empty( $obj->wl_user ) ); + $s .= $list->recentChangesLine( $rc, !empty( $obj->wl_user ), $counter ); --$limit; } $s .= $list->endRecentChangesList(); diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index b905944084..91ab38e36d 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -357,7 +357,7 @@ function wfSpecialWatchlist( $par ) { $rc->numberofWatchingusers = 0; } - $s .= $list->recentChangesLine( $rc, $updated ); + $s .= $list->recentChangesLine( $rc, $updated, $counter ); } $s .= $list->endRecentChangesList(); -- 2.20.1