Page MenuHomePhabricator

D12952.diff
No OneTemporary

D12952.diff

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 = <<<EOBANNER
+ uuuuuuu
+ uu###########uu
+ uu#################uu
+ u#####################u
+ u#######################u
+ u#########################u
+ u#########################u
+ u######" "###" "######u
+ "####" u#u ####"
+ ###u u#u u###
+ ###u u###u u###
+ "####uu### ###uu####"
+ "#######" "#######"
+ u#######u#######u
+ u#"#"#"#"#"#"#u
+ uuu ##u# # # # #u## uuu
+ u#### #####u#u#u### u####
+ #####uu "#########" uu######
+ u###########uu """"" uuuu##########
+ ####"""##########uuu uu#########"""###"
+ """ ""###########uu ""#"""
+ uuuu ""##########uuu
+ u###uuu#########uu ""###########uuu###
+ ##########"""" ""###########"
+ "#####" ""####""
+ ###" ####"
+
+EOBANNER;
+
+
+ $console->writeOut("\n\n<fg:red>%s</fg>\n\n", $banner);
+
$console->writeOut(
- "<bg:red>**%s**</bg>\n\n",
- pht(' IMPORTANT: OBJECTS WILL BE PERMANENTLY DESTROYED! '));
+ "<bg:red>** %s **</bg> %s\n\n%s\n\n".
+ "<bg:red>** %s **</bg> %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?',
+ ),
+
);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 2, 1:28 AM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6712086
Default Alt Text
D12952.diff (4 KB)

Event Timeline