From 74a36f9d7bf0503b729dcc003222267aa0f044f2 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 26 May 2016 12:10:30 -0700 Subject: [PATCH] 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 --- .../PhabricatorConfigDatabaseController.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/applications/config/controller/PhabricatorConfigDatabaseController.php b/src/applications/config/controller/PhabricatorConfigDatabaseController.php index 225312a52f..0619a4a3a1 100644 --- a/src/applications/config/controller/PhabricatorConfigDatabaseController.php +++ b/src/applications/config/controller/PhabricatorConfigDatabaseController.php @@ -4,16 +4,14 @@ abstract class PhabricatorConfigDatabaseController extends PhabricatorConfigController { protected function buildSchemaQuery() { - $conf = PhabricatorEnv::newObjectFromConfig( - 'mysql.configuration-provider', - array($dao = null, 'w')); + $ref = PhabricatorDatabaseRef::getMasterDatabaseRef(); $api = id(new PhabricatorStorageManagementAPI()) - ->setUser($conf->getUser()) - ->setHost($conf->getHost()) - ->setPort($conf->getPort()) + ->setUser($ref->getUser()) + ->setHost($ref->getHost()) + ->setPort($ref->getPort()) ->setNamespace(PhabricatorLiskDAO::getDefaultStorageNamespace()) - ->setPassword($conf->getPassword()); + ->setPassword($ref->getPass()); $query = id(new PhabricatorConfigSchemaQuery()) ->setAPI($api);