Differential D13224 Diff 32492 src/applications/arcanist/conduit/ArcanistProjectInfoConduitAPIMethod.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/arcanist/conduit/ArcanistProjectInfoConduitAPIMethod.php
Show All 28 Lines | protected function defineErrorTypes() { | ||||
return array( | return array( | ||||
'ERR-BAD-ARCANIST-PROJECT' => pht('No such project exists.'), | 'ERR-BAD-ARCANIST-PROJECT' => pht('No such project exists.'), | ||||
); | ); | ||||
} | } | ||||
protected function execute(ConduitAPIRequest $request) { | protected function execute(ConduitAPIRequest $request) { | ||||
$name = $request->getValue('name'); | $name = $request->getValue('name'); | ||||
$project = id(new PhabricatorRepositoryArcanistProject())->loadOneWhere( | $project = id(new DiffusionArcanistProject())->loadOneWhere( | ||||
'name = %s', | 'name = %s', | ||||
$name); | $name); | ||||
if (!$project) { | if (!$project) { | ||||
throw new ConduitException('ERR-BAD-ARCANIST-PROJECT'); | throw new ConduitException('ERR-BAD-ARCANIST-PROJECT'); | ||||
} | } | ||||
$repository = null; | $repository = null; | ||||
if ($project->getRepositoryID()) { | if ($project->getRepositoryID()) { | ||||
$repository = id(new PhabricatorRepositoryQuery()) | $repository = id(new DiffusionRepositoryQuery()) | ||||
->setViewer($request->getUser()) | ->setViewer($request->getUser()) | ||||
->withIDs(array($project->getRepositoryID())) | ->withIDs(array($project->getRepositoryID())) | ||||
->executeOne(); | ->executeOne(); | ||||
} | } | ||||
$repository_phid = null; | $repository_phid = null; | ||||
$tracked = false; | $tracked = false; | ||||
$encoding = null; | $encoding = null; | ||||
Show All 19 Lines |