Differential D10493 Diff 25253 src/applications/meta/controller/PhabricatorApplicationUninstallController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/meta/controller/PhabricatorApplicationUninstallController.php
| Show All 21 Lines | public function processRequest() { | ||||
| $selected = PhabricatorApplication::getByClass($this->application); | $selected = PhabricatorApplication::getByClass($this->application); | ||||
| if (!$selected) { | if (!$selected) { | ||||
| return new Aphront404Response(); | return new Aphront404Response(); | ||||
| } | } | ||||
| $view_uri = $this->getApplicationURI('view/'.$this->application); | $view_uri = $this->getApplicationURI('view/'.$this->application); | ||||
| $beta_enabled = PhabricatorEnv::getEnvConfig( | $prototypes_enabled = PhabricatorEnv::getEnvConfig( | ||||
| 'phabricator.show-beta-applications'); | 'phabricator.show-prototypes'); | ||||
| $dialog = id(new AphrontDialogView()) | $dialog = id(new AphrontDialogView()) | ||||
| ->setUser($user) | ->setUser($user) | ||||
| ->addCancelButton($view_uri); | ->addCancelButton($view_uri); | ||||
| if ($selected->isBeta() && !$beta_enabled) { | if ($selected->isPrototype() && !$prototypes_enabled) { | ||||
| $dialog | $dialog | ||||
| ->setTitle(pht('Beta Applications Not Enabled')) | ->setTitle(pht('Prototypes Not Enabled')) | ||||
| ->appendChild( | ->appendChild( | ||||
| pht( | pht( | ||||
| 'To manage beta applications, enable them by setting %s in your '. | 'To manage prototypes, enable them by setting %s in your '. | ||||
| 'Phabricator configuration.', | 'Phabricator configuration.', | ||||
| phutil_tag('tt', array(), 'phabricator.show-beta-applications'))); | phutil_tag('tt', array(), 'phabricator.show-prototypes'))); | ||||
| return id(new AphrontDialogResponse())->setDialog($dialog); | return id(new AphrontDialogResponse())->setDialog($dialog); | ||||
| } | } | ||||
| if ($request->isDialogFormPost()) { | if ($request->isDialogFormPost()) { | ||||
| $this->manageApplication(); | $this->manageApplication(); | ||||
| return id(new AphrontRedirectResponse())->setURI($view_uri); | return id(new AphrontRedirectResponse())->setURI($view_uri); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines | |||||