diff --git a/controllers/admin/admin_payppaypalplusorder_list.php b/controllers/admin/admin_payppaypalplusorder_list.php index ae97c09..9ddedea 100644 --- a/controllers/admin/admin_payppaypalplusorder_list.php +++ b/controllers/admin/admin_payppaypalplusorder_list.php @@ -94,7 +94,9 @@ protected function _buildSelectString($oListObject = null) LEFT JOIN payppaypalpluspui ON payppaypalpluspui.OXPAYMENTID = payppaypalpluspayment.OXPAYMENTID "; - $sSql = str_replace('from oxorder', $sQ, $sSql); + $unquoted = 'oxorder'; + $quoted = oxDb::getDb()->quoteIdentifier('oxorder'); + $sSql = preg_replace("/\bfrom\s+(?:\b$unquoted\b|$quoted)/i", $sQ, $sSql); return $sSql; } @@ -114,9 +116,9 @@ protected function _prepareOrderByQuery($sSql = null) $aSorting = parent::getListSorting(); if ($aSorting['oxorder']['oxpaymenttype']) { $sQ = ' ORDER BY payments_oxdesc, IF(ISNULL(payppaypalpluspui_oxid), 0, 1), oxorder.oxbillnr, '; - $sSql = str_replace('order by ', $sQ, $sSql); + $sSql = str_ireplace('order by ', $sQ, $sSql); } return $sSql; } -} \ No newline at end of file +}