Something went wrong. Try again.
@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
Something went wrong. Try again.
1.2 kB · 46 lines
PHP
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647<?php
final class PhabricatorSubscriptionsListController extends PhabricatorController {
public function shouldAllowPublic() { return true; }
public function handleRequest(AphrontRequest $request) { $viewer = $request->getViewer();
$object = id(new PhabricatorObjectQuery()) ->setViewer($viewer) ->withPHIDs(array($request->getURIData('phid'))) ->executeOne(); if (!$object) { return new Aphront404Response(); }
if (!($object instanceof PhabricatorSubscribableInterface)) { return new Aphront404Response(); }
$phid = $object->getPHID();
$handle_phids = PhabricatorSubscribersQuery::loadSubscribersForPHID($phid); $handle_phids[] = $phid;
$handles = id(new PhabricatorHandleQuery()) ->setViewer($viewer) ->withPHIDs($handle_phids) ->execute(); $object_handle = $handles[$phid];
$dialog = id(new SubscriptionListDialogBuilder()) ->setViewer($viewer) ->setTitle(pht('Subscribers')) ->setObjectPHID($phid) ->setHandles($handles) ->buildDialog();
return id(new AphrontDialogResponse())->setDialog($dialog); }
}