mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Completely uninstall beta applications
Summary: Fixes T2357. In D4529, I recommended we just hide tiles for beta applications on installs without beta apps enabled. However, this creates at least a couple of issues, notably the stuff in T2357. The main app I was concerned wih Config, which we ended up un-beta'ing anyway, so I think this will probably solve more problems than it creates. Test Plan: Verified routes for beta applications dropped out when beta was disabled. Verified "Customize Applications" no longer shows these applications. Reviewers: ljalonen, chad Reviewed By: chad CC: aran Maniphest Tasks: T2357 Differential Revision: https://secure.phabricator.com/D4546
This commit is contained in:
parent
c2b31149ab
commit
06fa724280
2 changed files with 8 additions and 5 deletions
|
@ -204,6 +204,9 @@ abstract class PhabricatorApplication {
|
|||
public static function getAllInstalledApplications() {
|
||||
static $applications;
|
||||
|
||||
$show_beta =
|
||||
PhabricatorEnv::getEnvConfig('phabricator.show-beta-applications');
|
||||
|
||||
if (empty($applications)) {
|
||||
$classes = id(new PhutilSymbolLoader())
|
||||
->setAncestorClass(__CLASS__)
|
||||
|
@ -216,6 +219,11 @@ abstract class PhabricatorApplication {
|
|||
if (!$app->isEnabled()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!$show_beta && $app->isBeta()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$apps[] = $app;
|
||||
}
|
||||
$applications = $apps;
|
||||
|
|
|
@ -22,13 +22,8 @@ abstract class PhabricatorDirectoryController extends PhabricatorController {
|
|||
$nav->setBaseURI(new PhutilURI('/'));
|
||||
|
||||
$applications = PhabricatorApplication::getAllInstalledApplications();
|
||||
$show_beta =
|
||||
PhabricatorEnv::getEnvConfig('phabricator.show-beta-applications');
|
||||
|
||||
foreach ($applications as $key => $application) {
|
||||
if (!$show_beta && $application->isBeta()) {
|
||||
unset($applications[$key]);
|
||||
}
|
||||
if (!$application->shouldAppearInLaunchView()) {
|
||||
// Remove hidden applications (usually internal stuff).
|
||||
unset($applications[$key]);
|
||||
|
|
Loading…
Reference in a new issue