Changeset View
Changeset View
Standalone View
Standalone View
src/applications/pholio/xaction/PholioImageFileTransaction.php
Show First 20 Lines • Show All 101 Lines • ▼ Show 20 Lines | final class PholioImageFileTransaction | ||||
public function extractFilePHIDs($object, $value) { | public function extractFilePHIDs($object, $value) { | ||||
$editor = $this->getEditor(); | $editor = $this->getEditor(); | ||||
// NOTE: This method is a little weird (and includes ALL the file PHIDs, | // NOTE: This method is a little weird (and includes ALL the file PHIDs, | ||||
// including old file PHIDs) because we currently don't have a storage | // including old file PHIDs) because we currently don't have a storage | ||||
// object when called. This might change at some point. | // object when called. This might change at some point. | ||||
$new_phids = $value; | $new_phids = $value; | ||||
$file_phids = array(); | $file_phids = array(); | ||||
foreach ($new_phids as $phid) { | foreach ($new_phids as $phids) { | ||||
foreach ($phids as $phid) { | |||||
$file_phids[] = $editor->loadPholioImage($object, $phid) | $file_phids[] = $editor->loadPholioImage($object, $phid) | ||||
->getFilePHID(); | ->getFilePHID(); | ||||
} | } | ||||
} | |||||
valerio.bozzolan: Note that Evan fixed with this version ↑
https://secure.phabricator. | |||||
speckUnsubmitted Not Done Inline ActionsWe should probably update to match. I agree it's likely the upstream fix was done to avoid loading a pholio image multiple times. speck: We should probably update to match. I agree it's likely the upstream fix was done to avoid… | |||||
return $file_phids; | return $file_phids; | ||||
} | } | ||||
public function mergeTransactions( | public function mergeTransactions( | ||||
$object, | $object, | ||||
PhabricatorApplicationTransaction $u, | PhabricatorApplicationTransaction $u, | ||||
PhabricatorApplicationTransaction $v) { | PhabricatorApplicationTransaction $v) { | ||||
return $this->getEditor()->mergePHIDOrEdgeTransactions($u, $v); | return $this->getEditor()->mergePHIDOrEdgeTransactions($u, $v); | ||||
} | } | ||||
} | } |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
Note that Evan fixed with this version ↑
https://secure.phabricator.com/rPa83cb99e856a70ac355dc51547949b50485bb768
I post this comment so we can compare