Skip to content

Commit

Permalink
improve searches
Browse files Browse the repository at this point in the history
  • Loading branch information
tabsl committed Aug 25, 2020
1 parent 96c4a24 commit 3fa499a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Controller/Admin/NavigationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @category OXID Module
* @license MIT License http://opensource.org/licenses/MIT
* @link https://github.com/OXIDprojects/adminsearch
* @version 1.1.0
* @version 1.1.1
*/

namespace OxidCommunity\AdminSearch\Controller\Admin;
Expand Down Expand Up @@ -98,7 +98,7 @@ public function getOxcomAdminSearchConfigParam($sParam = '')
protected function _getOxcomAdminSearchArticles()
{
$sViewName = $this->_sViewNameGenerator->getViewName("oxarticles");
$sSql = "SELECT oxid, CONCAT(oxtitle, '', oxvarselect, ' (', oxartnum, ')') FROM $sViewName WHERE CONCAT(oxtitle, '', oxvarselect, oxartnum) LIKE " . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote('%' . $this->_sQueryName . '%');
$sSql = "SELECT oxid, CONCAT(oxartnum, ' / ', oxtitle, '', oxvarselect) FROM $sViewName WHERE CONCAT(oxartnum, oxtitle, oxvarselect) LIKE " . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote('%' . $this->_sQueryName . '%');

return $this->_getOxcomAdminSearchData($sSql, 'article');
}
Expand Down Expand Up @@ -137,7 +137,7 @@ protected function _getOxcomAdminSearchCmsPages()
protected function _getOxcomAdminSearchOrders()
{
$sViewName = $this->_sViewNameGenerator->getViewName("oxorder");
$sSql = "SELECT oxid, CONCAT('#', oxordernr, ' ', oxbillfname, ' ', oxbilllname, ' ', oxtrackcode) FROM $sViewName WHERE CONCAT(oxbillfname, ' ', oxbilllname, ' ', oxordernr, ' ', oxbillemail) LIKE " . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote('%' . $this->_sQueryName . '%');
$sSql = "SELECT oxid, CONCAT(oxordernr, ' / ', oxbillfname, ' ', oxbilllname, ' / ', oxbillemail, ' / ', oxtrackcode) AS search FROM $sViewName WHERE CONCAT(oxordernr, oxbillfname, oxbilllname, oxbillemail, oxtrackcode) LIKE " . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote('%' . $this->_sQueryName . '%');

return $this->_getOxcomAdminSearchData($sSql, 'admin_order');
}
Expand All @@ -150,7 +150,7 @@ protected function _getOxcomAdminSearchOrders()
protected function _getOxcomAdminSearchUsers()
{
$sViewName = $this->_sViewNameGenerator->getViewName("oxuser");
$sSql = "SELECT oxid, CONCAT(oxlname, ', ', oxfname, ' (', oxcustnr, ')') FROM $sViewName WHERE CONCAT(oxlname, ' ', oxfname, ' ', oxcustnr, ' ', oxusername) LIKE " . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote('%' . $this->_sQueryName . '%');
$sSql = "SELECT oxid, CONCAT(oxcustnr, ' / ', oxfname, ' ', oxlname, ' / ', oxusername, ' / ', oxzip) FROM $sViewName WHERE CONCAT(oxcustnr, oxlname, oxfname, oxusername, oxzip) LIKE " . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote('%' . $this->_sQueryName . '%');

return $this->_getOxcomAdminSearchData($sSql, 'admin_user');
}
Expand All @@ -163,7 +163,7 @@ protected function _getOxcomAdminSearchUsers()
protected function _getOxcomAdminSearchCompanies()
{
$sViewName = $this->_sViewNameGenerator->getViewName("oxuser");
$sSql = "SELECT oxid, CONCAT(oxcompany, ' (', oxcustnr, ')') FROM $sViewName WHERE CONCAT(oxcompany, ' ', oxcustnr) LIKE " . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote('%' . $this->_sQueryName . '%');
$sSql = "SELECT oxid, oxcompany FROM $sViewName WHERE oxcompany LIKE " . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote('%' . $this->_sQueryName . '%');

return $this->_getOxcomAdminSearchData($sSql, 'admin_user');
}
Expand Down

0 comments on commit 3fa499a

Please sign in to comment.