Changeset View
Changeset View
Standalone View
Standalone View
src/view/layout/AphrontSideNavFilterView.php
Show First 20 Lines • Show All 139 Lines • ▼ Show 20 Lines | final class AphrontSideNavFilterView extends AphrontView { | ||||
} | } | ||||
public function getBaseURI() { | public function getBaseURI() { | ||||
return $this->baseURI; | return $this->baseURI; | ||||
} | } | ||||
public function selectFilter($key, $default = null) { | public function selectFilter($key, $default = null) { | ||||
$this->selectedFilter = $default; | $this->selectedFilter = $default; | ||||
if ($this->menu->getItem($key) && strlen($key)) { | if ($this->menu->getItem($key) && phutil_nonempty_string($key)) { | ||||
valerio.bozzolan: ✅ I logged `$key` locally with `phlog()` in various page and I can confirm we can assume it as… | |||||
$this->selectedFilter = $key; | $this->selectedFilter = $key; | ||||
} | } | ||||
return $this->selectedFilter; | return $this->selectedFilter; | ||||
} | } | ||||
public function getSelectedFilter() { | public function getSelectedFilter() { | ||||
return $this->selectedFilter; | return $this->selectedFilter; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 116 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 logged $key locally with phlog() in various page and I can confirm we can assume it as string or null. It assumes string values like "query/authored", "query/all", "item(0)", "query/ghj7xJtuslxH" etc.
The phutil_nonempty_string() will report alien values and this is OK.