1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-20 13:52:40 +01:00
Summary: Fixes T2630

Test Plan: Did not test yet.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2630

Differential Revision: https://secure.phabricator.com/D5456
This commit is contained in:
deedydas 2013-04-10 13:10:52 -07:00 committed by epriestley
parent 1df4357251
commit 0b1410b1d7
9 changed files with 43 additions and 15 deletions

View file

@ -39,9 +39,9 @@ final class PhabricatorSetupCheckDatabase extends PhabricatorSetupCheck {
->setName(pht('Can Not Connect to MySQL')) ->setName(pht('Can Not Connect to MySQL'))
->setMessage($message) ->setMessage($message)
->setIsFatal(true) ->setIsFatal(true)
->addPhabricatorConfig('mysql.host') ->addRelatedPhabricatorConfig('mysql.host')
->addPhabricatorConfig('mysql.user') ->addRelatedPhabricatorConfig('mysql.user')
->addPhabricatorConfig('mysql.pass'); ->addRelatedPhabricatorConfig('mysql.pass');
return; return;
} }

View file

@ -17,7 +17,7 @@ final class PhabricatorSetupCheckFacebook extends PhabricatorSetupCheck {
$this->newIssue('config.facebook.application-id') $this->newIssue('config.facebook.application-id')
->setName(pht("Facebook Application ID Not Set")) ->setName(pht("Facebook Application ID Not Set"))
->setMessage($message) ->setMessage($message)
->addPhabricatorConfig('facebook.auth-enabled') ->addRelatedPhabricatorConfig('facebook.auth-enabled')
->addPhabricatorConfig('facebook.application-id'); ->addPhabricatorConfig('facebook.application-id');
} }
@ -30,7 +30,7 @@ final class PhabricatorSetupCheckFacebook extends PhabricatorSetupCheck {
$this->newIssue('config.facebook.application-secret') $this->newIssue('config.facebook.application-secret')
->setName(pht("Facebook Application Secret Not Set")) ->setName(pht("Facebook Application Secret Not Set"))
->setMessage($message) ->setMessage($message)
->addPhabricatorConfig('facebook.auth-enabled') ->addRelatedPhabricatorConfig('facebook.auth-enabled')
->addPhabricatorConfig('facebook.application-secret'); ->addPhabricatorConfig('facebook.application-secret');
} }
} }

View file

@ -16,7 +16,7 @@ final class PhabricatorSetupCheckImagemagick extends PhabricatorSetupCheck {
->setName(pht( ->setName(pht(
"'convert' binary not found or Imagemagick is not installed.")) "'convert' binary not found or Imagemagick is not installed."))
->setMessage($message) ->setMessage($message)
->addPhabricatorConfig('files.enable-imagemagick') ->addRelatedPhabricatorConfig('files.enable-imagemagick')
->addPhabricatorConfig('environment.append-paths'); ->addPhabricatorConfig('environment.append-paths');
} }
} }

View file

@ -18,7 +18,7 @@ final class PhabricatorSetupCheckMail extends PhabricatorSetupCheck {
->setShortName(pht('Missing Sendmail')) ->setShortName(pht('Missing Sendmail'))
->setName(pht('No Sendmail Binary Found')) ->setName(pht('No Sendmail Binary Found'))
->setMessage($message) ->setMessage($message)
->addPhabricatorConfig('metamta.mail-adapter'); ->addRelatedPhabricatorConfig('metamta.mail-adapter');
} }
break; break;
case 'PhabricatorMailImplementationAmazonSESAdapter': case 'PhabricatorMailImplementationAmazonSESAdapter':
@ -30,7 +30,7 @@ final class PhabricatorSetupCheckMail extends PhabricatorSetupCheck {
$this->newIssue('config.can-send-as-user') $this->newIssue('config.can-send-as-user')
->setName(pht("SES Can't Send As User")) ->setName(pht("SES Can't Send As User"))
->setMessage($message) ->setMessage($message)
->addPhabricatorConfig('metamta.mail-adapter') ->addRelatedPhabricatorConfig('metamta.mail-adapter')
->addPhabricatorConfig('metamta.can-send-as-user'); ->addPhabricatorConfig('metamta.can-send-as-user');
} }
@ -43,7 +43,7 @@ final class PhabricatorSetupCheckMail extends PhabricatorSetupCheck {
$this->newIssue('config.amazon-ses.access-key') $this->newIssue('config.amazon-ses.access-key')
->setName(pht("Amazon SES Access Key Not Set")) ->setName(pht("Amazon SES Access Key Not Set"))
->setMessage($message) ->setMessage($message)
->addPhabricatorConfig('metamta.mail-adapter') ->addRelatedPhabricatorConfig('metamta.mail-adapter')
->addPhabricatorConfig('amazon-ses.access-key'); ->addPhabricatorConfig('amazon-ses.access-key');
} }
@ -56,7 +56,7 @@ final class PhabricatorSetupCheckMail extends PhabricatorSetupCheck {
$this->newIssue('config.amazon-ses.secret-key') $this->newIssue('config.amazon-ses.secret-key')
->setName(pht("Amazon SES Secret Key Not Set")) ->setName(pht("Amazon SES Secret Key Not Set"))
->setMessage($message) ->setMessage($message)
->addPhabricatorConfig('metamta.mail-adapter') ->addRelatedPhabricatorConfig('metamta.mail-adapter')
->addPhabricatorConfig('amazon-ses.secret-key'); ->addPhabricatorConfig('amazon-ses.secret-key');
} }
@ -73,7 +73,7 @@ final class PhabricatorSetupCheckMail extends PhabricatorSetupCheck {
$this->newIssue('config.metamta.default-address') $this->newIssue('config.metamta.default-address')
->setName(pht("No SES From Address Configured")) ->setName(pht("No SES From Address Configured"))
->setMessage($message) ->setMessage($message)
->addPhabricatorConfig('metamta.mail-adapter') ->addRelatedPhabricatorConfig('metamta.mail-adapter')
->addPhabricatorConfig('metamta.default-address'); ->addPhabricatorConfig('metamta.default-address');
} }
break; break;

