From: Antoine Musso Date: Mon, 23 Jan 2012 11:03:45 +0000 (+0000) Subject: cleanly handle wikiId on FileBackendBase construction X-Git-Tag: 1.31.0-rc.0~25125 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=71abcf2f4c216e68f8094d5b37393f17142da661;p=lhc%2Fweb%2Fwiklou.git cleanly handle wikiId on FileBackendBase construction Use the default array added by r109814 --- diff --git a/includes/filerepo/backend/FileBackend.php b/includes/filerepo/backend/FileBackend.php index dcd0317ae0..98e1187bab 100644 --- a/includes/filerepo/backend/FileBackend.php +++ b/includes/filerepo/backend/FileBackend.php @@ -53,13 +53,11 @@ abstract class FileBackendBase { public function __construct( array $config ) { $defaultConfig = array( 'lockManager' => null, + 'wikiId' => wfWikiID(), ); $config = array_merge( $defaultConfig, $config ); $this->name = $config['name']; - $this->wikiId = isset( $config['wikiId'] ) - ? $config['wikiId'] - : wfWikiID(); // e.g. "my_wiki-en_" - $this->wikiId = $this->resolveWikiId( $this->wikiId ); + $this->wikiId = $this->resolveWikiId( $config['wikiId'] ); $this->lockManager = LockManagerGroup::singleton()->get( $config['lockManager'] ); $this->readOnly = isset( $config['readOnly'] ) ? (string)$config['readOnly']