From c1f9b1f7b1b77776192048005dcc66dcf3df2bfb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Sat, 27 Dec 2014 15:41:37 +0100 Subject: Update to MediaWiki 1.24.1 --- includes/filerepo/ForeignDBRepo.php | 46 +++++++++++++++++++++++++++++++------ 1 file changed, 39 insertions(+), 7 deletions(-) (limited to 'includes/filerepo/ForeignDBRepo.php') diff --git a/includes/filerepo/ForeignDBRepo.php b/includes/filerepo/ForeignDBRepo.php index 37c65723..6e9e6add 100644 --- a/includes/filerepo/ForeignDBRepo.php +++ b/includes/filerepo/ForeignDBRepo.php @@ -27,17 +27,37 @@ * @ingroup FileRepo */ class ForeignDBRepo extends LocalRepo { - # Settings - var $dbType, $dbServer, $dbUser, $dbPassword, $dbName, $dbFlags, - $tablePrefix, $hasSharedCache; + /** @var string */ + protected $dbType; + + /** @var string */ + protected $dbServer; + + /** @var string */ + protected $dbUser; + + /** @var string */ + protected $dbPassword; + + /** @var string */ + protected $dbName; + + /** @var string */ + protected $dbFlags; + + /** @var string */ + protected $tablePrefix; + + /** @var bool */ + protected $hasSharedCache; # Other stuff - var $dbConn; - var $fileFactory = array( 'ForeignDBFile', 'newFromTitle' ); - var $fileFromRowFactory = array( 'ForeignDBFile', 'newFromRow' ); + protected $dbConn; + protected $fileFactory = array( 'ForeignDBFile', 'newFromTitle' ); + protected $fileFromRowFactory = array( 'ForeignDBFile', 'newFromRow' ); /** - * @param $info array|null + * @param array|null $info */ function __construct( $info ) { parent::__construct( $info ); @@ -68,6 +88,7 @@ class ForeignDBRepo extends LocalRepo { ) ); } + return $this->dbConn; } @@ -95,6 +116,7 @@ class ForeignDBRepo extends LocalRepo { if ( $this->hasSharedCache() ) { $args = func_get_args(); array_unshift( $args, $this->dbName, $this->tablePrefix ); + return call_user_func_array( 'wfForeignMemcKey', $args ); } else { return false; @@ -104,4 +126,14 @@ class ForeignDBRepo extends LocalRepo { protected function assertWritableRepo() { throw new MWException( get_class( $this ) . ': write operations are not supported.' ); } + + /** + * Return information about the repository. + * + * @return array + * @since 1.22 + */ + function getInfo() { + return FileRepo::getInfo(); + } } -- cgit v1.2.3-54-g00ecf