Index: branches/REL1_4/phase3/includes/SpecialWatchlist.php |
— | — | @@ -17,6 +17,7 @@ |
18 | 18 | function wfSpecialWatchlist() { |
19 | 19 | global $wgUser, $wgOut, $wgLang, $wgTitle, $wgMemc, $wgRequest; |
20 | 20 | global $wgUseWatchlistCache, $wgWLCacheTimeout, $wgDBname; |
| 21 | + global $wgRCMaxAge; |
21 | 22 | $fname = "wfSpecialWatchlist"; |
22 | 23 | |
23 | 24 | $wgOut->setPagetitle( wfMsg( "watchlist" ) ); |
— | — | @@ -146,14 +147,14 @@ |
147 | 148 | # through the time-sorted page list checking for watched items. |
148 | 149 | |
149 | 150 | # Up estimate of watched items by 15% to compensate for talk pages... |
150 | | - if( $cutoff && ( $days <= 28 ) ) { |
| 151 | + if( $cutoff && ( $days <= ( $wgRCMaxAge / 86400 ) ) ) { |
151 | 152 | $docutoff = "AND rc_timestamp > '$cutoff'"; |
152 | 153 | $sql = "SELECT |
153 | 154 | rc_namespace cur_namespace, rc_title cur_title, rc_comment cur_comment, |
154 | 155 | rc_cur_id cur_id, rc_user cur_user, |
155 | 156 | rc_user_text cur_user_text, rc_timestamp cur_timestamp, |
156 | 157 | rc_minor cur_minor_edit, rc_new cur_is_new |
157 | | - FROM watchlist,recentchanges |
| 158 | + FROM $watchlist,$recentchanges |
158 | 159 | WHERE wl_user=$uid AND wl_namespace=rc_namespace AND wl_title=rc_title AND rc_this_oldid=0 |
159 | 160 | $docutoff |
160 | 161 | UNION SELECT |
— | — | @@ -161,7 +162,7 @@ |
162 | 163 | rc_cur_id cur_id, rc_user cur_user, |
163 | 164 | rc_user_text cur_user_text, rc_timestamp cur_timestamp, |
164 | 165 | rc_minor cur_minor_edit, rc_new cur_is_new |
165 | | - FROM watchlist,recentchanges |
| 166 | + FROM $watchlist,$recentchanges |
166 | 167 | WHERE wl_user=$uid AND wl_namespace+1=rc_namespace AND wl_title=rc_title AND rc_this_oldid=0 |
167 | 168 | $docutoff |
168 | 169 | ORDER BY cur_timestamp DESC |