* (bug 4298) Include rc_id on enhanced RC singleton diff links for patrolling
[lhc/web/wiklou.git] / includes / SpecialWatchlist.php
index 768bd46..4ab7c21 100644 (file)
@@ -15,7 +15,7 @@ require_once( 'WatchedItem.php' );
  * constructor
  */
 function wfSpecialWatchlist( $par ) {
-       global $wgUser, $wgOut, $wgLang, $wgTitle, $wgMemc, $wgRequest, $wgContLang;
+       global $wgUser, $wgOut, $wgLang, $wgMemc, $wgRequest, $wgContLang;
        global $wgUseWatchlistCache, $wgWLCacheTimeout, $wgDBname;
        global $wgRCShowWatchingUsers, $wgEnotifWatchlist, $wgShowUpdatedMarker;
        global $wgEnotifWatchlist, $wgFilterRobotsWL;
@@ -208,7 +208,7 @@ function wfSpecialWatchlist( $par ) {
        if( $wgFilterRobotsWL ) {
                $andHideBotsOptional = $hideBots ? "AND (rc_bot = 0)" : '';
        } else {
-               $andHideBotsOptional = "AND AND  rc_this_oldid=page_latest";
+               $andHideBotsOptional = "AND rc_this_oldid=page_latest";
        }
                
        
@@ -250,7 +250,6 @@ function wfSpecialWatchlist( $par ) {
           AND wl_title=rc_title
           AND rc_timestamp > '$cutoff'
           AND rc_cur_id=page_id
-          AND rc_this_oldid=page_latest
           $andHideOwn
           $andHideBotsOptional
           ORDER BY rc_timestamp DESC";
@@ -294,8 +293,8 @@ function wfSpecialWatchlist( $par ) {
        $wgOut->addHTML( "</p>\n" );
        /* End bottom header */
 
-       $sk = $wgUser->getSkin();
-       $list =& new ChangesList( $sk );
+       $list = ChangesList::newFromUser( $wgUser );
+
        $s = $list->beginRecentChangesList();
        $counter = 1;
        while ( $obj = $dbr->fetchObject( $res ) ) {