Changeset View
Changeset View
Standalone View
Standalone View
src/applications/doorkeeper/controller/DoorkeeperTagsController.php
| <?php | <?php | ||||
| final class DoorkeeperTagsController extends PhabricatorController { | final class DoorkeeperTagsController extends PhabricatorController { | ||||
| public function processRequest() { | public function processRequest() { | ||||
| $request = $this->getRequest(); | $request = $this->getRequest(); | ||||
| $viewer = $request->getUser(); | $viewer = $request->getUser(); | ||||
| $tags = $request->getStr('tags'); | $tags = $request->getStr('tags'); | ||||
| $tags = json_decode($tags, true); | try { | ||||
| if (!is_array($tags)) { | $tags = phutil_json_decode($tags); | ||||
| } catch (PhutilJSONParserException $ex) { | |||||
| $tags = array(); | $tags = array(); | ||||
| } | } | ||||
| $refs = array(); | $refs = array(); | ||||
| $id_map = array(); | $id_map = array(); | ||||
| foreach ($tags as $tag_spec) { | foreach ($tags as $tag_spec) { | ||||
| $tag = $tag_spec['ref']; | $tag = $tag_spec['ref']; | ||||
| $ref = id(new DoorkeeperObjectRef()) | $ref = id(new DoorkeeperObjectRef()) | ||||
| ▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines | |||||