@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | $backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
| 100 | 100 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
| 101 | 101 | $mode = GETPOST('mode', 'aZ'); // The display mode ('list', 'kanban', 'hierarchy', 'calendar', 'gantt', ...) |
| 102 | -$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
| 102 | +$groupby = GETPOST('groupby', 'aZ09'); // Example: $groupby = 'p.fk_opp_status' or $groupby = 'p.fk_statut' |
|
| 103 | 103 | |
| 104 | 104 | $id = GETPOSTINT('id'); |
| 105 | 105 | $ref = GETPOST('ref', 'alpha'); |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $object = new MyObject($db); |
| 122 | 122 | $extrafields = new ExtraFields($db); |
| 123 | 123 | $diroutputmassaction = $conf->mymodule->dir_output.'/temp/massgeneration/'.$user->id; |
| 124 | -$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
| 124 | +$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes |
|
| 125 | 125 | |
| 126 | 126 | // Fetch optionals attributes and labels |
| 127 | 127 | $extrafields->fetch_name_optionals_label($object->table_element); |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | |
| 132 | 132 | // Default sort order (if not yet defined by previous GETPOST) |
| 133 | 133 | if (!$sortfield) { |
| 134 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 134 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
| 135 | 135 | $sortfield = "t.".key($object->fields); // Set here default search field. By default 1st field in definition. |
| 136 | 136 | } |
| 137 | 137 | if (!$sortorder) { |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | // Output page |
| 450 | 450 | // -------------------------------------------------------------------- |
| 451 | 451 | |
| 452 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-mymodule page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 452 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-mymodule page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 453 | 453 | |
| 454 | 454 | // Example : Adding jquery code |
| 455 | 455 | // print '<script type="text/javascript"> |
@@ -584,7 +584,7 @@ discard block |
||
| 584 | 584 | } |
| 585 | 585 | |
| 586 | 586 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 587 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup |
|
| 587 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, $conf->main_checkbox_left_column); // This also change content of $arrayfields with user setup |
|
| 588 | 588 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 589 | 589 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 590 | 590 | |
@@ -677,7 +677,7 @@ discard block |
||
| 677 | 677 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
| 678 | 678 | $cssforfield .= ($cssforfield ? ' ' : '').'right'; |
| 679 | 679 | } |
| 680 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 680 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
| 681 | 681 | if (!empty($arrayfields['t.'.$key]['checked'])) { |
| 682 | 682 | print getTitleFieldOfList($arrayfields['t.'.$key]['label'], 0, $_SERVER['PHP_SELF'], 't.'.$key, '', $param, ($cssforfield ? 'class="'.$cssforfield.'"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield.' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist']))."\n"; |
| 683 | 683 | $totalarray['nbfield']++; |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | public $liste_limit; |
| 145 | 145 | public $main_checkbox_left_column; |
| 146 | 146 | |
| 147 | - public $tzuserinputkey = 'tzserver'; // Use 'tzuserrel' to always store date in GMT and show date in time zone of user. |
|
| 147 | + public $tzuserinputkey = 'tzserver'; // Use 'tzuserrel' to always store date in GMT and show date in time zone of user. |
|
| 148 | 148 | |
| 149 | 149 | |
| 150 | 150 | // TODO Remove this part. |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | $value = $_ENV['DOLIBARR_'.$key]; |
| 386 | 386 | } |
| 387 | 387 | |
| 388 | - $this->global->$key = dolDecrypt($value); // decrypt data excrypted with dolibarr_set_const($db, $name, $value) |
|
| 388 | + $this->global->$key = dolDecrypt($value); // decrypt data excrypted with dolibarr_set_const($db, $name, $value) |
|
| 389 | 389 | |
| 390 | 390 | if ($value && strpos($key, 'MAIN_MODULE_') === 0) { |
| 391 | 391 | $reg = array(); |
@@ -443,9 +443,9 @@ discard block |
||
| 443 | 443 | // deprecated in php 8.2 |
| 444 | 444 | //if (version_compare(phpversion(), '8.2') < 0) { |
| 445 | 445 | if (!isset($this->$modulename) || !is_object($this->$modulename)) { |
| 446 | - $this->$modulename = new stdClass(); // We need this to use the ->enabled and the ->multidir, ->dir... |
|
| 446 | + $this->$modulename = new stdClass(); // We need this to use the ->enabled and the ->multidir, ->dir... |
|
| 447 | 447 | } |
| 448 | - $this->$modulename->enabled = true; // TODO Remove this |
|
| 448 | + $this->$modulename->enabled = true; // TODO Remove this |
|
| 449 | 449 | |
| 450 | 450 | // Duplicate entry with the new name |
| 451 | 451 | /* |
@@ -666,8 +666,8 @@ discard block |
||
| 666 | 666 | |
| 667 | 667 | // Module compta |
| 668 | 668 | $this->compta->payment = new stdClass(); |
| 669 | - $this->compta->payment->dir_output = $rootfordata."/compta/payment"; |
|
| 670 | - $this->compta->payment->dir_temp = $rootfortemp."/compta/payment/temp"; |
|
| 669 | + $this->compta->payment->dir_output = $rootfordata."/compta/payment"; |
|
| 670 | + $this->compta->payment->dir_temp = $rootfortemp."/compta/payment/temp"; |
|
| 671 | 671 | |
| 672 | 672 | // Module product/service |
| 673 | 673 | $this->product->multidir_output = array($this->entity => $rootfordata."/produit"); |
@@ -793,7 +793,7 @@ discard block |
||
| 793 | 793 | } |
| 794 | 794 | |
| 795 | 795 | if (!isset($this->global->MAIN_ENABLE_AJAX_TOOLTIP)) { |
| 796 | - $this->global->MAIN_ENABLE_AJAX_TOOLTIP = 0; // Not enabled by default (still trouble of persistent tooltip) |
|
| 796 | + $this->global->MAIN_ENABLE_AJAX_TOOLTIP = 0; // Not enabled by default (still trouble of persistent tooltip) |
|
| 797 | 797 | } |
| 798 | 798 | |
| 799 | 799 | // By default, suppliers objects can be linked to all projects |
@@ -1089,7 +1089,7 @@ discard block |
||
| 1089 | 1089 | } |
| 1090 | 1090 | |
| 1091 | 1091 | if (!isset($this->global->MAIL_SMTP_USE_FROM_FOR_HELO)) { |
| 1092 | - $this->global->MAIL_SMTP_USE_FROM_FOR_HELO = 2; // Use the domain in $dolibarr_main_url_root (mydomain.com) |
|
| 1092 | + $this->global->MAIL_SMTP_USE_FROM_FOR_HELO = 2; // Use the domain in $dolibarr_main_url_root (mydomain.com) |
|
| 1093 | 1093 | } |
| 1094 | 1094 | |
| 1095 | 1095 | if (!defined('MAIN_ANTIVIRUS_BYPASS_COMMAND_AND_PARAM')) { |
@@ -1119,7 +1119,7 @@ discard block |
||
| 1119 | 1119 | } |
| 1120 | 1120 | |
| 1121 | 1121 | if (!empty($this->global->MAIN_TZUSERINPUTKEY)) { |
| 1122 | - $this->tzuserinputkey = $this->global->MAIN_TZUSERINPUTKEY; // 'tzserver' or 'tzuserrel' |
|
| 1122 | + $this->tzuserinputkey = $this->global->MAIN_TZUSERINPUTKEY; // 'tzserver' or 'tzuserrel' |
|
| 1123 | 1123 | } |
| 1124 | 1124 | |
| 1125 | 1125 | if (!empty($this->global->PRODUIT_AUTOFILL_DESC)) { |
@@ -374,7 +374,7 @@ discard block |
||
| 374 | 374 | print '<td>'; |
| 375 | 375 | $s = picto_from_langcode($conf->global->MAIN_LANG_DEFAULT); |
| 376 | 376 | print $s ? $s.' ' : ''; |
| 377 | - print(getDolGlobalString('MAIN_LANG_DEFAULT') == 'auto' ? $langs->trans("AutoDetectLang") : $langs->trans("Language_" . getDolGlobalString('MAIN_LANG_DEFAULT'))); |
|
| 377 | + print(getDolGlobalString('MAIN_LANG_DEFAULT') == 'auto' ? $langs->trans("AutoDetectLang") : $langs->trans("Language_".getDolGlobalString('MAIN_LANG_DEFAULT'))); |
|
| 378 | 378 | print '</td>'; |
| 379 | 379 | print '<td class="nowrap" width="20%"><input class="oddeven" name="check_MAIN_LANG_DEFAULT" id="check_MAIN_LANG_DEFAULT" type="checkbox" '.(!empty($object->conf->MAIN_LANG_DEFAULT) ? " checked" : ""); |
| 380 | 380 | print empty($dolibarr_main_demo) ? '' : ' disabled="disabled"'; // Disabled for demo |
@@ -418,7 +418,7 @@ discard block |
||
| 418 | 418 | |
| 419 | 419 | // Max size of lists |
| 420 | 420 | print '<tr class="oddeven"><td>'.$langs->trans("MaxSizeList").'</td>'; |
| 421 | - print '<td>' . getDolGlobalString('MAIN_SIZE_LISTE_LIMIT').'</td>'; |
|
| 421 | + print '<td>'.getDolGlobalString('MAIN_SIZE_LISTE_LIMIT').'</td>'; |
|
| 422 | 422 | print '<td class="nowrap" width="20%"><input class="oddeven" name="check_MAIN_SIZE_LISTE_LIMIT" id="check_MAIN_SIZE_LISTE_LIMIT" type="checkbox" '.(!empty($object->conf->MAIN_SIZE_LISTE_LIMIT) ? " checked" : ""); |
| 423 | 423 | print empty($dolibarr_main_demo) ? '' : ' disabled="disabled"'; // Disabled for demo |
| 424 | 424 | print '> <label for="check_MAIN_SIZE_LISTE_LIMIT">'.$langs->trans("UsePersonalValue").'</label></td>'; |
@@ -426,7 +426,7 @@ discard block |
||
| 426 | 426 | |
| 427 | 427 | // Max size of lists |
| 428 | 428 | print '<tr class="oddeven"><td>'.$langs->trans("MaxSizeShortList").'</td>'; |
| 429 | - print '<td>' . getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT').'</td>'; |
|
| 429 | + print '<td>'.getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT').'</td>'; |
|
| 430 | 430 | print '<td class="nowrap" width="20%"><input class="oddeven" name="check_MAIN_SIZE_SHORTLIST_LIMIT" id="check_MAIN_SIZE_SHORTLIST_LIMIT" type="checkbox" '.(!empty($object->conf->MAIN_SIZE_SHORTLIST_LIMIT) ? " checked" : ""); |
| 431 | 431 | print empty($dolibarr_main_demo) ? '' : ' disabled="disabled"'; // Disabled for demo |
| 432 | 432 | print '> <label for="check_MAIN_SIZE_SHORTLIST_LIMIT">'.$langs->trans("UsePersonalValue").'</label></td>'; |
@@ -495,7 +495,7 @@ discard block |
||
| 495 | 495 | print '<td>'; |
| 496 | 496 | $s = picto_from_langcode($conf->global->MAIN_LANG_DEFAULT); |
| 497 | 497 | print($s ? $s.' ' : ''); |
| 498 | - print(getDolGlobalString('MAIN_LANG_DEFAULT') == 'auto' ? $langs->trans("AutoDetectLang") : $langs->trans("Language_" . getDolGlobalString('MAIN_LANG_DEFAULT'))); |
|
| 498 | + print(getDolGlobalString('MAIN_LANG_DEFAULT') == 'auto' ? $langs->trans("AutoDetectLang") : $langs->trans("Language_".getDolGlobalString('MAIN_LANG_DEFAULT'))); |
|
| 499 | 499 | print '</td>'; |
| 500 | 500 | print '<td class="nowrap"><input class="oddeven" type="checkbox" disabled '.(!empty($object->conf->MAIN_LANG_DEFAULT) ? " checked" : "").'> '.$langs->trans("UsePersonalValue").'</td>'; |
| 501 | 501 | print '<td>'; |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | print '<tr class="oddeven"><td>'.$langs->trans("MAIN_CHECKBOX_LEFT_COLUMN").'</td>'; |
| 556 | 556 | print '<td>'.(getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN') ? $langs->trans("Yes") : $langs->trans("No")).'</td>'; |
| 557 | 557 | print '<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(isset($object->conf->MAIN_CHECKBOX_LEFT_COLUMN) ? " checked" : "").'> '.$langs->trans("UsePersonalValue").'</td>'; |
| 558 | - print '<td>'.(isset($object->conf->MAIN_CHECKBOX_LEFT_COLUMN) ?( $object->conf->MAIN_CHECKBOX_LEFT_COLUMN == 1 ? $langs->trans("Yes") : $langs->trans("No")) : ' ').'</td></tr>'; |
|
| 558 | + print '<td>'.(isset($object->conf->MAIN_CHECKBOX_LEFT_COLUMN) ? ($object->conf->MAIN_CHECKBOX_LEFT_COLUMN == 1 ? $langs->trans("Yes") : $langs->trans("No")) : ' ').'</td></tr>'; |
|
| 559 | 559 | |
| 560 | 560 | // Max size for lists |
| 561 | 561 | print '<tr class="oddeven"><td>'.$langs->trans("MaxSizeList").'</td>'; |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | * \remarks To run this script as CLI: phpunit filename.php |
| 25 | 25 | */ |
| 26 | 26 | |
| 27 | -global $conf,$user,$langs,$db; |
|
| 27 | +global $conf, $user, $langs, $db; |
|
| 28 | 28 | //define('TEST_DB_FORCE_TYPE','mysql'); // This is to force using mysql driver |
| 29 | 29 | //require_once 'PHPUnit/Autoload.php'; |
| 30 | 30 | require_once dirname(__FILE__).'/../../htdocs/master.inc.php'; |
@@ -58,7 +58,7 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | public function testBankAccountCreate() |
| 60 | 60 | { |
| 61 | - global $conf,$user,$langs,$db; |
|
| 61 | + global $conf, $user, $langs, $db; |
|
| 62 | 62 | $conf = $this->savconf; |
| 63 | 63 | $user = $this->savuser; |
| 64 | 64 | $langs = $this->savlangs; |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | */ |
| 87 | 87 | public function testBankAccountFetch($id) |
| 88 | 88 | { |
| 89 | - global $conf,$user,$langs,$db; |
|
| 89 | + global $conf, $user, $langs, $db; |
|
| 90 | 90 | $conf = $this->savconf; |
| 91 | 91 | $user = $this->savuser; |
| 92 | 92 | $langs = $this->savlangs; |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | */ |
| 113 | 113 | public function testBankAccountOther($localobject) |
| 114 | 114 | { |
| 115 | - global $conf,$user,$langs,$db; |
|
| 115 | + global $conf, $user, $langs, $db; |
|
| 116 | 116 | $conf = $this->savconf; |
| 117 | 117 | $user = $this->savuser; |
| 118 | 118 | $langs = $this->savlangs; |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | */ |
| 157 | 157 | public function testCheckSwiftForAccount($localobject) |
| 158 | 158 | { |
| 159 | - global $conf,$user,$langs,$db; |
|
| 159 | + global $conf, $user, $langs, $db; |
|
| 160 | 160 | $conf = $this->savconf; |
| 161 | 161 | $user = $this->savuser; |
| 162 | 162 | $langs = $this->savlangs; |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | */ |
| 190 | 190 | public function testBankAccountDelete($id) |
| 191 | 191 | { |
| 192 | - global $conf,$user,$langs,$db; |
|
| 192 | + global $conf, $user, $langs, $db; |
|
| 193 | 193 | $conf = $this->savconf; |
| 194 | 194 | $user = $this->savuser; |
| 195 | 195 | $langs = $this->savlangs; |