Differential D25182 Diff 749 src/applications/diffusion/controller/DiffusionRepositoryManagePanelsController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionRepositoryManagePanelsController.php
Show All 34 Lines | foreach ($panels as $key => $panel) { | ||||
if (!$panel->shouldEnableForRepository($repository)) { | if (!$panel->shouldEnableForRepository($repository)) { | ||||
unset($panels[$key]); | unset($panels[$key]); | ||||
continue; | continue; | ||||
} | } | ||||
} | } | ||||
$selected = $request->getURIData('panel'); | $selected = $request->getURIData('panel'); | ||||
if (!strlen($selected)) { | if (!phutil_nonempty_string($selected)) { | ||||
valerio.bozzolan: ✅ I verified the above line
The `$selected` variable assumes the names of the panels like… | |||||
$selected = head_key($panels); | $selected = head_key($panels); | ||||
} | } | ||||
if (empty($panels[$selected])) { | if (empty($panels[$selected])) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} | } | ||||
$nav = $this->renderSideNav($repository, $panels, $selected); | $nav = $this->renderSideNav($repository, $panels, $selected); | ||||
▲ Show 20 Lines • Show All 141 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
✅ I verified the above line
The $selected variable assumes the names of the panels like "uris" or "limits" etc., default to null.
The function phutil_nonempty_string() will report alien types, and that is OK.