diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-05-01 15:12:12 -0400 |
commit | c9aa36da061816dee256a979c2ff8d2ee41824d9 (patch) | |
tree | 29f7002b80ee984b488bd047dbbd80b36bf892e9 /includes/filerepo/ForeignDBRepo.php | |
parent | b4274e0e33eafb5e9ead9d949ebf031a9fb8363b (diff) | |
parent | d1ba966140d7a60cd5ae4e8667ceb27c1a138592 (diff) |
Merge branch 'archwiki'
# Conflicts:
# skins/ArchLinux.php
# skins/ArchLinux/archlogo.gif
Diffstat (limited to 'includes/filerepo/ForeignDBRepo.php')
-rw-r--r-- | includes/filerepo/ForeignDBRepo.php | 46 |
1 files changed, 39 insertions, 7 deletions
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(); + } } |