From 71abcf2f4c216e68f8094d5b37393f17142da661 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Mon, 23 Jan 2012 11:03:45 +0000 Subject: [PATCH] cleanly handle wikiId on FileBackendBase construction Use the default array added by r109814 --- includes/filerepo/backend/FileBackend.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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'] -- 2.20.1