forked from Dolibarr/dolibarr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix-phpstan-no-langs
- Loading branch information
Showing
32 changed files
with
169 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<?php | ||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <[email protected]> | ||
* Copyright (C) 2004-2014 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2004 Sebastien Di Cintio <[email protected]> | ||
* Copyright (C) 2004 Benoit Mortier <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <[email protected]> | ||
* Copyright (C) 2004-2014 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2004 Sebastien Di Cintio <[email protected]> | ||
* Copyright (C) 2004 Benoit Mortier <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -41,19 +42,19 @@ | |
*/ | ||
|
||
if ($action == 'convertutf8unicode') { // Test on permission already done. | ||
$sql = "ALTER DATABASE ".$db->sanitize($table[0])." CHARACTER SET utf8 COLLATE utf8_unicode_ci"; | ||
$sql = "ALTER DATABASE ".$db->sanitize($db->database_name)." CHARACTER SET utf8 COLLATE utf8_unicode_ci"; | ||
$db->query($sql); | ||
} | ||
if ($action == 'convertutf8mb4unicode') { // Test on permission already done. | ||
$sql = "ALTER DATABASE ".$db->sanitize($table[0])." CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; | ||
$sql = "ALTER DATABASE CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci"; | ||
$db->query($sql); | ||
} | ||
if ($action == 'convertutf8general') { // Test on permission already done. | ||
$sql = "ALTER DATABASE ".$db->sanitize($table[0])." CHARACTER SET utf8 COLLATE utf8_general_ci"; | ||
$sql = "ALTER DATABASE ".$db->sanitize($db->database_name)." CHARACTER SET utf8 COLLATE utf8_general_ci"; | ||
$db->query($sql); | ||
} | ||
if ($action == 'convertutf8mb4general') { // Test on permission already done. | ||
$sql = "ALTER DATABASE ".$db->sanitize($table[0])." CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci"; | ||
$sql = "ALTER DATABASE ".$db->sanitize($db->database_name)." CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci"; | ||
$db->query($sql); | ||
} | ||
|
||
|
@@ -90,9 +91,10 @@ | |
print '<tr class="oddeven"><td width="300">'.$langs->trans("DBSortingCharset").'</td><td>'; | ||
$defaultcollation = $db->getDefaultCollationDatabase(); | ||
print dolPrintHTML($defaultcollation); | ||
global $dolibarr_main_db_collation; | ||
if ($db->type == 'mysqli') { | ||
if ($defaultcollation != $dolibarr_main_db_collation) { | ||
print img_warning('The database default value of collation '.$defaultcollation.' differs from conf setup '.$dolibarr_main_db_collation); | ||
if ($defaultcollation != $conf->db->dolibarr_main_db_collation) { | ||
print img_warning('The database default value of collation '.$defaultcollation.' differs from conf setup '.$conf->db->dolibarr_main_db_collation); | ||
} | ||
$tooltipexample = "<br>SHOW VARIABLES LIKE 'collation_database' (cached)<br>You can avoid cache effect with:<br>SELECT DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA WHERE SCHEMA_NAME = '".$db->escape($conf->db->name)."'"; | ||
print ' '.$form->textwithpicto('', $langs->transnoentitiesnoconv("HelpMariaDBToGetValue", $tooltipexample.'<br>'.$langs->transnoentitiesnoconv("HelpMariaDBToGetPossibleValues", "<br>SHOW COLLATION"))); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,8 @@ | |
* Copyright (C) 2004 Sebastien Di Cintio <[email protected]> | ||
* Copyright (C) 2004 Benoit Mortier <[email protected]> | ||
* Copyright (C) 2005-2012 Regis Houssin <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -63,7 +64,7 @@ | |
} | ||
|
||
$sql = "ALTER TABLE ".$db->sanitize($table)." MODIFY ".$db->sanitize($row[0])." ".$row[1]." COLLATE ".$db->sanitize($collation); // We must not sanitize the $row[1] | ||
$reslq2 = $db->query($sql); | ||
$resql2 = $db->query($sql); | ||
if (!$resql2) { | ||
setEventMessages($db->lasterror(), null, 'warnings'); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
<?php | ||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <[email protected]> | ||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <[email protected]> | ||
* Copyright (C) 2004-2013 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2013 Charles-Fr BENKE <[email protected]> | ||
* Copyright (C) 2015 Jean-François Ferry <[email protected]> | ||
* Copyright (C) 2016 Marcos García <[email protected]> | ||
* Copyright (C) 2018 Andreu Bisquerra <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -162,15 +163,15 @@ | |
} | ||
$error = 0; | ||
foreach ($arrayofpaymentmode as $key => $val) { | ||
$object->$key = price2num(GETPOST($key.'_amount', 'alpha')); | ||
$object->$key = (float) price2num(GETPOST($key.'_amount', 'alpha')); | ||
} | ||
|
||
if (!$error) { | ||
$object->day_close = GETPOSTINT('closeday'); | ||
$object->month_close = GETPOSTINT('closemonth'); | ||
$object->year_close = GETPOSTINT('closeyear'); | ||
|
||
$object->opening = price2num(GETPOST('opening', 'alpha')); | ||
$object->opening = (float) price2num(GETPOST('opening', 'alpha')); | ||
$object->posmodule = GETPOST('posmodule', 'alpha'); | ||
$object->posnumber = GETPOST('posnumber', 'alpha'); | ||
|
||
|
@@ -206,9 +207,9 @@ | |
$object->year_close = GETPOST('closeyear', 'int'); | ||
*/ | ||
|
||
$object->cash = price2num(GETPOST('cash_amount', 'alpha')); | ||
$object->card = price2num(GETPOST('card_amount', 'alpha')); | ||
$object->cheque = price2num(GETPOST('cheque_amount', 'alpha')); | ||
$object->cash = (float) price2num(GETPOST('cash_amount', 'alpha')); | ||
$object->card = (float) price2num(GETPOST('card_amount', 'alpha')); | ||
$object->cheque = (float) price2num(GETPOST('cheque_amount', 'alpha')); | ||
|
||
$result = $object->update($user); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
/* Copyright (C) 2014-2024 Alexandre Spangaro <[email protected]> | ||
* Copyright (C) 2015-2021 Frederic France <[email protected]> | ||
* Copyright (C) 2015-2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2017 Regis Houssin <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/* Copyright (C) 2014-2016 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2014-2018 Frederic France <frederic.france@netlogic.fr> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
/* Copyright (C) 2014-2016 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2014-2024 Frédéric France <frederic.france@free.fr> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* This program is free software; you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
<?php | ||
/* Copyright (c) 2013 Florian Henry <[email protected]> | ||
* Copyright (C) 2015 Marcos García <[email protected]> | ||
* Copyright (C) 2018 Charlene Benke <[email protected]> | ||
/* Copyright (c) 2013 Florian Henry <[email protected]> | ||
* Copyright (C) 2015 Marcos García <[email protected]> | ||
* Copyright (C) 2018 Charlene Benke <[email protected]> | ||
* Copyright (C) 2024 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* Copyright (C) 2024 Benjamin Falière <[email protected]> | ||
|
@@ -402,7 +402,7 @@ public function selectTasks($socid = -1, $selected = 0, $htmlname = 'taskid', $m | |
if (!empty($show_empty)) { | ||
$out .= '<option value="0" class="optiongrey">'; | ||
if (!is_numeric($show_empty)) { | ||
//if (!empty($conf->use_javascript_ajax)) $out .= '<span class="opacitymedium">aaa'; | ||
//if (!empty($conf->use_javascript_ajax)) $out .= '<span class="opacitymedium">'; | ||
$out .= $show_empty; | ||
//if (!empty($conf->use_javascript_ajax)) $out .= '</span>'; | ||
} else { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.