Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14057459
D14494.id.diff
No One
Temporary
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
D14494.id.diff
View Options
diff --git a/src/applications/conpherence/editor/ConpherenceEditor.php b/src/applications/conpherence/editor/ConpherenceEditor.php
--- a/src/applications/conpherence/editor/ConpherenceEditor.php
+++ b/src/applications/conpherence/editor/ConpherenceEditor.php
@@ -623,9 +623,8 @@
switch ($xaction->getTransactionType()) {
case ConpherenceTransaction::TYPE_PICTURE:
- return array($xaction->getNewValue()->getPHID());
case ConpherenceTransaction::TYPE_PICTURE_CROP:
- return array($xaction->getNewValue());
+ return array($xaction->getNewValue());
}
return parent::extractFilePHIDsFromCustomTransaction($object, $xaction);
diff --git a/src/applications/pholio/editor/PholioMockEditor.php b/src/applications/pholio/editor/PholioMockEditor.php
--- a/src/applications/pholio/editor/PholioMockEditor.php
+++ b/src/applications/pholio/editor/PholioMockEditor.php
@@ -120,19 +120,31 @@
PhabricatorLiskDAO $object,
PhabricatorApplicationTransaction $xaction) {
+ $images = $this->getNewImages();
+ $images = mpull($images, null, 'getPHID');
+
switch ($xaction->getTransactionType()) {
case PholioTransaction::TYPE_IMAGE_FILE:
- $new = $xaction->getNewValue();
- $phids = array();
- foreach ($new as $key => $images) {
- $phids[] = mpull($images, 'getFilePHID');
+ $file_phids = array();
+ foreach ($xaction->getNewValue() as $image_phid) {
+ $image = idx($images, $image_phid);
+ if (!$image) {
+ continue;
+ }
+ $file_phids[] = $image->getFilePHID();
}
- return array_mergev($phids);
+ return $file_phids;
case PholioTransaction::TYPE_IMAGE_REPLACE:
- return array($xaction->getNewValue()->getFilePHID());
+ $image_phid = $xaction->getNewValue();
+ $image = idx($images, $image_phid);
+
+ if ($image) {
+ return array($image->getFilePHID());
+ }
+ break;
}
- return array();
+ return parent::extractFilePHIDsFromCustomTransaction($object, $xaction);
}
diff --git a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
--- a/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
+++ b/src/applications/transactions/editor/PhabricatorApplicationTransactionEditor.php
@@ -775,8 +775,6 @@
throw new PhabricatorApplicationTransactionValidationException($errors);
}
- $file_phids = $this->extractFilePHIDs($object, $xactions);
-
if ($object->getID()) {
foreach ($xactions as $xaction) {
@@ -822,6 +820,7 @@
}
$xactions = $this->sortTransactions($xactions);
+ $file_phids = $this->extractFilePHIDs($object, $xactions);
if ($is_preview) {
$this->loadHandles($xactions);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 18, 3:25 AM (1 d, 14 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6729601
Default Alt Text
D14494.id.diff (2 KB)
Attached To
Mode
D14494: Extract PHIDs from transactions later, fixing Paste extraction/attachment
Attached
Detach File
Event Timeline
Log In to Comment