Index: skins/monobook/main.css =================================================================== --- skins/monobook/main.css (Revision 16523) +++ skins/monobook/main.css (Arbeitskopie) @@ -1488,3 +1488,7 @@ .imagelist .TablePager_col_links { background-color: #eeeeff } .imagelist .TablePager_col_img_description { white-space: normal } .imagelist th.TablePager_sort { background-color: #ccccff } + +.plusminus { + font-weight: normal +} \ Kein Zeilenvorschub am Ende der Datei Index: includes/SpecialRecentchanges.php =================================================================== --- includes/SpecialRecentchanges.php (Revision 16523) +++ includes/SpecialRecentchanges.php (Arbeitskopie) @@ -270,7 +270,43 @@ $wgOut->addHTML( $s ); } } +/** + * Calculates the difference of the character count + * between two revisions for recent changes, + * which are specified by id. + * @param $curid revision id of the newer revision + * @param $oldid revision id of the older revision + * @return string HTML tag with the difference + */ +function rcCharacterDiff( $curid, $oldid ) +{ + $currev = Revision::newFromId( intval( $curid ) ); + if( is_object( $currev ) ) + { + $curtext = $currev->getText(); + } + $oldrev = Revision::newFromId( intval( $oldid ) ); + if( is_object( $oldrev ) ) + { + $oldtext = $oldrev->getText(); + } + $diff = ( int ) ( mb_strlen( $curtext, "UTF8" ) - mb_strlen( $oldtext, "UTF8" ) ); + if( $diff > 0 ) + { + $diff = ( string ) "+" . $diff; + } elseif( $diff === 0 ) + { + $diff = ( string ) "±" . $diff; + } else + { + $diff = ( string ) "-" . abs( $diff ); + } + unset( $curtext ); + unset( $oldtext ); + return $diff; +} + function rcFilterByCategories ( &$rows , $categories , $any ) { require_once ( 'Categoryfinder.php' ) ; Index: includes/ChangesList.php =================================================================== --- includes/ChangesList.php (Revision 16523) +++ includes/ChangesList.php (Arbeitskopie) @@ -166,7 +166,12 @@ wfArrayToCGI( array( 'curid' => $rc->mAttribs['rc_cur_id'], 'action' => 'history' ) ) ); - $s .= ') . . '; + $s .= ') '; + + # Character diff + $curid = $rc->mAttribs['rc_this_oldid']; + $oldid = $rc->mAttribs['rc_last_oldid']; + $s .= "(" . rcCharacterDiff( $curid, $oldid ) . ") . . "; } function insertArticleLink(&$s, &$rc, $unpatrolled, $watched) { @@ -450,6 +455,11 @@ $r .= ' '.$block[0]->timestamp.' '; $r .= ''; + # Character diff + $curid = $rcObj->mAttribs['rc_this_oldid']; + $oldid = $rcObj->mAttribs['rc_last_oldid']; + $r .= "(" . rcCharacterDiff( $curid, $oldid ) . ") "; + # Article link $r .= $this->maybeWatchedLink( $block[0]->link, $block[0]->watched ); $r .= $wgContLang->getDirMark(); @@ -599,6 +609,11 @@ } $r .= ' '.$rcObj->timestamp.' '; + # Character diff + $curid = $rcObj->mAttribs['rc_this_oldid']; + $oldid = $rcObj->mAttribs['rc_last_oldid']; + $r .= "(" . rcCharacterDiff( $curid, $oldid ) . ") "; + # Article link $r .= $this->maybeWatchedLink( $rcObj->link, $rcObj->watched );