r100841 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100840‎ | r100841 | r100842 >
Date:18:52, 26 October 2011
Author:reedy
Status:ok
Tags:
Comment:
REL1_18 MFT r98703, r98755, r98880
Modified paths:
  • /branches/REL1_18/phase3 (modified) (history)
  • /branches/REL1_18/phase3/includes (modified) (history)
  • /branches/REL1_18/phase3/includes/DefaultSettings.php (modified) (history)
  • /branches/REL1_18/phase3/includes/Feed.php (modified) (history)
  • /branches/REL1_18/phase3/includes/OutputPage.php (modified) (history)
  • /branches/REL1_18/phase3/includes/WikiPage.php (modified) (history)
  • /branches/REL1_18/phase3/includes/api (modified) (history)
  • /branches/REL1_18/phase3/includes/api/ApiMain.php (modified) (history)
  • /branches/REL1_18/phase3/includes/db/Database.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/includes/db/Database.php
@@ -1192,9 +1192,6 @@
11931193 * - If the value is an array, an IN(...) clause will be constructed,
11941194 * such that the field name may match any of the elements in the
11951195 * array. The elements of the array will be quoted.
1196 - * - If the field name ends with "!", this is taken as a flag which
1197 - * inverts the comparison, allowing NOT IN clauses to be constructed,
1198 - * for example: array( 'user_id!' => array( 1, 2, 3 ) )
11991196 *
12001197 * Note that expressions are often DBMS-dependent in their syntax.
12011198 * DBMS-independent wrappers are provided for constructing several types of
Property changes on: branches/REL1_18/phase3/includes/db/Database.php
___________________________________________________________________
Modified: svn:mergeinfo
12021199 Merged /trunk/phase3/includes/db/Database.php:r98703,98755,98880
Index: branches/REL1_18/phase3/includes/Feed.php
@@ -239,13 +239,13 @@
240240 * but can also be called separately.
241241 */
242242 public function httpHeaders() {
243 - global $wgOut, $wgVaryOnXFPForAPI;
 243+ global $wgOut, $wgVaryOnXFP;
244244
245245 # We take over from $wgOut, excepting its cache header info
246246 $wgOut->disable();
247247 $mimetype = $this->contentType();
248248 header( "Content-type: $mimetype; charset=UTF-8" );
249 - if ( $wgVaryOnXFPForAPI ) {
 249+ if ( $wgVaryOnXFP ) {
250250 $wgOut->addVaryHeader( 'X-Forwarded-Proto' );
251251 }
252252 $wgOut->sendCacheControl();
Index: branches/REL1_18/phase3/includes/OutputPage.php
@@ -1783,7 +1783,7 @@
17841784 * the object, let's actually output it:
17851785 */
17861786 public function output() {
1787 - global $wgLanguageCode, $wgDebugRedirects, $wgMimeType;
 1787+ global $wgLanguageCode, $wgDebugRedirects, $wgMimeType, $wgVaryOnXFP;
17881788
17891789 if( $this->mDoNothing ) {
17901790 return;
@@ -1803,6 +1803,9 @@
18041804 }
18051805 $this->mLastModified = wfTimestamp( TS_RFC2822 );
18061806 }
 1807+ if ( $wgVaryOnXFP ) {
 1808+ $this->addVaryHeader( 'X-Forwarded-Proto' );
 1809+ }
18071810 $this->sendCacheControl();
18081811
18091812 $response->header( "Content-Type: text/html; charset=utf-8" );
Property changes on: branches/REL1_18/phase3/includes/OutputPage.php
___________________________________________________________________
Modified: svn:mergeinfo
18101813 Merged /trunk/phase3/includes/OutputPage.php:r98755,98880
Index: branches/REL1_18/phase3/includes/api/ApiMain.php
@@ -399,7 +399,7 @@
400400 }
401401
402402 protected function sendCacheHeaders() {
403 - global $wgUseXVO, $wgOut, $wgVaryOnXFPForAPI;
 403+ global $wgUseXVO, $wgOut, $wgVaryOnXFP;
404404 $response = $this->getRequest()->response();
405405
406406 if ( $this->mCacheMode == 'private' ) {
@@ -408,10 +408,10 @@
409409 }
410410
411411 if ( $this->mCacheMode == 'anon-public-user-private' ) {
412 - $xfp = $wgVaryOnXFPForAPI ? ', X-Forwarded-Proto' : '';
 412+ $xfp = $wgVaryOnXFP ? ', X-Forwarded-Proto' : '';
413413 $response->header( 'Vary: Accept-Encoding, Cookie' . $xfp );
414414 if ( $wgUseXVO ) {
415 - if ( $wgVaryOnXFPForAPI ) {
 415+ if ( $wgVaryOnXFP ) {
416416 $wgOut->addVaryHeader( 'X-Forwarded-Proto' );
417417 }
418418 $response->header( $wgOut->getXVO() );
@@ -430,7 +430,7 @@
431431 }
432432
433433 // Send public headers
434 - if ( $wgVaryOnXFPForAPI ) {
 434+ if ( $wgVaryOnXFP ) {
435435 $response->header( 'Vary: Accept-Encoding, X-Forwarded-Proto' );
436436 if ( $wgUseXVO ) {
437437 // Bleeeeegh. Our header setting system sucks
Property changes on: branches/REL1_18/phase3/includes/api
___________________________________________________________________
Modified: svn:mergeinfo
438438 Merged /trunk/phase3/includes/api:r98755,98880
Index: branches/REL1_18/phase3/includes/WikiPage.php
@@ -1068,7 +1068,7 @@
10691069 $status = Status::newGood( array() );
10701070
10711071 # Load $this->mTitle->getArticleID() and $this->mLatest if it's not already
1072 - $this->loadPageData();
 1072+ $this->loadPageData( 'fromdbmaster' );
10731073
10741074 $flags = $this->checkFlags( $flags );
10751075
Index: branches/REL1_18/phase3/includes/DefaultSettings.php
@@ -1756,10 +1756,12 @@
17571757
17581758 /** Add X-Forwarded-Proto to the Vary and X-Vary-Options headers for API
17591759 * requests and RSS/Atom feeds. Use this if you have an SSL termination setup
1760 - * and need to split the cache between HTTP and HTTPS for API and feed requests
1761 - * in order to prevent cache pollution. This does not affect 'normal' requests.
 1760+ * and need to split the cache between HTTP and HTTPS for API requests,
 1761+ * feed requests and HTTP redirect responses in order to prevent cache
 1762+ * pollution. This does not affect 'normal' requests to index.php other than
 1763+ * HTTP redirects.
17621764 */
1763 -$wgVaryOnXFPForAPI = false;
 1765+$wgVaryOnXFP = false;
17641766
17651767 /**
17661768 * Internal server name as known to Squid, if different. Example:
Property changes on: branches/REL1_18/phase3/includes
___________________________________________________________________
Modified: svn:mergeinfo
17671769 Merged /trunk/phase3/includes:r98703,98755,98880
Property changes on: branches/REL1_18/phase3
___________________________________________________________________
Modified: svn:mergeinfo
17681770 Merged /trunk/phase3:r98703,98755,98880

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r98703Followup r96930: also remove the documentation that describes the reverted be...catrope19:35, 2 October 2011
r98755Rename $wgVaryOnXFPForAPI (introduced in r93818) to $wgVaryOnXFP and extend i...catrope13:15, 3 October 2011
r98880Call loadPageData() with 'fromdbmaster' in doEdit() to avoid old slave dataaaron18:40, 4 October 2011

Status & tagging log