View file

@ -43,7 +43,7 @@ final class PhabricatorSetupCheckMySQL extends PhabricatorSetupCheck {
$this->newIssue('mysql.mode') $this->newIssue('mysql.mode')
->setName(pht('MySQL STRICT_ALL_TABLES Mode Not Set')) ->setName(pht('MySQL STRICT_ALL_TABLES Mode Not Set'))
->addPhabricatorConfig('phabricator.developer-mode') ->addRelatedPhabricatorConfig('phabricator.developer-mode')
->setSummary($summary) ->setSummary($summary)
->setMessage($message); ->setMessage($message);
} }

View file

@ -23,7 +23,7 @@ final class PhabricatorSetupCheckPygment extends PhabricatorSetupCheck {
->setName(pht('pygmentize Not Found')) ->setName(pht('pygmentize Not Found'))
->setSummary($summary) ->setSummary($summary)
->setMessage($message) ->setMessage($message)
->addPhabricatorConfig('pygments.enabled') ->addRelatedPhabricatorConfig('pygments.enabled')
->addPhabricatorConfig('environment.append-paths'); ->addPhabricatorConfig('environment.append-paths');
} }
} }

View file

@ -12,6 +12,7 @@ final class PhabricatorSetupIssue {
private $isIgnored = false; private $isIgnored = false;
private $phpExtensions = array(); private $phpExtensions = array();
private $phabricatorConfig = array(); private $phabricatorConfig = array();
private $relatedPhabricatorConfig = array();
private $phpConfig = array(); private $phpConfig = array();
private $commands = array(); private $commands = array();
@ -93,6 +94,15 @@ final class PhabricatorSetupIssue {
return $this->phabricatorConfig; return $this->phabricatorConfig;
} }
public function addRelatedPhabricatorConfig($phabricator_config) {
$this->relatedPhabricatorConfig[] = $phabricator_config;
return $this;
}
public function getRelatedPhabricatorConfig() {
return $this->relatedPhabricatorConfig;
}
public function addPHPExtension($php_extension) { public function addPHPExtension($php_extension) {
$this->phpExtensions[] = $php_extension; $this->phpExtensions[] = $php_extension;
return $this; return $this;

View file

@ -34,6 +34,12 @@ final class PhabricatorSetupIssueView extends AphrontView {
$description[] = $this->renderPhabricatorConfig($configs); $description[] = $this->renderPhabricatorConfig($configs);
} }
$related_configs = $issue->getRelatedPhabricatorConfig();
if ($related_configs) {
$description[] = $this->renderPhabricatorConfig($related_configs,
$related = true);
}
$commands = $issue->getCommands(); $commands = $issue->getCommands();
if ($commands) { if ($commands) {
$run_these = pht("Run these %d command(s):", count($commands)); $run_these = pht("Run these %d command(s):", count($commands));
@ -122,7 +128,7 @@ final class PhabricatorSetupIssueView extends AphrontView {
)); ));
} }
private function renderPhabricatorConfig(array $configs) { private function renderPhabricatorConfig(array $configs, $related = false) {
$issue = $this->getIssue(); $issue = $this->getIssue();
$table_info = phutil_tag( $table_info = phutil_tag(
@ -184,10 +190,18 @@ final class PhabricatorSetupIssueView extends AphrontView {
} }
if ($update) { if ($update) {
$update = phutil_tag('ul', array(), $update); $update = phutil_tag('ul', array(), $update);
if (!$related) {
$update_info = phutil_tag( $update_info = phutil_tag(
'p', 'p',
array(), array(),
pht("You can update these %d value(s) here:", count($configs))); pht("You can update these %d value(s) here:", count($configs)));
} else {
$update_info = phutil_tag(
'p',
array(),
pht("These %d configuration value(s) are related:", count($configs)));
}
} else { } else {
$update = null; $update = null;
$update_info = null; $update_info = null;

View file

@ -9,6 +9,10 @@ abstract class PhabricatorBaseEnglishTranslation
public function getTranslations() { public function getTranslations() {
return array( return array(
'These %d configuration value(s) are related:' => array(
'This configuration value is related:',
'These configuration values are related:',
),
'Differential Revision(s)' => array( 'Differential Revision(s)' => array(
'Differential Revision', 'Differential Revision',
'Differential Revisions', 'Differential Revisions',