added bytesize to new pages listing
authorErik Moeller <erik@users.mediawiki.org>
Mon, 26 May 2003 06:37:00 +0000 (06:37 +0000)
committerErik Moeller <erik@users.mediawiki.org>
Mon, 26 May 2003 06:37:00 +0000 (06:37 +0000)
includes/SpecialNewpages.php

index 47e09d6..dd7d5ca 100644 (file)
@@ -17,7 +17,7 @@ function wfSpecialNewpages()
 #        "WHERE cur_is_new=1 AND cur_namespace=0 AND cur_is_redirect=0 " .
 #        " ORDER BY cur_timestamp DESC LIMIT {$offset}, {$limit}";
        $sql = "SELECT rc_title AS cur_title,rc_user AS cur_user,rc_user_text AS cur_user_text,cur_comment," .
-         "rc_timestamp AS cur_timestamp FROM recentchanges,cur " .
+         "rc_timestamp AS cur_timestamp,length(cur_text) as cur_length FROM recentchanges,cur " .
          "WHERE rc_cur_id=cur_id AND rc_new=1 AND rc_namespace=0 AND cur_text NOT LIKE '#REDIRECT%' " .
          " ORDER BY rc_timestamp DESC LIMIT {$offset}, {$limit}";
        $res = wfQuery( $sql, $fname );
@@ -34,13 +34,14 @@ function wfSpecialNewpages()
        while ( $obj = wfFetchObject( $res ) ) {
                $u = $obj->cur_user;
                $ut = $obj->cur_user_text;
+               $length= wfmsg("nbytes",$obj->cur_length);
                $c = wfEscapeHTML( $obj->cur_comment );
                if ( 0 == $u ) { $ul = $ut; }
                else { $ul = $sk->makeLink( $wgLang->getNsText(2).":{$ut}", $ut ); }
 
                $d = $wgLang->timeanddate( $obj->cur_timestamp, true );
                $link = $sk->makeKnownLink( $obj->cur_title, "" );
-               $s .= "<li>{$d} {$link} . . {$ul}";
+               $s .= "<li>{$d} {$link} ({$length}) . . {$ul}";
 
                if ( "" != $c && "*" != $c ) { $s .= " <em>({$c})</em>"; }
                $s .= "</li>\n";