Differential D21864 Diff 52157 src/applications/config/controller/module/PhabricatorConfigModuleController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/controller/module/PhabricatorConfigModuleController.php
<?php | <?php | ||||
final class PhabricatorConfigModuleController | final class PhabricatorConfigModuleController | ||||
extends PhabricatorConfigController { | extends PhabricatorConfigController { | ||||
public function handleRequest(AphrontRequest $request) { | public function handleRequest(AphrontRequest $request) { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
$key = $request->getURIData('module'); | $key = $request->getURIData('module'); | ||||
$all_modules = PhabricatorConfigModule::getAllModules(); | $all_modules = PhabricatorConfigModule::getAllModules(); | ||||
if (!strlen($key)) { | if ($key === null || !strlen($key)) { | ||||
$key = head_key($all_modules); | $key = head_key($all_modules); | ||||
} | } | ||||
if (empty($all_modules[$key])) { | if (empty($all_modules[$key])) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} | } | ||||
$module = $all_modules[$key]; | $module = $all_modules[$key]; | ||||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |