Passed
Push — dev ( 162356...096618 )
by Rafael
70:47 queued 05:12
created
public/htdocs/comm/action/pertype.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 //if (! ($usergroup > 0) && ! ($filtert > 0)) $filtert = $user->id;
58 58
 
59 59
 // $showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1;
60
-$showbirthday = 0;    // will be hidden here
60
+$showbirthday = 0; // will be hidden here
61 61
 
62 62
 // If not choice done on calendar owner, we filter on user.
63 63
 if (empty($filtert) && !getDolGlobalString('AGENDA_ALL_CALENDARS')) {
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
 
258 258
 $week = $prev['week'];
259 259
 
260
-$day = (int)$day;
260
+$day = (int) $day;
261 261
 $next = dol_get_next_day($day, $month, $year);
262 262
 $next_year = $year + 1;
263 263
 $next_month = $month;
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
     }
289 289
 }
290 290
 if ($resourceid > 0) {
291
-    $param .= "&search_resourceid=" . urlencode((string)($resourceid));
291
+    $param .= "&search_resourceid=" . urlencode((string) ($resourceid));
292 292
 }
293 293
 if ($status || GETPOSTISSET('status') || GETPOSTISSET('search_status')) {
294 294
     $param .= "&search_status=" . urlencode($status);
@@ -300,16 +300,16 @@  discard block
 block discarded – undo
300 300
     $param .= "&search_filtert=" . urlencode($filtert);
301 301
 }
302 302
 if ($usergroup > 0) {
303
-    $param .= "&search_usergroup=" . urlencode((string)($usergroup));
303
+    $param .= "&search_usergroup=" . urlencode((string) ($usergroup));
304 304
 }
305 305
 if ($socid > 0) {
306
-    $param .= "&search_socid=" . urlencode((string)($socid));
306
+    $param .= "&search_socid=" . urlencode((string) ($socid));
307 307
 }
308 308
 if ($showbirthday) {
309 309
     $param .= "&search_showbirthday=1";
310 310
 }
311 311
 if ($pid) {
312
-    $param .= "&search_projectid=" . urlencode((string)($pid));
312
+    $param .= "&search_projectid=" . urlencode((string) ($pid));
313 313
 }
314 314
 if ($type) {
315 315
     $param .= "&search_type=" . urlencode($type);
@@ -324,12 +324,12 @@  discard block
 block discarded – undo
324 324
     $param .= '&end_h=' . urlencode($end_h);
325 325
 }
326 326
 if ($begin_d != '') {
327
-    $param .= '&begin_d=' . urlencode((string)($begin_d));
327
+    $param .= '&begin_d=' . urlencode((string) ($begin_d));
328 328
 }
329 329
 if ($end_d != '') {
330
-    $param .= '&end_d=' . urlencode((string)($end_d));
330
+    $param .= '&end_d=' . urlencode((string) ($end_d));
331 331
 }
332
-$param .= "&maxprint=" . urlencode((string)($maxprint));
332
+$param .= "&maxprint=" . urlencode((string) ($maxprint));
333 333
 
334 334
 $paramnoactionodate = $param;
335 335
 
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 
344 344
 $week = $prev['week'];
345 345
 
346
-$day = (int)$day;
346
+$day = (int) $day;
347 347
 $next = dol_get_next_day(31, 12, $year);
348 348
 $next_year = $year + 1;
349 349
 $next_month = $month;
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 $nav .= ' <button type="submit" class="liste_titre button_search" name="button_search_x" value="x"><span class="fa fa-search"></span></button>';
377 377
 
378 378
 // Must be after the nav definition
379
-$param .= '&year=' . urlencode((string)($year)) . '&month=' . urlencode((string)($month)) . ($day ? '&day=' . urlencode((string)($day)) : '');
379
+$param .= '&year=' . urlencode((string) ($year)) . '&month=' . urlencode((string) ($month)) . ($day ? '&day=' . urlencode((string) ($day)) : '');
380 380
 //print 'x'.$param;
381 381
 
382 382
 
