Merge "Use HTTPS instead of HTTP for caniuse.com"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sun, 21 Jan 2018 06:11:44 +0000 (06:11 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sun, 21 Jan 2018 06:11:44 +0000 (06:11 +0000)
.gitattributes
includes/OutputPage.php
includes/ProxyLookup.php
includes/libs/IP.php
includes/libs/XhprofData.php
includes/page/WikiPage.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderClientHtml.php
includes/resourceloader/ResourceLoaderModule.php
includes/user/User.php

index b306f36..786c09f 100644 (file)
@@ -5,8 +5,8 @@
 *~ export-ignore
 #*# export-ignore
 .* export-ignore
-package.jso export-ignore
-README.mediawik export-ignore
+package.json export-ignore
+README.mediawiki export-ignore
 Gemfile* export-ignore
 vendor/pear/net_smtp/README.rst export-ignore
 
index e8b000e..fc7fbf7 100644 (file)
@@ -23,8 +23,9 @@
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\MediaWikiServices;
 use MediaWiki\Session\SessionManager;
-use WrappedString\WrappedString;
-use WrappedString\WrappedStringList;
+use Wikimedia\RelPath;
+use Wikimedia\WrappedString;
+use Wikimedia\WrappedStringList;
 
 /**
  * This class should be covered by a general architecture document which does
@@ -3818,7 +3819,7 @@ class OutputPage extends ContextSource {
                        $remotePathPrefix = $remotePath = $uploadPath;
                }
 
-               $path = RelPath\getRelativePath( $path, $remotePath );
+               $path = RelPath::getRelativePath( $path, $remotePath );
                return self::transformFilePath( $remotePathPrefix, $localDir, $path );
        }
 
index 3a3243a..246ae95 100644 (file)
@@ -19,7 +19,7 @@
  * @file
  */
 
-use IPSet\IPSet;
+use Wikimedia\IPSet;
 
 /**
  * @since 1.28
index 1c48f49..f95bb1e 100644 (file)
@@ -21,7 +21,7 @@
  * @author Antoine Musso "<hashar at free dot fr>"
  */
 
-use IPSet\IPSet;
+use Wikimedia\IPSet;
 
 // Some regex definition to "play" with IP address and IP address ranges
 
index 0be4ff6..8762446 100644 (file)
@@ -18,7 +18,7 @@
  * @file
  */
 
-use RunningStat\RunningStat;
+use Wikimedia\RunningStat;
 
 /**
  * Convenience class for working with XHProf profiling data
index 788ae61..d403ab5 100644 (file)
@@ -434,8 +434,9 @@ class WikiPage implements Page, IDBAccessObject {
 
                if ( is_int( $from ) ) {
                        list( $index, $opts ) = DBAccessObjectUtils::getDBOptions( $from );
-                       $data = $this->pageDataFromTitle( wfGetDB( $index ), $this->mTitle, $opts );
                        $loadBalancer = MediaWikiServices::getInstance()->getDBLoadBalancer();
+                       $db = $loadBalancer->getConnection( $index );
+                       $data = $this->pageDataFromTitle( $db, $this->mTitle, $opts );
 
                        if ( !$data
                                && $index == DB_REPLICA
@@ -444,7 +445,8 @@ class WikiPage implements Page, IDBAccessObject {
                        ) {
                                $from = self::READ_LATEST;
                                list( $index, $opts ) = DBAccessObjectUtils::getDBOptions( $from );
-                               $data = $this->pageDataFromTitle( wfGetDB( $index ), $this->mTitle, $opts );
+                               $db = $loadBalancer->getConnection( $index );
+                               $data = $this->pageDataFromTitle( $db, $this->mTitle, $opts );
                        }
                } else {
                        // No idea from where the caller got this data, assume replica DB.
@@ -1426,7 +1428,7 @@ class WikiPage implements Page, IDBAccessObject {
                $baseRevId = null;
                if ( $edittime && $sectionId !== 'new' ) {
                        $lb = MediaWikiServices::getInstance()->getDBLoadBalancer();
-                       $dbr = wfGetDB( DB_REPLICA );
+                       $dbr = $lb->getConnection( DB_REPLICA );
                        $rev = Revision::loadFromTimestamp( $dbr, $this->mTitle, $edittime );
                        // Try the master if this thread may have just added it.
                        // This could be abstracted into a Revision method, but we don't want
@@ -1435,7 +1437,7 @@ class WikiPage implements Page, IDBAccessObject {
                                && $lb->getServerCount() > 1
                                && $lb->hasOrMadeRecentMasterChanges()
                        ) {
-                               $dbw = wfGetDB( DB_MASTER );
+                               $dbw = $lb->getConnection( DB_MASTER );
                                $rev = Revision::loadFromTimestamp( $dbw, $this->mTitle, $edittime );
                        }
                        if ( $rev ) {
index e1d4f26..36bf656 100644 (file)
@@ -26,8 +26,8 @@ use MediaWiki\MediaWikiServices;
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerInterface;
 use Psr\Log\NullLogger;
-use WrappedString\WrappedString;
 use Wikimedia\Rdbms\DBConnectionError;
+use Wikimedia\WrappedString;
 
 /**
  * Dynamic JavaScript and CSS resource loading system.
index c76ed91..fe9e56f 100644 (file)
@@ -18,7 +18,7 @@
  * @file
  */
 
-use WrappedString\WrappedStringList;
+use Wikimedia\WrappedStringList;
 
 /**
  * Bootstrap a ResourceLoader client on an HTML page.
index 4deb7fa..a6ec72a 100644 (file)
@@ -26,6 +26,7 @@ use MediaWiki\MediaWikiServices;
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerInterface;
 use Psr\Log\NullLogger;
+use Wikimedia\RelPath;
 use Wikimedia\ScopedCallback;
 
 /**
@@ -527,7 +528,7 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface {
        public static function getRelativePaths( array $filePaths ) {
                global $IP;
                return array_map( function ( $path ) use ( $IP ) {
-                       return RelPath\getRelativePath( $path, $IP );
+                       return RelPath::getRelativePath( $path, $IP );
                }, $filePaths );
        }
 
@@ -541,7 +542,7 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface {
        public static function expandRelativePaths( array $filePaths ) {
                global $IP;
                return array_map( function ( $path ) use ( $IP ) {
-                       return RelPath\joinPath( $IP, $path );
+                       return RelPath::joinPath( $IP, $path );
                }, $filePaths );
        }
 
index 0b3f8fd..5bab876 100644 (file)
@@ -20,7 +20,6 @@
  * @file
  */
 
-use IPSet\IPSet;
 use MediaWiki\MediaWikiServices;
 use MediaWiki\Session\SessionManager;
 use MediaWiki\Session\Token;
@@ -28,6 +27,7 @@ use MediaWiki\Auth\AuthManager;
 use MediaWiki\Auth\AuthenticationResponse;
 use MediaWiki\Auth\AuthenticationRequest;
 use MediaWiki\User\UserIdentity;
+use Wikimedia\IPSet;
 use Wikimedia\ScopedCallback;
 use Wikimedia\Rdbms\Database;
 use Wikimedia\Rdbms\DBExpectedError;