From b27d1b3075fac190acad103b4dab58bd5db4d955 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 30 Apr 2012 12:14:37 -0700 Subject: [PATCH] Minor, fix an issue created by D2341 + D2342 (namespace storage changed). --- .../base/storage/lisk/PhabricatorLiskDAO.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/applications/base/storage/lisk/PhabricatorLiskDAO.php b/src/applications/base/storage/lisk/PhabricatorLiskDAO.php index 23b7cc929d..e77b5a9861 100644 --- a/src/applications/base/storage/lisk/PhabricatorLiskDAO.php +++ b/src/applications/base/storage/lisk/PhabricatorLiskDAO.php @@ -86,7 +86,7 @@ abstract class PhabricatorLiskDAO extends LiskDAO { /** * @task config */ - public function establishLiveConnection($mode) { + public static function getStorageNamespace() { $namespace = end(self::$namespaceStack); if (!strlen($namespace)) { $namespace = self::getDefaultStorageNamespace(); @@ -94,6 +94,14 @@ abstract class PhabricatorLiskDAO extends LiskDAO { if (!strlen($namespace)) { throw new Exception("No storage namespace configured!"); } + return $namespace; + } + + /** + * @task config + */ + public function establishLiveConnection($mode) { + $namespace = self::getStorageNamespace(); $conf = PhabricatorEnv::newObjectFromConfig( 'mysql.configuration-provider', @@ -140,6 +148,6 @@ abstract class PhabricatorLiskDAO extends LiskDAO { abstract public function getApplicationName(); protected function getConnectionNamespace() { - return self::$namespace.'_'.$this->getApplicationName(); + return self::getStorageNamespace().'_'.$this->getApplicationName(); } }