@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<?php
2
3final class DiffusionRepositoryByIDRemarkupRule
4 extends PhabricatorObjectRemarkupRule {
5
6 protected function getObjectNamePrefix() {
7 return 'R';
8 }
9
10 /**
11 * @return string Regex which defines a valid object ID
12 */
13 protected function getObjectIDPattern() {
14 return '[0-9]+';
15 }
16
17 public function getPriority() {
18 return 460.0;
19 }
20
21 protected function loadObjects(array $ids) {
22 $viewer = $this->getEngine()->getConfig('viewer');
23
24 $repos = id(new PhabricatorRepositoryQuery())
25 ->setViewer($viewer)
26 ->withIdentifiers($ids);
27
28 $repos->execute();
29 return $repos->getIdentifierMap();
30 }
31
32}