From 06fa7242803d2aac81800f28e95f207d35999f45 Mon Sep 17 00:00:00 2001 From: epriestley Date: Sat, 19 Jan 2013 12:28:05 -0800 Subject: [PATCH] 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 --- src/applications/base/PhabricatorApplication.php | 8 ++++++++ .../controller/PhabricatorDirectoryController.php | 5 ----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/applications/base/PhabricatorApplication.php b/src/applications/base/PhabricatorApplication.php index 2bf099ba88..5a89f581c8 100644 --- a/src/applications/base/PhabricatorApplication.php +++ b/src/applications/base/PhabricatorApplication.php @@ -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; diff --git a/src/applications/directory/controller/PhabricatorDirectoryController.php b/src/applications/directory/controller/PhabricatorDirectoryController.php index 66dcc6c8bc..041b88f14e 100644 --- a/src/applications/directory/controller/PhabricatorDirectoryController.php +++ b/src/applications/directory/controller/PhabricatorDirectoryController.php @@ -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]);