@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

authored by

Debarghya Das and committed by
epriestley
2888d580 3a93ecdc

+16 -24
-10
conf/default.conf.php
··· 790 790 // addresses. 791 791 'phabricator.mail-key' => '5ce3e7e8787f6e40dfae861da315a5cdf1018f12', 792 792 793 - // Version string displayed in the footer. You can generate this value from 794 - // Git log or from the current date in the deploy with a script like this: 795 - // 796 - // git log -n1 --pretty=%h > version.txt 797 - // 798 - // You can then use this generated value like this: 799 - // 800 - // 'phabricator.version' => 801 - // file_get_contents(dirname(__FILE__).'/version.txt'), 802 - 'phabricator.version' => 'UNSTABLE', 803 793 804 794 // PHP requires that you set a timezone in your php.ini before using date 805 795 // functions, or it will emit a warning. If this isn't possible (for instance,
-6
src/aphront/configuration/AphrontDefaultApplicationConfiguration.php
··· 284 284 285 285 $libraries = PhutilBootloader::getInstance()->getAllLibraries(); 286 286 287 - $version = PhabricatorEnv::getEnvConfig('phabricator.version'); 288 - if (preg_match('/[^a-f0-9]/i', $version)) { 289 - $version = ''; 290 - } 291 - 292 287 // TODO: Make this configurable? 293 288 $path = 'https://secure.phabricator.com/diffusion/%s/browse/master/src/'; 294 289 ··· 335 330 if (empty($attrs['href'])) { 336 331 $attrs['href'] = sprintf($path, $callsigns[$lib]). 337 332 str_replace(DIRECTORY_SEPARATOR, '/', $relative). 338 - ($version && $lib == 'phabricator' ? ';'.$version : ''). 339 333 '$'.$part['line']; 340 334 $attrs['target'] = '_blank'; 341 335 }
+16
src/applications/config/controller/PhabricatorConfigAllController.php
··· 58 58 $panel->appendChild($table); 59 59 $panel->setNoBackground(); 60 60 61 + $phabricator_root = dirname(phutil_get_library_root('phabricator')); 62 + $future = id(new ExecFuture('git log --format=%%H -n 1 --')) 63 + ->setCWD($phabricator_root); 64 + list($err, $stdout) = $future->resolve(); 65 + if (!$err) { 66 + $display_version = trim($stdout); 67 + } else { 68 + $display_version = pht('Unknown'); 69 + } 70 + $version_property_list = id(new PhabricatorPropertyListView()); 71 + $version_property_list->addProperty('Version', $display_version); 72 + 73 + 61 74 $nav = $this->buildSideNavView(); 62 75 $nav->selectFilter('all/'); 63 76 $nav->setCrumbs($crumbs); 77 + $nav->appendChild($version_property_list); 64 78 $nav->appendChild($panel); 79 + 80 + 65 81 66 82 return $this->buildApplicationPage( 67 83 $nav,
-3
src/applications/config/option/PhabricatorCoreConfigOptions.php
··· 118 118 $this->newOption('phabricator.env', 'string', null) 119 119 ->setLocked(true) 120 120 ->setDescription(pht('Internal.')), 121 - $this->newOption('phabricator.version', 'string', null) 122 - ->setLocked(true) 123 - ->setDescription(pht('Internal / deprecated.')), 124 121 $this->newOption('phabricator.setup', 'bool', false) 125 122 ->setLocked(true) 126 123 ->setDescription(pht('Internal / deprecated.')),
-5
src/view/page/PhabricatorStandardPageView.php
··· 370 370 371 371 $foot_links = array(); 372 372 373 - $version = PhabricatorEnv::getEnvConfig('phabricator.version'); 374 - $foot_links[] = 375 - '<a href="http://phabricator.org/">Phabricator</a> '. 376 - phutil_escape_html($version); 377 - 378 373 if (PhabricatorEnv::getEnvConfig('darkconsole.enabled') && 379 374 !PhabricatorEnv::getEnvConfig('darkconsole.always-on')) { 380 375 if ($console) {