Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/view/PhabricatorSetupIssueView.php
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | if ($extensions) { | ||||
$install_commands = hsprintf( | $install_commands = hsprintf( | ||||
"\$ sudo apt-get install php5-<em>extname</em> ". | "\$ sudo apt-get install php5-<em>extname</em> ". | ||||
"# Debian / Ubuntu\n". | "# Debian / Ubuntu\n". | ||||
"\$ sudo yum install php-<em>extname</em> ". | "\$ sudo yum install php-<em>extname</em> ". | ||||
"# Red Hat / Derivatives"); | "# Red Hat / Derivatives"); | ||||
$fallback_info = pht( | $fallback_info = pht( | ||||
"If those commands don't work, try Google. The process of installing ". | "If those commands don't work, try Google. The process of installing ". | ||||
"PHP extensions is not specific to Phabricator, and any instructions ". | "PHP extensions is not specific to this software, and any ". | ||||
"you can find for installing them on your system should work. On Mac ". | "instructions you can find for installing them on your system should ". | ||||
"OS X, you might want to try Homebrew."); | "work. On Mac OS X, you might want to try Homebrew."); | ||||
$restart_info = pht( | $restart_info = pht( | ||||
'After installing new PHP extensions, <strong>restart Phabricator '. | 'After installing new PHP extensions, <strong>restart everything '. | ||||
'for the changes to take effect</strong>. For help with restarting '. | 'for the changes to take effect</strong>. For help with restarting '. | ||||
'Phabricator, see %s in the documentation.', | 'everything, see %s in the documentation.', | ||||
$this->renderRestartLink()); | $this->renderRestartLink()); | ||||
$description[] = phutil_tag( | $description[] = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'setup-issue-config', | 'class' => 'setup-issue-config', | ||||
), | ), | ||||
array( | array( | ||||
▲ Show 20 Lines • Show All 135 Lines • ▼ Show 20 Lines | final class PhabricatorSetupIssueView extends AphrontView { | ||||
private function renderPhabricatorConfig(array $configs, $related = false) { | private function renderPhabricatorConfig(array $configs, $related = false) { | ||||
$issue = $this->getIssue(); | $issue = $this->getIssue(); | ||||
$table_info = phutil_tag( | $table_info = phutil_tag( | ||||
'p', | 'p', | ||||
array(), | array(), | ||||
pht( | pht( | ||||
'The current Phabricator configuration has these %d value(s):', | 'The current configuration has these %d value(s):', | ||||
count($configs))); | count($configs))); | ||||
$options = PhabricatorApplicationConfigOptions::loadAllOptions(); | $options = PhabricatorApplicationConfigOptions::loadAllOptions(); | ||||
$hidden = array(); | $hidden = array(); | ||||
foreach ($options as $key => $option) { | foreach ($options as $key => $option) { | ||||
if ($option->getHidden()) { | if ($option->getHidden()) { | ||||
$hidden[$key] = true; | $hidden[$key] = true; | ||||
} | } | ||||
Show All 18 Lines | if ($this->getIssue()->getIsFatal()) { | ||||
pht( | pht( | ||||
'To update these %d value(s), run these command(s) from the command '. | 'To update these %d value(s), run these command(s) from the command '. | ||||
'line:', | 'line:', | ||||
count($configs))); | count($configs))); | ||||
$update = array(); | $update = array(); | ||||
foreach ($configs as $key) { | foreach ($configs as $key) { | ||||
$update[] = hsprintf( | $update[] = hsprintf( | ||||
'<tt>phabricator/ $</tt> ./bin/config set %s <em>value</em>', | '<tt>$</tt> ./bin/config set %s <em>value</em>', | ||||
$key); | $key); | ||||
} | } | ||||
$update = phutil_tag('pre', array(), phutil_implode_html("\n", $update)); | $update = phutil_tag('pre', array(), phutil_implode_html("\n", $update)); | ||||
} else { | } else { | ||||
$update = array(); | $update = array(); | ||||
foreach ($configs as $config) { | foreach ($configs as $config) { | ||||
if (idx($options, $config) && $options[$config]->getLocked()) { | if (idx($options, $config) && $options[$config]->getLocked()) { | ||||
$name = pht('View "%s"', $config); | $name = pht('View "%s"', $config); | ||||
▲ Show 20 Lines • Show All 159 Lines • ▼ Show 20 Lines | if ($show_opcache) { | ||||
), | ), | ||||
pht('PHP OPcache Documentation')))); | pht('PHP OPcache Documentation')))); | ||||
} | } | ||||
$info[] = phutil_tag( | $info[] = phutil_tag( | ||||
'p', | 'p', | ||||
array(), | array(), | ||||
pht( | pht( | ||||
'After editing the PHP configuration, <strong>restart Phabricator for '. | 'After editing the PHP configuration, <strong>restart everything for '. | ||||
'the changes to take effect</strong>. For help with restarting '. | 'the changes to take effect</strong>. For help with restarting '. | ||||
'Phabricator, see %s in the documentation.', | 'everything, see %s in the documentation.', | ||||
$this->renderRestartLink())); | $this->renderRestartLink())); | ||||
return phutil_tag( | return phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'setup-issue-config', | 'class' => 'setup-issue-config', | ||||
), | ), | ||||
array( | array( | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |