@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | if ($sql) { |
332 | 332 | // Test if the SQL is allowed SQL |
333 | 333 | if ($onlysqltoimportwebsite) { |
334 | - $newsql = str_replace(array("\'"), '__BACKSLASHQUOTE__', $sql); // Replace the \' char |
|
334 | + $newsql = str_replace(array("\'"), '__BACKSLASHQUOTE__', $sql); // Replace the \' char |
|
335 | 335 | |
336 | 336 | // Remove all strings contents including the ' so we can analyse SQL instruction only later |
337 | 337 | $l = strlen($newsql); |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | $extractphpold = ''; |
380 | 380 | |
381 | 381 | // Security analysis |
382 | - $errorphpcheck = checkPHPCode($extractphpold, $extractphp); // Contains the setEventMessages |
|
382 | + $errorphpcheck = checkPHPCode($extractphpold, $extractphp); // Contains the setEventMessages |
|
383 | 383 | if ($errorphpcheck) { |
384 | 384 | $error++; |
385 | 385 | //print 'Request '.($i + 1)." contains non allowed instructions.<br>\n"; |
@@ -586,7 +586,7 @@ discard block |
||
586 | 586 | dol_print_error(null, 'Error call dolibar_del_const with parameter name empty'); |
587 | 587 | return -1; |
588 | 588 | } |
589 | - if (! is_object($hookmanager)) { |
|
589 | + if (!is_object($hookmanager)) { |
|
590 | 590 | require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; |
591 | 591 | $hookmanager = new HookManager($db); |
592 | 592 | } |
@@ -680,12 +680,12 @@ discard block |
||
680 | 680 | dol_print_error($db, "Error: Call to function dolibarr_set_const with wrong parameters"); |
681 | 681 | exit; |
682 | 682 | } |
683 | - if (! is_object($hookmanager)) { |
|
683 | + if (!is_object($hookmanager)) { |
|
684 | 684 | require_once DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'; |
685 | 685 | $hookmanager = new HookManager($db); |
686 | 686 | } |
687 | 687 | |
688 | - $value = (string) $value; // We force type string (may be int) |
|
688 | + $value = (string) $value; // We force type string (may be int) |
|
689 | 689 | |
690 | 690 | $parameters = array( |
691 | 691 | 'name' => $name, |
@@ -1122,7 +1122,7 @@ discard block |
||
1122 | 1122 | |
1123 | 1123 | if (preg_match('/dol_login/i', $sessValues) && // limit to dolibarr session |
1124 | 1124 | preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i', $sessValues) && // limit to current entity |
1125 | - preg_match('/dol_company\|s:([0-9]+):"(' . getDolGlobalString('MAIN_INFO_SOCIETE_NOM').')"/i', $sessValues)) { // limit to company name |
|
1125 | + preg_match('/dol_company\|s:([0-9]+):"('.getDolGlobalString('MAIN_INFO_SOCIETE_NOM').')"/i', $sessValues)) { // limit to company name |
|
1126 | 1126 | $tmp = explode('_', $file); |
1127 | 1127 | $idsess = $tmp[1]; |
1128 | 1128 | // We remove session if it's not ourself |
@@ -1939,7 +1939,7 @@ discard block |
||
1939 | 1939 | global $conf, $langs; |
1940 | 1940 | |
1941 | 1941 | $text = $langs->trans("OnlyFollowingModulesAreOpenedToExternalUsers"); |
1942 | - $listofmodules = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')); // List of modules qualified for external user management |
|
1942 | + $listofmodules = explode(',', getDolGlobalString('MAIN_MODULES_FOR_EXTERNAL')); // List of modules qualified for external user management |
|
1943 | 1943 | |
1944 | 1944 | $i = 0; |
1945 | 1945 | if (!empty($modules)) { |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | } else { |
147 | 147 | dol_syslog('Failed to count actioncomm '.$db->lasterror(), LOG_ERR); |
148 | 148 | } |
149 | - dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
149 | + dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result. |
|
150 | 150 | } |
151 | 151 | |
152 | 152 | $head[$h][1] .= '/'; |
@@ -212,10 +212,10 @@ discard block |
||
212 | 212 | $dispachedLines = $object->getDispachedLines(1); |
213 | 213 | $nbDispachedLines = count($dispachedLines); |
214 | 214 | |
215 | - for ($line = 0 ; $line < $nbDispachedLines; $line++) { |
|
215 | + for ($line = 0; $line < $nbDispachedLines; $line++) { |
|
216 | 216 | $sumQtyAllreadyDispatched += $dispachedLines[$line]['qty']; |
217 | 217 | } |
218 | - for ($line = 0 ; $line < $nbLinesOrdered; $line++) { |
|
218 | + for ($line = 0; $line < $nbLinesOrdered; $line++) { |
|
219 | 219 | //If line is a product of conf to manage stocks for services |
220 | 220 | if ($object->lines[$line]->product_type == 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) { |
221 | 221 | $sumQtyOrdered += $object->lines[$line]->qty; |