@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | return array(); |
103 | 103 | } |
104 | 104 | |
105 | - $data = array(); // This is the return value |
|
106 | - $datay = array(); // This is a work value |
|
105 | + $data = array(); // This is the return value |
|
106 | + $datay = array(); // This is a work value |
|
107 | 107 | |
108 | 108 | // Search into cache |
109 | 109 | if (!empty($cachedelay)) { |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | } |
206 | 206 | |
207 | 207 | $datay = array(); |
208 | - $data = array(); // Return value |
|
208 | + $data = array(); // Return value |
|
209 | 209 | |
210 | 210 | // Search into cache |
211 | 211 | if (!empty($cachedelay)) { |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | if ($foundintocache) { // Cache file found and is not too old |
360 | 360 | dol_syslog(get_class($this) . '::' . __FUNCTION__ . " read data from cache file " . $newpathofdestfile . " " . $filedate . "."); |
361 | 361 | $data = json_decode(file_get_contents($newpathofdestfile), true); |
362 | - '@phan-var-force array<int<0,11>,array{0:int<1,12>,1:int|float}> $data'; // Phan can't decode json_decode's return value |
|
362 | + '@phan-var-force array<int<0,11>,array{0:int<1,12>,1:int|float}> $data'; // Phan can't decode json_decode's return value |
|
363 | 363 | } else { |
364 | 364 | // This method is defined in parent object only, not into abstract, so we disable phpstan warning |
365 | 365 | /** @phpstan-ignore-next-line */ |
@@ -240,7 +240,7 @@ |
||
240 | 240 | |
241 | 241 | $this->id = $obj->rowid; |
242 | 242 | $this->ref = $obj->rowid; |
243 | - $this->date_start = $this->db->jdate($obj->date_start); |
|
243 | + $this->date_start = $this->db->jdate($obj->date_start); |
|
244 | 244 | $this->date_end = $this->db->jdate($obj->date_end); |
245 | 245 | $this->label = $obj->label; |
246 | 246 | $this->statut = $obj->status; |
@@ -387,7 +387,7 @@ |
||
387 | 387 | |
388 | 388 | $out .= '<div class="template-option" data-template="' . $template . '" data-content="' . htmlentities($contentHtml) . '">'; |
389 | 389 | $out .= '<img class="maillayout" alt="' . $template . '" src="' . constant('BASE_URL') . '/theme/common/maillayout/' . $template . '.png" />'; |
390 | - $out .= '<span class="template-option-text">' . ($template != 'text' ? ucfirst($template) : ucfirst($templateFunction)) . '</span>'; |
|
390 | + $out .= '<span class="template-option-text">' . ($template != 'text' ? ucfirst($template) : ucfirst($templateFunction)) . '</span>'; |
|
391 | 391 | $out .= '</div>'; |
392 | 392 | } |
393 | 393 | $out .= '<input type="hidden" name="sample" value="" />'; |
@@ -86,17 +86,17 @@ discard block |
||
86 | 86 | |
87 | 87 | public $backtopage; |
88 | 88 | |
89 | - public $ispublic; // to show information or not into public form |
|
89 | + public $ispublic; // to show information or not into public form |
|
90 | 90 | |
91 | 91 | public $withtitletopic; |
92 | 92 | public $withtopicreadonly; |
93 | 93 | public $withreadid; |
94 | 94 | |
95 | - public $withcompany; // to show company drop-down list |
|
95 | + public $withcompany; // to show company drop-down list |
|
96 | 96 | public $withfromsocid; |
97 | 97 | public $withfromcontactid; |
98 | 98 | public $withnotifytiersatcreate; |
99 | - public $withusercreate; // to show name of creating user in form |
|
99 | + public $withusercreate; // to show name of creating user in form |
|
100 | 100 | public $withcreatereadonly; |
101 | 101 | |
102 | 102 | /** |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public $withextrafields; |
106 | 106 | |
107 | - public $withref; // to show ref field |
|
107 | + public $withref; // to show ref field |
|
108 | 108 | public $withcancel; |
109 | 109 | |
110 | 110 | public $type_code; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $this->withcreatereadonly = 1; |
150 | 150 | $this->withemail = 0; |
151 | 151 | $this->withref = 0; |
152 | - $this->withextrafields = 0; // to show extrafields or not |
|
152 | + $this->withextrafields = 0; // to show extrafields or not |
|
153 | 153 | //$this->withtopicreadonly=0; |
154 | 154 | } |
155 | 155 | |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | $maxfilesizearray = getMaxFileSizeArray(); |
566 | 566 | $maxmin = $maxfilesizearray['maxmin']; |
567 | 567 | if ($maxmin > 0) { |
568 | - $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
568 | + $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
569 | 569 | } |
570 | 570 | $out .= '<input type="file" class="flat" id="addedfile" name="addedfile" value="' . $langs->trans("Upload") . '" />'; |
571 | 571 | $out .= ' '; |
@@ -881,7 +881,7 @@ discard block |
||
881 | 881 | $publicgroups = ($filtertype == 'public=1' || $filtertype == '(public:=:1)'); |
882 | 882 | |
883 | 883 | $ticketstat = new Ticket($this->db); |
884 | - $ticketstat->loadCacheCategoriesTickets($publicgroups ? 1 : -1); // get list of active ticket groups |
|
884 | + $ticketstat->loadCacheCategoriesTickets($publicgroups ? 1 : -1); // get list of active ticket groups |
|
885 | 885 | |
886 | 886 | if ($use_multilevel <= 0) { |
887 | 887 | print '<select id="select' . $htmlname . '" class="flat minwidth100' . ($morecss ? ' ' . $morecss : '') . '" name="' . $htmlname . '">'; |
@@ -1053,7 +1053,7 @@ discard block |
||
1053 | 1053 | } |
1054 | 1054 | $stringtoprint .= '</select> '; |
1055 | 1055 | |
1056 | - $levelid = 1; // The first combobox |
|
1056 | + $levelid = 1; // The first combobox |
|
1057 | 1057 | while ($levelid <= $use_multilevel) { // Loop to take the child of the combo |
1058 | 1058 | $tabscript = array(); |
1059 | 1059 | $stringtoprint .= '<select id="' . $htmlname . '_child_' . $levelid . '" class="maxwidth500 minwidth400 groupticketchild" child_id="' . $levelid . '">'; |
@@ -1129,7 +1129,7 @@ discard block |
||
1129 | 1129 | $stringtoprint .= '</select>'; |
1130 | 1130 | |
1131 | 1131 | $stringtoprint .= '<script nonce="' . getNonce() . '">'; |
1132 | - $stringtoprint .= 'arraynotparents = ' . json_encode($arraycodenotparent) . ';'; // when the last visible combo list is number x, this is the array of group |
|
1132 | + $stringtoprint .= 'arraynotparents = ' . json_encode($arraycodenotparent) . ';'; // when the last visible combo list is number x, this is the array of group |
|
1133 | 1133 | $stringtoprint .= 'if (arraynotparents.includes($("#' . $htmlname . ($levelid > 1 ? '_child_' . ($levelid - 1) : '') . '").val())){ |
1134 | 1134 | console.log("' . $htmlname . '_child_' . $levelid . '") |
1135 | 1135 | if($("#' . $htmlname . '_child_' . $levelid . '").val() == "" && ($("#' . $htmlname . '_child_' . $levelid . '").attr("child_id")>' . $child_id . ')){ |
@@ -792,7 +792,7 @@ |
||
792 | 792 | if (is_array($selected)) { |
793 | 793 | $selectedarray = $selected; |
794 | 794 | } elseif ($selected == 99) { |
795 | - $selectedarray = array(0,1); |
|
795 | + $selectedarray = array(0, 1); |
|
796 | 796 | } else { |
797 | 797 | $selectedarray = explode(',', $selected); |
798 | 798 | } |
@@ -1017,9 +1017,9 @@ |
||
1017 | 1017 | |
1018 | 1018 | $color = substr($color, 1, 6); |
1019 | 1019 | |
1020 | - $red = hexdec(substr($color, 0, 2)); // Red channel conversion |
|
1021 | - $green = hexdec(substr($color, 2, 2)); // Green channel conversion |
|
1022 | - $blue = hexdec(substr($color, 4, 2)); // Blue channel conversion |
|
1020 | + $red = hexdec(substr($color, 0, 2)); // Red channel conversion |
|
1021 | + $green = hexdec(substr($color, 2, 2)); // Green channel conversion |
|
1022 | + $blue = hexdec(substr($color, 4, 2)); // Blue channel conversion |
|
1023 | 1023 | |
1024 | 1024 | $couleur = imagecolorallocate($image, $red, $green, $blue); |
1025 | 1025 | //print $red.$green.$blue; |
@@ -638,7 +638,7 @@ discard block |
||
638 | 638 | foreach ($this->data as $x) { // Loop on each x |
639 | 639 | for ($i = 0; $i < $nbseries; $i++) { // Loop on each series |
640 | 640 | if (is_null($max)) { |
641 | - $max = $x[$i + 1]; // $i+1 because the index 0 is the legend |
|
641 | + $max = $x[$i + 1]; // $i+1 because the index 0 is the legend |
|
642 | 642 | } elseif ($max < $x[$i + 1]) { |
643 | 643 | $max = $x[$i + 1]; |
644 | 644 | } |
@@ -668,7 +668,7 @@ discard block |
||
668 | 668 | foreach ($this->data as $x) { // Loop on each x |
669 | 669 | for ($i = 0; $i < $nbseries; $i++) { // Loop on each series |
670 | 670 | if (is_null($min)) { |
671 | - $min = $x[$i + 1]; // $i+1 because the index 0 is the legend |
|
671 | + $min = $x[$i + 1]; // $i+1 because the index 0 is the legend |
|
672 | 672 | } elseif ($min > $x[$i + 1]) { |
673 | 673 | $min = $x[$i + 1]; |
674 | 674 | } |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | $this->error = "Call to draw method was made but SetData was is an empty dataset"; |
758 | 758 | dol_syslog(get_class($this) . "::draw " . $this->error, LOG_WARNING); |
759 | 759 | } |
760 | - $call = "draw_" . $this->_library; // Example "draw_jflot" |
|
760 | + $call = "draw_" . $this->_library; // Example "draw_jflot" |
|
761 | 761 | |
762 | 762 | return call_user_func_array(array($this, $call), array($file, $fileurl)); |
763 | 763 | } |
@@ -1284,7 +1284,7 @@ discard block |
||
1284 | 1284 | if ($i > 0) { |
1285 | 1285 | $this->stringtoshow .= ', '; |
1286 | 1286 | } |
1287 | - $this->stringtoshow .= "'" . dol_escape_js(dol_trunc($val, 25)) . "'"; // Lower than 25 make some important label (that we can't shorten) to be truncated |
|
1287 | + $this->stringtoshow .= "'" . dol_escape_js(dol_trunc($val, 25)) . "'"; // Lower than 25 make some important label (that we can't shorten) to be truncated |
|
1288 | 1288 | $i++; |
1289 | 1289 | } |
1290 | 1290 |
@@ -154,10 +154,10 @@ |
||
154 | 154 | if (!getDolGlobalString('MAIN_DISABLE_ALL_SMS')) { |
155 | 155 | // Action according to the chose sending method |
156 | 156 | if (getDolGlobalString('MAIN_SMS_SENDMODE')) { |
157 | - $sendmode = getDolGlobalString('MAIN_SMS_SENDMODE'); // $conf->global->MAIN_SMS_SENDMODE looks like a value 'module' |
|
158 | - $classmoduleofsender = getDolGlobalString('MAIN_MODULE_' . strtoupper($sendmode) . '_SMS', $sendmode); // $conf->global->MAIN_MODULE_XXX_SMS looks like a value 'class@module' |
|
157 | + $sendmode = getDolGlobalString('MAIN_SMS_SENDMODE'); // $conf->global->MAIN_SMS_SENDMODE looks like a value 'module' |
|
158 | + $classmoduleofsender = getDolGlobalString('MAIN_MODULE_' . strtoupper($sendmode) . '_SMS', $sendmode); // $conf->global->MAIN_MODULE_XXX_SMS looks like a value 'class@module' |
|
159 | 159 | if ($classmoduleofsender == 'ovh') { |
160 | - $classmoduleofsender = 'ovhsms@ovh'; // For backward compatibility |
|
160 | + $classmoduleofsender = 'ovhsms@ovh'; // For backward compatibility |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | $tmp = explode('@', $classmoduleofsender); |
@@ -476,11 +476,11 @@ discard block |
||
476 | 476 | * |
477 | 477 | * Note: cond_reglement can not be aliased to cond_reglement!!! |
478 | 478 | */ |
479 | - private $cond_reglement; // Private to call DolDeprecationHandler |
|
479 | + private $cond_reglement; // Private to call DolDeprecationHandler |
|
480 | 480 | /** |
481 | 481 | * @var int|string Internal to detect deprecated access |
482 | 482 | */ |
483 | - protected $depr_cond_reglement; // Internal value for deprecation |
|
483 | + protected $depr_cond_reglement; // Internal value for deprecation |
|
484 | 484 | |
485 | 485 | /** |
486 | 486 | * @var int Delivery address ID |
@@ -537,12 +537,12 @@ discard block |
||
537 | 537 | /** |
538 | 538 | * @var float Multicurrency total localta1 |
539 | 539 | */ |
540 | - public $multicurrency_total_localtax1; // not in database |
|
540 | + public $multicurrency_total_localtax1; // not in database |
|
541 | 541 | |
542 | 542 | /** |
543 | 543 | * @var float Multicurrency total localtax2 |
544 | 544 | */ |
545 | - public $multicurrency_total_localtax2; // not in database |
|
545 | + public $multicurrency_total_localtax2; // not in database |
|
546 | 546 | |
547 | 547 | /** |
548 | 548 | * @var string |
@@ -3700,7 +3700,7 @@ discard block |
||
3700 | 3700 | $newsuffix = ''; |
3701 | 3701 | } |
3702 | 3702 | if (in_array($this->table_element, array('actioncomm', 'adherent', 'advtargetemailing', 'cronjob', 'establishment'))) { |
3703 | - $fieldusermod = "fk_user_mod"; |
|
3703 | + $fieldusermod = "fk_user_mod"; |
|
3704 | 3704 | } elseif ($this->table_element == 'ecm_files') { |
3705 | 3705 | $fieldusermod = "fk_user_m"; |
3706 | 3706 | } else { |
@@ -4673,14 +4673,14 @@ discard block |
||
4673 | 4673 | $sql .= ", date_validation = '" . $this->db->idate(dol_now()) . "'"; |
4674 | 4674 | } |
4675 | 4675 | $sql .= " WHERE rowid = " . ((int) $elementId); |
4676 | - $sql .= " AND " . $fieldstatus . " <> " . ((int) $status); // We avoid update if status already correct |
|
4676 | + $sql .= " AND " . $fieldstatus . " <> " . ((int) $status); // We avoid update if status already correct |
|
4677 | 4677 | |
4678 | 4678 | dol_syslog(get_class($this) . "::setStatut", LOG_DEBUG); |
4679 | 4679 | $resql = $this->db->query($sql); |
4680 | 4680 | if ($resql) { |
4681 | 4681 | $error = 0; |
4682 | 4682 | |
4683 | - $nb_rows_affected = $this->db->affected_rows($resql); // should be 1 or 0 if status was already correct |
|
4683 | + $nb_rows_affected = $this->db->affected_rows($resql); // should be 1 or 0 if status was already correct |
|
4684 | 4684 | |
4685 | 4685 | if ($nb_rows_affected > 0) { |
4686 | 4686 | if (empty($trigkey)) { |
@@ -4725,7 +4725,7 @@ discard block |
||
4725 | 4725 | if ($fieldstatus == 'tosell') { |
4726 | 4726 | $this->status = $status; |
4727 | 4727 | } elseif ($fieldstatus == 'tobuy') { |
4728 | - $this->status_buy = $status; // @phpstan-ignore-line |
|
4728 | + $this->status_buy = $status; // @phpstan-ignore-line |
|
4729 | 4729 | } else { |
4730 | 4730 | $this->status = $status; |
4731 | 4731 | } |
@@ -4833,7 +4833,7 @@ discard block |
||
4833 | 4833 | return -1; |
4834 | 4834 | } |
4835 | 4835 | |
4836 | - $arraytoscan = $this->childtables; // array('tablename'=>array('fk_element'=>'parentfield'), ...) or array('tablename'=>array('parent'=>table_parent, 'parentkey'=>'nameoffieldforparentfkkey'), ...) |
|
4836 | + $arraytoscan = $this->childtables; // array('tablename'=>array('fk_element'=>'parentfield'), ...) or array('tablename'=>array('parent'=>table_parent, 'parentkey'=>'nameoffieldforparentfkkey'), ...) |
|
4837 | 4837 | // For backward compatibility, we check if array is old format array('tablename1', 'tablename2', ...) |
4838 | 4838 | $tmparray = array_keys($this->childtables); |
4839 | 4839 | if (is_numeric($tmparray[0])) { |
@@ -5907,7 +5907,7 @@ discard block |
||
5907 | 5907 | $setsharekey = false; |
5908 | 5908 | if ($this->element == 'propal' || $this->element == 'proposal') { |
5909 | 5909 | if (getDolGlobalInt("PROPOSAL_ALLOW_ONLINESIGN")) { |
5910 | - $setsharekey = true; // feature to make online signature is not set or set to on (default) |
|
5910 | + $setsharekey = true; // feature to make online signature is not set or set to on (default) |
|
5911 | 5911 | } |
5912 | 5912 | if (getDolGlobalInt("PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD")) { |
5913 | 5913 | $setsharekey = true; |
@@ -5965,7 +5965,7 @@ discard block |
||
5965 | 5965 | $ecmfile->gen_or_uploaded = 'generated'; |
5966 | 5966 | $ecmfile->description = ''; // indexed content |
5967 | 5967 | $ecmfile->keywords = ''; // keyword content |
5968 | - $ecmfile->src_object_type = $this->table_element; // $this->table_name is 'myobject' or 'mymodule_myobject'. |
|
5968 | + $ecmfile->src_object_type = $this->table_element; // $this->table_name is 'myobject' or 'mymodule_myobject'. |
|
5969 | 5969 | $ecmfile->src_object_id = $this->id; |
5970 | 5970 | |
5971 | 5971 | $result = $ecmfile->create($user); |
@@ -6017,7 +6017,7 @@ discard block |
||
6017 | 6017 | $maxwidthmini = $tmparraysize['maxwidthmini']; |
6018 | 6018 | $maxheightmini = $tmparraysize['maxheightmini']; |
6019 | 6019 | //$quality = $tmparraysize['quality']; |
6020 | - $quality = 50; // For thumbs, we force quality to 50 |
|
6020 | + $quality = 50; // For thumbs, we force quality to 50 |
|
6021 | 6021 | |
6022 | 6022 | // Create small thumbs for company (Ratio is near 16/9) |
6023 | 6023 | // Used on logon for example |
@@ -6310,7 +6310,7 @@ discard block |
||
6310 | 6310 | $savDisableCompute = $conf->disable_compute; |
6311 | 6311 | $conf->disable_compute = 1; |
6312 | 6312 | |
6313 | - $ret = $this->fetch($id); /* @phpstan-ignore-line */ |
|
6313 | + $ret = $this->fetch($id); /* @phpstan-ignore-line */ |
|
6314 | 6314 | |
6315 | 6315 | $conf->disable_compute = $savDisableCompute; |
6316 | 6316 | |
@@ -6372,7 +6372,7 @@ discard block |
||
6372 | 6372 | if (is_array($optionsArray) && count($optionsArray) > 0) { |
6373 | 6373 | $sql = "SELECT rowid"; |
6374 | 6374 | foreach ($optionsArray as $name => $label) { |
6375 | - if (empty($extrafields->attributes[$this->table_element]['type'][$name]) || (!in_array($extrafields->attributes[$this->table_element]['type'][$name], ['separate', 'point', 'multipts', 'linestrg','polygon']))) { |
|
6375 | + if (empty($extrafields->attributes[$this->table_element]['type'][$name]) || (!in_array($extrafields->attributes[$this->table_element]['type'][$name], ['separate', 'point', 'multipts', 'linestrg', 'polygon']))) { |
|
6376 | 6376 | $sql .= ", " . $name; |
6377 | 6377 | } |
6378 | 6378 | // use geo sql fonction to read as text |
@@ -6437,8 +6437,8 @@ discard block |
||
6437 | 6437 | if (!empty($extrafields->attributes[$this->table_element]) && !empty($extrafields->attributes[$this->table_element]['computed'][$key])) { |
6438 | 6438 | //var_dump($conf->disable_compute); |
6439 | 6439 | if (empty($conf->disable_compute)) { |
6440 | - global $objectoffield; // We set a global variable to $objectoffield so |
|
6441 | - $objectoffield = $this; // we can use it inside computed formula |
|
6440 | + global $objectoffield; // We set a global variable to $objectoffield so |
|
6441 | + $objectoffield = $this; // we can use it inside computed formula |
|
6442 | 6442 | $this->array_options['options_' . $key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0, '2'); |
6443 | 6443 | } |
6444 | 6444 | } |
@@ -6620,7 +6620,7 @@ discard block |
||
6620 | 6620 | // If old value encrypted in database is same than submitted new value, it means we don't change it, so we don't update. |
6621 | 6621 | if ($algo == 'dolcrypt') { // dolibarr reversible encryption |
6622 | 6622 | if (!preg_match('/^dolcrypt:/', $this->array_options[$key])) { |
6623 | - $new_array_options[$key] = dolEncrypt($this->array_options[$key]); // warning, must be called when on the master |
|
6623 | + $new_array_options[$key] = dolEncrypt($this->array_options[$key]); // warning, must be called when on the master |
|
6624 | 6624 | } else { |
6625 | 6625 | $new_array_options[$key] = $this->array_options[$key]; // Value is kept |
6626 | 6626 | } |
@@ -6631,7 +6631,7 @@ discard block |
||
6631 | 6631 | // If value has changed |
6632 | 6632 | if ($algo == 'dolcrypt') { // dolibarr reversible encryption |
6633 | 6633 | if (!preg_match('/^dolcrypt:/', $this->array_options[$key])) { |
6634 | - $new_array_options[$key] = dolEncrypt($this->array_options[$key]); // warning, must be called when on the master |
|
6634 | + $new_array_options[$key] = dolEncrypt($this->array_options[$key]); // warning, must be called when on the master |
|
6635 | 6635 | } else { |
6636 | 6636 | $new_array_options[$key] = $this->array_options[$key]; // Value is kept |
6637 | 6637 | } |
@@ -6643,7 +6643,7 @@ discard block |
||
6643 | 6643 | //var_dump('jjj'.$algo.' '.$this->oldcopy->array_options[$key].' -> '.$this->array_options[$key]); |
6644 | 6644 | // If this->oldcopy is not defined, we can't know if we change attribute or not, so we must keep value |
6645 | 6645 | if ($algo == 'dolcrypt' && !preg_match('/^dolcrypt:/', $this->array_options[$key])) { // dolibarr reversible encryption |
6646 | - $new_array_options[$key] = dolEncrypt($this->array_options[$key]); // warning, must be called when on the master |
|
6646 | + $new_array_options[$key] = dolEncrypt($this->array_options[$key]); // warning, must be called when on the master |
|
6647 | 6647 | } else { |
6648 | 6648 | $new_array_options[$key] = $this->array_options[$key]; // Value is kept |
6649 | 6649 | } |
@@ -7068,7 +7068,7 @@ discard block |
||
7068 | 7068 | if (isset($this->oldcopy->array_options["options_" . $key]) && $this->array_options["options_" . $key] == $this->oldcopy->array_options["options_" . $key]) { // If old value encrypted in database is same than submitted new value, it means we don't change it, so we don't update. |
7069 | 7069 | if ($algo == 'dolcrypt') { // dolibarr reversible encryption |
7070 | 7070 | if (!preg_match('/^dolcrypt:/', $this->array_options["options_" . $key])) { |
7071 | - $new_array_options["options_" . $key] = dolEncrypt($this->array_options["options_" . $key]); // warning, must be called when on the master |
|
7071 | + $new_array_options["options_" . $key] = dolEncrypt($this->array_options["options_" . $key]); // warning, must be called when on the master |
|
7072 | 7072 | } else { |
7073 | 7073 | $new_array_options["options_" . $key] = $this->array_options["options_" . $key]; // Value is kept |
7074 | 7074 | } |
@@ -7088,7 +7088,7 @@ discard block |
||
7088 | 7088 | } |
7089 | 7089 | } else { |
7090 | 7090 | if ($algo == 'dolcrypt' && !preg_match('/^dolcrypt:/', $this->array_options["options_" . $key])) { // dolibarr reversible encryption |
7091 | - $new_array_options["options_" . $key] = dolEncrypt($this->array_options["options_" . $key]); // warning, must be called when on the master |
|
7091 | + $new_array_options["options_" . $key] = dolEncrypt($this->array_options["options_" . $key]); // warning, must be called when on the master |
|
7092 | 7092 | } else { |
7093 | 7093 | $new_array_options["options_" . $key] = $this->array_options["options_" . $key]; // Value is kept |
7094 | 7094 | } |
@@ -7611,7 +7611,7 @@ discard block |
||
7611 | 7611 | if (is_array($param['options'])) { |
7612 | 7612 | $param_list = array_keys($param['options']); |
7613 | 7613 | $InfoFieldList = explode(":", $param_list[0], 5); |
7614 | - if (! empty($InfoFieldList[4])) { |
|
7614 | + if (!empty($InfoFieldList[4])) { |
|
7615 | 7615 | $pos = 0; |
7616 | 7616 | $parenthesisopen = 0; |
7617 | 7617 | while (substr($InfoFieldList[4], $pos, 1) !== '' && ($parenthesisopen || $pos == 0 || substr($InfoFieldList[4], $pos, 1) != ':')) { |
@@ -8232,7 +8232,7 @@ discard block |
||
8232 | 8232 | $value = isset($param['options'][(string) $value]) ? $param['options'][(string) $value] : ''; |
8233 | 8233 | if (strpos($value, "|") !== false) { |
8234 | 8234 | $value = $langs->trans(explode('|', $value)[0]); |
8235 | - } elseif (! is_numeric($value)) { |
|
8235 | + } elseif (!is_numeric($value)) { |
|
8236 | 8236 | $value = $langs->trans($value); |
8237 | 8237 | } |
8238 | 8238 | } elseif ($type == 'sellist') { |
@@ -8903,7 +8903,7 @@ discard block |
||
8903 | 8903 | $value = $getposttemp; |
8904 | 8904 | } |
8905 | 8905 | } elseif (in_array($extrafields->attributes[$this->table_element]['type'][$key], array('int'))) { |
8906 | - $value = ( !empty($this->array_options["options_" . $key]) || $this->array_options["options_" . $key] === '0' ) ? $this->array_options["options_" . $key] : ''; |
|
8906 | + $value = (!empty($this->array_options["options_" . $key]) || $this->array_options["options_" . $key] === '0') ? $this->array_options["options_" . $key] : ''; |
|
8907 | 8907 | } else { |
8908 | 8908 | $value = (!empty($this->array_options["options_" . $key]) ? $this->array_options["options_" . $key] : ''); // No GET, no POST, no default value, so we take value of object. |
8909 | 8909 | } |
@@ -10042,7 +10042,7 @@ discard block |
||
10042 | 10042 | if (!$error) { |
10043 | 10043 | $sql = "INSERT INTO " . $this->db->prefix() . $this->table_element; |
10044 | 10044 | $sql .= " (" . implode(", ", $keys) . ')'; |
10045 | - $sql .= " VALUES (" . implode(", ", $values) . ")"; // $values can contains 'abc' or 123 |
|
10045 | + $sql .= " VALUES (" . implode(", ", $values) . ")"; // $values can contains 'abc' or 123 |
|
10046 | 10046 | |
10047 | 10047 | $res = $this->db->query($sql); |
10048 | 10048 | if (!$res) { |
@@ -10339,7 +10339,7 @@ discard block |
||
10339 | 10339 | |
10340 | 10340 | // Update extrafield |
10341 | 10341 | if (!$error) { |
10342 | - $result = $this->insertExtraFields(); // This delete and reinsert extrafields |
|
10342 | + $result = $this->insertExtraFields(); // This delete and reinsert extrafields |
|
10343 | 10343 | if ($result < 0) { |
10344 | 10344 | $error++; |
10345 | 10345 | } |
@@ -10541,7 +10541,7 @@ discard block |
||
10541 | 10541 | $error++; |
10542 | 10542 | } else { |
10543 | 10543 | while ($obj = $this->db->fetch_object($resql)) { |
10544 | - $result = $this->fetch($obj->rowid); // @phpstan-ignore-line |
|
10544 | + $result = $this->fetch($obj->rowid); // @phpstan-ignore-line |
|
10545 | 10545 | if ($result < 0) { |
10546 | 10546 | $error++; |
10547 | 10547 | $this->errors[] = $this->error; |
@@ -10762,7 +10762,7 @@ discard block |
||
10762 | 10762 | ); |
10763 | 10763 | foreach ($fields as $key => $value) { |
10764 | 10764 | if (array_key_exists($key, $this->fields)) { |
10765 | - $this->{$key} = $value; // @phpstan-ignore-line |
|
10765 | + $this->{$key} = $value; // @phpstan-ignore-line |
|
10766 | 10766 | } |
10767 | 10767 | } |
10768 | 10768 |