From 1e561a2bbc6a616eb158fce0e0f96fa999995e4a Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 31 Jan 2011 16:50:08 -0800 Subject: [PATCH] Make MySQL stuff configurable --- conf/default.conf.php | 27 +++++++++++++++++-- .../base/storage/lisk/PhabricatorLiskDAO.php | 6 ++--- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/conf/default.conf.php b/conf/default.conf.php index cf02b03b6a..9003515814 100644 --- a/conf/default.conf.php +++ b/conf/default.conf.php @@ -23,11 +23,23 @@ return array( 'phabricator.base-uri' => null, - // 'phabricator.csrf-key' => '0b7ec0592e0a2829d8b71df2fa269b2c6172eca3', -// -- Facebook --------------------------------------------------------------- + +// -- MySQL --------------------------------------------------------------- // + + // The username to use when connecting to MySQL. + 'mysql.user' => 'root', + + // The password to use when connecting to MySQL. + 'mysql.pass' => '', + + // The MySQL server to connect to. + 'mysql.host' => 'localhost', + + +// -- Facebook ------------------------------------------------------------ // // Can users use Facebook credentials to login to Phabricator? 'facebook.auth-enabled' => false, @@ -38,11 +50,22 @@ return array( // The Facebook "Application Secret" to use for Facebook API access. 'facebook.application-secret' => null, + + +// -- Recaptcha ------------------------------------------------------------- // + + // Is Recaptcha enabled? If disabled, captchas will not appear. + 'recaptcha.enabled' => false, + + // Your Recaptcha public key, obtained from Recaptcha. 'recaptcha.public-key' => null, + + // Your Recaptcha private key, obtained from Recaptcha. 'recaptcha.private-key' => null, 'user.default-profile-image-phid' => 'PHID-FILE-f57aaefce707fc4060ef', + ); diff --git a/src/applications/base/storage/lisk/PhabricatorLiskDAO.php b/src/applications/base/storage/lisk/PhabricatorLiskDAO.php index c27248660e..e0af5baeaa 100644 --- a/src/applications/base/storage/lisk/PhabricatorLiskDAO.php +++ b/src/applications/base/storage/lisk/PhabricatorLiskDAO.php @@ -22,9 +22,9 @@ abstract class PhabricatorLiskDAO extends LiskDAO { public function establishConnection($mode) { return new AphrontMySQLDatabaseConnection( array( - 'user' => 'root', - 'pass' => '', - 'host' => 'localhost', + 'user' => PhabricatorEnv::getEnvConfig('mysql.user'), + 'pass' => PhabricatorEnv::getEnvConfig('mysql.pass'), + 'host' => PhabricatorEnv::getEnvConfig('mysql.host'), 'database' => 'phabricator_'.$this->getApplicationName(), ));