(bug 14468) Lines in classic RecentChanges and Watchlist now have classes "odd" and...
authorSiebrand Mazeland <siebrand@users.mediawiki.org>
Sat, 16 Aug 2008 21:16:25 +0000 (21:16 +0000)
committerSiebrand Mazeland <siebrand@users.mediawiki.org>
Sat, 16 Aug 2008 21:16:25 +0000 (21:16 +0000)
RELEASE-NOTES
includes/ChangesList.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialWatchlist.php

index 2248751..cee93de 100644 (file)
@@ -37,15 +37,15 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   Backwards compatibility is maintained.
 * $wgEnablePersistentCookies has been added. Setting to false disables the
   setting of persistent cookies. Defaults to true.
-  
+
 === New features in 1.14 ===
 
-* New URL syntaxes for Special:ListUsers - 'Special:ListUsers/USER' and 
-  'Special:ListUsers/GROUP/USER', in addition to the older syntax 
+* New URL syntaxes for Special:ListUsers - 'Special:ListUsers/USER' and
+  'Special:ListUsers/GROUP/USER', in addition to the older syntax
   'Special:ListUsers/GROUP' where GROUP is a valid group name.
-* Configurable er-namespace and per-page notices for the edit form, 
+* Configurable er-namespace and per-page notices for the edit form,
   respectively MediaWiki:Editnotice-# where # is the namespace number, and
-  MediaWiki:Editnotice-#-PAGENAME where # is the page's namespace number and 
+  MediaWiki:Editnotice-#-PAGENAME where # is the page's namespace number and
   PAGENAME is the page name minus the namespace prefix.
 * (bug 8068) New __INDEX__ and __NOINDEX__ magic words allow user control of
   search engine indexing on a per-article basis.
@@ -80,7 +80,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 14929) removeUnusedAccounts.php now supports 'ignore-touched' and
   'ignore-groups'. Patch by Louperivois
 * (bug 15127) Work around minor display glitch in Opera.
-* By default, reject file uploads that look like ZIP files, to avoid the 
+* By default, reject file uploads that look like ZIP files, to avoid the
   so-called GIFAR vulnerability.
 * (bug 15141) Give ability to only list protected pages with the cascading
   option enabled on Special:ProtectedPages
@@ -88,7 +88,9 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   Show/Hide logged in users, Show/Hide anonymous, Invert namespace selection
 * Added hook 'UserrightsChangeableGroups' to allow modification of what
   groups may be added or removed via the Special:UserRights interface.
-  
+* (bug 14468) Lines in classic RecentChanges and Watchlist have classes "odd"
+  and "even" to make colouring using css possible.
+
 === Bug fixes in 1.14 ===
 
 * (bug 14907) DatabasePostgres::fieldType now defined.
index bad9445..d7f5bf7 100644 (file)
@@ -306,7 +306,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, $wgRCShowChangedSize, $wgUser;
 
                $fname = 'ChangesList::recentChangesLineOld';
@@ -321,7 +321,17 @@ class OldChangesList extends ChangesList {
 
                $this->insertDateHeader($s,$rc_timestamp);
 
-               $s .= '<li>';
+               // use even/odd class only if linenumber is given (feature from bug 14468)
+               if( $linenumber ) {
+                       if( $linenumber & 1 ) {
+                               $s .= '<li class="odd">';
+                       }
+                       else {
+                               $s .= '<li class="even">';
+                       }
+               } else {
+                       $s .= '<li>';
+               }
 
                // Moved pages
                if( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
index 4f43c8e..fc09a4d 100644 (file)
@@ -378,7 +378,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;
                        }
                }
index 3e729f2..e8386ed 100644 (file)
@@ -342,7 +342,7 @@ function wfSpecialWatchlist( $par ) {
                        $rc->numberofWatchingusers = 0;
                }
 
-               $s .= $list->recentChangesLine( $rc, $updated );
+               $s .= $list->recentChangesLine( $rc, $updated, $counter );
        }
        $s .= $list->endRecentChangesList();