Index: branches/REL1_16/extensions/CodeReview/api/ApiCodeDiff.php |
— | — | @@ -4,7 +4,6 @@ |
5 | 5 | |
6 | 6 | public function execute() { |
7 | 7 | global $wgUser, $wgCodeReviewMaxDiffSize; |
8 | | - $this->getMain()->setVaryCookie(); |
9 | 8 | // Before doing anything at all, let's check permissions |
10 | 9 | if( !$wgUser->isAllowed('codereview-use') ) { |
11 | 10 | $this->dieUsage('You don\'t have permission to view code diffs','permissiondenied'); |
Index: branches/REL1_16/extensions/CodeReview/api/ApiCodeUpdate.php |
— | — | @@ -8,7 +8,6 @@ |
9 | 9 | if( !$wgUser->isAllowed('codereview-use') ) { |
10 | 10 | $this->dieUsage('You don\'t have permission update code','permissiondenied'); |
11 | 11 | } |
12 | | - $this->getMain()->setVaryCookie(); |
13 | 12 | $params = $this->extractRequestParams(); |
14 | 13 | |
15 | 14 | if ( !isset( $params['repo'] ) ) { |
Index: branches/REL1_16/extensions/CodeReview/api/ApiCodeComments.php |
— | — | @@ -30,7 +30,6 @@ |
31 | 31 | |
32 | 32 | public function execute() { |
33 | 33 | global $wgUser; |
34 | | - $this->getMain()->setVaryCookie(); |
35 | 34 | // Before doing anything at all, let's check permissions |
36 | 35 | if( !$wgUser->isAllowed('codereview-use') ) { |
37 | 36 | $this->dieUsage('You don\'t have permission to view code comments','permissiondenied'); |
Property changes on: branches/REL1_16/extensions/UsabilityInitiative/js/plugins/jquery.textSelection.js |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/UsabilityInitiative/js/plugins/jquery.cookie.js |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Index: branches/REL1_16/extensions/UsabilityInitiative/ClickTracking/ApiClickTracking.php |
— | — | @@ -15,7 +15,6 @@ |
16 | 16 | public function execute() { |
17 | 17 | global $wgUser, $wgTitle, $wgClickTrackContribGranularity1, $wgClickTrackContribGranularity2, $wgClickTrackContribGranularity3; |
18 | 18 | |
19 | | - $this->getMain()->setCachePrivate(); |
20 | 19 | $params = $this->extractRequestParams(); |
21 | 20 | $this->validateParams( $params ); |
22 | 21 | $eventid_to_lookup = $params['eventid']; |
Index: branches/REL1_16/extensions/LiquidThreads/api/ApiQueryLQTThreads.php |
— | — | @@ -43,6 +43,8 @@ |
44 | 44 | } |
45 | 45 | |
46 | 46 | public function execute() { |
| 47 | + global $wgUser; |
| 48 | + |
47 | 49 | $params = $this->extractRequestParams(); |
48 | 50 | $prop = array_flip( $params['prop'] ); |
49 | 51 | $result = $this->getResult(); |
— | — | @@ -84,7 +86,6 @@ |
85 | 87 | ); |
86 | 88 | |
87 | 89 | $this->addFields( $allFields ); |
88 | | - $this->getMain()->setVaryCookie(); |
89 | 90 | } |
90 | 91 | |
91 | 92 | $res = $this->select( __METHOD__ ); |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/user/Voter.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/user/Auth.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/pages/DetailsPage.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/pages/DumpPage.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/pages/TallyPage.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/pages/LoginPage.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/pages/MessageDumpPage.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/pages/ListPage.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/pages/TranslatePage.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/pages/VotePage.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/pages/Page.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/pages/EntryPage.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/talliers/ElectionTallier.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/talliers/Tallier.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/ballots/Ballot.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/crypt/Random.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/crypt/Crypt.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/entities/Question.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/entities/Option.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/entities/Entity.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/entities/Election.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/main/Store.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/main/Context.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: branches/REL1_16/extensions/SecurePoll/includes/main/Base.php |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Index: branches/REL1_16/extensions/CentralAuth/ApiQueryGlobalUserInfo.php |
— | — | @@ -41,7 +41,6 @@ |
42 | 42 | $prop = array_flip( (array)$params['prop'] ); |
43 | 43 | if ( is_null( $params['user'] ) ) { |
44 | 44 | $params['user'] = $wgUser->getName(); |
45 | | - $this->getMain()->setVaryCookie(); |
46 | 45 | } |
47 | 46 | $user = new CentralAuthUser( $params['user'] ); |
48 | 47 | if ( !$user->exists() ) { |
Index: branches/REL1_16/extensions/FlaggedRevs/api/ApiQueryOldreviewedpages.php |
— | — | @@ -58,7 +58,6 @@ |
59 | 59 | $this->addWhere( 'GREATEST(page_len,rev_len)-LEAST(page_len,rev_len) <= '. |
60 | 60 | intval($params['maxsize']) ); |
61 | 61 | if( $params['filterwatched'] == 'watched' ) { |
62 | | - $this->getMain()->setVaryCookie(); |
63 | 62 | if( !($uid = $wgUser->getId()) ) { |
64 | 63 | $this->dieUsage('You must be logged-in to have a watchlist', 'notloggedin'); |
65 | 64 | } |
— | — | @@ -83,7 +82,7 @@ |
84 | 83 | $this->addWhere( 'rev_id=fp_stable' ); |
85 | 84 | if ( !isset( $params['start'] ) && !isset( $params['end'] ) ) |
86 | 85 | $this->addWhere( 'fp_pending_since IS NOT NULL' ); |
87 | | - |
| 86 | + |
88 | 87 | $this->addOption( 'USE INDEX', $useIndex ); |
89 | 88 | |
90 | 89 | if ( is_null( $resultPageSet ) ) { |
Index: branches/REL1_16/extensions/AbuseFilter/ApiQueryAbuseLog.php |
— | — | @@ -36,7 +36,6 @@ |
37 | 37 | |
38 | 38 | public function execute() { |
39 | 39 | global $wgUser; |
40 | | - $this->getMain()->setVaryCookie(); |
41 | 40 | if ( !$wgUser->isAllowed( 'abusefilter-log' ) ) |
42 | 41 | $this->dieUsage( 'You don\'t have permission to view the abuse log', 'permissiondenied' ); |
43 | 42 | |
Index: branches/REL1_16/extensions/AbuseFilter/ApiQueryAbuseFilters.php |
— | — | @@ -36,7 +36,6 @@ |
37 | 37 | |
38 | 38 | public function execute() { |
39 | 39 | global $wgUser; |
40 | | - $this->getMain()->setVaryCookie(); |
41 | 40 | if ( !$wgUser->isAllowed( 'abusefilter-view' ) ) |
42 | 41 | $this->dieUsage( 'You don\'t have permission to view abuse filters', 'permissiondenied' ); |
43 | 42 | |
Index: branches/REL1_16/extensions/GlobalBlocking/ApiQueryGlobalBlocks.php |
— | — | @@ -36,6 +36,7 @@ |
37 | 37 | } |
38 | 38 | |
39 | 39 | public function execute() { |
| 40 | + global $wgUser; |
40 | 41 | $params = $this->extractRequestParams(); |
41 | 42 | |
42 | 43 | $prop = array_flip($params['prop']); |
Index: branches/REL1_16/phase3/includes/api/ApiQueryRecentChanges.php |
— | — | @@ -137,12 +137,8 @@ |
138 | 138 | |
139 | 139 | // Check permissions |
140 | 140 | global $wgUser; |
141 | | - if ( isset( $show['patrolled'] ) || isset( $show['!patrolled'] ) ) { |
142 | | - $this->getMain()->setVaryCookie(); |
143 | | - if ( !$wgUser->useRCPatrol() && !$wgUser->useNPPatrol() ) { |
144 | | - $this->dieUsage( 'You need the patrol right to request the patrolled flag', 'permissiondenied' ); |
145 | | - } |
146 | | - } |
| 141 | + if ( ( isset( $show['patrolled'] ) || isset( $show['!patrolled'] ) ) && !$wgUser->useRCPatrol() && !$wgUser->useNPPatrol() ) |
| 142 | + $this->dieUsage( "You need the patrol right to request the patrolled flag", 'permissiondenied' ); |
147 | 143 | |
148 | 144 | /* Add additional conditions to query depending upon parameters. */ |
149 | 145 | $this->addWhereIf( 'rc_minor = 0', isset ( $show['!minor'] ) ); |
— | — | @@ -394,9 +390,6 @@ |
395 | 391 | |
396 | 392 | if ( !is_null( $this->token ) ) |
397 | 393 | { |
398 | | - // Don't cache tokens |
399 | | - $this->getMain()->setCachePrivate(); |
400 | | - |
401 | 394 | $tokenFunctions = $this->getTokenFunctions(); |
402 | 395 | foreach ( $this->token as $t ) |
403 | 396 | { |
Index: branches/REL1_16/phase3/includes/api/ApiQueryProtectedTitles.php |
— | — | @@ -100,7 +100,6 @@ |
101 | 101 | |
102 | 102 | if ( isset( $prop['parsedcomment'] ) ) { |
103 | 103 | global $wgUser; |
104 | | - $this->getMain()->setVaryCookie(); |
105 | 104 | $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $row->pt_reason, $title ); |
106 | 105 | } |
107 | 106 | |
Index: branches/REL1_16/phase3/includes/api/ApiLogout.php |
— | — | @@ -42,7 +42,6 @@ |
43 | 43 | |
44 | 44 | public function execute() { |
45 | 45 | global $wgUser; |
46 | | - $this->getMain()->setCachePrivate(); |
47 | 46 | $oldName = $wgUser->getName(); |
48 | 47 | $wgUser->logout(); |
49 | 48 | |
Index: branches/REL1_16/phase3/includes/api/ApiMain.php |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | |
126 | 126 | private $mPrinter, $mModules, $mModuleNames, $mFormats, $mFormatNames; |
127 | 127 | private $mResult, $mAction, $mShowVersions, $mEnableWrite, $mRequest; |
128 | | - private $mInternalMode, $mSquidMaxage, $mModule, $mVaryCookie; |
| 128 | + private $mInternalMode, $mSquidMaxage, $mModule; |
129 | 129 | |
130 | 130 | private $mCacheControl = array( 'must-revalidate' => true ); |
131 | 131 | |
— | — | @@ -171,7 +171,6 @@ |
172 | 172 | |
173 | 173 | $this->mSquidMaxage = - 1; // flag for executeActionWithErrorHandling() |
174 | 174 | $this->mCommit = false; |
175 | | - $this->mVaryCookie = false; |
176 | 175 | } |
177 | 176 | |
178 | 177 | /** |
— | — | @@ -222,14 +221,6 @@ |
223 | 222 | 's-maxage' => $maxage |
224 | 223 | ) ); |
225 | 224 | } |
226 | | - |
227 | | - /** |
228 | | - * Make sure Cache-Control: private is set. Use this when the output of a request |
229 | | - * is for the current recipient only and should not be cached in any shared cache. |
230 | | - */ |
231 | | - public function setCachePrivate() { |
232 | | - $this->setCacheControl( array( 'private' => true ) ); |
233 | | - } |
234 | 225 | |
235 | 226 | /** |
236 | 227 | * Set directives (key/value pairs) for the Cache-Control header. |
— | — | @@ -241,35 +232,6 @@ |
242 | 233 | } |
243 | 234 | |
244 | 235 | /** |
245 | | - * Make sure Vary: Cookie and friends are set. Use this when the output of a request |
246 | | - * may be cached for anons but may not be cached for logged-in users. |
247 | | - * |
248 | | - * WARNING: This function must be called CONSISTENTLY for a given URL. This means that a |
249 | | - * given URL must either always or never call this function; if it sometimes does and |
250 | | - * sometimes doesn't, stuff will break. |
251 | | - */ |
252 | | - public function setVaryCookie() { |
253 | | - $this->mVaryCookie = true; |
254 | | - } |
255 | | - |
256 | | - /** |
257 | | - * Actually output the Vary: Cookie header and its friends, if flagged with setVaryCookie(). |
258 | | - * Outputs the appropriate X-Vary-Options header and Cache-Control: private if needed. |
259 | | - */ |
260 | | - private function outputVaryCookieHeader() { |
261 | | - global $wgUseXVO, $wgOut; |
262 | | - if ( $this->mVaryCookie ) { |
263 | | - header( 'Vary: Cookie' ); |
264 | | - if ( $wgUseXVO ) { |
265 | | - header( $wgOut->getXVO() ); |
266 | | - if ( $wgOut->haveCacheVaryCookies() ) { |
267 | | - $this->setCacheControl( array( 'private' => true ) ); |
268 | | - } |
269 | | - } |
270 | | - } |
271 | | - } |
272 | | - |
273 | | - /** |
274 | 236 | * Create an instance of an output formatter by its name |
275 | 237 | */ |
276 | 238 | public function createPrinterByName( $format ) { |
— | — | @@ -319,7 +281,6 @@ |
320 | 282 | |
321 | 283 | // Error results should not be cached |
322 | 284 | $this->setCacheMaxAge( 0 ); |
323 | | - $this->setCachePrivate(); |
324 | 285 | |
325 | 286 | $headerStr = 'MediaWiki-API-Error: ' . $errCode; |
326 | 287 | if ( $e->getCode() === 0 ) |
— | — | @@ -334,11 +295,6 @@ |
335 | 296 | $this->mPrinter->safeProfileOut(); |
336 | 297 | $this->printResult( true ); |
337 | 298 | } |
338 | | - |
339 | | - // If this wiki is private, don't cache anything ever |
340 | | - if ( in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) ) { |
341 | | - $this->setCachePrivate(); |
342 | | - } |
343 | 299 | |
344 | 300 | // If nobody called setCacheMaxAge(), use the (s)maxage parameters |
345 | 301 | if ( !isset( $this->mCacheControl['s-maxage'] ) ) { |
— | — | @@ -370,7 +326,6 @@ |
371 | 327 | } |
372 | 328 | |
373 | 329 | header( "Cache-Control: $ccHeader" ); |
374 | | - $this->outputVaryCookieHeader(); |
375 | 330 | |
376 | 331 | if ( $this->mPrinter->getIsHtml() ) |
377 | 332 | echo wfReportTime(); |
— | — | @@ -491,8 +446,7 @@ |
492 | 447 | } |
493 | 448 | |
494 | 449 | global $wgUser, $wgGroupPermissions; |
495 | | - if ( $module->isReadMode() && !in_array( 'read', User::getGroupPermissions( array( '*' ) ), true ) && |
496 | | - !$wgUser->isAllowed( 'read' ) ) |
| 450 | + if ( $module->isReadMode() && !$wgGroupPermissions['*']['read'] && !$wgUser->isAllowed( 'read' ) ) |
497 | 451 | $this->dieUsageMsg( array( 'readrequired' ) ); |
498 | 452 | if ( $module->isWriteMode() ) { |
499 | 453 | if ( !$this->mEnableWrite ) |
Index: branches/REL1_16/phase3/includes/api/ApiQueryWatchlistRaw.php |
— | — | @@ -61,7 +61,6 @@ |
62 | 62 | if ( isset( $show['changed'] ) && isset( $show['!changed'] ) ) |
63 | 63 | $this->dieUsageMsg( array( 'show' ) ); |
64 | 64 | |
65 | | - $this->getMain()->setVaryCookie(); |
66 | 65 | $this->addTables( 'watchlist' ); |
67 | 66 | $this->addFields( array( 'wl_namespace', 'wl_title' ) ); |
68 | 67 | $this->addFieldsIf( 'wl_notificationtimestamp', isset( $prop['changed'] ) ); |
— | — | @@ -189,4 +188,4 @@ |
190 | 189 | public function getVersion() { |
191 | 190 | return __CLASS__ . ': $Id$'; |
192 | 191 | } |
193 | | -} |
| 192 | +} |
\ No newline at end of file |
Index: branches/REL1_16/phase3/includes/api/ApiQueryUserInfo.php |
— | — | @@ -40,7 +40,6 @@ |
41 | 41 | } |
42 | 42 | |
43 | 43 | public function execute() { |
44 | | - $this->getMain()->setCachePrivate(); |
45 | 44 | $params = $this->extractRequestParams(); |
46 | 45 | $result = $this->getResult(); |
47 | 46 | $r = array(); |
Index: branches/REL1_16/phase3/includes/api/ApiQueryLogEvents.php |
— | — | @@ -267,7 +267,6 @@ |
268 | 268 | |
269 | 269 | if ( $this->fld_parsedcomment ) { |
270 | 270 | global $wgUser; |
271 | | - $this->getMain()->setVaryCookie(); |
272 | 271 | $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $row->log_comment, $title ); |
273 | 272 | } |
274 | 273 | } |
Index: branches/REL1_16/phase3/includes/api/ApiQueryBlocks.php |
— | — | @@ -121,12 +121,8 @@ |
122 | 122 | 'ipb_auto' => 0 |
123 | 123 | ) ); |
124 | 124 | } |
125 | | - |
126 | | - // Make sure private data (deleted blocks) isn't cached |
127 | | - $this->getMain()->setVaryCookie(); |
128 | | - if ( !$wgUser->isAllowed( 'hideuser' ) ) { |
| 125 | + if ( !$wgUser->isAllowed( 'hideuser' ) ) |
129 | 126 | $this->addWhereFld( 'ipb_deleted', 0 ); |
130 | | - } |
131 | 127 | |
132 | 128 | // Purge expired entries on one in every 10 queries |
133 | 129 | if ( !mt_rand( 0, 10 ) ) |
Index: branches/REL1_16/phase3/includes/api/ApiQueryInfo.php |
— | — | @@ -244,7 +244,6 @@ |
245 | 245 | $this->getProtectionInfo(); |
246 | 246 | |
247 | 247 | if ( $this->fld_watched ) |
248 | | - $this->getMain()->setVaryCookie(); |
249 | 248 | $this->getWatchedInfo(); |
250 | 249 | |
251 | 250 | // Run the talkid/subjectid query if requested |
— | — | @@ -289,9 +288,6 @@ |
290 | 289 | } |
291 | 290 | |
292 | 291 | if ( !is_null( $this->params['token'] ) ) { |
293 | | - // Don't cache tokens |
294 | | - $this->getMain()->setCachePrivate(); |
295 | | - |
296 | 292 | $tokenFunctions = $this->getTokenFunctions(); |
297 | 293 | $pageInfo['starttimestamp'] = wfTimestamp( TS_ISO_8601, time() ); |
298 | 294 | foreach ( $this->params['token'] as $t ) |
— | — | @@ -526,7 +522,7 @@ |
527 | 523 | } |
528 | 524 | |
529 | 525 | /** |
530 | | - * Get information about watched status and put it in $this->watched |
| 526 | + * Get information about watched status and put it in $watched |
531 | 527 | */ |
532 | 528 | private function getWatchedInfo() |
533 | 529 | { |
Index: branches/REL1_16/phase3/includes/api/ApiQueryWatchlist.php |
— | — | @@ -68,12 +68,9 @@ |
69 | 69 | if ( $token == '' || $token != $params['token'] ) { |
70 | 70 | $this->dieUsage( 'Incorrect watchlist token provided -- please set a correct token in Special:Preferences', 'bad_wltoken' ); |
71 | 71 | } |
| 72 | + } elseif ( !$wgUser->isLoggedIn() ) { |
| 73 | + $this->dieUsage( 'You must be logged-in to have a watchlist', 'notloggedin' ); |
72 | 74 | } else { |
73 | | - // User not determined by URL, so don't cache |
74 | | - $this->getMain()->setVaryCookie(); |
75 | | - if ( !$wgUser->isLoggedIn() ) { |
76 | | - $this->dieUsage( 'You must be logged-in to have a watchlist', 'notloggedin' ); |
77 | | - } |
78 | 75 | $user = $wgUser; |
79 | 76 | } |
80 | 77 | |
— | — | @@ -93,8 +90,7 @@ |
94 | 91 | $this->fld_notificationtimestamp = isset( $prop['notificationtimestamp'] ); |
95 | 92 | |
96 | 93 | if ( $this->fld_patrol ) { |
97 | | - $this->getMain()->setVaryCookie(); |
98 | | - if ( !$user->useRCPatrol() && !$user->useNPPatrol() ) { |
| 94 | + if ( !$user->useRCPatrol() && !$user->useNPPatrol() ) |
99 | 95 | $this->dieUsage( 'patrol property is not available', 'patrol' ); |
100 | 96 | } |
101 | 97 | } |
— | — | @@ -159,12 +155,8 @@ |
160 | 156 | } |
161 | 157 | |
162 | 158 | // Check permissions. FIXME: should this check $user instead of $wgUser? |
163 | | - if ( isset( $show['patrolled'] ) || isset( $show['!patrolled'] ) ) { |
164 | | - $this->getMain()->setVaryCookie(); |
165 | | - if ( !$wgUser->useRCPatrol() && !$wgUser->useNPPatrol() ) { |
166 | | - $this->dieUsage( 'You need the patrol right to request the patrolled flag', 'permissiondenied' ); |
167 | | - } |
168 | | - } |
| 159 | + if ( ( isset( $show['patrolled'] ) || isset( $show['!patrolled'] ) ) && !$wgUser->useRCPatrol() && !$wgUser->useNPPatrol() ) |
| 160 | + $this->dieUsage( "You need the patrol right to request the patrolled flag", 'permissiondenied' ); |
169 | 161 | |
170 | 162 | /* Add additional conditions to query depending upon parameters. */ |
171 | 163 | $this->addWhereIf( 'rc_minor = 0', isset ( $show['!minor'] ) ); |
— | — | @@ -280,8 +272,6 @@ |
281 | 273 | |
282 | 274 | if ( $this->fld_parsedcomment && isset( $row->rc_comment ) ) { |
283 | 275 | global $wgUser; |
284 | | - $this->getMain()->setVaryCookie(); |
285 | | - |
286 | 276 | $vals['parsedcomment'] = $wgUser->getSkin()->formatComment( $row->rc_comment, $title ); |
287 | 277 | } |
288 | 278 | |
Index: branches/REL1_16/phase3/includes/api/ApiQueryDeletedrevs.php |
— | — | @@ -42,7 +42,6 @@ |
43 | 43 | public function execute() { |
44 | 44 | |
45 | 45 | global $wgUser; |
46 | | - $this->getMain()->setVaryCookie(); |
47 | 46 | // Before doing anything at all, let's check permissions |
48 | 47 | if ( !$wgUser->isAllowed( 'deletedhistory' ) ) |
49 | 48 | $this->dieUsage( 'You don\'t have permission to view deleted revision information', 'permissiondenied' ); |
Index: branches/REL1_16/phase3/includes/api/ApiPatrol.php |
— | — | @@ -41,7 +41,6 @@ |
42 | 42 | * Patrols the article or provides the reason the patrol failed. |
43 | 43 | */ |
44 | 44 | public function execute() { |
45 | | - $this->getMain()->setCachePrivate(); |
46 | 45 | $params = $this->extractRequestParams(); |
47 | 46 | |
48 | 47 | if ( !isset( $params['rcid'] ) ) |
Index: branches/REL1_16/phase3/includes/api/ApiWatch.php |
— | — | @@ -41,8 +41,7 @@ |
42 | 42 | |
43 | 43 | public function execute() { |
44 | 44 | global $wgUser; |
45 | | - $this->getMain()->setCachePrivate(); |
46 | | - if ( !$wgUser->isLoggedIn() ) { |
| 45 | + if ( !$wgUser->isLoggedIn() ) |
47 | 46 | $this->dieUsage( 'You must be logged-in to have a watchlist', 'notloggedin' ); |
48 | 47 | |
49 | 48 | $params = $this->extractRequestParams(); |
Index: branches/REL1_16/phase3/includes/api/ApiQueryRevisions.php |
— | — | @@ -396,9 +396,6 @@ |
397 | 397 | |
398 | 398 | if ( !is_null( $this->token ) ) |
399 | 399 | { |
400 | | - // Don't cache tokens |
401 | | - $this->getMain()->setCachePrivate(); |
402 | | - |
403 | 400 | $tokenFunctions = $this->getTokenFunctions(); |
404 | 401 | foreach ( $this->token as $t ) |
405 | 402 | { |
Index: branches/REL1_16/phase3/includes/api/ApiParse.php |
— | — | @@ -118,11 +118,10 @@ |
119 | 119 | if ( !$titleObj ) |
120 | 120 | $titleObj = Title::newFromText( "API" ); |
121 | 121 | $wgTitle = $titleObj; |
122 | | - if ( $params['pst'] || $params['onlypst'] ) { |
| 122 | + if ( $params['pst'] || $params['onlypst'] ) |
123 | 123 | $text = $wgParser->preSaveTransform( $text, $titleObj, $wgUser, $popts ); |
124 | | - $this->getMain()->setVaryCookie(); |
125 | | - } |
126 | | - if ( $params['onlypst'] ) { |
| 124 | + if ( $params['onlypst'] ) |
| 125 | + { |
127 | 126 | // Build a result and bail out |
128 | 127 | $result_array['text'] = array(); |
129 | 128 | $this->getResult()->setContent( $result_array['text'], $text ); |
— | — | @@ -326,4 +325,4 @@ |
327 | 326 | public function getVersion() { |
328 | 327 | return __CLASS__ . ': $Id$'; |
329 | 328 | } |
330 | | -} |
| 329 | +} |
\ No newline at end of file |
Index: branches/REL1_16/phase3/includes/api/ApiPurge.php |
— | — | @@ -42,7 +42,6 @@ |
43 | 43 | */ |
44 | 44 | public function execute() { |
45 | 45 | global $wgUser; |
46 | | - $this->getMain()->setCachePrivate(); |
47 | 46 | $params = $this->extractRequestParams(); |
48 | 47 | if ( !$wgUser->isAllowed( 'purge' ) ) |
49 | 48 | $this->dieUsageMsg( array( 'cantpurge' ) ); |
Index: branches/REL1_16/phase3/includes/api/ApiQueryAllmessages.php |
— | — | @@ -46,9 +46,6 @@ |
47 | 47 | { |
48 | 48 | global $wgLang; |
49 | 49 | $wgLang = Language::factory( $params['lang'] ); |
50 | | - } else if ( is_null( $params['lang'] ) ) { |
51 | | - // Language not determined by URL but by user preferences, so don't cache |
52 | | - $this->getMain()->setVaryCookie(); |
53 | 50 | } |
54 | 51 | |
55 | 52 | $prop = array_flip( (array)$params['prop'] ); |
Index: branches/REL1_16/phase3/includes/api/ApiQueryUserContributions.php |
— | — | @@ -164,9 +164,7 @@ |
165 | 165 | "rev_timestamp $op= '$encTS')" ); |
166 | 166 | } |
167 | 167 | |
168 | | - // Make sure private data (deleted revisions) isn't cached |
169 | | - $this->getMain()->setVaryCookie(); |
170 | | - if ( !$wgUser->isAllowed( 'hideuser' ) ) { |
| 168 | + if ( !$wgUser->isAllowed( 'hideuser' ) ) |
171 | 169 | $this->addWhere( $this->getDB()->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0' ); |
172 | 170 | // We only want pages by the specified users. |
173 | 171 | if ( $this->prefixMode ) |
— | — | @@ -212,12 +210,8 @@ |
213 | 211 | $this->fld_patrolled ) |
214 | 212 | { |
215 | 213 | global $wgUser; |
216 | | - // Don't cache private data |
217 | | - $this->getMain()->setVaryCookie(); |
218 | | - if ( !$wgUser->useRCPatrol() && !$wgUser->useNPPatrol() ) { |
219 | | - $this->dieUsage( 'You need the patrol right to request the patrolled flag', 'permissiondenied' ); |
220 | | - } |
221 | | - |
| 214 | + if ( !$wgUser->useRCPatrol() && !$wgUser->useNPPatrol() ) |
| 215 | + $this->dieUsage( "You need the patrol right to request the patrolled flag", 'permissiondenied' ); |
222 | 216 | // Use a redundant join condition on both |
223 | 217 | // timestamp and ID so we can use the timestamp |
224 | 218 | // index |
Index: branches/REL1_16/phase3/includes/api/ApiQueryUsers.php |
— | — | @@ -156,9 +156,6 @@ |
157 | 157 | |
158 | 158 | if ( !is_null( $params['token'] ) ) |
159 | 159 | { |
160 | | - // Don't cache tokens |
161 | | - $this->getMain()->setCachePrivate(); |
162 | | - |
163 | 160 | $tokenFunctions = $this->getTokenFunctions(); |
164 | 161 | foreach ( $params['token'] as $t ) |
165 | 162 | { |