mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 05:50:55 +01:00
This commit is contained in:
parent
307ad51404
commit
b27d1b3075
1 changed files with 10 additions and 2 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue