Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2683004
D25475.1734677179.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25475.1734677179.diff
View Options
diff --git a/src/applications/maniphest/xaction/ManiphestTaskCoverImageTransaction.php b/src/applications/maniphest/xaction/ManiphestTaskCoverImageTransaction.php
--- a/src/applications/maniphest/xaction/ManiphestTaskCoverImageTransaction.php
+++ b/src/applications/maniphest/xaction/ManiphestTaskCoverImageTransaction.php
@@ -33,6 +33,20 @@
$object->setProperty('cover.filePHID', $file->getPHID());
$object->setProperty('cover.thumbnailPHID', $xform->getPHID());
+
+ // Connect the Transform to the original file.
+ // In this way the user can change the permissions of the original File
+ // and this Transform automatically reflects these policies.
+ $xtransformed = id(new PhabricatorTransformedFile())
+ ->setOriginalPHID($file_phid)
+ ->setTransformedPHID($xform->getPHID())
+ ->setTransform($xform_key)
+ ->save();
+
+ // As side-effect, attach the Cover Image to the Object,
+ // otherwise it may be invisible to other participants.
+ // This is always successful.
+ $file->attachToObject($object->getPHID());
}
public function getTitle() {
diff --git a/src/applications/project/controller/PhabricatorProjectCoverController.php b/src/applications/project/controller/PhabricatorProjectCoverController.php
--- a/src/applications/project/controller/PhabricatorProjectCoverController.php
+++ b/src/applications/project/controller/PhabricatorProjectCoverController.php
@@ -35,6 +35,7 @@
$xactions = array();
+ // Set the new Cover Image.
$xactions[] = id(new ManiphestTransaction())
->setTransactionType(ManiphestTaskCoverImageTransaction::TRANSACTIONTYPE)
->setNewValue($file->getPHID());
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 06:46 (20 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1016722
Default Alt Text
D25475.1734677179.diff (1 KB)
Attached To
Mode
D25475: Drag & Drop Task Cover Image: also attach
Attached
Detach File
Event Timeline
Log In to Comment