From 150e9f5a6fa636bc2670f779be2fa812c902335c Mon Sep 17 00:00:00 2001 From: Can Arslan <138895927+mc2rcanarslan@users.noreply.github.com> Date: Sat, 11 May 2024 12:45:09 -0600 Subject: [PATCH 1/3] FIX: Ternary operator condition is always true/false (#29649) --- htdocs/comm/action/card.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 1dfd9dff3cb..81b84d89de0 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -772,11 +772,11 @@ if (empty($reshook) && $action == 'update') { if ($fulldayevent) { $tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT'); // For "full day" events, we must store date in GMT (It must be viewed as same moment everywhere) - $datep = dol_mktime($fulldayevent ? '00' : GETPOST("aphour", 'int'), $fulldayevent ? '00' : GETPOST("apmin", 'int'), $fulldayevent ? '00' : GETPOST("apsec", 'int'), GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), $tzforfullday ? $tzforfullday : 'tzuserrel'); - $datef = dol_mktime($fulldayevent ? '23' : GETPOST("p2hour", 'int'), $fulldayevent ? '59' : GETPOST("p2min", 'int'), $fulldayevent ? '59' : GETPOST("apsec", 'int'), GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), $tzforfullday ? $tzforfullday : 'tzuserrel'); + $datep = dol_mktime('00', '00', '00', GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), $tzforfullday ? $tzforfullday : 'tzuserrel'); + $datef = dol_mktime('23', '59', '59', GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), $tzforfullday ? $tzforfullday : 'tzuserrel'); } else { - $datep = dol_mktime($fulldayevent ? '00' : GETPOST("aphour", 'int'), $fulldayevent ? '00' : GETPOST("apmin", 'int'), $fulldayevent ? '00' : GETPOST("apsec", 'int'), GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), 'tzuserrel'); - $datef = dol_mktime($fulldayevent ? '23' : GETPOST("p2hour", 'int'), $fulldayevent ? '59' : GETPOST("p2min", 'int'), $fulldayevent ? '59' : GETPOST("apsec", 'int'), GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), 'tzuserrel'); + $datep = dol_mktime(GETPOST("aphour", 'int'), GETPOST("apmin", 'int'), GETPOST("apsec", 'int'), GETPOST("apmonth", 'int'), GETPOST("apday", 'int'), GETPOST("apyear", 'int'), 'tzuserrel'); + $datef = dol_mktime(GETPOST("p2hour", 'int'), GETPOST("p2min", 'int'), GETPOST("apsec", 'int'), GETPOST("p2month", 'int'), GETPOST("p2day", 'int'), GETPOST("p2year", 'int'), 'tzuserrel'); } if ($object->elementtype == 'ticket') { // code should be TICKET_MSG, TICKET_MSG_PRIVATE, TICKET_MSG_SENTBYMAIL, TICKET_MSG_PRIVATE_SENTBYMAIL From f5200ad2d9c962615e8eb52202a974d3fc1f5cd3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 13 May 2024 01:31:01 +0200 Subject: [PATCH 2/3] Fix changelog --- ChangeLog | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9f275d641ad..40bbc2ed275 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2226,7 +2226,7 @@ FIX: Button text on proposal card for create a invoice FIX: calculateCosts of BOM must not be included into fetch FIX: calculation of balance in conciliation page on desc sorting. FIX: card.php -FIX: Change date format of the inventorycode to be equal as mass stock transfert +FIX: Change date format of the inventorycode to be equal as mass stock transfer FIX: check if greater 0 FIX: close cash with some terminals in TakePOS FIX: compatibility with Multicompany @@ -7008,7 +7008,7 @@ FIX: #6253 Supplier invoice list filter does not respect "thirdparty" filter FIX: #6277 FIX: project list and ajax completion return wrong list. FIX: bug margin calculation by user with multicompany -FIX: Can make a stock transfert on product not on sale/purchase. +FIX: Can make a stock transfer on product not on sale/purchase. FIX: extrafield input for varchar was not working with special char within (ie double quotes) FIX: javascript error FIX: link for not found photo when using gravatar. Must use external url. @@ -7488,7 +7488,7 @@ FIX: Check of EAN13 barcode when mask was set to use 13 digits instead of 12 FIX: correct display of minimum buying price FIX: Creation of thumb image for size "small" was not done. FIX: Damn, where was the project ref ? -FIX: Default vat is not set correctly when an error occured and we use VAT identified by a code. +FIX: Default vat is not set correctly when an error occurred and we use VAT identified by a code. FIX: dont retrieve new buying price on margin display FIX: Duplicate records into export FIX: Each time we edit a line, we loose the unit price. @@ -10247,7 +10247,7 @@ For developers: - Can protect a module to not being enabled if javascript disabled. - If module numberwords is installed, code can use langs->getLabelFromNumber to get value of an amount in text. -- A module can add subsitution keys in makesubsitutions() functions. +- A module can add substitution keys in makesubsitutions() functions. - Add $conf->browser->phone defined to optimise code for smartphone browsers. - All external libs are now in same directory /includes. - All install files are now in same directory /install. From 2dd939d2dbb3bc56ca76c5792e213af1b1b1ec0a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 13 May 2024 02:46:31 +0200 Subject: [PATCH 3/3] Fix dump --- dev/initdemo/mysqldump_dolibarr_19.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/initdemo/mysqldump_dolibarr_19.0.0.sql b/dev/initdemo/mysqldump_dolibarr_19.0.0.sql index 83d4645572a..1c3b3457fb0 100644 --- a/dev/initdemo/mysqldump_dolibarr_19.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_19.0.0.sql @@ -2999,7 +2999,7 @@ DROP TABLE IF EXISTS `llx_c_type_contact`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `llx_c_type_contact` ( - `rowid` int(11) NOT NULL, + `rowid` int(11) NOT NULL AUTO_INCREMENT, `element` varchar(30) NOT NULL, `source` varchar(8) NOT NULL DEFAULT 'external', `code` varchar(32) NOT NULL,