Differential D25132 Diff 537 src/applications/search/menuitem/PhabricatorDashboardProfileMenuItem.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/search/menuitem/PhabricatorDashboardProfileMenuItem.php
Show First 20 Lines • Show All 111 Lines • ▼ Show 20 Lines | if (!$dashboard) { | ||||
return pht('Invalid Dashboard'); | return pht('Invalid Dashboard'); | ||||
} | } | ||||
} | } | ||||
if ($dashboard->isArchived()) { | if ($dashboard->isArchived()) { | ||||
return pht('Archived Dashboard'); | return pht('Archived Dashboard'); | ||||
} | } | ||||
if (strlen($this->getName($config))) { | if (phutil_nonempty_string($this->getName($config))) { | ||||
valerio.bozzolan: ✅ OK since the expected input domain is **NULL** (default) or a **string**. The phutil will… | |||||
return $this->getName($config); | return $this->getName($config); | ||||
} else { | } else { | ||||
return $dashboard->getName(); | return $dashboard->getName(); | ||||
} | } | ||||
} | } | ||||
public function buildEditEngineFields( | public function buildEditEngineFields( | ||||
PhabricatorProfileMenuItemConfiguration $config) { | PhabricatorProfileMenuItemConfiguration $config) { | ||||
▲ Show 20 Lines • Show All 122 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
✅ OK since the expected input domain is NULL (default) or a string. The phutil will throw for alien types, and it's OK.
Context input: