Passed
Push — GENERAL_BUG_REVIEW_240911 ( 776d89...c757bd )
by Rafael
50:33
created
public/htdocs/core/lib/security.lib.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
         return bin2hex(random_bytes((int) floor($length / 2))); // the bin2hex will double the number of bytes so we take length / 2
107 107
     }
108 108
 
109
-    return bin2hex(openssl_random_pseudo_bytes((int) floor($length / 2)));      // the bin2hex will double the number of bytes so we take length / 2. May be very slow on Windows.
109
+    return bin2hex(openssl_random_pseudo_bytes((int) floor($length / 2))); // the bin2hex will double the number of bytes so we take length / 2. May be very slow on Windows.
110 110
 }
111 111
 
112 112
 /**
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
 function dol_verifyHash($chain, $hash, $type = '0')
286 286
 {
287 287
     if ($type == '0' && getDolGlobalString('MAIN_SECURITY_HASH_ALGO') && getDolGlobalString('MAIN_SECURITY_HASH_ALGO') == 'password_hash' && function_exists('password_verify')) {
288
-        if (! empty($hash[0]) && $hash[0] == '$') {
288
+        if (!empty($hash[0]) && $hash[0] == '$') {
289 289
             return password_verify($chain, $hash);
290 290
         } elseif (dol_strlen($hash) == 32) {
291 291
             return dol_verifyHash($chain, $hash, '3'); // md5
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
     } elseif ($type === 'crypt') {
340 340
         return '{CRYPT}' . crypt($password, $salt);
341 341
     } elseif ($type === 'clear') {
342
-        return '{CLEAR}' . $password;  // Just for test, plain text password is not secured !
342
+        return '{CLEAR}' . $password; // Just for test, plain text password is not secured !
343 343
     }
344 344
     return "";
345 345
 }
@@ -372,13 +372,13 @@  discard block
 block discarded – undo
372 372
     if (is_object($object)) {
373 373
         $objectid = $object->id;
374 374
     } else {
375
-        $objectid = $object;        // $objectid can be X or 'X,Y,Z'
375
+        $objectid = $object; // $objectid can be X or 'X,Y,Z'
376 376
     }
377 377
     if ($objectid == "-1") {
378 378
         $objectid = 0;
379 379
     }
380 380
     if ($objectid) {
381
-        $objectid = preg_replace('/[^0-9\.\,]/', '', (string) $objectid);   // For the case value is coming from a non sanitized user input
381
+        $objectid = preg_replace('/[^0-9\.\,]/', '', (string) $objectid); // For the case value is coming from a non sanitized user input
382 382
     }
383 383
 
384 384
     //dol_syslog("functions.lib:restrictedArea $feature, $objectid, $dbtablename, $feature2, $dbt_socfield, $dbt_select, $isdraft");
@@ -863,9 +863,9 @@  discard block
 block discarded – undo
863 863
     if (is_object($object)) {
864 864
         $objectid = $object->id;
865 865
     } else {
866
-        $objectid = $object;        // $objectid can be X or 'X,Y,Z'
866
+        $objectid = $object; // $objectid can be X or 'X,Y,Z'
867 867
     }
868
-    $objectid = preg_replace('/[^0-9\.\,]/', '', $objectid);    // For the case value is coming from a non sanitized user input
868
+    $objectid = preg_replace('/[^0-9\.\,]/', '', $objectid); // For the case value is coming from a non sanitized user input
869 869
 
870 870
     //dol_syslog("functions.lib:restrictedArea $feature, $objectid, $dbtablename, $feature2, $dbt_socfield, $dbt_select, $isdraft");
871 871
     //print "user_id=".$user->id.", features=".join(',', $featuresarray).", objectid=".$objectid;
@@ -915,7 +915,7 @@  discard block
 block discarded – undo
915 915
         $checkparentsoc = array('agenda', 'contact', 'contrat'); // Test on entity + link to third party on field $dbt_keyfield. Allowed if link is empty (Ex: contacts...).
916 916
         $checkproject = array('projet', 'project'); // Test for project object
917 917
         $checktask = array('projet_task'); // Test for task object
918
-        $checkhierarchy = array('expensereport', 'holiday');    // check permission among the hierarchy of user
918
+        $checkhierarchy = array('expensereport', 'holiday'); // check permission among the hierarchy of user
919 919
         $checkuser = array('bookmark'); // check permission among the fk_user (must be myself or null)
920 920
         $nocheck = array('barcode', 'stock'); // No test
921 921
 
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
 
930 930
         // To avoid an access forbidden with a numeric ref
931 931
         if ($dbt_select != 'rowid' && $dbt_select != 'id') {
932
-            $objectid = "'" . $objectid . "'";  // Note: $objectid was already cast into int at begin of this method.
932
+            $objectid = "'" . $objectid . "'"; // Note: $objectid was already cast into int at begin of this method.
933 933
         }
934 934
         // Check permission for objectid on entity only
935 935
         if (in_array($feature, $check) && $objectid > 0) {      // For $objectid = 0, no check
Please login to merge, or discard this patch.
public/htdocs/core/lib/pdf.lib.php 1 patch
Spacing   +15 added lines, -17 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 
185 185
     $pdfa = false; // PDF-1.3
186 186
     if (getDolGlobalString('PDF_USE_A')) {
187
-        $pdfa = getDolGlobalString('PDF_USE_A');    // PDF/A-1 ou PDF/A-3
187
+        $pdfa = getDolGlobalString('PDF_USE_A'); // PDF/A-1 ou PDF/A-3
188 188
     }
189 189
 
190 190
     if (!getDolGlobalString('MAIN_DISABLE_TCPDI') && class_exists('TCPDI')) {
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
     $outputlangs->load("dict");
1027 1027
     $line = '';
1028 1028
     $reg = array();
1029
-    $marginwithfooter = 0;  // Return value
1029
+    $marginwithfooter = 0; // Return value
1030 1030
 
1031 1031
     $dims = $pdf->getPageDimensions();
1032 1032
 
@@ -1157,7 +1157,7 @@  discard block
 block discarded – undo
1157 1157
         $line4 .= ($line4 ? " - " : "") . $field . ": " . $outputlangs->convToOutputCharset($fromcompany->idprof5);
1158 1158
     }
1159 1159
     // Prof Id 6
1160
-    if (!empty($fromcompany->idprof6) &&  $fromcompany->idprof6) {
1160
+    if (!empty($fromcompany->idprof6) && $fromcompany->idprof6) {
1161 1161
         $field = $outputlangs->transcountrynoentities("ProfId6", $fromcompany->country_code);
1162 1162
         if (preg_match('/\((.*)\)/i', $field, $reg)) {
1163 1163
             $field = $reg[1];
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
         $line4 .= ($line4 ? " - " : "") . $field . ": " . $outputlangs->convToOutputCharset($fromcompany->idprof6);
1166 1166
     }
1167 1167
     // Prof Id 7
1168
-    if (!empty($fromcompany->idprof7) &&  $fromcompany->idprof7) {
1168
+    if (!empty($fromcompany->idprof7) && $fromcompany->idprof7) {
1169 1169
         $field = $outputlangs->transcountrynoentities("ProfId7", $fromcompany->country_code);
1170 1170
         if (preg_match('/\((.*)\)/i', $field, $reg)) {
1171 1171
             $field = $reg[1];
@@ -1173,7 +1173,7 @@  discard block
 block discarded – undo
1173 1173
         $line4 .= ($line4 ? " - " : "") . $field . ": " . $outputlangs->convToOutputCharset($fromcompany->idprof7);
1174 1174
     }
1175 1175
     // Prof Id 8
1176
-    if (!empty($fromcompany->idprof8) &&  $fromcompany->idprof8) {
1176
+    if (!empty($fromcompany->idprof8) && $fromcompany->idprof8) {
1177 1177
         $field = $outputlangs->transcountrynoentities("ProfId8", $fromcompany->country_code);
1178 1178
         if (preg_match('/\((.*)\)/i', $field, $reg)) {
1179 1179
             $field = $reg[1];
@@ -1181,7 +1181,7 @@  discard block
 block discarded – undo
1181 1181
         $line4 .= ($line4 ? " - " : "") . $field . ": " . $outputlangs->convToOutputCharset($fromcompany->idprof8);
1182 1182
     }
1183 1183
     // Prof Id 9
1184
-    if (!empty($fromcompany->idprof9) &&  $fromcompany->idprof9) {
1184
+    if (!empty($fromcompany->idprof9) && $fromcompany->idprof9) {
1185 1185
         $field = $outputlangs->transcountrynoentities("ProfId9", $fromcompany->country_code);
1186 1186
         if (preg_match('/\((.*)\)/i', $field, $reg)) {
1187 1187
             $field = $reg[1];
@@ -1189,7 +1189,7 @@  discard block
 block discarded – undo
1189 1189
         $line4 .= ($line4 ? " - " : "") . $field . ": " . $outputlangs->convToOutputCharset($fromcompany->idprof9);
1190 1190
     }
1191 1191
     // Prof Id 10
1192
-    if (!empty($fromcompany->idprof10) &&  $fromcompany->idprof10) {
1192
+    if (!empty($fromcompany->idprof10) && $fromcompany->idprof10) {
1193 1193
         $field = $outputlangs->transcountrynoentities("ProfId10", $fromcompany->country_code);
1194 1194
         if (preg_match('/\((.*)\)/i', $field, $reg)) {
1195 1195
             $field = $reg[1];
@@ -1197,7 +1197,7 @@  discard block
 block discarded – undo
1197 1197
         $line4 .= ($line4 ? " - " : "") . $field . ": " . $outputlangs->convToOutputCharset($fromcompany->idprof10);
1198 1198
     }
1199 1199
     // IntraCommunautary VAT
1200
-    if (!empty($fromcompany->tva_intra)  && $fromcompany->tva_intra != '') {
1200
+    if (!empty($fromcompany->tva_intra) && $fromcompany->tva_intra != '') {
1201 1201
         $line4 .= ($line4 ? " - " : "") . $outputlangs->transnoentities("VATIntraShort") . ": " . $outputlangs->convToOutputCharset($fromcompany->tva_intra);
1202 1202
     }
1203 1203
 
@@ -1366,7 +1366,7 @@  discard block
 block discarded – undo
1366 1366
 
1367 1367
     $pagination = $pdf->PageNo() . ' / ' . $pdf->getAliasNbPages();
1368 1368
     $fontRenderCorrection = 0;
1369
-    if (in_array(pdf_getPDFFont($outputlangs), array('freemono',  'DejaVuSans'))) {
1369
+    if (in_array(pdf_getPDFFont($outputlangs), array('freemono', 'DejaVuSans'))) {
1370 1370
         $fontRenderCorrection = 10;
1371 1371
     }
1372 1372
     $pdf->MultiCell(18 + $fontRenderCorrection, 2, $pagination, 0, 'R', 0);
@@ -1463,7 +1463,7 @@  discard block
 block discarded – undo
1463 1463
 
1464 1464
         if (getDolGlobalString('MARGIN_TOP_ZERO_UL')) {
1465 1465
             $pdf->setListIndentWidth(5);
1466
-            $TMarginList = ['ul' => [['h' => 0.1, ],['h' => 0.1, ]], 'li' => [['h' => 0.1, ],],];
1466
+            $TMarginList = ['ul' => [['h' => 0.1, ], ['h' => 0.1, ]], 'li' => [['h' => 0.1, ], ], ];
1467 1467
             $pdf->setHtmlVSpace($TMarginList);
1468 1468
         }
1469 1469
 
@@ -1585,8 +1585,7 @@  discard block
 block discarded – undo
1585 1585
                     $libelleproduitservice = dol_concatdesc(
1586 1586
                         dol_concatdesc($libelleproduitservice, " * " . $subprodval[3]),
1587 1587
                         (!empty($qtyText) ?
1588
-                            $outputlangs->trans('Qty') . ':' . $qtyText . ' x ' . $outputlangs->trans('AssociatedProducts') . ':' . $subprodval[1] . '= ' . $outputlangs->trans('QtyTot') . ':' . $subprodval[1] * $qtyText :
1589
-                            $outputlangs->trans('Qty') . ' ' . $outputlangs->trans('AssociatedProducts') . ':' . $subprodval[1])
1588
+                            $outputlangs->trans('Qty') . ':' . $qtyText . ' x ' . $outputlangs->trans('AssociatedProducts') . ':' . $subprodval[1] . '= ' . $outputlangs->trans('QtyTot') . ':' . $subprodval[1] * $qtyText : $outputlangs->trans('Qty') . ' ' . $outputlangs->trans('AssociatedProducts') . ':' . $subprodval[1])
1590 1589
                     );
1591 1590
                 }
1592 1591
             } else {
@@ -1594,8 +1593,7 @@  discard block
 block discarded – undo
1594 1593
                     $libelleproduitservice = dol_concatdesc(
1595 1594
                         dol_concatdesc($libelleproduitservice, " * " . $subprodval[5] . (($subprodval[5] && $subprodval[3]) ? ' - ' : '') . $subprodval[3]),
1596 1595
                         (!empty($qtyText) ?
1597
-                            $outputlangs->trans('Qty') . ':' . $qtyText . ' x ' . $outputlangs->trans('AssociatedProducts') . ':' . $subprodval[1] . '= ' . $outputlangs->trans('QtyTot') . ':' . $subprodval[1] * $qtyText :
1598
-                            $outputlangs->trans('Qty') . ' ' . $outputlangs->trans('AssociatedProducts') . ':' . $subprodval[1])
1596
+                            $outputlangs->trans('Qty') . ':' . $qtyText . ' x ' . $outputlangs->trans('AssociatedProducts') . ':' . $subprodval[1] . '= ' . $outputlangs->trans('QtyTot') . ':' . $subprodval[1] * $qtyText : $outputlangs->trans('Qty') . ' ' . $outputlangs->trans('AssociatedProducts') . ':' . $subprodval[1])
1599 1597
                     );
1600 1598
                 }
1601 1599
             }
@@ -2555,7 +2553,7 @@  discard block
 block discarded – undo
2555 2553
                         }
2556 2554
                     }
2557 2555
 
2558
-                    if (! is_object($order)) {
2556
+                    if (!is_object($order)) {
2559 2557
                         $object->note_public = dol_concatdesc($object->note_public, $outputlangs->transnoentities($elementobject->ref));
2560 2558
                     } else {
2561 2559
                         $object->note_public = dol_concatdesc($object->note_public, $outputlangs->convToOutputCharset($order->ref) . ($order->ref_client ? ' (' . $order->ref_client . ')' : ''));
@@ -2578,7 +2576,7 @@  discard block
 block discarded – undo
2578 2576
                     }
2579 2577
                 }
2580 2578
 
2581
-                if (! is_object($order)) {
2579
+                if (!is_object($order)) {
2582 2580
                     $linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefSending");
2583 2581
                     if (empty($linkedobjects[$objecttype]['ref_value'])) {
2584 2582
                         $linkedobjects[$objecttype]['ref_value'] = '';
@@ -2680,7 +2678,7 @@  discard block
 block discarded – undo
2680 2678
                 if (isset($hookmanager->resArray['linetotalremise'])) {
2681 2679
                     return $hookmanager->resArray['linetotalremise'];
2682 2680
                 } else {
2683
-                    return (float) $hookmanager->resPrint;  // For backward compatibility
2681
+                    return (float) $hookmanager->resPrint; // For backward compatibility
2684 2682
                 }
2685 2683
             }
2686 2684
         }
Please login to merge, or discard this patch.
public/htdocs/core/lib/modulebuilder.lib.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1387,7 +1387,7 @@
 block discarded – undo
1387 1387
 
1388 1388
     // build format asciidoc for urls in table
1389 1389
     if (!$error) {
1390
-		$asciiDocTable = "[options=\"header\"]\n|===\n|Object | URLs\n";  // phpcs:ignore
1390
+        $asciiDocTable = "[options=\"header\"]\n|===\n|Object | URLs\n";  // phpcs:ignore
1391 1391
         foreach ($groupedUrls as $objectName => $urls) {
1392 1392
             $urlsList = implode(" +\n*", $urls);
1393 1393
             $asciiDocTable .= "|$objectName | \n*$urlsList +\n";
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -277,22 +277,22 @@  discard block
 block discarded – undo
277 277
     // Edit .sql file
278 278
     if ($moduletype == 'internal') {
279 279
         $pathoffiletoeditsrc = '/../install/mysql/tables/llx_' . strtolower($module) . '_' . strtolower($objectname) . '.sql';
280
-        if (! dol_is_file($readdir . $pathoffiletoeditsrc)) {
280
+        if (!dol_is_file($readdir . $pathoffiletoeditsrc)) {
281 281
             $pathoffiletoeditsrc = '/../install/mysql/tables/llx_' . strtolower($module) . '_' . strtolower($objectname) . '-' . strtolower($module) . '.sql';
282
-            if (! dol_is_file($readdir . $pathoffiletoeditsrc)) {
282
+            if (!dol_is_file($readdir . $pathoffiletoeditsrc)) {
283 283
                 $pathoffiletoeditsrc = '/../install/mysql/tables/llx_' . strtolower($module) . '-' . strtolower($module) . '.sql';
284
-                if (! dol_is_file($readdir . $pathoffiletoeditsrc)) {
284
+                if (!dol_is_file($readdir . $pathoffiletoeditsrc)) {
285 285
                     $pathoffiletoeditsrc = '/../install/mysql/tables/llx_' . strtolower($module) . '.sql';
286 286
                 }
287 287
             }
288 288
         }
289 289
     } else {
290 290
         $pathoffiletoeditsrc = '/sql/llx_' . strtolower($module) . '_' . strtolower($objectname) . '.sql';
291
-        if (! dol_is_file($readdir . $pathoffiletoeditsrc)) {
291
+        if (!dol_is_file($readdir . $pathoffiletoeditsrc)) {
292 292
             $pathoffiletoeditsrc = '/sql/llx_' . strtolower($module) . '_' . strtolower($objectname) . '-' . strtolower($module) . '.sql';
293
-            if (! dol_is_file($readdir . $pathoffiletoeditsrc)) {
293
+            if (!dol_is_file($readdir . $pathoffiletoeditsrc)) {
294 294
                 $pathoffiletoeditsrc = '/sql/llx_' . strtolower($module) . '-' . strtolower($module) . '.sql';
295
-                if (! dol_is_file($readdir . $pathoffiletoeditsrc)) {
295
+                if (!dol_is_file($readdir . $pathoffiletoeditsrc)) {
296 296
                     $pathoffiletoeditsrc = '/sql/llx_' . strtolower($module) . '.sql';
297 297
                 }
298 298
             }
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
 {
736 736
 
737 737
     // stock all properties in array
738
-    $attributesUnique = array('type','label', 'enabled', 'position', 'notnull', 'visible', 'noteditable', 'index', 'default' , 'foreignkey', 'arrayofkeyval', 'alwayseditable','validate', 'searchall','comment', 'isameasure', 'css', 'cssview','csslist', 'help', 'showoncombobox','picto' );
738
+    $attributesUnique = array('type', 'label', 'enabled', 'position', 'notnull', 'visible', 'noteditable', 'index', 'default', 'foreignkey', 'arrayofkeyval', 'alwayseditable', 'validate', 'searchall', 'comment', 'isameasure', 'css', 'cssview', 'csslist', 'help', 'showoncombobox', 'picto');
739 739
 
740 740
     $start = "public \$fields=array(";
741 741
     $end = ");";
@@ -915,7 +915,7 @@  discard block
 block discarded – undo
915 915
     $string = "[options='header',grid=rows,width=60%,caption=Organisation]\n";
916 916
     $string .= "|===\n";
917 917
     // header for table
918
-    $header = array($langs->trans('Objects'),$langs->trans('Permission'));
918
+    $header = array($langs->trans('Objects'), $langs->trans('Permission'));
919 919
     foreach ($header as $h) {
920 920
         $string .= "|" . $h;
921 921
     }
@@ -1248,7 +1248,7 @@  discard block
 block discarded – undo
1248 1248
                  * @param mixed $val
1249 1249
                  * @return string|int
1250 1250
                  */
1251
-                function ($val) use ($module) {
1251
+                function($val) use ($module) {
1252 1252
                     return is_bool($val) ? "isModEnabled('$module')" : $val;
1253 1253
                 },
1254 1254
                 $value
@@ -1269,7 +1269,7 @@  discard block
 block discarded – undo
1269 1269
                          * @param string $val
1270 1270
                          * @return string
1271 1271
                          */
1272
-                        static function ($val) {
1272
+                        static function($val) {
1273 1273
                             return "'$val'";
1274 1274
                         },
1275 1275
                         $value
@@ -1363,7 +1363,7 @@  discard block
 block discarded – undo
1363 1363
     $dictionnaires['tabfieldvalue'][] = (array_key_exists('code', $columns) && array_key_exists('label', $columns) ? 'code,label' : '');
1364 1364
     $dictionnaires['tabfieldinsert'][] = (array_key_exists('code', $columns) && array_key_exists('label', $columns) ? 'code,label' : '');
1365 1365
     $dictionnaires['tabrowid'][] = $primaryKey;
1366
-    $dictionnaires['tabcond'][] = isModEnabled('$modulename');  // @phan-suppress-current-line UnknownModuleName
1366
+    $dictionnaires['tabcond'][] = isModEnabled('$modulename'); // @phan-suppress-current-line UnknownModuleName
1367 1367
     $dictionnaires['tabhelp'][] = (array_key_exists('code', $columns) ? array('code' => $langs->trans('CodeTooltipHelp'), 'field2' => 'field2tooltip') : '');
1368 1368
 
1369 1369
     // Build the dictionary string
@@ -1417,7 +1417,7 @@  discard block
 block discarded – undo
1417 1417
 
1418 1418
     // build format asciidoc for urls in table
1419 1419
     if (!$error) {
1420
-		$asciiDocTable = "[options=\"header\"]\n|===\n|Object | URLs\n";  // phpcs:ignore
1420
+		$asciiDocTable = "[options=\"header\"]\n|===\n|Object | URLs\n"; // phpcs:ignore
1421 1421
         foreach ($groupedUrls as $objectName => $urls) {
1422 1422
             $urlsList = implode(" +\n*", $urls);
1423 1423
             $asciiDocTable .= "|$objectName | \n*$urlsList +\n";
Please login to merge, or discard this patch.
public/htdocs/core/lib/fichinter.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
             } else {
145 145
                 dol_syslog('Failed to count actioncomm ' . $db->lasterror(), LOG_ERR);
146 146
             }
147
-            dol_setcache($cachekey, $nbEvent, 120);     // If setting cache fails, this is not a problem, so we do not test result.
147
+            dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
148 148
         }
149 149
 
150 150
         $head[$h][1] .= '/';
Please login to merge, or discard this patch.
public/htdocs/core/lib/website.lib.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 {
82 82
     $str = str_replace('<?=', '<?php', $str);
83 83
     $str = str_replace('<?php', '__LTINTPHP__', $str);
84
-    $str = str_replace('<?', '<?php', $str);            // replace the short_open_tag. It is recommended to set this is Off in php.ini
84
+    $str = str_replace('<?', '<?php', $str); // replace the short_open_tag. It is recommended to set this is Off in php.ini
85 85
     $str = str_replace('__LTINTPHP__', '<?php', $str);
86 86
 
87 87
     $newstr = '';
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
             $sql .= " WHERE rowid = " . ((int) $websiteid);
471 471
 
472 472
             $resql = $db->query($sql);
473
-            if (! $resql) {
473
+            if (!$resql) {
474 474
                 return -1;
475 475
             }
476 476
         }
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
             unset($tmpwebsitepage);
558 558
         }
559 559
         if ($result > 0) {
560
-            $currenturi = $_SERVER["REQUEST_URI"];  // Example: /public/website/index.php?website=mywebsite.com&pageref=mywebsite-home&nocache=1708177483
560
+            $currenturi = $_SERVER["REQUEST_URI"]; // Example: /public/website/index.php?website=mywebsite.com&pageref=mywebsite-home&nocache=1708177483
561 561
             $regtmp = array();
562 562
             if (preg_match('/&pageref=([^&]+)/', $currenturi, $regtmp)) {
563 563
                 if ($regtmp[0] == $containerref) {
@@ -1009,9 +1009,9 @@  discard block
 block discarded – undo
1009 1009
     $sql = "SELECT COUNT(rowid) as nb";
1010 1010
     $sql .= " FROM " . MAIN_DB_PREFIX . "ecm_files";
1011 1011
     $sql .= " WHERE entity IN (" . getEntity($object->element) . ")";
1012
-    $sql .= " AND src_object_type = '" . $db->escape($object->element) . "' AND src_object_id = " . ((int) $object->id);  // Filter on object
1012
+    $sql .= " AND src_object_type = '" . $db->escape($object->element) . "' AND src_object_id = " . ((int) $object->id); // Filter on object
1013 1013
     $sql .= " AND " . $db->regexpsql('filename', $regexforimg, 1);
1014
-    $sql .= " AND share IS NOT NULL";   // Only image that are public
1014
+    $sql .= " AND share IS NOT NULL"; // Only image that are public
1015 1015
 
1016 1016
     $resql = $db->query($sql);
1017 1017
     if ($resql) {
@@ -1046,7 +1046,7 @@  discard block
 block discarded – undo
1046 1046
     $sql = "SELECT rowid, ref, share, filename, cover, position";
1047 1047
     $sql .= " FROM " . MAIN_DB_PREFIX . "ecm_files";
1048 1048
     $sql .= " WHERE entity IN (" . getEntity($object->element) . ")";
1049
-    $sql .= " AND src_object_type = '" . $db->escape($object->element) . "' AND src_object_id = " . ((int) $object->id);  // Filter on object
1049
+    $sql .= " AND src_object_type = '" . $db->escape($object->element) . "' AND src_object_id = " . ((int) $object->id); // Filter on object
1050 1050
     $sql .= " AND " . $db->regexpsql('filename', $regexforimg, 1);
1051 1051
     $sql .= $db->order("cover,position,rowid", "ASC,ASC,ASC");
1052 1052
 
Please login to merge, or discard this patch.
public/htdocs/core/lib/usergroups.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -213,7 +213,7 @@
 block discarded – undo
213 213
                 } else {
214 214
                     dol_syslog('Failed to count actioncomm ' . $db->lasterror(), LOG_ERR);
215 215
                 }
216
-                dol_setcache($cachekey, $nbEvent, 120);     // If setting cache fails, this is not a problem, so we do not test result.
216
+                dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
217 217
             }
218 218
 
219 219
             $head[$h][1] .= '/';
Please login to merge, or discard this patch.
public/htdocs/core/lib/contact.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
             } else {
86 86
                 dol_print_error($db);
87 87
             }
88
-            dol_setcache($cachekey, $nbProject, 120);   // If setting cache fails, this is not a problem, so we do not test result.
88
+            dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result.
89 89
         }
90 90
         $head[$tab][0] = constant('BASE_URL') . '/contact/project.php?id=' . $object->id;
91 91
         $head[$tab][1] = $langs->trans("Projects");
Please login to merge, or discard this patch.
public/htdocs/core/lib/contract.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
             } else {
145 145
                 dol_syslog('Failed to count actioncomm ' . $db->lasterror(), LOG_ERR);
146 146
             }
147
-            dol_setcache($cachekey, $nbEvent, 120);     // If setting cache fails, this is not a problem, so we do not test result.
147
+            dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
148 148
         }
149 149
 
150 150
         $head[$h][1] .= '/';
Please login to merge, or discard this patch.
public/htdocs/core/lib/order.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
             } else {
145 145
                 dol_syslog('Failed to count actioncomm ' . $db->lasterror(), LOG_ERR);
146 146
             }
147
-            dol_setcache($cachekey, $nbEvent, 120);     // If setting cache fails, this is not a problem, so we do not test result.
147
+            dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
148 148
         }
149 149
 
150 150
         $head[$h][1] .= '/';
Please login to merge, or discard this patch.