* (bug 11005) Add CSS class to empty pages in Special:Newpages
authorRaimond Spekking <raymond@users.mediawiki.org>
Mon, 9 Aug 2010 19:35:56 +0000 (19:35 +0000)
committerRaimond Spekking <raymond@users.mediawiki.org>
Mon, 9 Aug 2010 19:35:56 +0000 (19:35 +0000)
RELEASE-NOTES
includes/specials/SpecialNewpages.php

index 3bd9e30..6e7a3a9 100644 (file)
@@ -143,6 +143,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   punctuation or non-English letters, so a section named "Hello?" will now
   result in a URL ending in "#Hello?" rather than "#Hello.3F".
 * (bug 8140) Add dedicated CSS classes to Special:Newpages elements
+* (bug 11005) Add CSS class to empty pages in Special:Newpages
 
 === Bug fixes in 1.17 ===
 * (bug 17560) Half-broken deletion moved image files to deletion archive
index 1661e96..54fedea 100644 (file)
@@ -298,8 +298,14 @@ class SpecialNewpages extends IncludableSpecialPage {
                        $this->skin->userToolLinks( $result->rc_user, $result->rc_user_text );
                $comment = $this->skin->commentBlock( $result->rc_comment );
                
-               if ( $this->patrollable( $result ) )
+               if ( $this->patrollable( $result ) ) {
                        $classes[] = 'not-patrolled';
+               }
+
+               # Add a class for zero byte pages
+               if ( $result->length == 0 ) {
+                       $classes[] = 'mw-newpages-zero-byte-page';
+               }
 
                # Tags, if any. check for including due to bug 23293
                if ( !$this->including() ) {