Differential D12680 Diff 30538 src/applications/diffusion/controller/DiffusionLastModifiedController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionLastModifiedController.php
| <?php | <?php | ||||
| final class DiffusionLastModifiedController extends DiffusionController { | final class DiffusionLastModifiedController extends DiffusionController { | ||||
| public function shouldAllowPublic() { | public function shouldAllowPublic() { | ||||
| return true; | return true; | ||||
| } | } | ||||
| protected function processDiffusionRequest(AphrontRequest $request) { | protected function processDiffusionRequest(AphrontRequest $request) { | ||||
| $drequest = $this->getDiffusionRequest(); | $drequest = $this->getDiffusionRequest(); | ||||
| $viewer = $request->getUser(); | $viewer = $request->getUser(); | ||||
| $paths = $request->getStr('paths'); | $paths = $request->getStr('paths'); | ||||
| $paths = json_decode($paths, true); | try { | ||||
| if (!is_array($paths)) { | $paths = phutil_json_decode($paths); | ||||
| } catch (PhutilJSONParserException $ex) { | |||||
| return new Aphront400Response(); | return new Aphront400Response(); | ||||
| } | } | ||||
| $modified_map = $this->callConduitWithDiffusionRequest( | $modified_map = $this->callConduitWithDiffusionRequest( | ||||
| 'diffusion.lastmodifiedquery', | 'diffusion.lastmodifiedquery', | ||||
| array( | array( | ||||
| 'paths' => array_fill_keys($paths, $drequest->getCommit()), | 'paths' => array_fill_keys($paths, $drequest->getCommit()), | ||||
| )); | )); | ||||
| ▲ Show 20 Lines • Show All 142 Lines • Show Last 20 Lines | |||||