@@ -575,10 +575,10 @@  discard block
 block discarded – undo
575 575
     }
576 576
 }
577 577
 if ($resourceid > 0) {
578
-    $sql .= " AND r.element_type = 'action' AND r.element_id = a.id AND r.resource_id = " . ((int)$resourceid);
578
+    $sql .= " AND r.element_type = 'action' AND r.element_id = a.id AND r.resource_id = " . ((int) $resourceid);
579 579
 }
580 580
 if ($pid) {
581
-    $sql .= " AND a.fk_project = " . ((int)$pid);
581
+    $sql .= " AND a.fk_project = " . ((int) $pid);
582 582
 }
583 583
 // If the internal user must only see his customers, force searching by him
584 584
 $search_sale = 0;
@@ -590,12 +590,12 @@  discard block
 block discarded – undo
590 590
     if ($search_sale == -2) {
591 591
         $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc)";
592 592
     } elseif ($search_sale > 0) {
593
-        $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc AND sc.fk_user = " . ((int)$search_sale) . ")";
593
+        $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = a.fk_soc AND sc.fk_user = " . ((int) $search_sale) . ")";
594 594
     }
595 595
 }
596 596
 // Search on socid
597 597
 if ($socid) {
598
-    $sql .= " AND a.fk_soc = " . ((int)$socid);
598
+    $sql .= " AND a.fk_soc = " . ((int) $socid);
599 599
 }
600 600
 // We must filter on assignment table
601 601
 if ($filtert > 0 || $usergroup > 0) {
@@ -626,7 +626,7 @@  discard block
 block discarded – undo
626 626
     $sql .= ')';
627 627
 }
628 628
 if ($type) {
629
-    $sql .= " AND ca.id = " . ((int)$type);
629
+    $sql .= " AND ca.id = " . ((int) $type);
630 630
 }
631 631
 if ($status == '0') {
632 632
     $sql .= " AND a.percent = 0";
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
         $sql .= "ar.fk_element = " . $filtert;
653 653
     }
654 654
     if ($usergroup > 0) {
655
-        $sql .= ($filtert > 0 ? " OR " : "") . " ugu.fk_usergroup = " . ((int)$usergroup);
655
+        $sql .= ($filtert > 0 ? " OR " : "") . " ugu.fk_usergroup = " . ((int) $usergroup);
656 656
     }
657 657
     $sql .= ")";
658 658
 }
@@ -1003,7 +1003,7 @@  discard block
 block discarded – undo
1003 1003
         $mois = dol_print_date($daykey, '%m', 'tzuserrel');
1004 1004
         $jour = dol_print_date($daykey, '%d', 'tzuserrel');
1005 1005
 
1006
-        if ($day == $jour && (int)$month == (int)$mois && $year == $annee) {  // Is it the day we are looking for when calling function ?
1006
+        if ($day == $jour && (int) $month == (int) $mois && $year == $annee) {  // Is it the day we are looking for when calling function ?
1007 1007
             // Scan all event for this date
1008 1008
             foreach ($eventarray[$daykey] as $index => $event) {
1009 1009
                 //print 'daykey='.$daykey.' '.$year.'-'.$month.'-'.$day.' -> '.$event->id.' '.$index.' '.$annee.'-'.$mois.'-'.$jour."<br>\n";
@@ -1079,9 +1079,9 @@  discard block
 block discarded – undo
1079 1079
                     //if ($username->id == 1 && $day==1) print 'h='.$h;
1080 1080
                     $newcolor = ''; //init
1081 1081
                     if (empty($event->fulldayevent)) {
1082
-                        $a = dol_mktime((int)$h, 0, 0, $month, $day, $year, 'tzuserrel', 0);
1083
-                        $b = dol_mktime((int)$h, 30, 0, $month, $day, $year, 'tzuserrel', 0);
1084
-                        $c = dol_mktime((int)$h + 1, 0, 0, $month, $day, $year, 'tzuserrel', 0);
1082
+                        $a = dol_mktime((int) $h, 0, 0, $month, $day, $year, 'tzuserrel', 0);
1083
+                        $b = dol_mktime((int) $h, 30, 0, $month, $day, $year, 'tzuserrel', 0);
1084
+                        $c = dol_mktime((int) $h + 1, 0, 0, $month, $day, $year, 'tzuserrel', 0);
1085 1085
 
1086 1086
                         $dateendtouse = $event->date_end_in_calendar;
1087 1087
                         if ($dateendtouse == $event->date_start_in_calendar) {
Please login to merge, or discard this patch.
public/htdocs/knowledgemanagement/knowledgerecord_card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -426,7 +426,7 @@
 block discarded – undo
426 426
     print '<table class="border centpercent tableforfield">' . "\n";
427 427
 
428 428
     // Common attributes
429
-    $keyforbreak = 'fk_c_ticket_category';    // We change column just before this field
429
+    $keyforbreak = 'fk_c_ticket_category'; // We change column just before this field
430 430
     //unset($object->fields['fk_project']);             // Hide field already shown in banner
431 431
     //unset($object->fields['fk_soc']);                 // Hide field already shown in banner
432 432
     $object->fields['answer']['enabled'] = 0;
Please login to merge, or discard this patch.
public/htdocs/hrm/evaluation_card.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 require_once constant('DOL_DOCUMENT_ROOT') . '/hrm/lib/hrm_skillrank.lib.php';
46 46
 
47 47
 // Load translation files required by the page
48
-$langs->loadLangs(array('hrm', 'other', 'products'));  // why products?
48
+$langs->loadLangs(array('hrm', 'other', 'products')); // why products?
49 49
 
50 50
 // Get parameters
51 51
 $id = GETPOSTINT('id');
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
     if ($action == 'close') {
176 176
         // save evaldet lines to user;
177 177
         $sk = new SkillRank($db);
178
-        $SkillrecordsForActiveUser = $sk->fetchAll('ASC', 'fk_skill', 0, 0, "(fk_object:=:" . ((int)$object->fk_user) . ") AND (objecttype:=:'" . $db->escape(SkillRank::SKILLRANK_TYPE_USER) . "')", 'AND');
178
+        $SkillrecordsForActiveUser = $sk->fetchAll('ASC', 'fk_skill', 0, 0, "(fk_object:=:" . ((int) $object->fk_user) . ") AND (objecttype:=:'" . $db->escape(SkillRank::SKILLRANK_TYPE_USER) . "')", 'AND');
179 179
 
180 180
         $errors = 0;
181 181
         // we go through the evaldets of the eval
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
         $sql .= '  INNER JOIN ' . MAIN_DB_PREFIX . 'hrm_skilldet as skdet_user ON (skdet_user.fk_skill = sk.rowid AND skdet_user.rankorder = ed.rankorder)';
551 551
         //$sql .= "  LEFT JOIN " . MAIN_DB_PREFIX . "hrm_skillrank as skr ON (j.rowid = skr.fk_object AND skr.fk_skill = ed.fk_skill AND skr.objecttype = 'job')";
552 552
         $sql .= '  LEFT JOIN ' . MAIN_DB_PREFIX . 'hrm_skilldet as skdet_required ON (skdet_required.fk_skill = sk.rowid AND skdet_required.rankorder = ed.required_rank)';
553
-        $sql .= " WHERE e.rowid =" . ((int)$object->id);
553
+        $sql .= " WHERE e.rowid =" . ((int) $object->id);
554 554
 
555 555
         //      echo $sql;
556 556
 
Please login to merge, or discard this patch.
public/htdocs/hrm/job_card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 require_once constant('DOL_DOCUMENT_ROOT') . '/hrm/lib/hrm_job.lib.php';
42 42
 
43 43
 // Load translation files required by the page
44
-$langs->loadLangs(array('hrm', 'other', 'products'));   // why products?
44
+$langs->loadLangs(array('hrm', 'other', 'products')); // why products?
45 45
 
46 46
 // Get parameters
47 47
 $id = GETPOSTINT('id');
Please login to merge, or discard this patch.
public/htdocs/hrm/skill_card.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 require_once constant('DOL_DOCUMENT_ROOT') . '/hrm/lib/hrm_skill.lib.php';
42 42
 
43 43
 // Load translation files required by the page
44
-$langs->loadLangs(array('hrm', 'other', 'products'));  // why products?
44
+$langs->loadLangs(array('hrm', 'other', 'products')); // why products?
45 45
 
46 46
 // Get parameters
47 47
 $id = GETPOSTINT('id');
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
 
530 530
     // Default sort order (if not yet defined by previous GETPOST)
531 531
     if (!$sortfield) {
532
-        reset($objectline->fields);                    // Reset is required to avoid key() to return null.
532
+        reset($objectline->fields); // Reset is required to avoid key() to return null.
533 533
         $sortfield = "t." . key($objectline->fields); // Set here default search field. By default 1st field in definition.
534 534
     }
535 535
     if (!$sortorder) {
@@ -562,11 +562,11 @@  discard block
 block discarded – undo
562 562
     foreach ($objectline->fields as $key => $val) {
563 563
         // If $val['visible']==0, then we never show the field
564 564
         if (!empty($val['visible'])) {
565
-            $visible = (int)dol_eval($val['visible'], 1, 1, '1');
565
+            $visible = (int) dol_eval($val['visible'], 1, 1, '1');
566 566
             $arrayfields['t.' . $key] = array(
567 567
                 'label' => $val['label'],
568 568
                 'checked' => (($visible < 0) ? 0 : 1),
569
-                'enabled' => (abs($visible) != 3 && (int)dol_eval($val['enabled'], 1, 1, '1')),
569
+                'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1, 1, '1')),
570 570
                 'position' => $val['position'],
571 571
                 'help' => isset($val['help']) ? $val['help'] : ''
572 572
             );
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
     } else {
602 602
         $sql .= " WHERE 1 = 1 ";
603 603
     }
604
-    $sql .= " AND fk_skill = " . ((int)$id);
604
+    $sql .= " AND fk_skill = " . ((int) $id);
605 605
 
606 606
     $resql = $db->query($sql);
607 607
     $nbtotalofrecords = $db->num_rows($resql);
Please login to merge, or discard this patch.
public/htdocs/imports/emptyexample.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -99,8 +99,8 @@
 block discarded – undo
99 99
 }
100 100
 
101 101
 // List of targets fields
102
-$headerlinefields = array();    // Array of fields (label to show)
103
-$contentlinevalues = array();   // Array of example values
102
+$headerlinefields = array(); // Array of fields (label to show)
103
+$contentlinevalues = array(); // Array of example values
104 104
 $i = 0;
105 105
 foreach ($fieldstarget as $code => $label) {
106 106
     $withoutstar = preg_replace('/\*/', '', $fieldstarget[$code]);
Please login to merge, or discard this patch.
public/htdocs/imports/import.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 $endatlinenb = (GETPOST('endatlinenb') ? GETPOST('endatlinenb') : '');
149 149
 $updatekeys = (GETPOST('updatekeys', 'array') ? GETPOST('updatekeys', 'array') : array());
150 150
 $separator = (GETPOST('separator', 'nohtml') ? GETPOST('separator', 'nohtml', 3) : '');
151
-$enclosure = (GETPOST('enclosure', 'nohtml') ? GETPOST('enclosure', 'nohtml') : '"');  // We must use 'nohtml' and not 'alphanohtml' because we must accept "
151
+$enclosure = (GETPOST('enclosure', 'nohtml') ? GETPOST('enclosure', 'nohtml') : '"'); // We must use 'nohtml' and not 'alphanohtml' because we must accept "
152 152
 $charset = GETPOST('charset', 'aZ09');
153 153
 $separator_used = str_replace('\t', "\t", $separator);
154 154
 
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
     $maxfilesizearray = getMaxFileSizeArray();
616 616
     $maxmin = $maxfilesizearray['maxmin'];
617 617
     if ($maxmin > 0) {
618
-        print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
618
+        print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
619 619
     }
620 620
     print '<input type="file" name="userfile" size="20" maxlength="80"> &nbsp; &nbsp; ';
621 621
     $out = (!getDolGlobalString('MAIN_UPLOAD_DOC') ? ' disabled' : '');
@@ -625,29 +625,29 @@  discard block
 block discarded – undo
625 625
         $max = getDolGlobalString('MAIN_UPLOAD_DOC'); // In Kb
626 626
         $maxphp = @ini_get('upload_max_filesize'); // In unknown
627 627
         if (preg_match('/k$/i', $maxphp)) {
628
-            $maxphp = (int)substr($maxphp, 0, -1);
628
+            $maxphp = (int) substr($maxphp, 0, -1);
629 629
         }
630 630
         if (preg_match('/m$/i', $maxphp)) {
631
-            $maxphp = (int)substr($maxphp, 0, -1) * 1024;
631
+            $maxphp = (int) substr($maxphp, 0, -1) * 1024;
632 632
         }
633 633
         if (preg_match('/g$/i', $maxphp)) {
634
-            $maxphp = (int)substr($maxphp, 0, -1) * 1024 * 1024;
634
+            $maxphp = (int) substr($maxphp, 0, -1) * 1024 * 1024;
635 635
         }
636 636
         if (preg_match('/t$/i', $maxphp)) {
637
-            $maxphp = (int)substr($maxphp, 0, -1) * 1024 * 1024 * 1024;
637
+            $maxphp = (int) substr($maxphp, 0, -1) * 1024 * 1024 * 1024;
638 638
         }
639 639
         $maxphp2 = @ini_get('post_max_size'); // In unknown
640 640
         if (preg_match('/k$/i', $maxphp2)) {
641
-            $maxphp2 = (int)substr($maxphp2, 0, -1);
641
+            $maxphp2 = (int) substr($maxphp2, 0, -1);
642 642
         }
643 643
         if (preg_match('/m$/i', $maxphp2)) {
644
-            $maxphp2 = (int)substr($maxphp2, 0, -1) * 1024;
644
+            $maxphp2 = (int) substr($maxphp2, 0, -1) * 1024;
645 645
         }
646 646
         if (preg_match('/g$/i', $maxphp2)) {
647
-            $maxphp2 = (int)substr($maxphp2, 0, -1) * 1024 * 1024;
647
+            $maxphp2 = (int) substr($maxphp2, 0, -1) * 1024 * 1024;
648 648
         }
649 649
         if (preg_match('/t$/i', $maxphp2)) {
650
-            $maxphp2 = (int)substr($maxphp2, 0, -1) * 1024 * 1024 * 1024;
650
+            $maxphp2 = (int) substr($maxphp2, 0, -1) * 1024 * 1024 * 1024;
651 651
         }
652 652
         // Now $max and $maxphp and $maxphp2 are in Kb
653 653
         $maxmin = $max;
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
     //var_dump($_SESSION["dol_array_match_file_to_database_select"]);
735 735
     $serialized_array_match_file_to_database = isset($_SESSION["dol_array_match_file_to_database_select"]) ? $_SESSION["dol_array_match_file_to_database_select"] : '';
736 736
     $fieldsarray = explode(',', $serialized_array_match_file_to_database);
737
-    $array_match_file_to_database = array();        // Same than $fieldsarray but with mapped value only  (col1 => 's.fielda', col2 => 's.fieldb'...)
737
+    $array_match_file_to_database = array(); // Same than $fieldsarray but with mapped value only  (col1 => 's.fielda', col2 => 's.fieldb'...)
738 738
     foreach ($fieldsarray as $elem) {
739 739
         $tabelem = explode('=', $elem, 2);
740 740
         $key = $tabelem[0];
@@ -1088,7 +1088,7 @@  discard block
 block discarded – undo
1088 1088
     foreach ($fieldstarget as $code => $line) {
1089 1089
         //var_dump($line);
1090 1090
 
1091
-        $tmparray = explode('|', $line["label"]);   // If label of field is several translation keys separated with |
1091
+        $tmparray = explode('|', $line["label"]); // If label of field is several translation keys separated with |
1092 1092
         $labeltoshow = '';
1093 1093
         foreach ($tmparray as $tmpkey => $tmpval) {
1094 1094
             $labeltoshow .= ($labeltoshow ? ' ' . $langs->trans('or') . ' ' : '') . $langs->transnoentities($tmpval);
@@ -1118,7 +1118,7 @@  discard block
 block discarded – undo
1118 1118
     //var_dump($fieldssource);
1119 1119
     //var_dump($fieldstarget);
1120 1120
 
1121
-    $modetoautofillmapping = 'session';     // Use setup in session
1121
+    $modetoautofillmapping = 'session'; // Use setup in session
1122 1122
     if ($initialloadofstep4) {
1123 1123
         $modetoautofillmapping = 'guess';
1124 1124
     }
@@ -1250,10 +1250,10 @@  discard block
 block discarded – undo
1250 1250
             } elseif ($modetoautofillmapping == 'session' && !empty($_SESSION['dol_array_match_file_to_database_select'])) {
1251 1251
                 $tmpselectioninsession = dolExplodeIntoArray($_SESSION['dol_array_match_file_to_database_select'], ',', '=');
1252 1252
                 //var_dump($code);
1253
-                if (!empty($tmpselectioninsession[(string)($i + 1)]) && $tmpselectioninsession[(string)($i + 1)] == $tmpcode) {
1253
+                if (!empty($tmpselectioninsession[(string) ($i + 1)]) && $tmpselectioninsession[(string) ($i + 1)] == $tmpcode) {
1254 1254
                     $selectforline .= ' selected';
1255 1255
                 }
1256
-                $selectforline .= ' data-debug="' . $tmpcode . '-' . $code . '-' . $j . '-' . (!empty($tmpselectioninsession[(string)($i + 1)]) ? $tmpselectioninsession[(string)($i + 1)] : "") . '"';
1256
+                $selectforline .= ' data-debug="' . $tmpcode . '-' . $code . '-' . $j . '-' . (!empty($tmpselectioninsession[(string) ($i + 1)]) ? $tmpselectioninsession[(string) ($i + 1)] : "") . '"';
1257 1257
             }
1258 1258
             $selectforline .= ' data-html="' . dol_escape_htmltag($labelhtml) . '"';
1259 1259
             $selectforline .= '>';
@@ -1330,7 +1330,7 @@  discard block
 block discarded – undo
1330 1330
         // - Then we set to disabled all fields that are selected
1331 1331
         print 'function setOptionsToDisabled() {' . "\n";
1332 1332
         print '		console.log("Remove the disabled flag everywhere");' . "\n";
1333
-        print '		$("select.targetselectchange").not($( this )).find(\'option\').prop("disabled", false);' . "\n";  // Enable all options
1333
+        print '		$("select.targetselectchange").not($( this )).find(\'option\').prop("disabled", false);' . "\n"; // Enable all options
1334 1334
         print '		arrayofselectedvalues = [];' . "\n";
1335 1335
 
1336 1336
         print '		$("select.targetselectchange").each(function(){' . "\n";
@@ -1347,7 +1347,7 @@  discard block
 block discarded – undo
1347 1347
         print '     $.each(arrayofselectedvalues, function(key, value) {' . "\n"; // Loop on each selected value
1348 1348
         print '         if (value != -1) {' . "\n";
1349 1349
         print '     		console.log("Process key="+key+" value="+value+" to disable.");' . "\n";
1350
-        print '				$("select.targetselectchange").find(\'option[value="\'+value+\'"]:not(:selected)\').prop("disabled", true);' . "\n";  // Set to disabled except if currently selected
1350
+        print '				$("select.targetselectchange").find(\'option[value="\'+value+\'"]:not(:selected)\').prop("disabled", true);' . "\n"; // Set to disabled except if currently selected
1351 1351
         print '         }' . "\n";
1352 1352
         print '     });' . "\n";
1353 1353
         print '}' . "\n";
@@ -1490,7 +1490,7 @@  discard block
 block discarded – undo
1490 1490
         $sql .= " FROM " . MAIN_DB_PREFIX . "import_model";
1491 1491
         $sql .= " WHERE type = '" . $db->escape($datatoimport) . "'";
1492 1492
         if (!getDolGlobalString('EXPORTS_SHARE_MODELS')) {  // EXPORTS_SHARE_MODELS means all templates are visible, whatever is owner.
1493
-            $sql .= " AND fk_user IN (0, " . ((int)$user->id) . ")";
1493
+            $sql .= " AND fk_user IN (0, " . ((int) $user->id) . ")";
1494 1494
         }
1495 1495
         $sql .= " ORDER BY rowid";
1496 1496
 
Please login to merge, or discard this patch.
public/htdocs/fichinter/card.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
                                                     $mult = 3600 * 24 * 7;
388 388
                                                     break;
389 389
                                                 case 'm':
390
-                                                    $mult = (int)3600 * 24 * (365 / 12); // Average month duration
390
+                                                    $mult = (int) 3600 * 24 * (365 / 12); // Average month duration
391 391
                                                     break;
392 392
                                                 case 'y':
393 393
                                                     $mult = 3600 * 24 * 365;
@@ -1076,7 +1076,7 @@  discard block
 block discarded – undo
1076 1076
     } else {
1077 1077
         print '<form name="fichinter" action="' . $_SERVER['PHP_SELF'] . '" method="POST">';
1078 1078
         print '<input type="hidden" name="token" value="' . newToken() . '">';
1079
-        print '<input type="hidden" name="action" value="create">';     // We go back to create action
1079
+        print '<input type="hidden" name="action" value="create">'; // We go back to create action
1080 1080
         print '<input type="hidden" name="backtopage" value="' . $backtopage . '">';
1081 1081
 
1082 1082
         print dol_get_fiche_head('');
@@ -1365,7 +1365,7 @@  discard block
 block discarded – undo
1365 1365
         $sql = 'SELECT ft.rowid, ft.description, ft.fk_fichinter, ft.duree, ft.rang,';
1366 1366
         $sql .= ' ft.date as date_intervention';
1367 1367
         $sql .= ' FROM ' . MAIN_DB_PREFIX . 'fichinterdet as ft';
1368
-        $sql .= ' WHERE ft.fk_fichinter = ' . ((int)$object->id);
1368
+        $sql .= ' WHERE ft.fk_fichinter = ' . ((int) $object->id);
1369 1369
         if (getDolGlobalString('FICHINTER_HIDE_EMPTY_DURATION')) {
1370 1370
             $sql .= ' AND ft.duree <> 0';
1371 1371
         }
Please login to merge, or discard this patch.
public/htdocs/mrp/mo_card.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         $objectbomchildline = new BOMLine($db);
163 163
 
164 164
         foreach ($TBomLineId as $id_bom_line) {
165
-            $object = new Mo($db);  // modified by the actions_addupdatedelete.inc.php
165
+            $object = new Mo($db); // modified by the actions_addupdatedelete.inc.php
166 166
 
167 167
             $objectbomchildline->fetch($id_bom_line);
168 168
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             $res = $object->add_object_linked('mo', $mo_parent->id);
181 181
         }
182 182
 
183
-        header("Location: " . dol_buildpath('/mrp/mo_card.php?id=' . ((int)$mo_parent->id), 1));
183
+        header("Location: " . dol_buildpath('/mrp/mo_card.php?id=' . ((int) $mo_parent->id), 1));
184 184
         exit;
185 185
     } elseif ($action == 'confirm_cancel' && $confirm == 'yes' && !empty($permissiontoadd)) {
186 186
         $also_cancel_consumed_and_produced_lines = (GETPOST('alsoCancelConsumedAndProducedLines', 'alpha') ? 1 : 0);
Please login to merge, or discard this patch.