Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/request/DiffusionRequest.php
| Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | /* -( Creating Requests )-------------------------------------------------- */ | ||||
| final public static function newFromAphrontRequestDictionary( | final public static function newFromAphrontRequestDictionary( | ||||
| array $data, | array $data, | ||||
| AphrontRequest $request) { | AphrontRequest $request) { | ||||
| $callsign = phutil_unescape_uri_path_component(idx($data, 'callsign')); | $callsign = phutil_unescape_uri_path_component(idx($data, 'callsign')); | ||||
| $object = self::newFromCallsign($callsign, $request->getUser()); | $object = self::newFromCallsign($callsign, $request->getUser()); | ||||
| $use_branches = $object->supportsBranches(); | $use_branches = $object->supportsBranches(); | ||||
| if (isset($data['dblob'])) { | |||||
| $parsed = self::parseRequestBlob(idx($data, 'dblob'), $use_branches); | $parsed = self::parseRequestBlob(idx($data, 'dblob'), $use_branches); | ||||
| } else { | |||||
| $parsed = array( | |||||
| 'commit' => idx($data, 'commit'), | |||||
| 'path' => idx($data, 'path'), | |||||
| 'line' => idx($data, 'line'), | |||||
| 'branch' => idx($data, 'branch'), | |||||
| ); | |||||
| } | |||||
| $object->setUser($request->getUser()); | $object->setUser($request->getUser()); | ||||
| $object->initializeFromDictionary($parsed); | $object->initializeFromDictionary($parsed); | ||||
| $object->lint = $request->getStr('lint'); | $object->lint = $request->getStr('lint'); | ||||
| return $object; | return $object; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 649 Lines • Show Last 20 Lines | |||||