@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
3abstract class PasteConduitAPIMethod extends ConduitAPIMethod {
4
5 final public function getApplication() {
6 return PhabricatorApplication::getByClass(
7 PhabricatorPasteApplication::class);
8 }
9
10 protected function buildPasteInfoDictionary(PhabricatorPaste $paste) {
11 return array(
12 'id' => $paste->getID(),
13 'objectName' => 'P'.$paste->getID(),
14 'phid' => $paste->getPHID(),
15 'authorPHID' => $paste->getAuthorPHID(),
16 'filePHID' => $paste->getFilePHID(),
17 'title' => $paste->getTitle(),
18 'dateCreated' => $paste->getDateCreated(),
19 'language' => $paste->getLanguage(),
20 'uri' => PhabricatorEnv::getProductionURI('/P'.$paste->getID()),
21 'parentPHID' => $paste->getParentPHID(),
22 'content' => $paste->getRawContent(),
23 );
24 }
25
26}