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 %s, and any instructions ". | ||||
"you can find for installing them on your system should work. On Mac ". | "you can find for installing them on your system should work. On Mac ". | ||||
"OS X, you might want to try Homebrew."); | "OS X, you might want to try Homebrew.", | ||||
PhabricatorPlatformSite::getName()); | |||||
$restart_info = pht( | $restart_info = pht( | ||||
'After installing new PHP extensions, <strong>restart Phabricator '. | 'After installing new PHP extensions, <strong>restart %s '. | ||||
'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.', | '%s, see %s in the documentation.', | ||||
PhabricatorPlatformSite::getName(), | |||||
PhabricatorPlatformSite::getName(), | |||||
$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 %s configuration has these %d value(s):', | ||||
PhabricatorPlatformSite::getName(), | |||||
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 20 Lines • Show All 194 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 %s 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.', | '%s, see %s in the documentation.', | ||||
PhabricatorPlatformSite::getName(), | |||||
PhabricatorPlatformSite::getName(), | |||||
$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 129 Lines • ▼ Show 20 Lines | final class PhabricatorSetupIssueView extends AphrontView { | ||||
private function renderRestartLink() { | private function renderRestartLink() { | ||||
$doc_href = PhabricatorEnv::getDoclink('Restarting Phabricator'); | $doc_href = PhabricatorEnv::getDoclink('Restarting Phabricator'); | ||||
return phutil_tag( | return phutil_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'href' => $doc_href, | 'href' => $doc_href, | ||||
'target' => '_blank', | 'target' => '_blank', | ||||
), | ), | ||||
pht('Restarting Phabricator')); | pht('Restarting %s', PhabricatorPlatformSite::getName())); | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0