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

Conduit API: allow phriction.edit to modify viewPolicy and editPolicy

Summary: Closes T15858

Test Plan: See T15858

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T15858

Differential Revision: https://we.phorge.it/D25693

+43
+2
src/__phutil_library_map__.php
··· 5615 5615 'PhrictionDocumentDatasource' => 'applications/phriction/typeahead/PhrictionDocumentDatasource.php', 5616 5616 'PhrictionDocumentDeleteTransaction' => 'applications/phriction/xaction/PhrictionDocumentDeleteTransaction.php', 5617 5617 'PhrictionDocumentDraftTransaction' => 'applications/phriction/xaction/PhrictionDocumentDraftTransaction.php', 5618 + 'PhrictionDocumentEditConduitAPIMethod' => 'applications/phriction/conduit/PhrictionDocumentEditConduitAPIMethod.php', 5618 5619 'PhrictionDocumentEditEngine' => 'applications/phriction/editor/PhrictionDocumentEditEngine.php', 5619 5620 'PhrictionDocumentEditTransaction' => 'applications/phriction/xaction/PhrictionDocumentEditTransaction.php', 5620 5621 'PhrictionDocumentFerretEngine' => 'applications/phriction/search/PhrictionDocumentFerretEngine.php', ··· 12510 12511 'PhrictionDocumentDatasource' => 'PhabricatorTypeaheadDatasource', 12511 12512 'PhrictionDocumentDeleteTransaction' => 'PhrictionDocumentVersionTransaction', 12512 12513 'PhrictionDocumentDraftTransaction' => 'PhrictionDocumentEditTransaction', 12514 + 'PhrictionDocumentEditConduitAPIMethod' => 'PhabricatorEditEngineAPIMethod', 12513 12515 'PhrictionDocumentEditEngine' => 'PhabricatorEditEngine', 12514 12516 'PhrictionDocumentEditTransaction' => 'PhrictionDocumentVersionTransaction', 12515 12517 'PhrictionDocumentFerretEngine' => 'PhabricatorFerretEngine',
+19
src/applications/phriction/conduit/PhrictionDocumentEditConduitAPIMethod.php
··· 1 + <?php 2 + 3 + final class PhrictionDocumentEditConduitAPIMethod 4 + extends PhabricatorEditEngineAPIMethod { 5 + 6 + public function getAPIMethodName() { 7 + return 'phriction.document.edit'; 8 + } 9 + 10 + public function newEditEngine() { 11 + return new PhrictionDocumentEditEngine(); 12 + } 13 + 14 + public function getMethodSummary() { 15 + return pht( 16 + 'Apply transactions to edit an existing phriction document.'); 17 + } 18 + 19 + }
+22
src/applications/phriction/phid/PhrictionDocumentPHIDType.php
··· 47 47 } 48 48 } 49 49 50 + public function canLoadNamedObject($name) { 51 + return preg_match('/.*\/$/', $name); 52 + } 53 + 54 + public function loadNamedObjects( 55 + PhabricatorObjectQuery $query, 56 + array $names) { 57 + $objects = id(new PhrictionDocumentQuery()) 58 + ->setViewer($query->getViewer()) 59 + ->withSlugs($names) 60 + ->execute(); 61 + 62 + $results = array(); 63 + foreach ($objects as $id => $object) { 64 + foreach ($names as $name) { 65 + $results[$name] = $object; 66 + } 67 + } 68 + 69 + return $results; 70 + } 71 + 50 72 }