Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F88599
D7737.diff
All Users
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D7737.diff
View Options
diff --git a/src/applications/phragment/controller/PhragmentBrowseController.php b/src/applications/phragment/controller/PhragmentBrowseController.php
--- a/src/applications/phragment/controller/PhragmentBrowseController.php
+++ b/src/applications/phragment/controller/PhragmentBrowseController.php
@@ -66,6 +66,10 @@
$item->addAttribute(pht(
'Latest Version %s',
$fragment->getLatestVersion()->getSequence()));
+ if ($fragment->isDeleted()) {
+ $item->setDisabled(true);
+ $item->addAttribute(pht('Deleted'));
+ }
} else {
$item->addAttribute('Directory');
}
diff --git a/src/applications/phragment/controller/PhragmentController.php b/src/applications/phragment/controller/PhragmentController.php
--- a/src/applications/phragment/controller/PhragmentController.php
+++ b/src/applications/phragment/controller/PhragmentController.php
@@ -134,9 +134,15 @@
->setActionList($actions);
if (!$fragment->isDirectory()) {
- $properties->addProperty(
- pht('Type'),
- pht('File'));
+ if ($fragment->isDeleted()) {
+ $properties->addProperty(
+ pht('Type'),
+ pht('File (Deleted)'));
+ } else {
+ $properties->addProperty(
+ pht('Type'),
+ pht('File'));
+ }
$properties->addProperty(
pht('Latest Version'),
$this->renderHandlesForPHIDs(array($fragment->getLatestVersionPHID())));
diff --git a/src/applications/phragment/controller/PhragmentHistoryController.php b/src/applications/phragment/controller/PhragmentHistoryController.php
--- a/src/applications/phragment/controller/PhragmentHistoryController.php
+++ b/src/applications/phragment/controller/PhragmentHistoryController.php
@@ -52,6 +52,11 @@
$version->getDateCreated(),
$viewer));
+ if ($version->getFilePHID() === null) {
+ $item->setDisabled(true);
+ $item->addAttribute('Deletion');
+ }
+
$disabled = !isset($files[$version->getFilePHID()]);
$action = id(new PHUIListItemView())
->setIcon('download')
diff --git a/src/applications/phragment/storage/PhragmentFragment.php b/src/applications/phragment/storage/PhragmentFragment.php
--- a/src/applications/phragment/storage/PhragmentFragment.php
+++ b/src/applications/phragment/storage/PhragmentFragment.php
@@ -42,6 +42,10 @@
return $this->latestVersionPHID === null;
}
+ public function isDeleted() {
+ return $this->getLatestVersion()->getFilePHID() === null;
+ }
+
public function getLatestVersion() {
if ($this->latestVersionPHID === null) {
return null;
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/vc/lj/td4zow5acmv7oidf
Default Alt Text
D7737.diff (2 KB)
Attached To
Mode
D7737: Render deleted files in Phragment as disabled
Attached
Detach File
Event Timeline
Log In to Comment