mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01:00
Moved Version Footer from Footer to /config/all
Summary: Fixed T2349 Test Plan: Could not visibly see version at footer any more. Appeared in the top of /config. Does not appear as a config option in /config. Reviewers: epriestley CC: aran, Korvin Maniphest Tasks: T2349 Differential Revision: https://secure.phabricator.com/D4539
This commit is contained in:
parent
3a93ecdc53
commit
2888d58034
5 changed files with 16 additions and 24 deletions
|
@ -790,16 +790,6 @@ return array(
|
||||||
// addresses.
|
// addresses.
|
||||||
'phabricator.mail-key' => '5ce3e7e8787f6e40dfae861da315a5cdf1018f12',
|
'phabricator.mail-key' => '5ce3e7e8787f6e40dfae861da315a5cdf1018f12',
|
||||||
|
|
||||||
// Version string displayed in the footer. You can generate this value from
|
|
||||||
// Git log or from the current date in the deploy with a script like this:
|
|
||||||
//
|
|
||||||
// git log -n1 --pretty=%h > version.txt
|
|
||||||
//
|
|
||||||
// You can then use this generated value like this:
|
|
||||||
//
|
|
||||||
// 'phabricator.version' =>
|
|
||||||
// file_get_contents(dirname(__FILE__).'/version.txt'),
|
|
||||||
'phabricator.version' => 'UNSTABLE',
|
|
||||||
|
|
||||||
// PHP requires that you set a timezone in your php.ini before using date
|
// PHP requires that you set a timezone in your php.ini before using date
|
||||||
// functions, or it will emit a warning. If this isn't possible (for instance,
|
// functions, or it will emit a warning. If this isn't possible (for instance,
|
||||||
|
|
|
@ -284,11 +284,6 @@ class AphrontDefaultApplicationConfiguration
|
||||||
|
|
||||||
$libraries = PhutilBootloader::getInstance()->getAllLibraries();
|
$libraries = PhutilBootloader::getInstance()->getAllLibraries();
|
||||||
|
|
||||||
$version = PhabricatorEnv::getEnvConfig('phabricator.version');
|
|
||||||
if (preg_match('/[^a-f0-9]/i', $version)) {
|
|
||||||
$version = '';
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Make this configurable?
|
// TODO: Make this configurable?
|
||||||
$path = 'https://secure.phabricator.com/diffusion/%s/browse/master/src/';
|
$path = 'https://secure.phabricator.com/diffusion/%s/browse/master/src/';
|
||||||
|
|
||||||
|
@ -335,7 +330,6 @@ class AphrontDefaultApplicationConfiguration
|
||||||
if (empty($attrs['href'])) {
|
if (empty($attrs['href'])) {
|
||||||
$attrs['href'] = sprintf($path, $callsigns[$lib]).
|
$attrs['href'] = sprintf($path, $callsigns[$lib]).
|
||||||
str_replace(DIRECTORY_SEPARATOR, '/', $relative).
|
str_replace(DIRECTORY_SEPARATOR, '/', $relative).
|
||||||
($version && $lib == 'phabricator' ? ';'.$version : '').
|
|
||||||
'$'.$part['line'];
|
'$'.$part['line'];
|
||||||
$attrs['target'] = '_blank';
|
$attrs['target'] = '_blank';
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,11 +58,27 @@ final class PhabricatorConfigAllController
|
||||||
$panel->appendChild($table);
|
$panel->appendChild($table);
|
||||||
$panel->setNoBackground();
|
$panel->setNoBackground();
|
||||||
|
|
||||||
|
$phabricator_root = dirname(phutil_get_library_root('phabricator'));
|
||||||
|
$future = id(new ExecFuture('git log --format=%%H -n 1 --'))
|
||||||
|
->setCWD($phabricator_root);
|
||||||
|
list($err, $stdout) = $future->resolve();
|
||||||
|
if (!$err) {
|
||||||
|
$display_version = trim($stdout);
|
||||||
|
} else {
|
||||||
|
$display_version = pht('Unknown');
|
||||||
|
}
|
||||||
|
$version_property_list = id(new PhabricatorPropertyListView());
|
||||||
|
$version_property_list->addProperty('Version', $display_version);
|
||||||
|
|
||||||
|
|
||||||
$nav = $this->buildSideNavView();
|
$nav = $this->buildSideNavView();
|
||||||
$nav->selectFilter('all/');
|
$nav->selectFilter('all/');
|
||||||
$nav->setCrumbs($crumbs);
|
$nav->setCrumbs($crumbs);
|
||||||
|
$nav->appendChild($version_property_list);
|
||||||
$nav->appendChild($panel);
|
$nav->appendChild($panel);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return $this->buildApplicationPage(
|
return $this->buildApplicationPage(
|
||||||
$nav,
|
$nav,
|
||||||
array(
|
array(
|
||||||
|
|
|
@ -118,9 +118,6 @@ final class PhabricatorCoreConfigOptions
|
||||||
$this->newOption('phabricator.env', 'string', null)
|
$this->newOption('phabricator.env', 'string', null)
|
||||||
->setLocked(true)
|
->setLocked(true)
|
||||||
->setDescription(pht('Internal.')),
|
->setDescription(pht('Internal.')),
|
||||||
$this->newOption('phabricator.version', 'string', null)
|
|
||||||
->setLocked(true)
|
|
||||||
->setDescription(pht('Internal / deprecated.')),
|
|
||||||
$this->newOption('phabricator.setup', 'bool', false)
|
$this->newOption('phabricator.setup', 'bool', false)
|
||||||
->setLocked(true)
|
->setLocked(true)
|
||||||
->setDescription(pht('Internal / deprecated.')),
|
->setDescription(pht('Internal / deprecated.')),
|
||||||
|
|
|
@ -370,11 +370,6 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
|
||||||
|
|
||||||
$foot_links = array();
|
$foot_links = array();
|
||||||
|
|
||||||
$version = PhabricatorEnv::getEnvConfig('phabricator.version');
|
|
||||||
$foot_links[] =
|
|
||||||
'<a href="http://phabricator.org/">Phabricator</a> '.
|
|
||||||
phutil_escape_html($version);
|
|
||||||
|
|
||||||
if (PhabricatorEnv::getEnvConfig('darkconsole.enabled') &&
|
if (PhabricatorEnv::getEnvConfig('darkconsole.enabled') &&
|
||||||
!PhabricatorEnv::getEnvConfig('darkconsole.always-on')) {
|
!PhabricatorEnv::getEnvConfig('darkconsole.always-on')) {
|
||||||
if ($console) {
|
if ($console) {
|
||||||
|
|
Loading…
Reference in a new issue