Differential D25002 Diff 39 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.', | '%s configuration.', | ||||
phutil_tag('tt', array(), 'phabricator.show-prototypes'))); | phutil_tag('tt', array(), 'phabricator.show-prototypes'), | ||||
PhabricatorPlatformSite::getName())); | |||||
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) | ||||
->setTransactionType( | ->setTransactionType( | ||||
▲ Show 20 Lines • Show All 42 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 %s home page. You should only '. | ||||
'do this if you are certain you know what you are doing.')) | 'do this if you are certain you know what you are doing.', | ||||
->addSubmitButton(pht('Completely Break Phabricator')); | PhabricatorPlatformSite::getName())) | ||||
->addSubmitButton(pht('Completely Break %s', | |||||
PhabricatorPlatformSite::getName())); | |||||
} 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 cannot be uninstalled, '. | ||||
'because it is required for Phabricator to work.')); | 'because it is required for %s to work.', | ||||
PhabricatorPlatformSite::getName())); | |||||
} | } | ||||
} | } | ||||
return id(new AphrontDialogResponse())->setDialog($dialog); | return id(new AphrontDialogResponse())->setDialog($dialog); | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0