Index: trunk/phase3/includes/api/ApiQueryWatchlist.php |
— | — | @@ -115,17 +115,21 @@ |
116 | 116 | } |
117 | 117 | |
118 | 118 | $this->addTables( array( |
| 119 | + 'recentchanges', |
119 | 120 | 'watchlist', |
120 | 121 | 'page', |
121 | | - 'recentchanges' |
122 | 122 | ) ); |
123 | 123 | |
124 | 124 | $userId = $user->getId(); |
| 125 | + $this->addJoinConds( array( 'watchlist' => array('INNER JOIN', |
| 126 | + array( |
| 127 | + 'wl_user' => $userId, |
| 128 | + 'wl_namespace=rc_namespace', |
| 129 | + 'wl_title=rc_title' |
| 130 | + ) ) ) ); |
| 131 | + $this->addJoinConds( array( 'page' => array( 'LEFT JOIN','rc_cur_id=page_id' ) ) ); |
| 132 | + |
125 | 133 | $this->addWhere( array( |
126 | | - 'wl_namespace = rc_namespace', |
127 | | - 'wl_title = rc_title', |
128 | | - 'rc_cur_id = page_id', |
129 | | - 'wl_user' => $userId, |
130 | 134 | 'rc_deleted' => 0, |
131 | 135 | ) ); |
132 | 136 | |