@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | $error = 0; |
79 | 79 | $setupnotempty = 0; |
80 | 80 | |
81 | -$dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
81 | +$dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
82 | 82 | |
83 | 83 | $moduledir = 'asset'; |
84 | 84 | $myTmpObjects = array(); |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | // Search template files |
123 | 123 | $file = ''; |
124 | 124 | $classname = ''; |
125 | - $dirmodels = array_merge(array('/'), (array)$conf->modules_parts['models']); |
|
125 | + $dirmodels = array_merge(array('/'), (array) $conf->modules_parts['models']); |
|
126 | 126 | foreach ($dirmodels as $reldir) { |
127 | 127 | $file = dol_buildpath($reldir . "core/modules/asset/doc/pdf_" . $modele . "_" . strtolower($tmpobjectkey) . ".modules.php", 0); |
128 | 128 | if (file_exists($file)) { |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | $accountsystem->fetch(getDolGlobalInt('CHARTOFACCOUNTS')); |
559 | 559 | $sql = 'SELECT DISTINCT pcg_type FROM ' . MAIN_DB_PREFIX . 'accounting_account'; |
560 | 560 | $sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'"; |
561 | - $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')'; // Always limit to current entity. No sharing in accountancy. |
|
561 | + $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')'; // Always limit to current entity. No sharing in accountancy. |
|
562 | 562 | $sql .= ' LIMIT 50000'; // just as a sanity check |
563 | 563 | $resql = $db->query($sql); |
564 | 564 | if ($resql) { |
@@ -229,7 +229,7 @@ |
||
229 | 229 | print '<td class="left">' . $langs->trans('ProducedBy') . '</td>'; |
230 | 230 | } |
231 | 231 | print '<td class="linecolqty right">' . $langs->trans('Quantity') . '</td>'; |
232 | - print '<td></td>'; // For unit |
|
232 | + print '<td></td>'; // For unit |
|
233 | 233 | print '<td class="linecolstock right">' . $form->textwithpicto($langs->trans("PhysicalStock"), $text_stock_options, 1) . '</td>'; |
234 | 234 | print '<td class="linecoltheoricalstock right">' . $form->textwithpicto($langs->trans("VirtualStock"), $langs->trans("VirtualStockDesc")) . '</td>'; |
235 | 235 | print '</tr>'; |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | $fk_default_workstation = GETPOSTINT('idworkstations'); |
289 | 289 | } |
290 | 290 | |
291 | - $result = $object->updateLine($lineid, $qty, (int)$qty_frozen, (int)$disable_stock_change, $efficiency, $bomline->position, $bomline->import_key, $fk_unit, $array_options, $fk_default_workstation); |
|
291 | + $result = $object->updateLine($lineid, $qty, (int) $qty_frozen, (int) $disable_stock_change, $efficiency, $bomline->position, $bomline->import_key, $fk_unit, $array_options, $fk_default_workstation); |
|
292 | 292 | |
293 | 293 | if ($result <= 0) { |
294 | 294 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | if (!empty($object->table_element_line)) { |
593 | 593 | // Products |
594 | 594 | |
595 | - $res = $object->fetchLinesbytypeproduct(0); // Load all lines products into ->lines |
|
595 | + $res = $object->fetchLinesbytypeproduct(0); // Load all lines products into ->lines |
|
596 | 596 | $object->calculateCosts(); |
597 | 597 | |
598 | 598 | print ($res == 0 && $object->status >= $object::STATUS_VALIDATED) ? '' : load_fiche_titre($langs->trans('BOMProductsList'), '', 'product'); |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | // Services |
647 | 647 | |
648 | 648 | $filtertype = 1; |
649 | - $res = $object->fetchLinesbytypeproduct(1); // Load all lines services into ->lines |
|
649 | + $res = $object->fetchLinesbytypeproduct(1); // Load all lines services into ->lines |
|
650 | 650 | $object->calculateCosts(); |
651 | 651 | |
652 | 652 | print ($res == 0 && $object->status >= $object::STATUS_VALIDATED) ? '' : load_fiche_titre($langs->trans('BOMServicesList'), '', 'service'); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | |
39 | 39 | // Load Dolibarr environment |
40 | 40 | require constant('DOL_DOCUMENT_ROOT') . '/main.inc.php'; |
41 | -require_once constant('DOL_DOCUMENT_ROOT') . '/core/class/fileupload.class.php'; // Class to upload common files |
|
41 | +require_once constant('DOL_DOCUMENT_ROOT') . '/core/class/fileupload.class.php'; // Class to upload common files |
|
42 | 42 | require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/geturl.lib.php'; |
43 | 43 | |
44 | 44 | $id = GETPOSTINT('fk_element'); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | if (!empty($user->socid)) { |
63 | 63 | $socid = $user->socid; |
64 | 64 | if (!empty($object->socid) && $socid != $object->socid) { |
65 | - httponly_accessforbidden("Access on object not allowed for this external user."); // This includes the exit. |
|
65 | + httponly_accessforbidden("Access on object not allowed for this external user."); // This includes the exit. |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 |
@@ -57,9 +57,9 @@ |
||
57 | 57 | $urlfrom = GETPOST('urlfrom', 'alpha'); |
58 | 58 | $backtopage = GETPOST('backtopage', 'alpha'); |
59 | 59 | |
60 | -$label = (string)GETPOST('label', 'alphanohtml'); |
|
61 | -$description = (string)GETPOST('description', 'restricthtml'); |
|
62 | -$color = preg_replace('/[^0-9a-f#]/i', '', (string)GETPOST('color', 'alphanohtml')); |
|
60 | +$label = (string) GETPOST('label', 'alphanohtml'); |
|
61 | +$description = (string) GETPOST('description', 'restricthtml'); |
|
62 | +$color = preg_replace('/[^0-9a-f#]/i', '', (string) GETPOST('color', 'alphanohtml')); |
|
63 | 63 | $position = GETPOSTINT('position'); |
64 | 64 | $visible = GETPOSTINT('visible'); |
65 | 65 | $parent = GETPOSTINT('parent'); |
@@ -1178,7 +1178,7 @@ discard block |
||
1178 | 1178 | } |
1179 | 1179 | } |
1180 | 1180 | |
1181 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1181 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1182 | 1182 | /** |
1183 | 1183 | * Load lines |
1184 | 1184 | * |
@@ -1186,7 +1186,7 @@ discard block |
||
1186 | 1186 | */ |
1187 | 1187 | public function fetch_lines() |
1188 | 1188 | { |
1189 | - // phpcs:enable |
|
1189 | + // phpcs:enable |
|
1190 | 1190 | $this->lines = array(); |
1191 | 1191 | |
1192 | 1192 | |
@@ -1327,7 +1327,7 @@ discard block |
||
1327 | 1327 | return $this->LibStatut($this->statut, $mode); |
1328 | 1328 | } |
1329 | 1329 | |
1330 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1330 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1331 | 1331 | /** |
1332 | 1332 | * Return label of a status |
1333 | 1333 | * |
@@ -1337,7 +1337,7 @@ discard block |
||
1337 | 1337 | */ |
1338 | 1338 | public function LibStatut($status, $mode) |
1339 | 1339 | { |
1340 | - // phpcs:enable |
|
1340 | + // phpcs:enable |
|
1341 | 1341 | global $langs; |
1342 | 1342 | |
1343 | 1343 | // List of long language codes for status |
@@ -1498,7 +1498,7 @@ discard block |
||
1498 | 1498 | } |
1499 | 1499 | } |
1500 | 1500 | |
1501 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1501 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1502 | 1502 | /** |
1503 | 1503 | * Fetch deliveries method and return an array. Load array this->meths(rowid=>label). |
1504 | 1504 | * |
@@ -1506,7 +1506,7 @@ discard block |
||
1506 | 1506 | */ |
1507 | 1507 | public function fetch_delivery_methods() |
1508 | 1508 | { |
1509 | - // phpcs:enable |
|
1509 | + // phpcs:enable |
|
1510 | 1510 | global $langs; |
1511 | 1511 | $this->meths = array(); |
1512 | 1512 | |
@@ -1524,7 +1524,7 @@ discard block |
||
1524 | 1524 | } |
1525 | 1525 | } |
1526 | 1526 | |
1527 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1527 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1528 | 1528 | /** |
1529 | 1529 | * Fetch all deliveries method and return an array. Load array this->listmeths. |
1530 | 1530 | * |
@@ -1533,7 +1533,7 @@ discard block |
||
1533 | 1533 | */ |
1534 | 1534 | public function list_delivery_methods($id = 0) |
1535 | 1535 | { |
1536 | - // phpcs:enable |
|
1536 | + // phpcs:enable |
|
1537 | 1537 | global $langs; |
1538 | 1538 | |
1539 | 1539 | $this->listmeths = array(); |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | $maxphptoshow = $maxfilesizearray['maxphptoshow']; |
210 | 210 | $maxphptoshowparam = $maxfilesizearray['maxphptoshowparam']; |
211 | 211 | if ($maxmin > 0) { |
212 | - $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
212 | + $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
213 | 213 | } |
214 | 214 | $out .= '<input class="flat minwidth400 maxwidth200onsmartphone" type="file"'; |
215 | 215 | $out .= ((getDolGlobalString('MAIN_DISABLE_MULTIPLE_FILEUPLOAD') || $disablemulti) ? ' name="userfile"' : ' name="userfile[]" multiple'); |
@@ -2231,7 +2231,7 @@ discard block |
||
2231 | 2231 | print '<td class="right">'; |
2232 | 2232 | print '<a href="' . $_SERVER['PHP_SELF'] . '?action=update&linkid=' . $link->id . $param . '&token=' . newToken() . '" class="editfilelink editfielda reposition" >' . img_edit() . '</a>'; // id= is included into $param |
2233 | 2233 | if ($permissiontodelete) { |
2234 | - print ' <a class="deletefilelink reposition" href="' . $_SERVER['PHP_SELF'] . '?action=deletelink&token=' . newToken() . '&linkid=' . ((int)$link->id) . $param . '">' . img_delete() . '</a>'; // id= is included into $param |
|
2234 | + print ' <a class="deletefilelink reposition" href="' . $_SERVER['PHP_SELF'] . '?action=deletelink&token=' . newToken() . '&linkid=' . ((int) $link->id) . $param . '">' . img_delete() . '</a>'; // id= is included into $param |
|
2235 | 2235 | } else { |
2236 | 2236 | print ' '; |
2237 | 2237 | } |
@@ -234,11 +234,11 @@ discard block |
||
234 | 234 | foreach ($object->fields as $key => $val) { |
235 | 235 | // If $val['visible']==0, then we never show the field |
236 | 236 | if (!empty($val['visible'])) { |
237 | - $visible = (int)dol_eval($val['visible'], 1); |
|
237 | + $visible = (int) dol_eval($val['visible'], 1); |
|
238 | 238 | $arrayfields['p.' . $key] = array( |
239 | 239 | 'label' => $val['label'], |
240 | 240 | 'checked' => (($visible < 0) ? 0 : 1), |
241 | - 'enabled' => (abs($visible) != 3 && (int)dol_eval($val['enabled'], 1)), |
|
241 | + 'enabled' => (abs($visible) != 3 && (int) dol_eval($val['enabled'], 1)), |
|
242 | 242 | 'position' => $val['position'], |
243 | 243 | 'help' => isset($val['help']) ? $val['help'] : '' |
244 | 244 | ); |
@@ -276,7 +276,7 @@ discard block |
||
276 | 276 | $object->fields = dol_sort_array($object->fields, 'position'); |
277 | 277 | //$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right'); |
278 | 278 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
279 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
279 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
280 | 280 | |
281 | 281 | |
282 | 282 | if (($id > 0 || !empty($ref)) && $action != 'add') { |
@@ -315,11 +315,11 @@ discard block |
||
315 | 315 | $invoice->module_source = 'takepos'; |
316 | 316 | $invoice->pos_source = $_SESSION["takeposterminal"]; |
317 | 317 | $placeid = $invoice->create($user); |
318 | - $sql = "UPDATE " . MAIN_DB_PREFIX . "facture set ref='(PROV-POS" . $_SESSION["takeposterminal"] . "-" . $place . ")' where rowid = " . ((int)$placeid); |
|
318 | + $sql = "UPDATE " . MAIN_DB_PREFIX . "facture set ref='(PROV-POS" . $_SESSION["takeposterminal"] . "-" . $place . ")' where rowid = " . ((int) $placeid); |
|
319 | 319 | $db->query($sql); |
320 | 320 | } |
321 | 321 | |
322 | - $sql = "UPDATE " . MAIN_DB_PREFIX . "facture set fk_soc=" . ((int)$idcustomer) . " where ref='(PROV-POS" . $_SESSION["takeposterminal"] . "-" . $place . ")'"; |
|
322 | + $sql = "UPDATE " . MAIN_DB_PREFIX . "facture set fk_soc=" . ((int) $idcustomer) . " where ref='(PROV-POS" . $_SESSION["takeposterminal"] . "-" . $place . ")'"; |
|
323 | 323 | $resql = $db->query($sql); |
324 | 324 | |
325 | 325 | // set contact on invoice |
@@ -515,11 +515,11 @@ discard block |
||
515 | 515 | |
516 | 516 | // Add fields from hooks - ListFrom |
517 | 517 | $parameters = array(); |
518 | -$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
518 | +$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
519 | 519 | $sql .= $hookmanager->resPrint; |
520 | 520 | $sql .= ' WHERE p.entity IN (' . getEntity('contact') . ')'; |
521 | 521 | if (!empty($userid)) { // propre au commercial |
522 | - $sql .= " AND p.fk_user_creat=" . ((int)$userid); |
|
522 | + $sql .= " AND p.fk_user_creat=" . ((int) $userid); |
|
523 | 523 | } |
524 | 524 | if ($search_level) { |
525 | 525 | $sql .= natural_search("p.fk_prospectlevel", implode(',', $search_level), 3); |
@@ -530,13 +530,13 @@ discard block |
||
530 | 530 | |
531 | 531 | // Filter to exclude not owned private contacts |
532 | 532 | if ($search_priv != '0' && $search_priv != '1') { |
533 | - $sql .= " AND (p.priv='0' OR (p.priv='1' AND p.fk_user_creat=" . ((int)$user->id) . "))"; |
|
533 | + $sql .= " AND (p.priv='0' OR (p.priv='1' AND p.fk_user_creat=" . ((int) $user->id) . "))"; |
|
534 | 534 | } else { |
535 | 535 | if ($search_priv == '0') { |
536 | 536 | $sql .= " AND p.priv='0'"; |
537 | 537 | } |
538 | 538 | if ($search_priv == '1') { |
539 | - $sql .= " AND (p.priv='1' AND p.fk_user_creat=" . ((int)$user->id) . ")"; |
|
539 | + $sql .= " AND (p.priv='1' AND p.fk_user_creat=" . ((int) $user->id) . ")"; |
|
540 | 540 | } |
541 | 541 | } |
542 | 542 | // Search on sale representative |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | if ($search_sale == -2) { |
545 | 545 | $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM " . $db->prefix() . "societe_commerciaux as sc WHERE sc.fk_soc = p.fk_soc)"; |
546 | 546 | } elseif ($search_sale > 0) { |
547 | - $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . $db->prefix() . "societe_commerciaux as sc WHERE sc.fk_soc = p.fk_soc AND sc.fk_user = " . ((int)$search_sale) . ")"; |
|
547 | + $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . $db->prefix() . "societe_commerciaux as sc WHERE sc.fk_soc = p.fk_soc AND sc.fk_user = " . ((int) $search_sale) . ")"; |
|
548 | 548 | } |
549 | 549 | } |
550 | 550 | |
@@ -560,9 +560,9 @@ discard block |
||
560 | 560 | $searchCategoryContactSqlList[] = "NOT EXISTS (SELECT ck.fk_socpeople FROM " . MAIN_DB_PREFIX . "categorie_contact as ck WHERE p.rowid = ck.fk_socpeople)"; |
561 | 561 | } elseif (intval($searchCategoryContact) > 0) { |
562 | 562 | if ($searchCategoryContactOperator == 0) { |
563 | - $searchCategoryContactSqlList[] = " EXISTS (SELECT ck.fk_socpeople FROM " . MAIN_DB_PREFIX . "categorie_contact as ck WHERE p.rowid = ck.fk_socpeople AND ck.fk_categorie = " . ((int)$searchCategoryContact) . ")"; |
|
563 | + $searchCategoryContactSqlList[] = " EXISTS (SELECT ck.fk_socpeople FROM " . MAIN_DB_PREFIX . "categorie_contact as ck WHERE p.rowid = ck.fk_socpeople AND ck.fk_categorie = " . ((int) $searchCategoryContact) . ")"; |
|
564 | 564 | } else { |
565 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') . ((int)$searchCategoryContact); |
|
565 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '') . ((int) $searchCategoryContact); |
|
566 | 566 | } |
567 | 567 | } |
568 | 568 | } |
@@ -592,9 +592,9 @@ discard block |
||
592 | 592 | $searchCategoryCustomerSqlList[] = "NOT EXISTS (SELECT ck.fk_soc FROM " . MAIN_DB_PREFIX . "categorie_societe as ck WHERE s.rowid = ck.fk_soc)"; |
593 | 593 | } elseif (intval($searchCategoryCustomer) > 0) { |
594 | 594 | if ($searchCategoryCustomerOperator == 0) { |
595 | - $searchCategoryCustomerSqlList[] = " EXISTS (SELECT ck.fk_soc FROM " . MAIN_DB_PREFIX . "categorie_societe as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = " . ((int)$searchCategoryCustomer) . ")"; |
|
595 | + $searchCategoryCustomerSqlList[] = " EXISTS (SELECT ck.fk_soc FROM " . MAIN_DB_PREFIX . "categorie_societe as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = " . ((int) $searchCategoryCustomer) . ")"; |
|
596 | 596 | } else { |
597 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') . ((int)$searchCategoryCustomer); |
|
597 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '') . ((int) $searchCategoryCustomer); |
|
598 | 598 | } |
599 | 599 | } |
600 | 600 | } |
@@ -624,9 +624,9 @@ discard block |
||
624 | 624 | $searchCategorySupplierSqlList[] = "NOT EXISTS (SELECT ck.fk_soc FROM " . MAIN_DB_PREFIX . "categorie_fournisseur as ck WHERE s.rowid = ck.fk_soc)"; |
625 | 625 | } elseif (intval($searchCategorySupplier) > 0) { |
626 | 626 | if ($searchCategorySupplierOperator == 0) { |
627 | - $searchCategorySupplierSqlList[] = " EXISTS (SELECT ck.fk_soc FROM " . MAIN_DB_PREFIX . "categorie_fournisseur as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = " . ((int)$searchCategorySupplier) . ")"; |
|
627 | + $searchCategorySupplierSqlList[] = " EXISTS (SELECT ck.fk_soc FROM " . MAIN_DB_PREFIX . "categorie_fournisseur as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = " . ((int) $searchCategorySupplier) . ")"; |
|
628 | 628 | } else { |
629 | - $listofcategoryid .= ($listofcategoryid ? ', ' : '') . ((int)$searchCategorySupplier); |
|
629 | + $listofcategoryid .= ($listofcategoryid ? ', ' : '') . ((int) $searchCategorySupplier); |
|
630 | 630 | } |
631 | 631 | } |
632 | 632 | } |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | $sql .= " AND (SELECT count(*) FROM " . MAIN_DB_PREFIX . "mailing_unsubscribe WHERE email = p.email) = 0 AND p.email IS NOT NULL AND p.email <> ''"; |
734 | 734 | } |
735 | 735 | if ($search_status != '' && $search_status >= 0) { |
736 | - $sql .= " AND p.statut = " . ((int)$search_status); |
|
736 | + $sql .= " AND p.statut = " . ((int) $search_status); |
|
737 | 737 | } |
738 | 738 | if ($search_import_key) { |
739 | 739 | $sql .= natural_search("p.import_key", $search_import_key); |
@@ -748,7 +748,7 @@ discard block |
||
748 | 748 | $sql .= " AND s.client IN (2, 3)"; |
749 | 749 | } |
750 | 750 | if (!empty($socid)) { |
751 | - $sql .= " AND s.rowid = " . ((int)$socid); |
|
751 | + $sql .= " AND s.rowid = " . ((int) $socid); |
|
752 | 752 | } |
753 | 753 | if ($search_birthday_start) { |
754 | 754 | $sql .= " AND p.birthday >= '" . $db->idate($search_birthday_start) . "'"; |
@@ -835,30 +835,30 @@ discard block |
||
835 | 835 | $param .= '&contextpage=' . urlencode($contextpage); |
836 | 836 | } |
837 | 837 | if ($limit > 0 && $limit != $conf->liste_limit) { |
838 | - $param .= '&limit=' . ((int)$limit); |
|
838 | + $param .= '&limit=' . ((int) $limit); |
|
839 | 839 | } |
840 | 840 | if ($optioncss != '') { |
841 | 841 | $param .= '&optioncss=' . urlencode($optioncss); |
842 | 842 | } |
843 | -$param .= '&begin=' . urlencode((string)($begin)) . '&userid=' . urlencode((string)($userid)) . '&contactname=' . urlencode((string)($search_all)); |
|
843 | +$param .= '&begin=' . urlencode((string) ($begin)) . '&userid=' . urlencode((string) ($userid)) . '&contactname=' . urlencode((string) ($search_all)); |
|
844 | 844 | $param .= '&type=' . urlencode($type) . '&view=' . urlencode($view); |
845 | 845 | if (!empty($search_sale) && $search_sale != '-1') { |
846 | 846 | $param .= '&search_sale=' . urlencode($search_sale); |
847 | 847 | } |
848 | 848 | if (!empty($search_categ) && $search_categ != '-1') { |
849 | - $param .= '&search_categ=' . urlencode((string)($search_categ)); |
|
849 | + $param .= '&search_categ=' . urlencode((string) ($search_categ)); |
|
850 | 850 | } |
851 | 851 | if (!empty($search_categ_thirdparty) && $search_categ_thirdparty != '-1') { |
852 | - $param .= '&search_categ_thirdparty=' . urlencode((string)($search_categ_thirdparty)); |
|
852 | + $param .= '&search_categ_thirdparty=' . urlencode((string) ($search_categ_thirdparty)); |
|
853 | 853 | } |
854 | 854 | if (!empty($search_categ_supplier) && $search_categ_supplier != '-1') { |
855 | - $param .= '&search_categ_supplier=' . urlencode((string)($search_categ_supplier)); |
|
855 | + $param .= '&search_categ_supplier=' . urlencode((string) ($search_categ_supplier)); |
|
856 | 856 | } |
857 | 857 | if ($search_all != '') { |
858 | 858 | $param .= '&search_all=' . urlencode($search_all); |
859 | 859 | } |
860 | 860 | if ($search_id > 0) { |
861 | - $param .= "&search_id=" . urlencode((string)($search_id)); |
|
861 | + $param .= "&search_id=" . urlencode((string) ($search_id)); |
|
862 | 862 | } |
863 | 863 | if ($search_lastname != '') { |
864 | 864 | $param .= '&search_lastname=' . urlencode($search_lastname); |
@@ -903,16 +903,16 @@ discard block |
||
903 | 903 | $param .= '&search_email=' . urlencode($search_email); |
904 | 904 | } |
905 | 905 | if ($search_no_email != '') { |
906 | - $param .= '&search_no_email=' . urlencode((string)($search_no_email)); |
|
906 | + $param .= '&search_no_email=' . urlencode((string) ($search_no_email)); |
|
907 | 907 | } |
908 | 908 | if ($search_status != '') { |
909 | - $param .= '&search_status=' . urlencode((string)($search_status)); |
|
909 | + $param .= '&search_status=' . urlencode((string) ($search_status)); |
|
910 | 910 | } |
911 | 911 | if ($search_priv == '0' || $search_priv == '1') { |
912 | 912 | $param .= "&search_priv=" . urlencode($search_priv); |
913 | 913 | } |
914 | 914 | if ($search_stcomm != '') { |
915 | - $param .= '&search_stcomm=' . urlencode((string)($search_stcomm)); |
|
915 | + $param .= '&search_stcomm=' . urlencode((string) ($search_stcomm)); |
|
916 | 916 | } |
917 | 917 | if (is_array($search_level) && count($search_level)) { |
918 | 918 | foreach ($search_level as $slevel) { |
@@ -1402,7 +1402,7 @@ discard block |
||
1402 | 1402 | break; // Should not happen |
1403 | 1403 | } |
1404 | 1404 | |
1405 | - $arraysocialnetworks = (array)json_decode($obj->socialnetworks, true); |
|
1405 | + $arraysocialnetworks = (array) json_decode($obj->socialnetworks, true); |
|
1406 | 1406 | $contactstatic->lastname = $obj->lastname; |
1407 | 1407 | $contactstatic->firstname = ''; |
1408 | 1408 | $contactstatic->id = $obj->rowid; |
@@ -1697,7 +1697,7 @@ discard block |
||
1697 | 1697 | $titlealt = $val['label']; |
1698 | 1698 | } |
1699 | 1699 | if ($obj->stcomm_id != $val['id']) { |
1700 | - print '<a class="pictosubstatus" href="' . $_SERVER["PHP_SELF"] . '?stcommcontactid=' . $obj->rowid . '&stcomm=' . urlencode((string)($val['code'])) . '&action=setstcomm&token=' . newToken() . $param . ($page ? '&page=' . urlencode((string)($page)) : '') . '">' . img_action($titlealt, $val['code'], $val['picto']) . '</a>'; |
|
1700 | + print '<a class="pictosubstatus" href="' . $_SERVER["PHP_SELF"] . '?stcommcontactid=' . $obj->rowid . '&stcomm=' . urlencode((string) ($val['code'])) . '&action=setstcomm&token=' . newToken() . $param . ($page ? '&page=' . urlencode((string) ($page)) : '') . '">' . img_action($titlealt, $val['code'], $val['picto']) . '</a>'; |
|
1701 | 1701 | } |
1702 | 1702 | } |
1703 | 1703 | print '</div></div></td>'; |
@@ -560,7 +560,7 @@ discard block |
||
560 | 560 | if ($permissiontoadd) { |
561 | 561 | $morehtmlref .= img_picto($langs->trans("Project"), 'project', 'class="pictofixedwidth"'); |
562 | 562 | if ($action != 'classify') { |
563 | - $morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token=' . newToken() . '&id=' . ((int)$object->id) . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> '; |
|
563 | + $morehtmlref .= '<a class="editfielda" href="' . $_SERVER['PHP_SELF'] . '?action=classify&token=' . newToken() . '&id=' . ((int) $object->id) . '">' . img_edit($langs->transnoentitiesnoconv('SetProject')) . '</a> '; |
|
564 | 564 | } |
565 | 565 | $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, (!getDolGlobalString('PROJECT_CAN_ALWAYS_LINK_TO_ALL_SUPPLIERS') ? $object->socid : -1), $object->fk_project, ($action == 'classify' ? 'fk_project' : 'none'), 0, 0, 0, 1, '', 'maxwidth300'); |
566 | 566 | } else { |
@@ -686,7 +686,7 @@ discard block |
||
686 | 686 | $sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'bank_account as ba ON b.fk_account = ba.rowid'; |
687 | 687 | $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "c_paiement as c ON p.fk_typepaiement = c.id"; |
688 | 688 | $sql .= ", " . MAIN_DB_PREFIX . "chargesociales as cs"; |
689 | - $sql .= " WHERE p.fk_charge = " . ((int)$id); |
|
689 | + $sql .= " WHERE p.fk_charge = " . ((int) $id); |
|
690 | 690 | $sql .= " AND p.fk_charge = cs.rowid"; |
691 | 691 | $sql .= " AND cs.entity IN (" . getEntity('sc') . ")"; |
692 | 692 | $sql .= " ORDER BY dp DESC"; |