From 0df596d8840f18f7e5c87604b627c4f5102d1c73 Mon Sep 17 00:00:00 2001 From: Herman van Rink <rink@initfour.nl> Date: Sun, 22 May 2022 21:34:24 +0200 Subject: [PATCH] Move the CLIENTNAMESQL replace out of the way from form postings These two are the only ones being used by the respective queries and the onUpdateSave() methods use query() directly. --- interface/lib/classes/db_mysql.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php index 35e58637ce..49fd378d79 100644 --- a/interface/lib/classes/db_mysql.inc.php +++ b/interface/lib/classes/db_mysql.inc.php @@ -134,8 +134,6 @@ class db } public function _build_query_string($sQuery = '') { - $sQuery = str_replace("{CLIENTNAMESQL}", $this->get_client_sql_concat_query(), $sQuery); - $iArgs = func_num_args(); if($iArgs > 1) { $aArgs = func_get_args(); @@ -356,6 +354,7 @@ class db * @return array result row or NULL if none found */ public function queryOneRecord($sQuery = '') { + $sQuery = str_replace("{CLIENTNAMESQL}", $this->get_client_sql_concat_query(), $sQuery); $aArgs = func_get_args(); if(!empty($aArgs)) { @@ -395,6 +394,7 @@ class db * @return array all the rows in the result set */ public function queryAllRecords($sQuery = '') { + $sQuery = str_replace("{CLIENTNAMESQL}", $this->get_client_sql_concat_query(), $sQuery); $aArgs = func_get_args(); $oResult = call_user_func_array(array(&$this, 'query'), $aArgs); if(!$oResult) return array(); -- GitLab