Index: trunk/phase3/includes/SpecialRecentchangeslinked.php |
— | — | @@ -62,8 +62,10 @@ |
63 | 63 | $cmq = 'AND rc_minor=0'; |
64 | 64 | } else { $cmq = ''; } |
65 | 65 | |
66 | | - extract( $dbr->tableNames( 'recentchanges', 'categorylinks', 'pagelinks', 'revision', 'page' ) ); |
| 66 | + extract( $dbr->tableNames( 'recentchanges', 'categorylinks', 'pagelinks', 'revision', 'page' , "watchlist" ) ); |
67 | 67 | |
| 68 | + $uid = $wgUser->getID(); |
| 69 | + |
68 | 70 | // If target is a Category, use categorylinks and invert from and to |
69 | 71 | if( $nt->getNamespace() == NS_CATEGORY ) { |
70 | 72 | $catkey = $dbr->addQuotes( $nt->getDBKey() ); |
— | — | @@ -82,7 +84,9 @@ |
83 | 85 | rc_new, |
84 | 86 | rc_patrolled, |
85 | 87 | rc_type |
| 88 | +" . ($uid ? ",wl_user" : "") . " |
86 | 89 | FROM $categorylinks, $recentchanges |
| 90 | +" . ($uid ? "LEFT OUTER JOIN $watchlist ON wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace " : "") . " |
87 | 91 | WHERE rc_timestamp > '{$cutoff}' |
88 | 92 | {$cmq} |
89 | 93 | AND cl_from=rc_cur_id |
— | — | @@ -110,7 +114,9 @@ |
111 | 115 | rc_new, |
112 | 116 | rc_patrolled, |
113 | 117 | rc_type |
114 | | - FROM $pagelinks, $recentchanges |
| 118 | +" . ($uid ? ",wl_user" : "") . " |
| 119 | + FROM $pagelinks, $recentchanges |
| 120 | +" . ($uid ? " LEFT OUTER JOIN $watchlist ON wl_user={$uid} AND wl_title=rc_title AND wl_namespace=rc_namespace " : "") . " |
115 | 121 | WHERE rc_timestamp > '{$cutoff}' |
116 | 122 | {$cmq} |
117 | 123 | AND pl_namespace=rc_namespace |
— | — | @@ -143,10 +149,12 @@ |
144 | 150 | if ( 0 == $count ) { break; } |
145 | 151 | $obj = $dbr->fetchObject( $res ); |
146 | 152 | --$count; |
| 153 | +# print_r ( $obj ) ; |
| 154 | +# print "<br/>\n" ; |
147 | 155 | |
148 | 156 | $rc = RecentChange::newFromRow( $obj ); |
149 | 157 | $rc->counter = $counter++; |
150 | | - $s .= $list->recentChangesLine( $rc ); |
| 158 | + $s .= $list->recentChangesLine( $rc , !empty( $obj->wl_user) ); |
151 | 159 | --$limit; |
152 | 160 | } |
153 | 161 | $s .= $list->endRecentChangesList(); |