@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Correct file PHID extraction on image update in Pholio

Summary: Ref T12776. This extraction of file PHIDs extracted "PholioImage" object PHIDs (`PHID-PIMG-...`), not "File" PHIDs (`PHID-FILE-...`). Instead, dig into the Pholio images and actually extract the file PHIDs. This method is now similar to the `PholioImageFileTransaction` method, which works already.

Test Plan:
- Create a mock.
- Update one of the images.
- In Files, view the "Attached" tab of the updated image.
- Before patch: not attached to mock.
- After patch: properly attached to mock.

Reviewers: chad, amckinley

Reviewed By: chad

Maniphest Tasks: T12776

Differential Revision: https://secure.phabricator.com/D18042

+13 -1
+13 -1
src/applications/pholio/xaction/PholioImageReplaceTransaction.php
··· 62 62 } 63 63 64 64 public function extractFilePHIDs($object, $value) { 65 - return array($value); 65 + $file_phids = array(); 66 + 67 + $editor = $this->getEditor(); 68 + $images = $editor->getNewImages(); 69 + foreach ($images as $image) { 70 + if ($image->getPHID() !== $value) { 71 + continue; 72 + } 73 + 74 + $file_phids[] = $image->getFilePHID(); 75 + } 76 + 77 + return $file_phids; 66 78 } 67 79 68 80 }