1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42: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:
Debarghya Das 2013-01-19 10:24:46 -08:00 committed by epriestley
parent 3a93ecdc53
commit 2888d58034
5 changed files with 16 additions and 24 deletions

View file

@ -790,16 +790,6 @@ return array(
// addresses.
'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
// functions, or it will emit a warning. If this isn't possible (for instance,

View file

@ -284,11 +284,6 @@ class AphrontDefaultApplicationConfiguration
$libraries = PhutilBootloader::getInstance()->getAllLibraries();
$version = PhabricatorEnv::getEnvConfig('phabricator.version');
if (preg_match('/[^a-f0-9]/i', $version)) {
$version = '';
}
// TODO: Make this configurable?
$path = 'https://secure.phabricator.com/diffusion/%s/browse/master/src/';
@ -335,7 +330,6 @@ class AphrontDefaultApplicationConfiguration
if (empty($attrs['href'])) {
$attrs['href'] = sprintf($path, $callsigns[$lib]).
str_replace(DIRECTORY_SEPARATOR, '/', $relative).
($version && $lib == 'phabricator' ? ';'.$version : '').
'$'.$part['line'];
$attrs['target'] = '_blank';
}

View file

@ -58,11 +58,27 @@ final class PhabricatorConfigAllController
$panel->appendChild($table);
$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->selectFilter('all/');
$nav->setCrumbs($crumbs);
$nav->appendChild($version_property_list);
$nav->appendChild($panel);
return $this->buildApplicationPage(
$nav,
array(

View file

@ -118,9 +118,6 @@ final class PhabricatorCoreConfigOptions
$this->newOption('phabricator.env', 'string', null)
->setLocked(true)
->setDescription(pht('Internal.')),
$this->newOption('phabricator.version', 'string', null)
->setLocked(true)
->setDescription(pht('Internal / deprecated.')),
$this->newOption('phabricator.setup', 'bool', false)
->setLocked(true)
->setDescription(pht('Internal / deprecated.')),

View file

@ -370,11 +370,6 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
$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') &&
!PhabricatorEnv::getEnvConfig('darkconsole.always-on')) {
if ($console) {