*~ 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
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
$remotePathPrefix = $remotePath = $uploadPath;
}
- $path = RelPath\getRelativePath( $path, $remotePath );
+ $path = RelPath::getRelativePath( $path, $remotePath );
return self::transformFilePath( $remotePathPrefix, $localDir, $path );
}
* @file
*/
-use IPSet\IPSet;
+use Wikimedia\IPSet;
/**
* @since 1.28
* @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
* @file
*/
-use RunningStat\RunningStat;
+use Wikimedia\RunningStat;
/**
* Convenience class for working with XHProf profiling data
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
) {
$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.
$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
&& $lb->getServerCount() > 1
&& $lb->hasOrMadeRecentMasterChanges()
) {
- $dbw = wfGetDB( DB_MASTER );
+ $dbw = $lb->getConnection( DB_MASTER );
$rev = Revision::loadFromTimestamp( $dbw, $this->mTitle, $edittime );
}
if ( $rev ) {
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.
* @file
*/
-use WrappedString\WrappedStringList;
+use Wikimedia\WrappedStringList;
/**
* Bootstrap a ResourceLoader client on an HTML page.
use Psr\Log\LoggerAwareInterface;
use Psr\Log\LoggerInterface;
use Psr\Log\NullLogger;
+use Wikimedia\RelPath;
use Wikimedia\ScopedCallback;
/**
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 );
}
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 );
}
* @file
*/
-use IPSet\IPSet;
use MediaWiki\MediaWikiServices;
use MediaWiki\Session\SessionManager;
use MediaWiki\Session\Token;
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;