1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 14:52:41 +01:00

Respected canUninstall() :P

Summary: Disabled uninstalling of applications which can't be uninstalled. Also, applications which cannot be uninstalled always show that they are installed even if users somehow manually edit the configuration.

Test Plan: Manually edited the URI to uninstall applications which can't be unisntalled.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4741
This commit is contained in:
Afaque Hussain 2013-01-30 11:31:04 -08:00 committed by epriestley
parent cc95818384
commit 49beca445b
2 changed files with 4 additions and 2 deletions

View file

@ -66,7 +66,9 @@ abstract class PhabricatorApplication {
$uninstalled =
PhabricatorEnv::getEnvConfig('phabricator.uninstalled-applications');
if (isset($uninstalled[get_class($this)])) {
if (!$this->canUninstall()) {
return true;
} else if (isset($uninstalled[get_class($this)])) {
return false;
} else {
return true;

View file

@ -17,7 +17,7 @@ final class PhabricatorApplicationUninstallController
$selected = PhabricatorApplication::getByClass($this->application);
if (!$selected) {
if (!$selected || !$selected->canUninstall()) {
return new Aphront404Response();
}