Differential D21770 Diff 51906 src/applications/meta/controller/PhabricatorApplicationUninstallController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/meta/controller/PhabricatorApplicationUninstallController.php
Show All 32 Lines | $dialog = id(new AphrontDialogView()) | ||||
->addCancelButton($view_uri); | ->addCancelButton($view_uri); | ||||
if ($application->isPrototype() && !$prototypes_enabled) { | if ($application->isPrototype() && !$prototypes_enabled) { | ||||
$dialog | $dialog | ||||
->setTitle(pht('Prototypes Not Enabled')) | ->setTitle(pht('Prototypes Not Enabled')) | ||||
->appendChild( | ->appendChild( | ||||
pht( | pht( | ||||
'To manage prototypes, enable them by setting %s in your '. | 'To manage prototypes, enable them by setting %s in your '. | ||||
'Phabricator configuration.', | 'configuration.', | ||||
phutil_tag('tt', array(), 'phabricator.show-prototypes'))); | 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()) { | ||||
$xactions = array(); | $xactions = array(); | ||||
$template = $application->getApplicationTransactionTemplate(); | $template = $application->getApplicationTransactionTemplate(); | ||||
$xactions[] = id(clone $template) | $xactions[] = id(clone $template) | ||||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | if ($action == 'install') { | ||||
$dialog | $dialog | ||||
->appendParagraph( | ->appendParagraph( | ||||
pht( | pht( | ||||
'Are you absolutely certain you want to uninstall the Home '. | 'Are you absolutely certain you want to uninstall the Home '. | ||||
'application?')) | 'application?')) | ||||
->appendParagraph( | ->appendParagraph( | ||||
pht( | pht( | ||||
'This is very unusual and will leave you without any '. | 'This is very unusual and will leave you without any '. | ||||
'content on the Phabricator home page. You should only '. | 'content on the home page. You should only do this if you '. | ||||
'do this if you are certain you know what you are doing.')) | 'are certain you know what you are doing.')) | ||||
->addSubmitButton(pht('Completely Break Phabricator')); | ->addSubmitButton(pht('Completely Break Everything')); | ||||
} else { | } else { | ||||
$dialog | $dialog | ||||
->appendParagraph( | ->appendParagraph( | ||||
pht( | pht( | ||||
'Really uninstall the %s application?', | 'Really uninstall the %s application?', | ||||
$application->getName())) | $application->getName())) | ||||
->addSubmitButton(pht('Uninstall')); | ->addSubmitButton(pht('Uninstall')); | ||||
} | } | ||||
} else { | } else { | ||||
$dialog | $dialog | ||||
->setTitle(pht('Information')) | ->setTitle(pht('Information')) | ||||
->appendChild( | ->appendChild( | ||||
pht( | pht( | ||||
'This application cannot be uninstalled, '. | 'This application is required and cannot be uninstalled.')); | ||||
'because it is required for Phabricator to work.')); | |||||
} | } | ||||
} | } | ||||
return id(new AphrontDialogResponse())->setDialog($dialog); | return id(new AphrontDialogResponse())->setDialog($dialog); | ||||
} | } | ||||
} | } |