Differential D25155 Diff 575 src/applications/dashboard/controller/PhabricatorDashboardQueryPanelInstallController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/dashboard/controller/PhabricatorDashboardQueryPanelInstallController.php
<?php | <?php | ||||
final class PhabricatorDashboardQueryPanelInstallController | final class PhabricatorDashboardQueryPanelInstallController | ||||
extends PhabricatorDashboardController { | extends PhabricatorDashboardController { | ||||
public function handleRequest(AphrontRequest $request) { | public function handleRequest(AphrontRequest $request) { | ||||
$viewer = $request->getViewer(); | $viewer = $request->getViewer(); | ||||
$v_dashboard = null; | $v_dashboard = null; | ||||
$e_dashboard = null; | $e_dashboard = null; | ||||
$v_name = null; | $v_name = null; | ||||
$e_name = true; | $e_name = true; | ||||
$v_engine = $request->getStr('engine'); | $v_engine = $request->getStr('engine'); | ||||
if (!strlen($v_engine)) { | if (!phutil_nonempty_string($v_engine)) { | ||||
valerio.bozzolan: ✅ This is always a string, something like: `"PhabricatorPeopleLogSearchEngine"`. Alien values… | |||||
$v_engine = $request->getURIData('engineKey'); | $v_engine = $request->getURIData('engineKey'); | ||||
} | } | ||||
$v_query = $request->getStr('query'); | $v_query = $request->getStr('query'); | ||||
if (!strlen($v_query)) { | if (!phutil_nonempty_string($v_query)) { | ||||
Done Inline Actions✅ This is always a (random) string, something like: "NMQOq_OGAH2B". Alien values will be reported and it's OK. valerio.bozzolan: ✅ This is always a (random) string, something like: `"NMQOq_OGAH2B"`. Alien values will be… | |||||
$v_query = $request->getURIData('queryKey'); | $v_query = $request->getURIData('queryKey'); | ||||
} | } | ||||
$engines = PhabricatorApplicationSearchEngine::getAllEngines(); | $engines = PhabricatorApplicationSearchEngine::getAllEngines(); | ||||
$engine = idx($engines, $v_engine); | $engine = idx($engines, $v_engine); | ||||
if ($engine) { | if ($engine) { | ||||
$engine = id(clone $engine) | $engine = id(clone $engine) | ||||
->setViewer($viewer); | ->setViewer($viewer); | ||||
▲ Show 20 Lines • Show All 140 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
✅ This is always a string, something like: "PhabricatorPeopleLogSearchEngine". Alien values will be reported and it's OK.