diff options
author | Brion Vibber <brion@users.mediawiki.org> | 2004-12-18 03:47:11 +0000 |
---|---|---|
committer | Brion Vibber <brion@users.mediawiki.org> | 2004-12-18 03:47:11 +0000 |
commit | 798270581d38271fa87b2744fa157f77f2d2db80 (patch) | |
tree | 49523a20cfbed91f4d0292160a8f8b08c03eef13 /includes/ChangesList.php | |
parent | 3150abb758f8f2088cbccbbab340ee7e71f08bef (diff) | |
download | mediawikicore-798270581d38271fa87b2744fa157f77f2d2db80.tar.gz mediawikicore-798270581d38271fa87b2744fa157f77f2d2db80.zip |
(bug 454) Merge e-notif 2.00
From http://bugzilla.wikipedia.org/attachment.cgi?id=171&action=view
and extra files from http://www.tgries.de/mw/cvs15+enea200-minus-cvs.tgz
Undid a couple minor bits like the broken changing of minoreditletter.
Have not yet made general corrections/reworkings. Since this changes
the user and watchlist tables, you must run the updaters (installer or
update.php) on an existing database.
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/6696
Diffstat (limited to 'includes/ChangesList.php')
-rw-r--r-- | includes/ChangesList.php | 45 |
1 files changed, 37 insertions, 8 deletions
diff --git a/includes/ChangesList.php b/includes/ChangesList.php index 96575d730d4f..96a91d492c74 100644 --- a/includes/ChangesList.php +++ b/includes/ChangesList.php @@ -79,6 +79,10 @@ class ChangesList { if ( $rcObj->watched ) $link = '<strong>'.$link.'</strong>' ; $r .= $link ; + if ($rcObj->notificationtimestamp) { + $r .= wfMsg( 'updatedmarker' ); + } + # Diff $r .= ' (' ; $r .= $rcObj->difflink ; @@ -97,6 +101,10 @@ class ChangesList { $r .= $wgContLang->emphasize( ' ('.$rc_comment.')' ); } + if ($rcObj->numberofWatchingusers > 0) { + $r .= wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($rcObj->numberofWatchingusers)); + } + $r .= "<br />\n" ; return $r ; } @@ -158,9 +166,9 @@ class ChangesList { else $r .= ' ' ; $r .= ' ' ; # Minor if ( $unpatrolled ) { - $r .= "!"; + $r .= '!'; } else { - $r .= " "; + $r .= ' '; } # Timestamp @@ -172,6 +180,10 @@ class ChangesList { if ( $block[0]->watched ) $link = '<strong>'.$link.'</strong>' ; $r .= $link ; + if ($block[0]->notificationtimestamp) { + $r .= wfMsg( 'updatedmarker' ); + } + $curIdEq = 'curid=' . $block[0]->mAttribs['rc_cur_id']; if ( $block[0]->mAttribs['rc_type'] != RC_LOG ) { # Changes @@ -187,6 +199,10 @@ class ChangesList { } $r .= $users ; + + if ($block[0]->numberofWatchingusers > 0) { + $r .= wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($block[0]->numberofWatchingusers)); + } $r .= "<br />\n" ; # Sub-entries @@ -210,9 +226,9 @@ class ChangesList { } if ( $rcObj->unpatrolled ) { - $r .= "!"; + $r .= '!'; } else { - $r .= " "; + $r .= ' '; } $r .= ' </tt>' ; @@ -271,7 +287,7 @@ class ChangesList { * Either returns the line, or caches it for later use */ function recentChangesLine( &$rc, $watched = false ) { - global $wgUser ; + global $wgUser; $usenew = $wgUser->getOption( 'usenewrc' ); if ( $usenew ) $line = $this->recentChangesLineNew ( $rc, $watched ) ; @@ -280,6 +296,7 @@ class ChangesList { return $line ; } + function recentChangesLineOld( &$rc, $watched = false ) { $fname = 'Skin::recentChangesLineOld'; wfProfileIn( $fname ); @@ -350,9 +367,9 @@ class ChangesList { $s .= ') . . '; # M, N and ! (minor, new and unpatrolled) - if ( $rc_minor ) { $s .= ' <span class="minor">'.$message["minoreditletter"].'</span>'; } - if ( $rc_type == RC_NEW ) { $s .= '<span class="newpage">'.$message["newpageletter"].'</span>'; } - if ( $unpatrolled ) { $s .= ' <span class="unpatrolled">!</span>'; } + if ( $rc_minor ) { $s .= ' <span class="minoreditletter">'.$message["minoreditletter"].'</span>'; } + if ( $rc_type == RC_NEW ) { $s .= '<span class="newpageletter">'.$message["newpageletter"].'</span>'; } + if ( !$rc_patrolled ) { $s .= ' <span class="unpatrolled">!</span>'; } # Article link # If it's a new article, there is no diff link, but if it hasn't been @@ -365,6 +382,11 @@ class ChangesList { if ( $watched ) { $articleLink = '<strong>'.$articleLink.'</strong>'; } + + if ($rc->notificationtimestamp) { + $articleLink .= wfMsg( 'updatedmarker' ); + } + $s .= ' '.$articleLink; wfProfileOut("$fname-page"); } @@ -412,6 +434,11 @@ class ChangesList { $rc_comment = $this->skin->formatComment($rc_comment,$rc->getTitle()); $s .= $wgContLang->emphasize(' (' . $rc_comment . ')'); } + + if ($rc->numberofWatchingusers > 0) { + $s .= ' ' . wfMsg('number_of_watching_users_RCview', $wgContLang->formatNum($rc->numberofWatchingusers)); + } + $s .= "</li>\n"; wfProfileOut( "$fname-rest" ); @@ -477,6 +504,8 @@ class ChangesList { $rc->watched = $watched ; $rc->link = $clink ; $rc->timestamp = $time; + $rc->notificationtimestamp = $baseRC->notificationtimestamp; + $rc->numberofWatchingusers = $baseRC->numberofWatchingusers; # Make "cur" and "diff" links $titleObj = $rc->getTitle(); |