1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +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
*/
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();
}
}