diff --git a/src/applications/system/management/PhabricatorSystemRemoveDestroyWorkflow.php b/src/applications/system/management/PhabricatorSystemRemoveDestroyWorkflow.php --- a/src/applications/system/management/PhabricatorSystemRemoveDestroyWorkflow.php +++ b/src/applications/system/management/PhabricatorSystemRemoveDestroyWorkflow.php @@ -54,23 +54,81 @@ } } + $banner = <<writeOut("\n\n%s\n\n", $banner); + $console->writeOut( - "**%s**\n\n", - pht(' IMPORTANT: OBJECTS WILL BE PERMANENTLY DESTROYED! ')); + "** %s ** %s\n\n%s\n\n". + "** %s ** %s\n\n%s\n\n", + pht('IMPORTANT'), + pht('DATA WILL BE PERMANENTLY DESTROYED'), + phutil_console_wrap( + pht( + 'Objects will be permanently destroyed. There is no way to '. + 'undo this operation or ever retrieve this data unless you '. + 'maintain external backups.')), + pht('IMPORTANT'), + pht('DELETING OBJECTS OFTEN BREAKS THINGS'), + phutil_console_wrap( + pht( + 'Destroying objects may cause related objects to stop working, '. + 'and may leave scattered references to objects which no longer '. + 'exist. In most cases, it is much better to disable or archive '. + 'objects instead of destroying them. This risk is greatest when '. + 'deleting complex or highly connected objects like repositories, '. + 'projects and users.'. + "\n\n". + 'These tattered edges are an expected consquence of destroying '. + 'objects, and the Phabricator upstream will not help you fix '. + 'them. We strongly recomend disabling or archiving objects '. + 'instead.'))); + + $phids = mpull($named_objects, 'getPHID'); + $handles = PhabricatorUser::getOmnipotentUser()->loadHandles($phids); $console->writeOut( pht( - "There is no way to undo this operation or ever retrieve this data.". - "\n\n". - "These %s object(s) will be **completely destroyed forever**:". - "\n\n", - new PhutilNumber(count($named_objects)))); + 'These %s object(s) will be destroyed forever:', + new PhutilNumber(count($named_objects)))."\n\n"); foreach ($named_objects as $object_name => $object) { + $phid = $object->getPHID(); + $console->writeOut( - " - %s (%s)\n", + " - %s (%s) %s\n", $object_name, - get_class($object)); + get_class($object), + $handles[$phid]->getFullName()); } $force = $args->getArg('force'); diff --git a/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php b/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php --- a/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php +++ b/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php @@ -1067,6 +1067,17 @@ ), ), + 'These %s object(s) will be destroyed forever:' => array( + 'This object will be destroyed forever:', + 'These objects will be destroyed forever:', + ), + + 'Are you absolutely certain you want to destroy these %s '. + 'object(s)?' => array( + 'Are you absolutely certain you want to destroy this object?', + 'Are you absolutely certain you want to destroy these objects?', + ), + ); }