From 993ea22a7874b836f2237e8e4c6a6f84b488bf7c Mon Sep 17 00:00:00 2001 From: SarenkaGD Date: Thu, 2 Apr 2026 15:45:34 +0200 Subject: [PATCH] bugfix: missing table locks for MySQL --- lib/LMSManagers/LMSCustomerManager.php | 12 ++++++------ modules/invoicenote.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/LMSManagers/LMSCustomerManager.php b/lib/LMSManagers/LMSCustomerManager.php index 2e04f685e4..66ae872bad 100644 --- a/lib/LMSManagers/LMSCustomerManager.php +++ b/lib/LMSManagers/LMSCustomerManager.php @@ -2358,12 +2358,12 @@ public function GetCustomer($id, $short = false) require_once(LIB_DIR . DIRECTORY_SEPARATOR . 'customercontacttypes.php'); $capitalize_customer_names = ConfigHelper::checkConfig('customers.capitalize_names', ConfigHelper::checkConfig('phpui.capitalize_customer_names', true)); - if ($result = $this->db->GetRow('SELECT c.*, ' - . $this->db->Concat($capitalize_customer_names ? 'UPPER(c.lastname)' : 'c.lastname', "' '", 'c.name') . ' AS customername, - d.shortname AS division, d.label AS division_label, d.account, c.altname - FROM customer' . (defined('LMS-UI') ? '' : 'address') . 'view c - LEFT JOIN divisions d ON (d.id = c.divisionid) - WHERE c.id = ?', array($id))) { + if ($result = $this->db->GetRow('SELECT cvv.*, ' + . $this->db->Concat($capitalize_customer_names ? 'UPPER(cvv.lastname)' : 'cvv.lastname', "' '", 'cvv.name') . ' AS customername, + d.shortname AS division, d.label AS division_label, d.account, cvv.altname + FROM customer' . (defined('LMS-UI') ? '' : 'address') . 'view cvv + LEFT JOIN divisions d ON (d.id = cvv.divisionid) + WHERE cvv.id = ?', array($id))) { if (!$short) { $user_manager = new LMSUserManager($this->db, $this->auth, $this->cache, $this->syslog); $result['createdby'] = $user_manager->getUserName($result['creatorid']); diff --git a/modules/invoicenote.php b/modules/invoicenote.php index fa38fa4b90..cb328889e3 100644 --- a/modules/invoicenote.php +++ b/modules/invoicenote.php @@ -737,7 +737,7 @@ function cleanUpValue($value) $tables = array('documents', 'numberplans', 'divisions', 'vdivisions', 'addresses', 'customers', 'customer_addresses', 'logtransactions'); if (ConfigHelper::getConfig('database.type') != 'postgres') { - $tables = array_merge($tables, array('addresses a', 'customers c', 'customer_addresses ca')); + $tables = array_merge($tables, array('addresses a', 'customers c', 'customer_addresses ca', 'customerview cvv', 'customers cv', 'location_streets lst', 'teryt_simc simc', 'teryt_ulic ulic')); } if ($SYSLOG) {