Differential D11753 Diff 28336 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 57 Lines • ▼ Show 20 Lines | if ($this->action == 'install') { | ||||
->addSubmitButton('Install'); | ->addSubmitButton('Install'); | ||||
} else { | } else { | ||||
$dialog->setTitle('Information') | $dialog->setTitle('Information') | ||||
->appendChild('You cannot install an installed application.'); | ->appendChild('You cannot install an installed application.'); | ||||
} | } | ||||
} else { | } else { | ||||
if ($selected->canUninstall()) { | if ($selected->canUninstall()) { | ||||
$dialog->setTitle('Confirmation') | $dialog->setTitle(pht('Really Uninstall Application?')); | ||||
->appendChild( | |||||
'Really Uninstall '.$selected->getName().' application?') | if ($selected instanceof PhabricatorHomeApplication) { | ||||
->addSubmitButton('Uninstall'); | $dialog | ||||
->appendParagraph( | |||||
pht( | |||||
'Are you absolutely certain you want to uninstall the Home '. | |||||
'application?')) | |||||
->appendParagraph( | |||||
pht( | |||||
'This is very unusual and will leave you without any '. | |||||
'content on the Phabricator home page. You should only '. | |||||
'do this if you are certain you know what you are doing.')) | |||||
->addSubmitButton(pht('Completely Break Phabricator')); | |||||
} else { | |||||
$dialog | |||||
->appendParagraph( | |||||
pht( | |||||
'Really uninstall the %s application?', | |||||
$selected->getName())) | |||||
->addSubmitButton(pht('Uninstall')); | |||||
} | |||||
} else { | } else { | ||||
$dialog->setTitle('Information') | $dialog->setTitle('Information') | ||||
->appendChild( | ->appendChild( | ||||
'This application cannot be uninstalled, | 'This application cannot be uninstalled, | ||||
because it is required for Phabricator to work.'); | because it is required for Phabricator to work.'); | ||||
} | } | ||||
} | } | ||||
return id(new AphrontDialogResponse())->setDialog($dialog); | return id(new AphrontDialogResponse())->setDialog($dialog); | ||||
Show All 22 Lines |