Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15527364
D10464.id25166.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D10464.id25166.diff
View Options
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
@@ -1199,18 +1199,23 @@
}
}
- $objects = id(new PhabricatorObjectQuery())
+ $mentioned_objects = id(new PhabricatorObjectQuery())
->setViewer($this->getActor())
->withPHIDs($mentioned_phids)
->execute();
$mentionable_phids = array();
- foreach ($objects as $object) {
- if ($object instanceof PhabricatorMentionableInterface) {
- if (idx($this->getUnmentionablePHIDMap(), $object->getPHID())) {
+ foreach ($mentioned_objects as $mentioned_object) {
+ if ($mentioned_object instanceof PhabricatorMentionableInterface) {
+ $mentioned_phid = $mentioned_object->getPHID();
+ if (idx($this->getUnmentionablePHIDMap(), $mentioned_phid)) {
continue;
}
- $mentionable_phids[$object->getPHID()] = $object->getPHID();
+ // don't let objects mention themselves
+ if ($object->getPHID() && $mentioned_phid == $object->getPHID()) {
+ continue;
+ }
+ $mentionable_phids[$mentioned_phid] = $mentioned_phid;
}
}
if ($mentionable_phids) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 23, 3:10 AM (34 m, 23 s)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7725037
Default Alt Text
D10464.id25166.diff (1 KB)
Attached To
Mode
D10464: Transactions - don't let objects mention themselves.
Attached
Detach File
Event Timeline
Log In to Comment