Differential D18306 Diff 44026 src/applications/config/controller/PhabricatorConfigVersionController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/controller/PhabricatorConfigVersionController.php
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | public function renderModuleStatus($viewer) { | ||||
$version_path = $phabricator_root.'/conf/local/VERSION'; | $version_path = $phabricator_root.'/conf/local/VERSION'; | ||||
if (Filesystem::pathExists($version_path)) { | if (Filesystem::pathExists($version_path)) { | ||||
$version_from_file = Filesystem::readFile($version_path); | $version_from_file = Filesystem::readFile($version_path); | ||||
$version_property_list->addProperty( | $version_property_list->addProperty( | ||||
pht('Local Version'), | pht('Local Version'), | ||||
$version_from_file); | $version_from_file); | ||||
} | } | ||||
$binaries = PhutilBinaryAnalyzer::getAllBinaries(); | |||||
foreach ($binaries as $binary) { | |||||
if (!$binary->isBinaryAvailable()) { | |||||
$binary_info = pht('Not Available'); | |||||
} else { | |||||
$version = $binary->getBinaryVersion(); | |||||
$path = $binary->getBinaryPath(); | |||||
if ($path === null && $version === null) { | |||||
$binary_info = pht('-'); | |||||
} else if ($path === null) { | |||||
$binary_info = $version; | |||||
} else if ($version === null) { | |||||
$binary_info = pht('- at %s', $path); | |||||
} else { | |||||
$binary_info = pht('%s at %s', $version, $path); | |||||
} | |||||
} | |||||
$version_property_list->addProperty( | |||||
$binary->getBinaryName(), | |||||
$binary_info); | |||||
} | |||||
return $version_property_list; | return $version_property_list; | ||||
} | } | ||||
private function loadVersions(PhabricatorUser $viewer) { | private function loadVersions(PhabricatorUser $viewer) { | ||||
$specs = array( | $specs = array( | ||||
'phabricator', | 'phabricator', | ||||
'arcanist', | 'arcanist', | ||||
'phutil', | 'phutil', | ||||
▲ Show 20 Lines • Show All 146 Lines • Show Last 20 Lines |