Differential D13808 Diff 33385 src/applications/maniphest/conduit/ManiphestUpdateConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/conduit/ManiphestUpdateConduitAPIMethod.php
Show All 32 Lines | protected function execute(ConduitAPIRequest $request) { | ||||
if (($id && $phid) || (!$id && !$phid)) { | if (($id && $phid) || (!$id && !$phid)) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
"Specify exactly one of '%s' and '%s'.", | "Specify exactly one of '%s' and '%s'.", | ||||
'id', | 'id', | ||||
'phid')); | 'phid')); | ||||
} | } | ||||
$query = id (new ManiphestTaskQuery()) | $query = id(new ManiphestTaskQuery()) | ||||
->setViewer($request->getUser()) | ->setViewer($request->getUser()) | ||||
->needSubscriberPHIDs(true) | ->needSubscriberPHIDs(true) | ||||
->needProjectPHIDs(true); | ->needProjectPHIDs(true); | ||||
if ($id) { | if ($id) { | ||||
$query->withIDs(array($id)); | $query->withIDs(array($id)); | ||||
} else { | } else { | ||||
$query->withPHIDs(array($phid)); | $query->withPHIDs(array($phid)); | ||||
} | } | ||||
Show All 20 Lines |