1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 05:50:55 +01:00

Minor, fix an issue created by D2341 + D2342 (namespace storage changed).

This commit is contained in:
epriestley 2012-04-30 12:14:37 -07:00
parent 307ad51404
commit b27d1b3075

View file

@ -86,7 +86,7 @@ abstract class PhabricatorLiskDAO extends LiskDAO {
/** /**
* @task config * @task config
*/ */
public function establishLiveConnection($mode) { public static function getStorageNamespace() {
$namespace = end(self::$namespaceStack); $namespace = end(self::$namespaceStack);
if (!strlen($namespace)) { if (!strlen($namespace)) {
$namespace = self::getDefaultStorageNamespace(); $namespace = self::getDefaultStorageNamespace();
@ -94,6 +94,14 @@ abstract class PhabricatorLiskDAO extends LiskDAO {
if (!strlen($namespace)) { if (!strlen($namespace)) {
throw new Exception("No storage namespace configured!"); throw new Exception("No storage namespace configured!");
} }
return $namespace;
}
/**
* @task config
*/
public function establishLiveConnection($mode) {
$namespace = self::getStorageNamespace();
$conf = PhabricatorEnv::newObjectFromConfig( $conf = PhabricatorEnv::newObjectFromConfig(
'mysql.configuration-provider', 'mysql.configuration-provider',
@ -140,6 +148,6 @@ abstract class PhabricatorLiskDAO extends LiskDAO {
abstract public function getApplicationName(); abstract public function getApplicationName();
protected function getConnectionNamespace() { protected function getConnectionNamespace() {
return self::$namespace.'_'.$this->getApplicationName(); return self::getStorageNamespace().'_'.$this->getApplicationName();
} }
} }