@@ -64,19 +64,19 @@ |
||
64 | 64 | curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
65 | 65 | curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['prompt' => $instructions])); |
66 | 66 | curl_setopt($ch, CURLOPT_HTTPHEADER, [ |
67 | - 'Authorization: Bearer ' . $this->apiKey, |
|
67 | + 'Authorization: Bearer '.$this->apiKey, |
|
68 | 68 | 'Content-Type: application/json' |
69 | 69 | ]); |
70 | 70 | |
71 | 71 | $response = curl_exec($ch); |
72 | 72 | |
73 | 73 | if (curl_errno($ch)) { |
74 | - throw new Exception('cURL error: ' . curl_error($ch)); |
|
74 | + throw new Exception('cURL error: '.curl_error($ch)); |
|
75 | 75 | } |
76 | 76 | |
77 | 77 | $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); |
78 | 78 | if ($statusCode != 200) { |
79 | - throw new Exception('API request failed with status code ' . $statusCode); |
|
79 | + throw new Exception('API request failed with status code '.$statusCode); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | return $response; |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | $also_cancel_consumed_and_produced_lines = (GETPOST('alsoCancelConsumedAndProducedLines', 'alpha') ? 1 : 0); |
134 | 134 | $result = $object->cancel($user, 0, $also_cancel_consumed_and_produced_lines); |
135 | 135 | if ($result > 0) { |
136 | - header("Location: " . dol_buildpath('/mrp/mo_card.php?id=' . $object->id, 1)); |
|
136 | + header("Location: ".dol_buildpath('/mrp/mo_card.php?id='.$object->id, 1)); |
|
137 | 137 | exit; |
138 | 138 | } else { |
139 | 139 | $action = ''; |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | $also_cancel_consumed_and_produced_lines = (GETPOST('alsoCancelConsumedAndProducedLines', 'alpha') ? 1 : 0); |
144 | 144 | $result = $object->delete($user, 0, $also_cancel_consumed_and_produced_lines); |
145 | 145 | if ($result > 0) { |
146 | - header("Location: " . $backurlforlist); |
|
146 | + header("Location: ".$backurlforlist); |
|
147 | 147 | exit; |
148 | 148 | } else { |
149 | 149 | $action = ''; |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | 'value' => !getDolGlobalString('MO_ALSO_CANCEL_CONSUMED_AND_PRODUCED_LINES_BY_DEFAULT') ? 0 : 1 |
604 | 604 | ), |
605 | 605 | ); |
606 | - $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('CancelMo'), $langs->trans('ConfirmCancelMo'), 'confirm_cancel', $formquestion, 0, 1); |
|
606 | + $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?id='.$object->id, $langs->trans('CancelMo'), $langs->trans('ConfirmCancelMo'), 'confirm_cancel', $formquestion, 0, 1); |
|
607 | 607 | } |
608 | 608 | |
609 | 609 | // Call Hook formConfirm |
@@ -841,7 +841,7 @@ discard block |
||
841 | 841 | print '<td class="right">'.$langs->trans("Qty").'</td>'; |
842 | 842 | // Unit |
843 | 843 | if (getDolGlobalInt('PRODUCT_USE_UNITS')) { |
844 | - print '<td class="right">' . $langs->trans("Unit") . '</td>'; |
|
844 | + print '<td class="right">'.$langs->trans("Unit").'</td>'; |
|
845 | 845 | } |
846 | 846 | // Cost price |
847 | 847 | if ($permissiontoupdatecost && getDolGlobalString('MRP_SHOW_COST_FOR_CONSUMPTION')) { |
@@ -958,7 +958,7 @@ discard block |
||
958 | 958 | |
959 | 959 | // Lines to consume |
960 | 960 | |
961 | - $bomcostupdated = 0; // We will recalculate the unitary cost to produce a product using the real "products to consume into MO" |
|
961 | + $bomcostupdated = 0; // We will recalculate the unitary cost to produce a product using the real "products to consume into MO" |
|
962 | 962 | |
963 | 963 | if (!empty($object->lines)) { |
964 | 964 | $nblinetoconsume = 0; |
@@ -989,8 +989,8 @@ discard block |
||
989 | 989 | $costprice = 0; |
990 | 990 | } |
991 | 991 | } |
992 | - $linecost = price2num(($line->qty * $costprice) / $object->qty, 'MT'); // price for line for all quantities |
|
993 | - $bomcostupdated += price2num(($line->qty * $costprice) / $object->qty, 'MU'); // same but with full accuracy |
|
992 | + $linecost = price2num(($line->qty * $costprice) / $object->qty, 'MT'); // price for line for all quantities |
|
993 | + $bomcostupdated += price2num(($line->qty * $costprice) / $object->qty, 'MU'); // same but with full accuracy |
|
994 | 994 | } |
995 | 995 | |
996 | 996 | $bomcostupdated = price2num($bomcostupdated, 'MU'); |
@@ -1010,23 +1010,23 @@ discard block |
||
1010 | 1010 | $alreadyconsumed += $line2['qty']; |
1011 | 1011 | } |
1012 | 1012 | } |
1013 | - $suffix = '_' . $line->id; |
|
1014 | - print '<!-- Line to dispatch ' . $suffix . ' -->' . "\n"; |
|
1013 | + $suffix = '_'.$line->id; |
|
1014 | + print '<!-- Line to dispatch '.$suffix.' -->'."\n"; |
|
1015 | 1015 | // hidden fields for js function |
1016 | - print '<input id="qty_ordered' . $suffix . '" type="hidden" value="' . $line->qty . '">'; |
|
1016 | + print '<input id="qty_ordered'.$suffix.'" type="hidden" value="'.$line->qty.'">'; |
|
1017 | 1017 | // Duration - Time spent |
1018 | - print '<input id="qty_dispatched' . $suffix . '" type="hidden" value="' . $alreadyconsumed . '">'; |
|
1018 | + print '<input id="qty_dispatched'.$suffix.'" type="hidden" value="'.$alreadyconsumed.'">'; |
|
1019 | 1019 | print '<tr>'; |
1020 | - print '<input name="lineid" type="hidden" value="' . $line->id . '">'; |
|
1020 | + print '<input name="lineid" type="hidden" value="'.$line->id.'">'; |
|
1021 | 1021 | |
1022 | 1022 | // Product |
1023 | - print '<td>' . $tmpproduct->getNomUrl(1); |
|
1024 | - print '<br><div class="opacitymedium small tdoverflowmax150" title="' . dol_escape_htmltag($tmpproduct->label) . '">' . $tmpproduct->label . '</span>'; |
|
1023 | + print '<td>'.$tmpproduct->getNomUrl(1); |
|
1024 | + print '<br><div class="opacitymedium small tdoverflowmax150" title="'.dol_escape_htmltag($tmpproduct->label).'">'.$tmpproduct->label.'</span>'; |
|
1025 | 1025 | print '</td>'; |
1026 | 1026 | |
1027 | 1027 | // Qty |
1028 | 1028 | print '<td class="right nowraponall">'; |
1029 | - print '<input class="width40" name="qty_lineProduce" value="'. $line->qty.'">'; |
|
1029 | + print '<input class="width40" name="qty_lineProduce" value="'.$line->qty.'">'; |
|
1030 | 1030 | print '</td>'; |
1031 | 1031 | // Unit |
1032 | 1032 | if (getDolGlobalInt('PRODUCT_USE_UNITS')) { |
@@ -1036,7 +1036,7 @@ discard block |
||
1036 | 1036 | } |
1037 | 1037 | // Qty consumed |
1038 | 1038 | print '<td class="right">'; |
1039 | - print ' ' . price2num($alreadyconsumed, 'MS'); |
|
1039 | + print ' '.price2num($alreadyconsumed, 'MS'); |
|
1040 | 1040 | print '</td>'; |
1041 | 1041 | // Entrepot |
1042 | 1042 | print '<td class="right">'; |
@@ -1047,7 +1047,7 @@ discard block |
||
1047 | 1047 | if ($tmpproduct->stock_reel < ($line->qty - $alreadyconsumed)) { |
1048 | 1048 | print img_warning($langs->trans('StockTooLow')).' '; |
1049 | 1049 | } |
1050 | - print '<span class="left">'. $tmpproduct->stock_reel .' </span>'; |
|
1050 | + print '<span class="left">'.$tmpproduct->stock_reel.' </span>'; |
|
1051 | 1051 | } |
1052 | 1052 | print '</td>'; |
1053 | 1053 | |
@@ -1059,8 +1059,8 @@ discard block |
||
1059 | 1059 | |
1060 | 1060 | // Action delete line |
1061 | 1061 | print '<td colspan="2">'; |
1062 | - print '<input type="submit" class="button buttongen button-add small nominwidth" name="save" value="' . $langs->trans("Save") . '">'; |
|
1063 | - print '<input type="submit" class="button buttongen button-cancel small nominwidth" name="cancel" value="' . $langs->trans("Cancel") . '">'; |
|
1062 | + print '<input type="submit" class="button buttongen button-add small nominwidth" name="save" value="'.$langs->trans("Save").'">'; |
|
1063 | + print '<input type="submit" class="button buttongen button-cancel small nominwidth" name="cancel" value="'.$langs->trans("Cancel").'">'; |
|
1064 | 1064 | print '</td>'; |
1065 | 1065 | |
1066 | 1066 | // Action delete line |
@@ -1081,28 +1081,28 @@ discard block |
||
1081 | 1081 | } |
1082 | 1082 | } |
1083 | 1083 | } else { |
1084 | - $suffix = '_' . $line->id; |
|
1085 | - print '<!-- Line to dispatch ' . $suffix . ' -->' . "\n"; |
|
1084 | + $suffix = '_'.$line->id; |
|
1085 | + print '<!-- Line to dispatch '.$suffix.' -->'."\n"; |
|
1086 | 1086 | // hidden fields for js function |
1087 | - print '<input id="qty_ordered' . $suffix . '" type="hidden" value="' . $line->qty . '">'; |
|
1088 | - print '<input id="qty_dispatched' . $suffix . '" type="hidden" value="' . $alreadyconsumed . '">'; |
|
1087 | + print '<input id="qty_ordered'.$suffix.'" type="hidden" value="'.$line->qty.'">'; |
|
1088 | + print '<input id="qty_dispatched'.$suffix.'" type="hidden" value="'.$alreadyconsumed.'">'; |
|
1089 | 1089 | |
1090 | - print '<tr data-line-id="' . $line->id . '">'; |
|
1090 | + print '<tr data-line-id="'.$line->id.'">'; |
|
1091 | 1091 | // Product |
1092 | - print '<td>' . $tmpproduct->getNomUrl(1); |
|
1093 | - print '<br><div class="opacitymedium small tdoverflowmax150" title="' . dol_escape_htmltag($tmpproduct->label) . '">' . $tmpproduct->label . '</div>'; |
|
1092 | + print '<td>'.$tmpproduct->getNomUrl(1); |
|
1093 | + print '<br><div class="opacitymedium small tdoverflowmax150" title="'.dol_escape_htmltag($tmpproduct->label).'">'.$tmpproduct->label.'</div>'; |
|
1094 | 1094 | print '</td>'; |
1095 | 1095 | // Qty |
1096 | 1096 | print '<td class="right nowraponall">'; |
1097 | 1097 | $help = ''; |
1098 | 1098 | $picto = 'help'; |
1099 | 1099 | if ($line->qty_frozen) { |
1100 | - $help = ($help ? '<br>' : '') . '<strong>' . $langs->trans("QuantityFrozen") . '</strong>: ' . yn(1) . ' (' . $langs->trans("QuantityConsumedInvariable") . ')'; |
|
1101 | - print $form->textwithpicto('', $help, -1, 'lock') . ' '; |
|
1100 | + $help = ($help ? '<br>' : '').'<strong>'.$langs->trans("QuantityFrozen").'</strong>: '.yn(1).' ('.$langs->trans("QuantityConsumedInvariable").')'; |
|
1101 | + print $form->textwithpicto('', $help, -1, 'lock').' '; |
|
1102 | 1102 | } |
1103 | 1103 | if ($line->disable_stock_change) { |
1104 | - $help = ($help ? '<br>' : '') . '<strong>' . $langs->trans("DisableStockChange") . '</strong>: ' . yn(1) . ' (' . (($tmpproduct->type == Product::TYPE_SERVICE && !getDolGlobalString('STOCK_SUPPORTS_SERVICES')) ? $langs->trans("NoStockChangeOnServices") : $langs->trans("DisableStockChangeHelp")) . ')'; |
|
1105 | - print $form->textwithpicto('', $help, -1, 'help') . ' '; |
|
1104 | + $help = ($help ? '<br>' : '').'<strong>'.$langs->trans("DisableStockChange").'</strong>: '.yn(1).' ('.(($tmpproduct->type == Product::TYPE_SERVICE && !getDolGlobalString('STOCK_SUPPORTS_SERVICES')) ? $langs->trans("NoStockChangeOnServices") : $langs->trans("DisableStockChangeHelp")).')'; |
|
1105 | + print $form->textwithpicto('', $help, -1, 'help').' '; |
|
1106 | 1106 | } |
1107 | 1107 | print price2num($line->qty, 'MS'); |
1108 | 1108 | print '</td>'; |
@@ -1123,9 +1123,9 @@ discard block |
||
1123 | 1123 | if ($alreadyconsumed) { |
1124 | 1124 | print '<script>'; |
1125 | 1125 | print 'jQuery(document).ready(function() { |
1126 | - jQuery("#expandtoproduce' . $line->id . '").click(function() { |
|
1127 | - console.log("Expand mrp_production line ' . $line->id . '"); |
|
1128 | - jQuery(".expanddetail' . $line->id . '").toggle();'; |
|
1126 | + jQuery("#expandtoproduce' . $line->id.'").click(function() { |
|
1127 | + console.log("Expand mrp_production line ' . $line->id.'"); |
|
1128 | + jQuery(".expanddetail' . $line->id.'").toggle();'; |
|
1129 | 1129 | if ($nblinetoconsume == $nblinetoconsumecursor) { // If it is the last line |
1130 | 1130 | print 'if (jQuery("#tablelines").hasClass("nobottom")) { jQuery("#tablelines").removeClass("nobottom"); } else { jQuery("#tablelines").addClass("nobottom"); }'; |
1131 | 1131 | } |
@@ -1134,9 +1134,9 @@ discard block |
||
1134 | 1134 | });'; |
1135 | 1135 | print '</script>'; |
1136 | 1136 | if (empty($conf->use_javascript_ajax)) { |
1137 | - print '<a href="' . $_SERVER["PHP_SELF"] . '?collapse=' . $collapse . ',' . $line->id . '">'; |
|
1137 | + print '<a href="'.$_SERVER["PHP_SELF"].'?collapse='.$collapse.','.$line->id.'">'; |
|
1138 | 1138 | } |
1139 | - print img_picto($langs->trans("ShowDetails"), "chevron-down", 'id="expandtoproduce' . $line->id . '"'); |
|
1139 | + print img_picto($langs->trans("ShowDetails"), "chevron-down", 'id="expandtoproduce'.$line->id.'"'); |
|
1140 | 1140 | if (empty($conf->use_javascript_ajax)) { |
1141 | 1141 | print '</a>'; |
1142 | 1142 | } |
@@ -1145,12 +1145,12 @@ discard block |
||
1145 | 1145 | print '<script>jQuery("#tablelines").removeClass("nobottom");</script>'; |
1146 | 1146 | } |
1147 | 1147 | } |
1148 | - print ' ' . price2num($alreadyconsumed, 'MS'); |
|
1148 | + print ' '.price2num($alreadyconsumed, 'MS'); |
|
1149 | 1149 | print '</td>'; |
1150 | 1150 | // Warehouse and/or workstation |
1151 | 1151 | print '<td>'; |
1152 | 1152 | if (getDolGlobalString('STOCK_CONSUMPTION_FROM_MANUFACTURING_WAREHOUSE') && $tmpwarehouse->id > 0) { |
1153 | - print img_picto('', $tmpwarehouse->picto) . " " . $tmpwarehouse->label; |
|
1153 | + print img_picto('', $tmpwarehouse->picto)." ".$tmpwarehouse->label; |
|
1154 | 1154 | } |
1155 | 1155 | if (isModEnabled('workstation') && $line->fk_default_workstation > 0) { |
1156 | 1156 | $tmpworkstation = new Workstation($db); |
@@ -1163,7 +1163,7 @@ discard block |
||
1163 | 1163 | print '<td class="nowraponall right">'; |
1164 | 1164 | if (!getDolGlobalString('STOCK_SUPPORTS_SERVICES') && $tmpproduct->type != Product::TYPE_SERVICE) { |
1165 | 1165 | if (!$line->disable_stock_change && $tmpproduct->stock_reel < ($line->qty - $alreadyconsumed)) { |
1166 | - print img_warning($langs->trans('StockTooLow')) . ' '; |
|
1166 | + print img_warning($langs->trans('StockTooLow')).' '; |
|
1167 | 1167 | } |
1168 | 1168 | if (!getDolGlobalString('STOCK_CONSUMPTION_FROM_MANUFACTURING_WAREHOUSE') || empty($tmpwarehouse->id)) { |
1169 | 1169 | print price2num($tmpproduct->stock_reel, 'MS'); // Available |
@@ -1193,9 +1193,9 @@ discard block |
||
1193 | 1193 | |
1194 | 1194 | // Action Edit line |
1195 | 1195 | if ($object->status == Mo::STATUS_DRAFT) { |
1196 | - $href = $_SERVER["PHP_SELF"] . '?id=' . ((int) $object->id) . '&action=editline&token=' . newToken() . '&lineid=' . ((int) $line->id); |
|
1196 | + $href = $_SERVER["PHP_SELF"].'?id='.((int) $object->id).'&action=editline&token='.newToken().'&lineid='.((int) $line->id); |
|
1197 | 1197 | print '<td class="center">'; |
1198 | - print '<a class="reposition" href="' . $href . '">'; |
|
1198 | + print '<a class="reposition" href="'.$href.'">'; |
|
1199 | 1199 | print img_picto($langs->trans('TooltipEditAndRevertStockMovement'), 'edit'); |
1200 | 1200 | print '</a>'; |
1201 | 1201 | print '</td>'; |
@@ -1203,9 +1203,9 @@ discard block |
||
1203 | 1203 | |
1204 | 1204 | // Action delete line |
1205 | 1205 | if ($permissiontodelete) { |
1206 | - $href = $_SERVER["PHP_SELF"] . '?id=' . ((int) $object->id) . '&action=deleteline&token=' . newToken() . '&lineid=' . ((int) $line->id); |
|
1206 | + $href = $_SERVER["PHP_SELF"].'?id='.((int) $object->id).'&action=deleteline&token='.newToken().'&lineid='.((int) $line->id); |
|
1207 | 1207 | print '<td class="center">'; |
1208 | - print '<a class="reposition" href="' . $href . '">'; |
|
1208 | + print '<a class="reposition" href="'.$href.'">'; |
|
1209 | 1209 | print img_picto($langs->trans('TooltipDeleteAndRevertStockMovement'), 'delete'); |
1210 | 1210 | print '</a>'; |
1211 | 1211 | print '</td>'; |
@@ -1278,9 +1278,9 @@ discard block |
||
1278 | 1278 | |
1279 | 1279 | // Action Edit line |
1280 | 1280 | if ($object->status == Mo::STATUS_DRAFT) { |
1281 | - $href = $_SERVER["PHP_SELF"] . '?id=' . ((int) $object->id) . '&action=editline&token=' . newToken() . '&lineid=' . ((int) $line->id); |
|
1281 | + $href = $_SERVER["PHP_SELF"].'?id='.((int) $object->id).'&action=editline&token='.newToken().'&lineid='.((int) $line->id); |
|
1282 | 1282 | print '<td class="center">'; |
1283 | - print '<a class="reposition" href="' . $href . '">'; |
|
1283 | + print '<a class="reposition" href="'.$href.'">'; |
|
1284 | 1284 | print img_picto($langs->trans('TooltipEditAndRevertStockMovement'), 'edit'); |
1285 | 1285 | print '</a>'; |
1286 | 1286 | print '</td>'; |
@@ -1320,7 +1320,7 @@ discard block |
||
1320 | 1320 | print '<input type="hidden" name="product-'.$line->id.'-'.$i.'" value="'.$line->fk_product.'">'; |
1321 | 1321 | |
1322 | 1322 | // Qty |
1323 | - print '<td class="right"><input type="text" class="width50 right" id="qtytoconsume-' . $line->id . '-' . $i . '" name="qty-' . $line->id . '-' . $i . '" value="' . $preselected . '" ' . $disable . '></td>'; |
|
1323 | + print '<td class="right"><input type="text" class="width50 right" id="qtytoconsume-'.$line->id.'-'.$i.'" name="qty-'.$line->id.'-'.$i.'" value="'.$preselected.'" '.$disable.'></td>'; |
|
1324 | 1324 | |
1325 | 1325 | // Unit |
1326 | 1326 | if (getDolGlobalInt('PRODUCT_USE_UNITS')) { |
@@ -1834,7 +1834,7 @@ discard block |
||
1834 | 1834 | |
1835 | 1835 | $.ajax({ |
1836 | 1836 | type: "POST", |
1837 | - url: "<?php echo DOL_URL_ROOT . '/mrp/ajax/interface.php'; ?>", |
|
1837 | + url: "<?php echo DOL_URL_ROOT.'/mrp/ajax/interface.php'; ?>", |
|
1838 | 1838 | data: { |
1839 | 1839 | action: "updateselectbatchbywarehouse", |
1840 | 1840 | permissiontoproduce: <?php echo $permissiontoproduce ?>, |
@@ -1895,7 +1895,7 @@ discard block |
||
1895 | 1895 | |
1896 | 1896 | $.ajax({ |
1897 | 1897 | type: "POST", |
1898 | - url: "<?php echo DOL_URL_ROOT . '/mrp/ajax/interface.php'; ?>", |
|
1898 | + url: "<?php echo DOL_URL_ROOT.'/mrp/ajax/interface.php'; ?>", |
|
1899 | 1899 | data: { |
1900 | 1900 | action: "updateselectwarehousebybatch", |
1901 | 1901 | permissiontoproduce: <?php echo $permissiontoproduce ?>, |
@@ -41,45 +41,45 @@ discard block |
||
41 | 41 | |
42 | 42 | |
43 | 43 | // Get parameters |
44 | -$action = GETPOST('action', 'aZ09'); |
|
44 | +$action = GETPOST('action', 'aZ09'); |
|
45 | 45 | $massaction = GETPOST('massaction', 'alpha'); |
46 | 46 | $show_files = GETPOST('show_files', 'int'); |
47 | -$confirm = GETPOST('confirm', 'alpha'); |
|
47 | +$confirm = GETPOST('confirm', 'alpha'); |
|
48 | 48 | $cancel = GETPOST('cancel', 'alpha'); |
49 | -$toselect = GETPOST('toselect', 'array'); |
|
49 | +$toselect = GETPOST('toselect', 'array'); |
|
50 | 50 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'memberslist'; // To manage different context of search |
51 | 51 | $backtopage = GETPOST('backtopage', 'alpha'); |
52 | 52 | $optioncss = GETPOST('optioncss', 'aZ'); |
53 | -$mode = GETPOST('mode', 'alpha'); |
|
53 | +$mode = GETPOST('mode', 'alpha'); |
|
54 | 54 | |
55 | 55 | // Search fields |
56 | -$search = GETPOST("search", 'alpha'); |
|
57 | -$search_ref = GETPOST("search_ref", 'alpha'); |
|
56 | +$search = GETPOST("search", 'alpha'); |
|
57 | +$search_ref = GETPOST("search_ref", 'alpha'); |
|
58 | 58 | $search_lastname = GETPOST("search_lastname", 'alpha'); |
59 | -$search_firstname = GETPOST("search_firstname", 'alpha'); |
|
59 | +$search_firstname = GETPOST("search_firstname", 'alpha'); |
|
60 | 60 | $search_gender = GETPOST("search_gender", 'alpha'); |
61 | 61 | $search_civility = GETPOST("search_civility", 'alpha'); |
62 | 62 | $search_company = GETPOST('search_company', 'alphanohtml'); |
63 | -$search_login = GETPOST("search_login", 'alpha'); |
|
63 | +$search_login = GETPOST("search_login", 'alpha'); |
|
64 | 64 | $search_address = GETPOST("search_address", 'alpha'); |
65 | -$search_zip = GETPOST("search_zip", 'alpha'); |
|
66 | -$search_town = GETPOST("search_town", 'alpha'); |
|
67 | -$search_state = GETPOST("search_state", 'alpha'); // county / departement / federal state |
|
68 | -$search_country = GETPOST("search_country", 'alpha'); |
|
65 | +$search_zip = GETPOST("search_zip", 'alpha'); |
|
66 | +$search_town = GETPOST("search_town", 'alpha'); |
|
67 | +$search_state = GETPOST("search_state", 'alpha'); // county / departement / federal state |
|
68 | +$search_country = GETPOST("search_country", 'alpha'); |
|
69 | 69 | $search_phone = GETPOST("search_phone", 'alpha'); |
70 | 70 | $search_phone_perso = GETPOST("search_phone_perso", 'alpha'); |
71 | 71 | $search_phone_mobile = GETPOST("search_phone_mobile", 'alpha'); |
72 | -$search_type = GETPOST("search_type", 'alpha'); |
|
72 | +$search_type = GETPOST("search_type", 'alpha'); |
|
73 | 73 | $search_email = GETPOST("search_email", 'alpha'); |
74 | 74 | $search_categ = GETPOST("search_categ", 'int'); |
75 | -$search_morphy = GETPOST("search_morphy", 'alpha'); |
|
76 | -$search_import_key = trim(GETPOST("search_import_key", 'alpha')); |
|
75 | +$search_morphy = GETPOST("search_morphy", 'alpha'); |
|
76 | +$search_import_key = trim(GETPOST("search_import_key", 'alpha')); |
|
77 | 77 | |
78 | 78 | $catid = GETPOST("catid", 'int'); |
79 | 79 | $socid = GETPOST('socid', 'int'); |
80 | 80 | |
81 | 81 | $search_filter = GETPOST("search_filter", 'alpha'); |
82 | -$search_status = GETPOST("search_status", 'intcomma'); // statut |
|
82 | +$search_status = GETPOST("search_status", 'intcomma'); // statut |
|
83 | 83 | $search_datec_start = dol_mktime(0, 0, 0, GETPOST('search_datec_start_month', 'int'), GETPOST('search_datec_start_day', 'int'), GETPOST('search_datec_start_year', 'int')); |
84 | 84 | $search_datec_end = dol_mktime(23, 59, 59, GETPOST('search_datec_end_month', 'int'), GETPOST('search_datec_end_day', 'int'), GETPOST('search_datec_end_year', 'int')); |
85 | 85 | $search_datem_start = dol_mktime(0, 0, 0, GETPOST('search_datem_start_month', 'int'), GETPOST('search_datem_start_day', 'int'), GETPOST('search_datem_start_year', 'int')); |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | $sqlfields = $sql; // $sql fields to remove for count total |
398 | 398 | |
399 | 399 | // SQL Alias adherent |
400 | -$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d"; // maybe better to use ad (adh) instead of d |
|
400 | +$sql .= " FROM ".MAIN_DB_PREFIX."adherent as d"; // maybe better to use ad (adh) instead of d |
|
401 | 401 | if (!empty($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { |
402 | 402 | $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (d.rowid = ef.fk_object)"; |
403 | 403 | } |
@@ -426,7 +426,7 @@ discard block |
||
426 | 426 | if ($searchCategoryContactOperator == 0) { |
427 | 427 | $searchCategoryContactSqlList[] = " EXISTS (SELECT ck.fk_categorie FROM ".MAIN_DB_PREFIX."categorie_member as ck WHERE d.rowid = ck.fk_member AND ck.fk_categorie = ".((int) $searchCategoryContact).")"; |
428 | 428 | } else { |
429 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryContact); |
|
429 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryContact); |
|
430 | 430 | } |
431 | 431 | } |
432 | 432 | } |
@@ -588,7 +588,7 @@ discard block |
||
588 | 588 | // Output page |
589 | 589 | // -------------------------------------------------------------------- |
590 | 590 | |
591 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
591 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
592 | 592 | |
593 | 593 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
594 | 594 |
@@ -42,12 +42,12 @@ discard block |
||
42 | 42 | $ref = GETPOST('ref', 'alpha'); |
43 | 43 | $address = GETPOST('address', 'alpha'); |
44 | 44 | $zip = GETPOST('zipcode', 'alpha'); |
45 | -$town = GETPOST('town', 'alpha'); |
|
45 | +$town = GETPOST('town', 'alpha'); |
|
46 | 46 | $description = GETPOST('description', 'restricthtml'); |
47 | -$confirm = GETPOST('confirm', 'aZ09'); |
|
48 | -$fk_code_type_resource = GETPOST('fk_code_type_resource', 'alpha'); |
|
47 | +$confirm = GETPOST('confirm', 'aZ09'); |
|
48 | +$fk_code_type_resource = GETPOST('fk_code_type_resource', 'alpha'); |
|
49 | 49 | $country_id = GETPOST('country_id', 'int'); |
50 | -$state_id = GETPOST('state_id', 'int'); |
|
50 | +$state_id = GETPOST('state_id', 'int'); |
|
51 | 51 | |
52 | 52 | // Protection if external user |
53 | 53 | if ($user->socid > 0) { |
@@ -102,14 +102,14 @@ discard block |
||
102 | 102 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")), null, 'errors'); |
103 | 103 | $action = 'create'; |
104 | 104 | } else { |
105 | - $object->ref = $ref; |
|
106 | - $object->address = $address; |
|
107 | - $object->zip = $zip; |
|
108 | - $object->town = $town; |
|
105 | + $object->ref = $ref; |
|
106 | + $object->address = $address; |
|
107 | + $object->zip = $zip; |
|
108 | + $object->town = $town; |
|
109 | 109 | $object->description = $description; |
110 | 110 | $object->fk_code_type_resource = $fk_code_type_resource; |
111 | 111 | $object->country_id = $country_id; |
112 | - $object->state_id = $state_id; |
|
112 | + $object->state_id = $state_id; |
|
113 | 113 | |
114 | 114 | // Fill array 'array_options' with data from add form |
115 | 115 | $ret = $extrafields->setOptionalsFromPost(null, $object); |
@@ -146,14 +146,14 @@ discard block |
||
146 | 146 | if (!$error) { |
147 | 147 | $res = $object->fetch($id); |
148 | 148 | if ($res > 0) { |
149 | - $object->ref = $ref; |
|
150 | - $object->address = $address; |
|
151 | - $object->zip = $zip; |
|
152 | - $object->town = $town; |
|
153 | - $object->description = $description; |
|
149 | + $object->ref = $ref; |
|
150 | + $object->address = $address; |
|
151 | + $object->zip = $zip; |
|
152 | + $object->town = $town; |
|
153 | + $object->description = $description; |
|
154 | 154 | $object->fk_code_type_resource = $fk_code_type_resource; |
155 | 155 | $object->country_id = $country_id; |
156 | - $object->state_id = $state_id; |
|
156 | + $object->state_id = $state_id; |
|
157 | 157 | |
158 | 158 | // Fill array 'array_options' with data from add form |
159 | 159 | $ret = $extrafields->setOptionalsFromPost(null, $object, '@GETPOSTISSET'); |
@@ -244,13 +244,13 @@ discard block |
||
244 | 244 | print '</td></tr>'; |
245 | 245 | |
246 | 246 | // Zip / Town |
247 | - print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td'.($conf->browser->layout == 'phone' ? ' colspan="3"': '').'>'; |
|
247 | + print '<tr><td>'.$form->editfieldkey('Zip', 'zipcode', '', $object, 0).'</td><td'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'; |
|
248 | 248 | print $formresource->select_ziptown($object->zip, 'zipcode', array('town', 'selectcountry_id', 'state_id'), 0, 0, '', 'maxwidth100'); |
249 | 249 | print '</td>'; |
250 | 250 | if ($conf->browser->layout == 'phone') { |
251 | 251 | print '</tr><tr>'; |
252 | 252 | } |
253 | - print '<td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td'.($conf->browser->layout == 'phone' ? ' colspan="3"': '').'>'; |
|
253 | + print '<td>'.$form->editfieldkey('Town', 'town', '', $object, 0).'</td><td'.($conf->browser->layout == 'phone' ? ' colspan="3"' : '').'>'; |
|
254 | 254 | print $formresource->select_ziptown($object->town, 'town', array('zipcode', 'selectcountry_id', 'state_id')); |
255 | 255 | print $form->widgetForTranslation("town", $object, $permissiontoadd, 'string', 'alphanohtml', 'maxwidth100 quatrevingtpercent'); |
256 | 256 | print '</td></tr>'; |
@@ -152,9 +152,9 @@ discard block |
||
152 | 152 | $sql .= "note_public,"; |
153 | 153 | $sql .= "note_private"; |
154 | 154 | $sql .= ") VALUES ("; |
155 | - $sql .= getEntity('resource') . ", "; |
|
155 | + $sql .= getEntity('resource').", "; |
|
156 | 156 | foreach ($new_resource_values as $value) { |
157 | - $sql .= " " . ((isset($value) && $value > 0) ? "'" . $this->db->escape($value) . "'" : 'NULL') . ","; |
|
157 | + $sql .= " ".((isset($value) && $value > 0) ? "'".$this->db->escape($value)."'" : 'NULL').","; |
|
158 | 158 | } |
159 | 159 | $sql = rtrim($sql, ","); |
160 | 160 | $sql .= ")"; |
@@ -162,9 +162,9 @@ discard block |
||
162 | 162 | // Database session |
163 | 163 | $this->db->begin(); |
164 | 164 | try { |
165 | - dol_syslog(get_class($this) . "::create", LOG_DEBUG); |
|
165 | + dol_syslog(get_class($this)."::create", LOG_DEBUG); |
|
166 | 166 | } catch (Exception $exception) { |
167 | - error_log('dol_syslog error: ' . $exception->getMessage()); |
|
167 | + error_log('dol_syslog error: '.$exception->getMessage()); |
|
168 | 168 | } |
169 | 169 | $resql = $this->db->query($sql); |
170 | 170 | if (!$resql) { |
@@ -176,14 +176,14 @@ discard block |
||
176 | 176 | $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); |
177 | 177 | $result = $this->insertExtraFields(); |
178 | 178 | if ($result < 0) { |
179 | - $error=-1; |
|
179 | + $error = -1; |
|
180 | 180 | } |
181 | 181 | } |
182 | 182 | |
183 | 183 | if (!$error && !$no_trigger) { |
184 | 184 | $result = $this->call_trigger('RESOURCE_CREATE', $user); |
185 | 185 | if ($result < 0) { |
186 | - $error=-1; |
|
186 | + $error = -1; |
|
187 | 187 | } |
188 | 188 | } |
189 | 189 | |
@@ -191,9 +191,9 @@ discard block |
||
191 | 191 | if ($error) { |
192 | 192 | foreach ($this->errors as $errmsg) { |
193 | 193 | try { |
194 | - dol_syslog(get_class($this) . "::create " . $errmsg, LOG_ERR); |
|
194 | + dol_syslog(get_class($this)."::create ".$errmsg, LOG_ERR); |
|
195 | 195 | } catch (Exception $exception) { |
196 | - error_log('dol_syslog error: ' . $exception->getMessage()); |
|
196 | + error_log('dol_syslog error: '.$exception->getMessage()); |
|
197 | 197 | } |
198 | 198 | $this->error .= ($this->error ? ', '.$errmsg : $errmsg); |
199 | 199 | } |
@@ -250,11 +250,11 @@ discard block |
||
250 | 250 | $this->address = $obj->address; |
251 | 251 | $this->zip = $obj->zip; |
252 | 252 | $this->town = $obj->town; |
253 | - $this->description = $obj->description; |
|
253 | + $this->description = $obj->description; |
|
254 | 254 | $this->country_id = $obj->fk_country; |
255 | 255 | $this->state_id = $obj->fk_state; |
256 | 256 | $this->fk_code_type_resource = $obj->fk_code_type_resource; |
257 | - $this->note_public = $obj->note_public; |
|
257 | + $this->note_public = $obj->note_public; |
|
258 | 258 | $this->note_private = $obj->note_private; |
259 | 259 | $this->type_label = $obj->type_label; |
260 | 260 | |
@@ -887,7 +887,7 @@ discard block |
||
887 | 887 | $result .= $linkend; |
888 | 888 | |
889 | 889 | global $action; |
890 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
890 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
891 | 891 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
892 | 892 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
893 | 893 | if ($reshook > 0) { |
@@ -263,14 +263,14 @@ discard block |
||
263 | 263 | |
264 | 264 | $size = ''; |
265 | 265 | if (!empty($fieldsize)) { |
266 | - $size = 'size="' . $fieldsize . '"'; |
|
266 | + $size = 'size="'.$fieldsize.'"'; |
|
267 | 267 | } |
268 | 268 | |
269 | 269 | if ($conf->use_javascript_ajax && empty($disableautocomplete)) { |
270 | - $out .= ajax_multiautocompleter($htmlname, $fields, DOL_URL_ROOT . '/core/ajax/ziptown.php') . "\n"; |
|
270 | + $out .= ajax_multiautocompleter($htmlname, $fields, DOL_URL_ROOT.'/core/ajax/ziptown.php')."\n"; |
|
271 | 271 | $moreattrib .= ' autocomplete="off"'; |
272 | 272 | } |
273 | - $out .= '<input id="' . $htmlname . '" class="maxwidthonsmartphone' . ($morecss ? ' ' . $morecss : '') . '" type="text"' . ($moreattrib ? ' ' . $moreattrib : '') . ' name="' . $htmlname . '" ' . $size . ' value="' . $selected . '">' . "\n"; |
|
273 | + $out .= '<input id="'.$htmlname.'" class="maxwidthonsmartphone'.($morecss ? ' '.$morecss : '').'" type="text"'.($moreattrib ? ' '.$moreattrib : '').' name="'.$htmlname.'" '.$size.' value="'.$selected.'">'."\n"; |
|
274 | 274 | |
275 | 275 | return $out; |
276 | 276 | } |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | // phpcs:enable |
295 | 295 | global $conf, $langs, $user; |
296 | 296 | |
297 | - dol_syslog(get_class($this) . "::select_departement selected=" . $selected . ", country_codeid=" . $country_codeid, LOG_DEBUG); |
|
297 | + dol_syslog(get_class($this)."::select_departement selected=".$selected.", country_codeid=".$country_codeid, LOG_DEBUG); |
|
298 | 298 | |
299 | 299 | $langs->load("dict"); |
300 | 300 | |
@@ -302,28 +302,28 @@ discard block |
||
302 | 302 | |
303 | 303 | // Search active departements/cantons/province of a region and actif country |
304 | 304 | $sql = "SELECT d.rowid, d.code_departement as code, d.nom as name, d.active, c.label as country, c.code as country_code, r.nom as region_name FROM"; |
305 | - $sql .= " " . $this->db->prefix() . "c_departements as d, " . $this->db->prefix() . "c_regions as r," . $this->db->prefix() . "c_country as c"; |
|
305 | + $sql .= " ".$this->db->prefix()."c_departements as d, ".$this->db->prefix()."c_regions as r,".$this->db->prefix()."c_country as c"; |
|
306 | 306 | $sql .= " WHERE d.fk_region=r.code_region and r.fk_pays=c.rowid"; |
307 | 307 | $sql .= " AND d.active = 1 AND r.active = 1 AND c.active = 1"; |
308 | 308 | if ($country_codeid && is_numeric($country_codeid)) { |
309 | - $sql .= " AND c.rowid = '" . $this->db->escape($country_codeid) . "'"; |
|
309 | + $sql .= " AND c.rowid = '".$this->db->escape($country_codeid)."'"; |
|
310 | 310 | } |
311 | 311 | if ($country_codeid && !is_numeric($country_codeid)) { |
312 | - $sql .= " AND c.code = '" . $this->db->escape($country_codeid) . "'"; |
|
312 | + $sql .= " AND c.code = '".$this->db->escape($country_codeid)."'"; |
|
313 | 313 | } |
314 | 314 | $sql .= " ORDER BY c.code, d.code_departement"; |
315 | 315 | |
316 | 316 | $result = $this->db->query($sql); |
317 | 317 | if ($result) { |
318 | 318 | if (!empty($htmlname)) { |
319 | - $out .= '<select id="' . $htmlname . '" class="flat' . ($morecss ? ' ' . $morecss : '') . '" name="' . $htmlname . '">'; |
|
319 | + $out .= '<select id="'.$htmlname.'" class="flat'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'">'; |
|
320 | 320 | } |
321 | 321 | if ($country_codeid) { |
322 | 322 | $out .= '<option value="0"> </option>'; |
323 | 323 | } |
324 | 324 | $num = $this->db->num_rows($result); |
325 | 325 | $i = 0; |
326 | - dol_syslog(get_class($this) . "::select_departement num=" . $num, LOG_DEBUG); |
|
326 | + dol_syslog(get_class($this)."::select_departement num=".$num, LOG_DEBUG); |
|
327 | 327 | if ($num) { |
328 | 328 | $country = ''; |
329 | 329 | while ($i < $num) { |
@@ -334,15 +334,15 @@ discard block |
||
334 | 334 | if (!$country || $country != $obj->country) { |
335 | 335 | // Show break if we are in list with multiple countries |
336 | 336 | if (!$country_codeid && $obj->country_code) { |
337 | - $out .= '<option value="-1" disabled data-html="----- ' . $obj->country . ' -----">----- ' . $obj->country . " -----</option>\n"; |
|
337 | + $out .= '<option value="-1" disabled data-html="----- '.$obj->country.' -----">----- '.$obj->country." -----</option>\n"; |
|
338 | 338 | $country = $obj->country; |
339 | 339 | } |
340 | 340 | } |
341 | 341 | |
342 | 342 | if (!empty($selected) && $selected == $obj->rowid) { |
343 | - $out .= '<option value="' . $obj->rowid . '" selected>'; |
|
343 | + $out .= '<option value="'.$obj->rowid.'" selected>'; |
|
344 | 344 | } else { |
345 | - $out .= '<option value="' . $obj->rowid . '">'; |
|
345 | + $out .= '<option value="'.$obj->rowid.'">'; |
|
346 | 346 | } |
347 | 347 | |
348 | 348 | // If translation exists use it, otherwise use default name |
@@ -351,13 +351,13 @@ discard block |
||
351 | 351 | (getDolGlobalInt('MAIN_SHOW_STATE_CODE') == 1 || getDolGlobalInt('MAIN_SHOW_STATE_CODE') == 2 || $conf->global->MAIN_SHOW_STATE_CODE === 'all') |
352 | 352 | ) { |
353 | 353 | if (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1) { |
354 | - $out .= $obj->region_name . ' - ' . $obj->code . ' - ' . ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); |
|
354 | + $out .= $obj->region_name.' - '.$obj->code.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); |
|
355 | 355 | } else { |
356 | - $out .= $obj->code . ' - ' . ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); |
|
356 | + $out .= $obj->code.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); |
|
357 | 357 | } |
358 | 358 | } else { |
359 | 359 | if (getDolGlobalInt('MAIN_SHOW_REGION_IN_STATE_SELECT') == 1) { |
360 | - $out .= $obj->region_name . ' - ' . ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); |
|
360 | + $out .= $obj->region_name.' - '.($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); |
|
361 | 361 | } else { |
362 | 362 | $out .= ($langs->trans($obj->code) != $obj->code ? $langs->trans($obj->code) : ($obj->name != '-' ? $obj->name : '')); |
363 | 363 | } |
@@ -372,7 +372,7 @@ discard block |
||
372 | 372 | $out .= '</select>'; |
373 | 373 | } |
374 | 374 | if (!empty($htmlname) && $user->admin) { |
375 | - $out .= ' ' . info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); |
|
375 | + $out .= ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); |
|
376 | 376 | } |
377 | 377 | } else { |
378 | 378 | dol_print_error($this->db); |
@@ -380,7 +380,7 @@ discard block |
||
380 | 380 | |
381 | 381 | // Make select dynamic |
382 | 382 | if (!empty($htmlname)) { |
383 | - include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; |
|
383 | + include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; |
|
384 | 384 | $out .= ajax_combobox($htmlname); |
385 | 385 | } |
386 | 386 |
@@ -380,11 +380,11 @@ discard block |
||
380 | 380 | $this->id = $res['rowid']; |
381 | 381 | //$this->ref = $res['rowid']; |
382 | 382 | $this->fk_parent = (int) $res['fk_parent']; |
383 | - $this->label = $res['label']; |
|
383 | + $this->label = $res['label']; |
|
384 | 384 | $this->description = $res['description']; |
385 | 385 | $this->color = $res['color']; |
386 | - $this->position = $res['position']; |
|
387 | - $this->socid = (int) $res['fk_soc']; |
|
386 | + $this->position = $res['position']; |
|
387 | + $this->socid = (int) $res['fk_soc']; |
|
388 | 388 | $this->visible = (int) $res['visible']; |
389 | 389 | $this->type = (int) $res['type']; |
390 | 390 | $this->ref_ext = $res['ref_ext']; |
@@ -1035,10 +1035,10 @@ discard block |
||
1035 | 1035 | if ($category_static->fetch($obj->rowid)) { |
1036 | 1036 | $categories[$i]['id'] = $category_static->id; |
1037 | 1037 | $categories[$i]['fk_parent'] = $category_static->fk_parent; |
1038 | - $categories[$i]['label'] = $category_static->label; |
|
1038 | + $categories[$i]['label'] = $category_static->label; |
|
1039 | 1039 | $categories[$i]['description'] = $category_static->description; |
1040 | 1040 | $categories[$i]['color'] = $category_static->color; |
1041 | - $categories[$i]['position'] = $category_static->position; |
|
1041 | + $categories[$i]['position'] = $category_static->position; |
|
1042 | 1042 | $categories[$i]['socid'] = $category_static->socid; |
1043 | 1043 | $categories[$i]['ref_ext'] = $category_static->ref_ext; |
1044 | 1044 | $categories[$i]['visible'] = $category_static->visible; |
@@ -1720,7 +1720,7 @@ discard block |
||
1720 | 1720 | $result .= $link.dol_trunc(($this->ref ? $this->ref : $this->label), $maxlength).$linkend; |
1721 | 1721 | } |
1722 | 1722 | global $action; |
1723 | - $hookmanager->initHooks(array($this->element . 'dao')); |
|
1723 | + $hookmanager->initHooks(array($this->element.'dao')); |
|
1724 | 1724 | $parameters = array('id'=>$this->id, 'getnomurl' => &$result); |
1725 | 1725 | $reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks |
1726 | 1726 | if ($reshook > 0) { |