Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13971734
D10721.id25736.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
D10721.id25736.diff
View Options
diff --git a/src/applications/audit/editor/PhabricatorAuditEditor.php b/src/applications/audit/editor/PhabricatorAuditEditor.php
--- a/src/applications/audit/editor/PhabricatorAuditEditor.php
+++ b/src/applications/audit/editor/PhabricatorAuditEditor.php
@@ -321,6 +321,7 @@
$object);
if ($request) {
$xactions[] = $request;
+ $this->setUnmentionablePHIDMap($request->getNewValue());
}
break;
default:
@@ -448,6 +449,64 @@
return true;
}
+ protected function expandCustomRemarkupBlockTransactions(
+ PhabricatorLiskDAO $object,
+ array $xactions,
+ $blocks,
+ PhutilMarkupEngine $engine) {
+
+ // we are only really trying to find unmentionable phids here...
+ // don't bother with this outside initial commit (i.e. create)
+ // transaction
+ $is_commit = false;
+ foreach ($xactions as $xaction) {
+ switch ($xaction->getTransactionType()) {
+ case PhabricatorAuditTransaction::TYPE_COMMIT:
+ $is_commit = true;
+ break;
+ }
+ }
+
+ // "result" is always an array....
+ $result = array();
+ if (!$is_commit) {
+ return $result;
+ }
+
+ $flat_blocks = array_mergev($blocks);
+ $huge_block = implode("\n\n", $flat_blocks);
+ $phid_map = array();
+ $phid_map[] = $this->getUnmentionablePHIDMap();
+ $monograms = array();
+
+ $task_refs = id(new ManiphestCustomFieldStatusParser())
+ ->parseCorpus($huge_block);
+ foreach ($task_refs as $match) {
+ foreach ($match['monograms'] as $monogram) {
+ $monograms[] = $monogram;
+ }
+ }
+
+ $rev_refs = id(new DifferentialCustomFieldDependsOnParser())
+ ->parseCorpus($huge_block);
+ foreach ($rev_refs as $match) {
+ foreach ($match['monograms'] as $monogram) {
+ $monograms[] = $monogram;
+ }
+ }
+
+ $objects = id(new PhabricatorObjectQuery())
+ ->setViewer($this->getActor())
+ ->withNames($monograms)
+ ->execute();
+ $phid_map[] = mpull($objects, 'getPHID', 'getPHID');
+ $phid_map = array_mergev($phid_map);
+ $this->setUnmentionablePHIDMap($phid_map);
+
+ return $result;
+ }
+
+
protected function shouldSendMail(
PhabricatorLiskDAO $object,
array $xactions) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 18, 3:02 PM (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6710369
Default Alt Text
D10721.id25736.diff (2 KB)
Attached To
Mode
D10721: Audit - fix erroneous mentions of tasks, etc via commit message
Attached
Detach File
Event Timeline
Log In to Comment