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

Remove file attachment edge types, including API access

Summary:
Ref T13603. This removes the file attachment edge types, which no longer have readers or writers.

It does not delete the underlying data.

This indirectly removes API access to this edge. As far as I know, this was only used by one customer (see D21480) who has migrated away from Phabricator.

Test Plan: Grepped for edge constants.

Maniphest Tasks: T13603

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

-146
-4
src/__phutil_library_map__.php
··· 3471 3471 'PhabricatorFileExternalRequest' => 'applications/files/storage/PhabricatorFileExternalRequest.php', 3472 3472 'PhabricatorFileExternalRequestGarbageCollector' => 'applications/files/garbagecollector/PhabricatorFileExternalRequestGarbageCollector.php', 3473 3473 'PhabricatorFileFilePHIDType' => 'applications/files/phid/PhabricatorFileFilePHIDType.php', 3474 - 'PhabricatorFileHasObjectEdgeType' => 'applications/files/edge/PhabricatorFileHasObjectEdgeType.php', 3475 3474 'PhabricatorFileIconSetSelectController' => 'applications/files/controller/PhabricatorFileIconSetSelectController.php', 3476 3475 'PhabricatorFileImageMacro' => 'applications/macro/storage/PhabricatorFileImageMacro.php', 3477 3476 'PhabricatorFileImageProxyController' => 'applications/files/controller/PhabricatorFileImageProxyController.php', ··· 3933 3932 'PhabricatorObjectHasAsanaTaskEdgeType' => 'applications/doorkeeper/edge/PhabricatorObjectHasAsanaTaskEdgeType.php', 3934 3933 'PhabricatorObjectHasContributorEdgeType' => 'applications/transactions/edges/PhabricatorObjectHasContributorEdgeType.php', 3935 3934 'PhabricatorObjectHasDraftEdgeType' => 'applications/transactions/edges/PhabricatorObjectHasDraftEdgeType.php', 3936 - 'PhabricatorObjectHasFileEdgeType' => 'applications/transactions/edges/PhabricatorObjectHasFileEdgeType.php', 3937 3935 'PhabricatorObjectHasJiraIssueEdgeType' => 'applications/doorkeeper/edge/PhabricatorObjectHasJiraIssueEdgeType.php', 3938 3936 'PhabricatorObjectHasSubscriberEdgeType' => 'applications/transactions/edges/PhabricatorObjectHasSubscriberEdgeType.php', 3939 3937 'PhabricatorObjectHasUnsubscriberEdgeType' => 'applications/transactions/edges/PhabricatorObjectHasUnsubscriberEdgeType.php', ··· 9920 9918 ), 9921 9919 'PhabricatorFileExternalRequestGarbageCollector' => 'PhabricatorGarbageCollector', 9922 9920 'PhabricatorFileFilePHIDType' => 'PhabricatorPHIDType', 9923 - 'PhabricatorFileHasObjectEdgeType' => 'PhabricatorEdgeType', 9924 9921 'PhabricatorFileIconSetSelectController' => 'PhabricatorFileController', 9925 9922 'PhabricatorFileImageMacro' => array( 9926 9923 'PhabricatorFileDAO', ··· 10432 10429 'PhabricatorObjectHasAsanaTaskEdgeType' => 'PhabricatorEdgeType', 10433 10430 'PhabricatorObjectHasContributorEdgeType' => 'PhabricatorEdgeType', 10434 10431 'PhabricatorObjectHasDraftEdgeType' => 'PhabricatorEdgeType', 10435 - 'PhabricatorObjectHasFileEdgeType' => 'PhabricatorEdgeType', 10436 10432 'PhabricatorObjectHasJiraIssueEdgeType' => 'PhabricatorEdgeType', 10437 10433 'PhabricatorObjectHasSubscriberEdgeType' => 'PhabricatorEdgeType', 10438 10434 'PhabricatorObjectHasUnsubscriberEdgeType' => 'PhabricatorEdgeType',
-27
src/applications/files/edge/PhabricatorFileHasObjectEdgeType.php
··· 1 - <?php 2 - 3 - final class PhabricatorFileHasObjectEdgeType extends PhabricatorEdgeType { 4 - 5 - const EDGECONST = 26; 6 - 7 - public function getInverseEdgeConstant() { 8 - return PhabricatorObjectHasFileEdgeType::EDGECONST; 9 - } 10 - 11 - public function shouldWriteInverseTransactions() { 12 - return true; 13 - } 14 - 15 - public function getConduitKey() { 16 - return 'file.attached-objects'; 17 - } 18 - 19 - public function getConduitName() { 20 - return pht('File Has Object'); 21 - } 22 - 23 - public function getConduitDescription() { 24 - return pht('The source file is attached to the destination object.'); 25 - } 26 - 27 - }
-115
src/applications/transactions/edges/PhabricatorObjectHasFileEdgeType.php
··· 1 - <?php 2 - 3 - final class PhabricatorObjectHasFileEdgeType extends PhabricatorEdgeType { 4 - 5 - const EDGECONST = 25; 6 - 7 - public function getInverseEdgeConstant() { 8 - return PhabricatorFileHasObjectEdgeType::EDGECONST; 9 - } 10 - 11 - public function shouldWriteInverseTransactions() { 12 - return true; 13 - } 14 - 15 - public function getConduitKey() { 16 - return 'object.attached-files'; 17 - } 18 - 19 - public function getConduitName() { 20 - return pht('Object Has Files'); 21 - } 22 - 23 - public function getConduitDescription() { 24 - return pht('The source object is associated with the destination file.'); 25 - } 26 - 27 - public function getTransactionAddString( 28 - $actor, 29 - $add_count, 30 - $add_edges) { 31 - 32 - return pht( 33 - '%s added %s file(s): %s.', 34 - $actor, 35 - $add_count, 36 - $add_edges); 37 - } 38 - 39 - public function getTransactionRemoveString( 40 - $actor, 41 - $rem_count, 42 - $rem_edges) { 43 - 44 - return pht( 45 - '%s removed %s file(s): %s.', 46 - $actor, 47 - $rem_count, 48 - $rem_edges); 49 - } 50 - 51 - public function getTransactionEditString( 52 - $actor, 53 - $total_count, 54 - $add_count, 55 - $add_edges, 56 - $rem_count, 57 - $rem_edges) { 58 - 59 - return pht( 60 - '%s edited file(s), added %s: %s; removed %s: %s.', 61 - $actor, 62 - $add_count, 63 - $add_edges, 64 - $rem_count, 65 - $rem_edges); 66 - } 67 - 68 - public function getFeedAddString( 69 - $actor, 70 - $object, 71 - $add_count, 72 - $add_edges) { 73 - 74 - return pht( 75 - '%s added %s file(s) for %s: %s.', 76 - $actor, 77 - $add_count, 78 - $object, 79 - $add_edges); 80 - } 81 - 82 - public function getFeedRemoveString( 83 - $actor, 84 - $object, 85 - $rem_count, 86 - $rem_edges) { 87 - 88 - return pht( 89 - '%s removed %s file(s) for %s: %s.', 90 - $actor, 91 - $rem_count, 92 - $object, 93 - $rem_edges); 94 - } 95 - 96 - public function getFeedEditString( 97 - $actor, 98 - $object, 99 - $total_count, 100 - $add_count, 101 - $add_edges, 102 - $rem_count, 103 - $rem_edges) { 104 - 105 - return pht( 106 - '%s edited file(s) for %s, added %s: %s; removed %s: %s.', 107 - $actor, 108 - $object, 109 - $add_count, 110 - $add_edges, 111 - $rem_count, 112 - $rem_edges); 113 - } 114 - 115 - }