@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.

Calendar event monograms, part 4. Typing E{id} makes the object available in global search.

Summary: Closes T7928, E{id} is available via global search.

Test Plan: Create calendar event, search for its monogram in global search, event should be accessible.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7928

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

+29 -1
+28
src/applications/calendar/phid/PhabricatorCalendarEventPHIDType.php
··· 38 38 } 39 39 } 40 40 41 + public function canLoadNamedObject($name) { 42 + return preg_match('/^E[1-9]\d*$/i', $name); 43 + } 44 + 45 + public function loadNamedObjects( 46 + PhabricatorObjectQuery $query, 47 + array $names) { 48 + 49 + $id_map = array(); 50 + foreach ($names as $name) { 51 + $id = (int)substr($name, 1); 52 + $id_map[$id][] = $name; 53 + } 54 + 55 + $objects = id(new PhabricatorCalendarEventQuery()) 56 + ->setViewer($query->getViewer()) 57 + ->withIDs(array_keys($id_map)) 58 + ->execute(); 59 + 60 + $results = array(); 61 + foreach ($objects as $id => $object) { 62 + foreach (idx($id_map, $id, array()) as $name) { 63 + $results[$name] = $object; 64 + } 65 + } 66 + 67 + return $results; 68 + } 41 69 }
+1 -1
src/applications/differential/phid/DifferentialRevisionPHIDType.php
··· 47 47 } 48 48 49 49 public function canLoadNamedObject($name) { 50 - return preg_match('/^D\d*[1-9]\d*$/i', $name); 50 + return preg_match('/^D[1-9]\d*$/i', $name); 51 51 } 52 52 53 53 public function loadNamedObjects(