mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-13 02:12:41 +01:00
Read "Database Status" page connection information from cluster config if present
Summary: Fixes T11043. This page was still reading the old information directly instead of going through the cluster-aware stuff. Have it ask the cluster-aware stuff for information instead. Test Plan: - Nuked MySQL on localhost. - Configured cluster hosts. - Loaded "Database Status" page -- worked after patch. - Grepped for any remaining `mysql.configuration-provider` stragglers, came up empty. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11043 Differential Revision: https://secure.phabricator.com/D15982
This commit is contained in:
parent
727a7de759
commit
74a36f9d7b
1 changed files with 5 additions and 7 deletions
|
@ -4,16 +4,14 @@ abstract class PhabricatorConfigDatabaseController
|
||||||
extends PhabricatorConfigController {
|
extends PhabricatorConfigController {
|
||||||
|
|
||||||
protected function buildSchemaQuery() {
|
protected function buildSchemaQuery() {
|
||||||
$conf = PhabricatorEnv::newObjectFromConfig(
|
$ref = PhabricatorDatabaseRef::getMasterDatabaseRef();
|
||||||
'mysql.configuration-provider',
|
|
||||||
array($dao = null, 'w'));
|
|
||||||
|
|
||||||
$api = id(new PhabricatorStorageManagementAPI())
|
$api = id(new PhabricatorStorageManagementAPI())
|
||||||
->setUser($conf->getUser())
|
->setUser($ref->getUser())
|
||||||
->setHost($conf->getHost())
|
->setHost($ref->getHost())
|
||||||
->setPort($conf->getPort())
|
->setPort($ref->getPort())
|
||||||
->setNamespace(PhabricatorLiskDAO::getDefaultStorageNamespace())
|
->setNamespace(PhabricatorLiskDAO::getDefaultStorageNamespace())
|
||||||
->setPassword($conf->getPassword());
|
->setPassword($ref->getPass());
|
||||||
|
|
||||||
$query = id(new PhabricatorConfigSchemaQuery())
|
$query = id(new PhabricatorConfigSchemaQuery())
|
||||||
->setAPI($api);
|
->setAPI($api);
|
||||||
|
|
Loading…
Reference in a new issue