@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | } |
589 | 589 | // Most servers expect a 2nd pass of EHLO after TLS is established to get another time |
590 | 590 | // the answer with list of supported AUTH methods. They may differs between non STARTTLS and with STARTTLS. |
591 | - if (! $_retVal = $this->socket_send_str('EHLO ' . $hosth, '250')) { |
|
591 | + if (!$_retVal = $this->socket_send_str('EHLO ' . $hosth, '250')) { |
|
592 | 592 | $this->_setErr(126, '"' . $hosth . '" does not support authenticated connections or temporary error. Error after 2nd sending EHLO ' . $hosth . ' : ' . $this->lastretval); |
593 | 593 | return $_retVal; |
594 | 594 | } |
@@ -1709,7 +1709,7 @@ discard block |
||
1709 | 1709 | $this->_msgContent['attachment'][$strFileName]['mimeType'] = $strMimeType; |
1710 | 1710 | $this->_msgContent['attachment'][$strFileName]['fileName'] = $strFileName; |
1711 | 1711 | $this->_msgContent['attachment'][$strFileName]['data'] = $strContent; |
1712 | - $this->_msgContent['attachment'][$strFileName]['cid'] = $strCid; // If defined, it means this attachment must be shown inline |
|
1712 | + $this->_msgContent['attachment'][$strFileName]['cid'] = $strCid; // If defined, it means this attachment must be shown inline |
|
1713 | 1713 | |
1714 | 1714 | if ($this->getMD5flag()) { |
1715 | 1715 | $this->_msgContent['attachment'][$strFileName]['md5'] = dol_hash($strContent, 3); |
@@ -126,9 +126,9 @@ discard block |
||
126 | 126 | * Message Sensitivity |
127 | 127 | */ |
128 | 128 | private $_arySensitivity = array(false, |
129 | - 'Personal', |
|
130 | - 'Private', |
|
131 | - 'Company Confidential'); |
|
129 | + 'Personal', |
|
130 | + 'Private', |
|
131 | + 'Company Confidential'); |
|
132 | 132 | |
133 | 133 | /** |
134 | 134 | * Message Sensitivity |
@@ -156,12 +156,12 @@ discard block |
||
156 | 156 | * Content-Transfer-Encoding |
157 | 157 | */ |
158 | 158 | private $_smtpsTransEncodeTypes = array('7bit', // Simple 7-bit ASCII |
159 | - '8bit', // 8-bit coding with line termination characters |
|
160 | - 'base64', // 3 octets encoded into 4 sextets with offset |
|
161 | - 'binary', // Arbitrary binary stream |
|
162 | - 'mac-binhex40', // Macintosh binary to hex encoding |
|
163 | - 'quoted-printable', // Mostly 7-bit, with 8-bit characters encoded as "=HH" |
|
164 | - 'uuencode'); // UUENCODE encoding |
|
159 | + '8bit', // 8-bit coding with line termination characters |
|
160 | + 'base64', // 3 octets encoded into 4 sextets with offset |
|
161 | + 'binary', // Arbitrary binary stream |
|
162 | + 'mac-binhex40', // Macintosh binary to hex encoding |
|
163 | + 'quoted-printable', // Mostly 7-bit, with 8-bit characters encoded as "=HH" |
|
164 | + 'uuencode'); // UUENCODE encoding |
|
165 | 165 | |
166 | 166 | /** |
167 | 167 | * Content-Transfer-Encoding |
@@ -386,7 +386,7 @@ discard block |
||
386 | 386 | $_aryToList = $this->getTo(); |
387 | 387 | } |
388 | 388 | |
389 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
389 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
390 | 390 | /** |
391 | 391 | * Attempt a connection to mail server |
392 | 392 | * |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | */ |
395 | 395 | private function _server_connect() |
396 | 396 | { |
397 | - // phpcs:enable |
|
397 | + // phpcs:enable |
|
398 | 398 | // Default return value |
399 | 399 | $_retVal = true; |
400 | 400 | |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | return $_retVal; |
465 | 465 | } |
466 | 466 | |
467 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
467 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
468 | 468 | /** |
469 | 469 | * Attempt mail server authentication for a secure connection |
470 | 470 | * |
@@ -472,7 +472,7 @@ discard block |
||
472 | 472 | */ |
473 | 473 | private function _server_authenticate() |
474 | 474 | { |
475 | - // phpcs:enable |
|
475 | + // phpcs:enable |
|
476 | 476 | global $conf; |
477 | 477 | |
478 | 478 | require_once BASE_PATH . '/../Dolibarr/Lib/GetUrl.php'; |
@@ -1199,7 +1199,7 @@ discard block |
||
1199 | 1199 | $this->_msgRecipients = $aryHost; |
1200 | 1200 | } |
1201 | 1201 | |
1202 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1202 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1203 | 1203 | /** |
1204 | 1204 | * Returns an array of the various parts of an email address |
1205 | 1205 | * This assumes a well formed address: |
@@ -1218,7 +1218,7 @@ discard block |
||
1218 | 1218 | */ |
1219 | 1219 | private function _strip_email($_strAddr) |
1220 | 1220 | { |
1221 | - // phpcs:enable |
|
1221 | + // phpcs:enable |
|
1222 | 1222 | $_aryEmail = array(); |
1223 | 1223 | // Keep the original |
1224 | 1224 | $_aryEmail['org'] = $_strAddr; |
@@ -1255,7 +1255,7 @@ discard block |
||
1255 | 1255 | return $_aryEmail; |
1256 | 1256 | } |
1257 | 1257 | |
1258 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1258 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1259 | 1259 | /** |
1260 | 1260 | * Returns an array of bares addresses for use with 'RCPT TO:' |
1261 | 1261 | * This is a "build as you go" method. Each time this method is called |
@@ -1265,7 +1265,7 @@ discard block |
||
1265 | 1265 | */ |
1266 | 1266 | public function get_RCPT_list() |
1267 | 1267 | { |
1268 | - // phpcs:enable |
|
1268 | + // phpcs:enable |
|
1269 | 1269 | /** |
1270 | 1270 | * An array of bares addresses for use with 'RCPT TO:' |
1271 | 1271 | */ |
@@ -1284,7 +1284,7 @@ discard block |
||
1284 | 1284 | return $_RCPT_list; |
1285 | 1285 | } |
1286 | 1286 | |
1287 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1287 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1288 | 1288 | /** |
1289 | 1289 | * Returns an array of addresses for a specific type; TO, CC or BCC |
1290 | 1290 | * |
@@ -1293,7 +1293,7 @@ discard block |
||
1293 | 1293 | */ |
1294 | 1294 | public function get_email_list($_which = null) |
1295 | 1295 | { |
1296 | - // phpcs:enable |
|
1296 | + // phpcs:enable |
|
1297 | 1297 | // We need to know which address segment to pull |
1298 | 1298 | if ($_which) { |
1299 | 1299 | // Make sure we have addresses to process |
@@ -1900,7 +1900,7 @@ discard block |
||
1900 | 1900 | return ''; |
1901 | 1901 | } |
1902 | 1902 | |
1903 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1903 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1904 | 1904 | /** |
1905 | 1905 | * This function has been modified as provided by SirSir to allow multiline responses when |
1906 | 1906 | * using SMTP Extensions |
@@ -1913,7 +1913,7 @@ discard block |
||
1913 | 1913 | */ |
1914 | 1914 | public function server_parse($socket, $response) |
1915 | 1915 | { |
1916 | - // phpcs:enable |
|
1916 | + // phpcs:enable |
|
1917 | 1917 | /** |
1918 | 1918 | * Returns constructed SELECT Object string or boolean upon failure |
1919 | 1919 | * Default value is set at true |
@@ -1945,7 +1945,7 @@ discard block |
||
1945 | 1945 | return $_retVal; |
1946 | 1946 | } |
1947 | 1947 | |
1948 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1948 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1949 | 1949 | /** |
1950 | 1950 | * Send str |
1951 | 1951 | * |
@@ -1956,7 +1956,7 @@ discard block |
||
1956 | 1956 | */ |
1957 | 1957 | public function socket_send_str($_strSend, $_returnCode = null, $CRLF = "\r\n") |
1958 | 1958 | { |
1959 | - // phpcs:enable |
|
1959 | + // phpcs:enable |
|
1960 | 1960 | if ($this->_debug) { |
1961 | 1961 | $this->log .= $_strSend; // @CHANGE LDR for log |
1962 | 1962 | } |
@@ -428,7 +428,7 @@ |
||
428 | 428 | // Sanitize to avoid stream execution when calling file_size(). Not that this is a second security because |
429 | 429 | // most streams are already disabled by stream_wrapper_unregister() in filefunc.inc.php |
430 | 430 | $uploaded_file = preg_replace('/\s*(http|ftp)s?:/i', '', $uploaded_file); |
431 | - $uploaded_file = realpath($uploaded_file); // A hack to be sure the file point to an existing file on disk (and is not a SSRF attack) |
|
431 | + $uploaded_file = realpath($uploaded_file); // A hack to be sure the file point to an existing file on disk (and is not a SSRF attack) |
|
432 | 432 | |
433 | 433 | $validate = $this->validate($uploaded_file, $file, $error, $index); |
434 | 434 |
@@ -132,14 +132,14 @@ discard block |
||
132 | 132 | if ($choice == 'allfiles') { |
133 | 133 | // Delete all files (except install.lock, do not follow symbolic links) |
134 | 134 | if ($dolibarr_main_data_root) { |
135 | - $filesarray = dol_dir_list($dolibarr_main_data_root, "all", 0, '', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1); // No need to use recursive, we will delete directory |
|
135 | + $filesarray = dol_dir_list($dolibarr_main_data_root, "all", 0, '', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1); // No need to use recursive, we will delete directory |
|
136 | 136 | } |
137 | 137 | } |
138 | 138 | |
139 | 139 | if ($choice == 'allfilesold') { |
140 | 140 | // Delete all files (except install.lock, do not follow symbolic links) |
141 | 141 | if ($dolibarr_main_data_root) { |
142 | - $filesarray = dol_dir_list($dolibarr_main_data_root, "files", 1, '', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1, $nbsecondsold); // No need to use recursive, we will delete directory |
|
142 | + $filesarray = dol_dir_list($dolibarr_main_data_root, "files", 1, '', 'install\.lock$', 'name', SORT_ASC, 0, 0, '', 1, $nbsecondsold); // No need to use recursive, we will delete directory |
|
143 | 143 | } |
144 | 144 | } |
145 | 145 | |
@@ -467,7 +467,7 @@ discard block |
||
467 | 467 | $langs->load("errors"); |
468 | 468 | dol_syslog("Datadump retval after exec=" . $retval, LOG_ERR); |
469 | 469 | $errormsg = 'Error ' . $retval; |
470 | - $ok = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
470 | + $ok = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
471 | 471 | } else { |
472 | 472 | $i = 0; |
473 | 473 | if (!empty($output_arr)) { |
@@ -1344,14 +1344,14 @@ discard block |
||
1344 | 1344 | } |
1345 | 1345 | if ($tmpfiles && is_array($tmpfiles)) { |
1346 | 1346 | foreach ($tmpfiles as $key => $val) { |
1347 | - if ($key == 'fullname') { |
|
1347 | + if ($key == 'fullname') { |
|
1348 | 1348 | $filepath = array($val); |
1349 | 1349 | $filesize = dol_filesize($val); |
1350 | 1350 | } |
1351 | - if ($key == 'type') { |
|
1351 | + if ($key == 'type') { |
|
1352 | 1352 | $mimetype = array($val); |
1353 | 1353 | } |
1354 | - if ($key == 'relativename') { |
|
1354 | + if ($key == 'relativename') { |
|
1355 | 1355 | $filename = array($val); |
1356 | 1356 | } |
1357 | 1357 | } |
@@ -1360,7 +1360,7 @@ discard block |
||
1360 | 1360 | if ($filepath) { |
1361 | 1361 | if ($filesize > $sizelimit) { |
1362 | 1362 | $message .= '<br>' . $langs->trans("BackupIsTooLargeSend"); |
1363 | - $documenturl = $dolibarr_main_url_root . '/document.php?modulepart=systemtools&atachement=1&file=backup/' . urlencode($filename[0]); |
|
1363 | + $documenturl = $dolibarr_main_url_root . '/document.php?modulepart=systemtools&atachement=1&file=backup/' . urlencode($filename[0]); |
|
1364 | 1364 | $message .= '<br><a href=' . $documenturl . '>Lien de téléchargement</a>'; |
1365 | 1365 | $filepath = ''; |
1366 | 1366 | $mimetype = ''; |
@@ -1432,7 +1432,7 @@ discard block |
||
1432 | 1432 | } |
1433 | 1433 | |
1434 | 1434 | $cron_job = new Cronjob($db); |
1435 | - $cron_job->fetchAll('DESC', 't.rowid', 100, 0, 1, [], 1); // Fetch jobs that are currently running |
|
1435 | + $cron_job->fetchAll('DESC', 't.rowid', 100, 0, 1, [], 1); // Fetch jobs that are currently running |
|
1436 | 1436 | |
1437 | 1437 | // Iterate over all jobs in processing (this can't be this job since his state is set to 0 before) |
1438 | 1438 | foreach ($cron_job->lines as $job_line) { |
@@ -1450,7 +1450,7 @@ discard block |
||
1450 | 1450 | } |
1451 | 1451 | |
1452 | 1452 | // Calling posix_kill with the 0 kill signal will return true if the process is running, false otherwise. |
1453 | - if (! posix_kill($job->pid, 0)) { |
|
1453 | + if (!posix_kill($job->pid, 0)) { |
|
1454 | 1454 | // Clean processing and pid values |
1455 | 1455 | $job->processing = 0; |
1456 | 1456 | $job->pid = null; |
@@ -944,7 +944,7 @@ |
||
944 | 944 | } |
945 | 945 | break; |
946 | 946 | default: |
947 | - $parameters = array('vals' => $vals[$tplline],'object' => $object,'nbcharactbyline' => $nbcharactbyline); |
|
947 | + $parameters = array('vals' => $vals[$tplline], 'object' => $object, 'nbcharactbyline' => $nbcharactbyline); |
|
948 | 948 | $action = ''; |
949 | 949 | $reshook = $hookmanager->executeHooks('sendToPrinterAfter', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
950 | 950 |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | |
126 | 126 | public $liste_limit; |
127 | 127 | |
128 | - public $tzuserinputkey = 'tzserver'; // Use 'tzuserrel' to always store date in GMT and show date in time zone of user. |
|
128 | + public $tzuserinputkey = 'tzserver'; // Use 'tzuserrel' to always store date in GMT and show date in time zone of user. |
|
129 | 129 | |
130 | 130 | |
131 | 131 | // TODO Remove this part. |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | $value = $_ENV['DOLIBARR_' . $key]; |
353 | 353 | } |
354 | 354 | |
355 | - $this->global->$key = dolDecrypt($value); // decrypt data excrypted with dolibarr_set_const($db, $name, $value) |
|
355 | + $this->global->$key = dolDecrypt($value); // decrypt data excrypted with dolibarr_set_const($db, $name, $value) |
|
356 | 356 | |
357 | 357 | if ($value && strpos($key, 'MAIN_MODULE_') === 0) { |
358 | 358 | $reg = array(); |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | // deprecated in php 8.2 |
409 | 409 | //if (version_compare(phpversion(), '8.2') < 0) { |
410 | 410 | if (!isset($this->$modulename) || !is_object($this->$modulename)) { |
411 | - $this->$modulename = new stdClass(); // We need this to use the ->enabled and the ->multidir, ->dir... |
|
411 | + $this->$modulename = new stdClass(); // We need this to use the ->enabled and the ->multidir, ->dir... |
|
412 | 412 | } |
413 | 413 | $this->$modulename->enabled = true; // TODO Remove this |
414 | 414 | //} |
@@ -740,7 +740,7 @@ discard block |
||
740 | 740 | } |
741 | 741 | |
742 | 742 | if (!isset($this->global->MAIN_ENABLE_AJAX_TOOLTIP)) { |
743 | - $this->global->MAIN_ENABLE_AJAX_TOOLTIP = 0; // Not enabled by default (still trouble of persistent tooltip) |
|
743 | + $this->global->MAIN_ENABLE_AJAX_TOOLTIP = 0; // Not enabled by default (still trouble of persistent tooltip) |
|
744 | 744 | } |
745 | 745 | |
746 | 746 | // By default, suppliers objects can be linked to all projects |
@@ -320,7 +320,7 @@ |
||
320 | 320 | $file_lang_osencoded = dol_osencode($file_lang); |
321 | 321 | |
322 | 322 | //$filelangexists = is_file($file_lang_osencoded); |
323 | - $filelangexists = @is_file($file_lang_osencoded); // avoid [php:warn] |
|
323 | + $filelangexists = @is_file($file_lang_osencoded); // avoid [php:warn] |
|
324 | 324 | |
325 | 325 | //dol_syslog(get_class($this).'::Load Try to read for alt='.$alt.' langofdir='.$langofdir.' domain='.$domain.' newdomain='.$newdomain.' modulename='.$modulename.' file_lang='.$file_lang." => filelangexists=".$filelangexists); |
326 | 326 | //print 'Try to read for alt='.$alt.' langofdir='.$langofdir.' domain='.$domain.' newdomain='.$newdomain.' modulename='.$modulename.' this->_tab_loaded[newdomain]='.$this->_tab_loaded[$newdomain].' file_lang='.$file_lang." => filelangexists=".$filelangexists."\n"; |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | { |
136 | 136 | // $type = "GIF" | "JPEG" |
137 | 137 | //$this->properties["PHOTO;MEDIATYPE=$type;ENCODING=BASE64"] = base64_encode($photo); |
138 | - $this->properties["PHOTO;MEDIATYPE=$type"] = $photo; // must be url of photo |
|
138 | + $this->properties["PHOTO;MEDIATYPE=$type"] = $photo; // must be url of photo |
|
139 | 139 | //$this->properties["PHOTO;TYPE=$type;ENCODING=BASE64"] = base64_encode($photo); // must be content of image |
140 | 140 | } |
141 | 141 | |
@@ -359,7 +359,7 @@ discard block |
||
359 | 359 | public function getVCard() |
360 | 360 | { |
361 | 361 | $text = "BEGIN:VCARD\r\n"; |
362 | - $text .= "VERSION:4.0\r\n"; // With V4, all encoding are UTF-8 |
|
362 | + $text .= "VERSION:4.0\r\n"; // With V4, all encoding are UTF-8 |
|
363 | 363 | //$text.= "VERSION:2.1\r\n"; |
364 | 364 | foreach ($this->properties as $key => $value) { |
365 | 365 | $newkey = preg_replace('/-.*$/', '', $key); // remove suffix -twitter, -facebook, ... |
@@ -129,10 +129,10 @@ |
||
129 | 129 | |
130 | 130 | // Boxes |
131 | 131 | $this->boxes = array( |
132 | - 0 => array('file' => 'box_project.php', 'enabledbydefaulton' => 'Home'), // open projects |
|
133 | - 1 => array('file' => 'box_project_opportunities.php', 'enabledbydefaulton' => 'Home'), // open opportunities |
|
132 | + 0 => array('file' => 'box_project.php', 'enabledbydefaulton' => 'Home'), // open projects |
|
133 | + 1 => array('file' => 'box_project_opportunities.php', 'enabledbydefaulton' => 'Home'), // open opportunities |
|
134 | 134 | 2 => array('file' => 'box_task.php', 'enabledbydefaulton' => 'Home'), |
135 | - 3 => array('file' => 'box_validated_projects.php', 'enabledbydefaulton' => 'Home'), // task without timespent |
|
135 | + 3 => array('file' => 'box_validated_projects.php', 'enabledbydefaulton' => 'Home'), // task without timespent |
|
136 | 136 | 4 => array('file' => 'box_funnel_of_prospection.php', 'enabledbydefaulton' => 'Home'), |
137 | 137 | ); |
138 | 138 | // Cronjobs |
@@ -92,7 +92,7 @@ |
||
92 | 92 | // Permissions |
93 | 93 | $this->rights = array(); |
94 | 94 | $this->rights_class = 'paymentbybanktransfer'; |
95 | - $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
95 | + $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
96 | 96 | $r++; |
97 | 97 | $this->rights[$r][0] = 561; |
98 | 98 | $this->rights[$r][1] = 'Read bank transfer payment orders'; |