mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Do not extract file PHIDs from remarkup blocks for attachment
Summary: Ref T13603. When processing transactions that include remarkup blocks, stop extracting file references from them for attachment. Test Plan: Submitted a remarkup block with a file reference, no longer saw automatic file attachment. Maniphest Tasks: T13603 Differential Revision: https://secure.phabricator.com/D21812
This commit is contained in:
parent
ee6e2a396f
commit
6fea5e5ce7
2 changed files with 0 additions and 26 deletions
|
@ -78,12 +78,6 @@ final class PhabricatorApplicationTransactionCommentEditor
|
|||
$comment->setViewPolicy(PhabricatorPolicies::POLICY_PUBLIC);
|
||||
$comment->setEditPolicy($this->getActingAsPHID());
|
||||
|
||||
$file_phids = PhabricatorMarkupEngine::extractFilePHIDsFromEmbeddedFiles(
|
||||
$actor,
|
||||
array(
|
||||
$comment->getContent(),
|
||||
));
|
||||
|
||||
$xaction->openTransaction();
|
||||
$xaction->beginReadLocking();
|
||||
if ($xaction->getID()) {
|
||||
|
@ -132,18 +126,6 @@ final class PhabricatorApplicationTransactionCommentEditor
|
|||
$xaction->endReadLocking();
|
||||
$xaction->saveTransaction();
|
||||
|
||||
// Add links to any files newly referenced by the edit.
|
||||
if ($file_phids) {
|
||||
$editor = new PhabricatorEdgeEditor();
|
||||
foreach ($file_phids as $file_phid) {
|
||||
$editor->addEdge(
|
||||
$xaction->getObjectPHID(),
|
||||
PhabricatorObjectHasFileEdgeType::EDGECONST ,
|
||||
$file_phid);
|
||||
}
|
||||
$editor->save();
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
|
|
@ -4042,15 +4042,7 @@ abstract class PhabricatorApplicationTransactionEditor
|
|||
PhabricatorLiskDAO $object,
|
||||
array $xactions) {
|
||||
|
||||
$changes = $this->getRemarkupChanges($xactions);
|
||||
$blocks = mpull($changes, 'getNewValue');
|
||||
|
||||
$phids = array();
|
||||
if ($blocks) {
|
||||
$phids[] = PhabricatorMarkupEngine::extractFilePHIDsFromEmbeddedFiles(
|
||||
$this->getActor(),
|
||||
$blocks);
|
||||
}
|
||||
|
||||
foreach ($xactions as $xaction) {
|
||||
$type = $xaction->getTransactionType();
|
||||
|
|
Loading…
Reference in a new issue