Differential D13200 Diff 31965 src/applications/meta/controller/PhabricatorApplicationUninstallController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/meta/controller/PhabricatorApplicationUninstallController.php
| Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | public function processRequest() { | ||||
| if ($request->isDialogFormPost()) { | if ($request->isDialogFormPost()) { | ||||
| $this->manageApplication(); | $this->manageApplication(); | ||||
| return id(new AphrontRedirectResponse())->setURI($view_uri); | return id(new AphrontRedirectResponse())->setURI($view_uri); | ||||
| } | } | ||||
| if ($this->action == 'install') { | if ($this->action == 'install') { | ||||
| if ($selected->canUninstall()) { | if ($selected->canUninstall()) { | ||||
| $dialog | $dialog | ||||
| ->setTitle('Confirmation') | ->setTitle(pht('Confirmation')) | ||||
| ->appendChild( | ->appendChild( | ||||
| pht( | pht( | ||||
| 'Install %s application?', | 'Install %s application?', | ||||
| $selected->getName())) | $selected->getName())) | ||||
| ->addSubmitButton('Install'); | ->addSubmitButton(pht('Install')); | ||||
| } else { | } else { | ||||
| $dialog | $dialog | ||||
| ->setTitle('Information') | ->setTitle(pht('Information')) | ||||
| ->appendChild(pht('You cannot install an installed application.')); | ->appendChild(pht('You cannot install an installed application.')); | ||||
| } | } | ||||
| } else { | } else { | ||||
| if ($selected->canUninstall()) { | if ($selected->canUninstall()) { | ||||
| $dialog->setTitle(pht('Really Uninstall Application?')); | $dialog->setTitle(pht('Really Uninstall Application?')); | ||||
| if ($selected instanceof PhabricatorHomeApplication) { | if ($selected instanceof PhabricatorHomeApplication) { | ||||
| $dialog | $dialog | ||||
| ▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines | |||||