@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 PhabricatorPasteContentSearchEngineAttachment
4 extends PhabricatorSearchEngineAttachment {
5
6 public function getAttachmentName() {
7 return pht('Paste Content');
8 }
9
10 public function getAttachmentDescription() {
11 return pht('Get the full content for each paste.');
12 }
13
14 public function willLoadAttachmentData($query, $spec) {
15 $query->needRawContent(true);
16 }
17
18 public function getAttachmentForObject($object, $data, $spec) {
19 return array(
20 'content' => $object->getRawContent(),
21 );
22 }
23
24}