mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-21 03:08:40 +01:00
Make Application->isInstalled canonical
Summary: We currently inspect `phabricator.uninstalled-applications` in two places -- when building a list of `getAllInstalledApplications()` and when asking an application if it `isInstalled()`. This diff moves that all to the latter function, meaning we can override it in clever and subtle ways for applications that want to add extra defensiveness about whether they should be considered installed or not (e.g. Releeph, in D4932.) Test Plan: Load the main Phabricator page, pick an application, uninstall it, notice it is absent, then install it and notice the launch icon reappear. Reviewers: epriestley, Afaque_Hussain Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5326
This commit is contained in:
parent
33997d43d0
commit
7487c57401
1 changed files with 1 additions and 5 deletions
|
@ -273,15 +273,11 @@ abstract class PhabricatorApplication {
|
|||
$show_beta = PhabricatorEnv::getEnvConfig(
|
||||
'phabricator.show-beta-applications');
|
||||
|
||||
$uninstalled = PhabricatorEnv::getEnvConfig(
|
||||
'phabricator.uninstalled-applications');
|
||||
|
||||
if (empty($applications)) {
|
||||
$all_applications = self::getAllApplications();
|
||||
$apps = array();
|
||||
foreach ($all_applications as $app) {
|
||||
$class = get_class($app);
|
||||
if (isset($uninstalled[$class])) {
|
||||
if (!$app->isInstalled()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue