@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | */ |
| 41 | 41 | class FormCompany extends Form |
| 42 | 42 | { |
| 43 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 43 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 44 | 44 | /** |
| 45 | 45 | * Return list of labels (translated) of third parties type |
| 46 | 46 | * |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | */ |
| 51 | 51 | public function typent_array($mode = 0, $filter = '') |
| 52 | 52 | { |
| 53 | - // phpcs:enable |
|
| 53 | + // phpcs:enable |
|
| 54 | 54 | global $langs, $mysoc; |
| 55 | 55 | |
| 56 | 56 | $effs = array(); |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | return $effs; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 94 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 95 | 95 | /** |
| 96 | 96 | * Renvoie la liste des types d'effectifs possibles (pas de traduction car nombre) |
| 97 | 97 | * |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | */ |
| 102 | 102 | public function effectif_array($mode = 0, $filter = '') |
| 103 | 103 | { |
| 104 | - // phpcs:enable |
|
| 104 | + // phpcs:enable |
|
| 105 | 105 | $effs = array(); |
| 106 | 106 | |
| 107 | 107 | $sql = "SELECT id, code, libelle as label"; |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | } |
| 137 | 137 | |
| 138 | 138 | |
| 139 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 139 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 140 | 140 | /** |
| 141 | 141 | * Affiche formulaire de selection des modes de reglement |
| 142 | 142 | * |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | */ |
| 149 | 149 | public function form_prospect_level($page, $selected = 0, $htmlname = 'prospect_level_id', $empty = 0) |
| 150 | 150 | { |
| 151 | - // phpcs:enable |
|
| 151 | + // phpcs:enable |
|
| 152 | 152 | global $user, $langs; |
| 153 | 153 | |
| 154 | 154 | print '<form method="post" action="' . $page . '">'; |
@@ -240,7 +240,7 @@ discard block |
||
| 240 | 240 | print '</form>'; |
| 241 | 241 | } |
| 242 | 242 | |
| 243 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 243 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 244 | 244 | /** |
| 245 | 245 | * Returns the drop-down list of departments/provinces/cantons for all countries or for a given country. |
| 246 | 246 | * In the case of an all-country list, the display breaks on the country. |
@@ -254,11 +254,11 @@ discard block |
||
| 254 | 254 | */ |
| 255 | 255 | public function select_departement($selected = '', $country_codeid = 0, $htmlname = 'state_id') |
| 256 | 256 | { |
| 257 | - // phpcs:enable |
|
| 257 | + // phpcs:enable |
|
| 258 | 258 | print $this->select_state($selected, $country_codeid, $htmlname); |
| 259 | 259 | } |
| 260 | 260 | |
| 261 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 261 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 262 | 262 | /** |
| 263 | 263 | * Returns the drop-down list of departments/provinces/cantons for all countries or for a given country. |
| 264 | 264 | * In the case of an all-country list, the display breaks on the country. |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | */ |
| 275 | 275 | public function select_state($selected = 0, $country_codeid = 0, $htmlname = 'state_id', $morecss = 'maxwidth200onsmartphone minwidth300') |
| 276 | 276 | { |
| 277 | - // phpcs:enable |
|
| 277 | + // phpcs:enable |
|
| 278 | 278 | global $conf, $langs, $user; |
| 279 | 279 | |
| 280 | 280 | dol_syslog(get_class($this) . "::select_departement selected=" . $selected . ", country_codeid=" . $country_codeid, LOG_DEBUG); |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | return $out; |
| 371 | 371 | } |
| 372 | 372 | |
| 373 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 373 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 374 | 374 | /** |
| 375 | 375 | * Returns the drop-down list of departments/provinces/cantons for all countries or for a given country. |
| 376 | 376 | * In the case of an all-country list, the display breaks on the country. |
@@ -397,7 +397,7 @@ discard block |
||
| 397 | 397 | return $html . '</script><span id="target_' . $htmlname . '">' . $this->select_state($selected, $country_codeid, $htmlname, $morecss) . '</span>'; |
| 398 | 398 | } |
| 399 | 399 | |
| 400 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 400 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 401 | 401 | /** |
| 402 | 402 | * Retourne la liste deroulante des regions actives don't le pays est actif |
| 403 | 403 | * La cle de la liste est le code (il peut y avoir plusieurs entree pour |
@@ -410,7 +410,7 @@ discard block |
||
| 410 | 410 | */ |
| 411 | 411 | public function select_region($selected = '', $htmlname = 'region_id') |
| 412 | 412 | { |
| 413 | - // phpcs:enable |
|
| 413 | + // phpcs:enable |
|
| 414 | 414 | global $conf, $langs; |
| 415 | 415 | $langs->load("dict"); |
| 416 | 416 | |
@@ -456,7 +456,7 @@ discard block |
||
| 456 | 456 | } |
| 457 | 457 | } |
| 458 | 458 | |
| 459 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 459 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 460 | 460 | /** |
| 461 | 461 | * Return combo list with people title |
| 462 | 462 | * |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | */ |
| 469 | 469 | public function select_civility($selected = '', $htmlname = 'civility_id', $morecss = 'maxwidth150', $addjscombo = 1) |
| 470 | 470 | { |
| 471 | - // phpcs:enable |
|
| 471 | + // phpcs:enable |
|
| 472 | 472 | global $conf, $langs, $user; |
| 473 | 473 | $langs->load("dict"); |
| 474 | 474 | |
@@ -515,7 +515,7 @@ discard block |
||
| 515 | 515 | return $out; |
| 516 | 516 | } |
| 517 | 517 | |
| 518 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 518 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 519 | 519 | /** |
| 520 | 520 | * Return the list of all juridical entity types for all countries or a specific country. |
| 521 | 521 | * A country separator is included in case the list for all countries is returned. |
@@ -529,11 +529,11 @@ discard block |
||
| 529 | 529 | */ |
| 530 | 530 | public function select_forme_juridique($selected = '', $country_codeid = 0, $filter = '') |
| 531 | 531 | { |
| 532 | - // phpcs:enable |
|
| 532 | + // phpcs:enable |
|
| 533 | 533 | print $this->select_juridicalstatus($selected, $country_codeid, $filter); |
| 534 | 534 | } |
| 535 | 535 | |
| 536 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 536 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 537 | 537 | /** |
| 538 | 538 | * Return the list of all juridical entity types for all countries or a specific country. |
| 539 | 539 | * A country separator is included in case the list for all countries is returned. |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | */ |
| 548 | 548 | public function select_juridicalstatus($selected = '', $country_codeid = 0, $filter = '', $htmlname = 'forme_juridique_code', $morecss = '') |
| 549 | 549 | { |
| 550 | - // phpcs:enable |
|
| 550 | + // phpcs:enable |
|
| 551 | 551 | global $conf, $langs, $user; |
| 552 | 552 | $langs->load("dict"); |
| 553 | 553 | |
@@ -893,7 +893,7 @@ discard block |
||
| 893 | 893 | return 'ErrorBadValueForParameterRenderMode'; // Should not happened |
| 894 | 894 | } |
| 895 | 895 | |
| 896 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 896 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 897 | 897 | /** |
| 898 | 898 | * Return a select list with zip codes and their town |
| 899 | 899 | * |
@@ -908,7 +908,7 @@ discard block |
||
| 908 | 908 | */ |
| 909 | 909 | public function select_ziptown($selected = '', $htmlname = 'zipcode', $fields = array(), $fieldsize = 0, $disableautocomplete = 0, $moreattrib = '', $morecss = '') |
| 910 | 910 | { |
| 911 | - // phpcs:enable |
|
| 911 | + // phpcs:enable |
|
| 912 | 912 | global $conf; |
| 913 | 913 | |
| 914 | 914 | $out = ''; |
@@ -927,7 +927,7 @@ discard block |
||
| 927 | 927 | return $out; |
| 928 | 928 | } |
| 929 | 929 | |
| 930 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 930 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 931 | 931 | /** |
| 932 | 932 | * Return HTML string to use as input of professional id into a HTML page (siren, siret, etc...) |
| 933 | 933 | * |
@@ -940,7 +940,7 @@ discard block |
||
| 940 | 940 | */ |
| 941 | 941 | public function get_input_id_prof($idprof, $htmlname, $preselected, $country_code, $morecss = 'maxwidth200') |
| 942 | 942 | { |
| 943 | - // phpcs:enable |
|
| 943 | + // phpcs:enable |
|
| 944 | 944 | global $conf, $langs, $hookmanager; |
| 945 | 945 | |
| 946 | 946 | $formlength = 0; |
@@ -1005,7 +1005,7 @@ discard block |
||
| 1005 | 1005 | return $out; |
| 1006 | 1006 | } |
| 1007 | 1007 | |
| 1008 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1008 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1009 | 1009 | /** |
| 1010 | 1010 | * Return a HTML select with localtax values for thirdparties |
| 1011 | 1011 | * |
@@ -1016,7 +1016,7 @@ discard block |
||
| 1016 | 1016 | */ |
| 1017 | 1017 | public function select_localtax($local, $selected, $htmlname) |
| 1018 | 1018 | { |
| 1019 | - // phpcs:enable |
|
| 1019 | + // phpcs:enable |
|
| 1020 | 1020 | $tax = get_localtax_by_third($local); |
| 1021 | 1021 | |
| 1022 | 1022 | if ($tax) { |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $this->db = $db; |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 62 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 63 | 63 | /** |
| 64 | 64 | * Function called when a Dolibarr business event occurs |
| 65 | 65 | * This function call all qualified triggers. |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | public function run_triggers($action, $object, $user, $langs, $conf) |
| 75 | 75 | { |
| 76 | - // phpcs:enable |
|
| 76 | + // phpcs:enable |
|
| 77 | 77 | |
| 78 | 78 | if (getDolGlobalInt('MAIN_TRIGGER_DEBUG')) { |
| 79 | 79 | // This his too much verbose, enabled if const enabled only |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | |
| 55 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 55 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 56 | 56 | /** |
| 57 | 57 | * Show list of action status |
| 58 | 58 | * |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function form_select_status_action($formname, $selected, $canedit = 1, $htmlname = 'complete', $showempty = 0, $onlyselect = 0, $morecss = 'maxwidth100') |
| 69 | 69 | { |
| 70 | - // phpcs:enable |
|
| 70 | + // phpcs:enable |
|
| 71 | 71 | global $langs, $conf; |
| 72 | 72 | |
| 73 | 73 | $listofstatus = array( |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | } |
| 339 | 339 | |
| 340 | 340 | |
| 341 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 341 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 342 | 342 | /** |
| 343 | 343 | * Output html select list of type of event |
| 344 | 344 | * |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | */ |
| 355 | 355 | public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0, $morecss = 'minwidth300') |
| 356 | 356 | { |
| 357 | - // phpcs:enable |
|
| 357 | + // phpcs:enable |
|
| 358 | 358 | global $langs, $user, $form, $conf; |
| 359 | 359 | |
| 360 | 360 | if (!is_object($form)) { |
@@ -366,7 +366,7 @@ |
||
| 366 | 366 | $caction = new CActionComm($this->db); |
| 367 | 367 | |
| 368 | 368 | // Suggest a list with manual events or all auto events |
| 369 | - $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0); // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by. |
|
| 369 | + $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0); // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by. |
|
| 370 | 370 | if (empty($multiselect)) { |
| 371 | 371 | // Add empty line at start only if no multiselect |
| 372 | 372 | array_unshift($arraylist, ' '); |
@@ -847,7 +847,7 @@ discard block |
||
| 847 | 847 | return $this->LibStatut($this->status, $mode); |
| 848 | 848 | } |
| 849 | 849 | |
| 850 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 850 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 851 | 851 | /** |
| 852 | 852 | * Return the status |
| 853 | 853 | * |
@@ -857,7 +857,7 @@ discard block |
||
| 857 | 857 | */ |
| 858 | 858 | public function LibStatut($status, $mode = 0) |
| 859 | 859 | { |
| 860 | - // phpcs:enable |
|
| 860 | + // phpcs:enable |
|
| 861 | 861 | if (empty($this->labelStatus) || empty($this->labelStatusShort)) { |
| 862 | 862 | global $langs; |
| 863 | 863 | //$langs->load("timespent@timespent"); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | } |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 120 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 121 | 121 | /** |
| 122 | 122 | * Output edit area inside the HTML stream. |
| 123 | 123 | * Output depends on this->tool (fckeditor, ckeditor, textarea, ...) |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | */ |
| 134 | 134 | public function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $titlecontent = '', $option = '', $moreparam = '', $morecss = '') |
| 135 | 135 | { |
| 136 | - // phpcs:enable |
|
| 136 | + // phpcs:enable |
|
| 137 | 137 | global $conf, $langs; |
| 138 | 138 | |
| 139 | 139 | $fullpage = false; |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | define('REQUIRE_CKEDITOR', '1'); |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - $skin = getDolGlobalString('FCKEDITOR_SKIN', 'moono-lisa'); // default with ckeditor 4.6 : moono-lisa |
|
| 161 | + $skin = getDolGlobalString('FCKEDITOR_SKIN', 'moono-lisa'); // default with ckeditor 4.6 : moono-lisa |
|
| 162 | 162 | |
| 163 | 163 | $pluginstodisable = 'elementspath,save,flash,div,anchor'; |
| 164 | 164 | if (!getDolGlobalString('FCKEDITOR_ENABLE_SPECIALCHAR')) { |
@@ -259,7 +259,7 @@ discard block |
||
| 259 | 259 | filebrowserImageWindowWidth : \'900\', |
| 260 | 260 | filebrowserImageWindowHeight : \'500\''; |
| 261 | 261 | } |
| 262 | - $out .= ' })' . $morejs; // end CKEditor.replace |
|
| 262 | + $out .= ' })' . $morejs; // end CKEditor.replace |
|
| 263 | 263 | // Show the CKEditor javascript object once loaded is ready 'For debug) |
| 264 | 264 | //$out .= '; CKEDITOR.on(\'instanceReady\', function(ck) { ck.editor.removeMenuItem(\'maximize\'); ck.editor.removeMenuItem(\'Undo\'); ck.editor.removeMenuItem(\'undo\'); console.log(ck.editor); console.log(ck.editor.toolbar[0]); }); '; |
| 265 | 265 | $out .= '});' . "\n"; // end document.ready |
@@ -1153,7 +1153,7 @@ discard block |
||
| 1153 | 1153 | } |
| 1154 | 1154 | |
| 1155 | 1155 | |
| 1156 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1156 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1157 | 1157 | /** |
| 1158 | 1158 | * Add a link between element $this->element and a contact |
| 1159 | 1159 | * |
@@ -1165,7 +1165,7 @@ discard block |
||
| 1165 | 1165 | */ |
| 1166 | 1166 | public function add_contact($fk_socpeople, $type_contact, $source = 'external', $notrigger = 0) |
| 1167 | 1167 | { |
| 1168 | - // phpcs:enable |
|
| 1168 | + // phpcs:enable |
|
| 1169 | 1169 | global $user, $langs; |
| 1170 | 1170 | |
| 1171 | 1171 | |
@@ -1263,7 +1263,7 @@ discard block |
||
| 1263 | 1263 | } |
| 1264 | 1264 | } |
| 1265 | 1265 | |
| 1266 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1266 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1267 | 1267 | /** |
| 1268 | 1268 | * Copy contact from one element to current |
| 1269 | 1269 | * |
@@ -1273,7 +1273,7 @@ discard block |
||
| 1273 | 1273 | */ |
| 1274 | 1274 | public function copy_linked_contact($objFrom, $source = 'internal') |
| 1275 | 1275 | { |
| 1276 | - // phpcs:enable |
|
| 1276 | + // phpcs:enable |
|
| 1277 | 1277 | $contacts = $objFrom->liste_contact(-1, $source); |
| 1278 | 1278 | foreach ($contacts as $contact) { |
| 1279 | 1279 | if ($this->add_contact($contact['id'], $contact['fk_c_type_contact'], $contact['source']) < 0) { |
@@ -1283,7 +1283,7 @@ discard block |
||
| 1283 | 1283 | return 1; |
| 1284 | 1284 | } |
| 1285 | 1285 | |
| 1286 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1286 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1287 | 1287 | /** |
| 1288 | 1288 | * Update a link to contact line |
| 1289 | 1289 | * |
@@ -1295,7 +1295,7 @@ discard block |
||
| 1295 | 1295 | */ |
| 1296 | 1296 | public function update_contact($rowid, $statut, $type_contact_id = 0, $fk_socpeople = 0) |
| 1297 | 1297 | { |
| 1298 | - // phpcs:enable |
|
| 1298 | + // phpcs:enable |
|
| 1299 | 1299 | // Insert into database |
| 1300 | 1300 | $sql = "UPDATE " . $this->db->prefix() . "element_contact set"; |
| 1301 | 1301 | $sql .= " statut = " . $statut; |
@@ -1315,7 +1315,7 @@ discard block |
||
| 1315 | 1315 | } |
| 1316 | 1316 | } |
| 1317 | 1317 | |
| 1318 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1318 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1319 | 1319 | /** |
| 1320 | 1320 | * Delete a link to contact line |
| 1321 | 1321 | * |
@@ -1325,7 +1325,7 @@ discard block |
||
| 1325 | 1325 | */ |
| 1326 | 1326 | public function delete_contact($rowid, $notrigger = 0) |
| 1327 | 1327 | { |
| 1328 | - // phpcs:enable |
|
| 1328 | + // phpcs:enable |
|
| 1329 | 1329 | global $user; |
| 1330 | 1330 | |
| 1331 | 1331 | $error = 0; |
@@ -1365,7 +1365,7 @@ discard block |
||
| 1365 | 1365 | } |
| 1366 | 1366 | } |
| 1367 | 1367 | |
| 1368 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1368 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1369 | 1369 | /** |
| 1370 | 1370 | * Delete all links between an object $this and all its contacts in llx_element_contact |
| 1371 | 1371 | * |
@@ -1375,7 +1375,7 @@ discard block |
||
| 1375 | 1375 | */ |
| 1376 | 1376 | public function delete_linked_contact($source = '', $code = '') |
| 1377 | 1377 | { |
| 1378 | - // phpcs:enable |
|
| 1378 | + // phpcs:enable |
|
| 1379 | 1379 | $listId = ''; |
| 1380 | 1380 | $temp = array(); |
| 1381 | 1381 | $typeContact = $this->liste_type_contact($source, '', 0, 0, $code); |
@@ -1406,7 +1406,7 @@ discard block |
||
| 1406 | 1406 | } |
| 1407 | 1407 | } |
| 1408 | 1408 | |
| 1409 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1409 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1410 | 1410 | /** |
| 1411 | 1411 | * Get array of all contacts for an object |
| 1412 | 1412 | * |
@@ -1420,7 +1420,7 @@ discard block |
||
| 1420 | 1420 | */ |
| 1421 | 1421 | public function liste_contact($statusoflink = -1, $source = 'external', $list = 0, $code = '', $status = -1, $arrayoftcids = array()) |
| 1422 | 1422 | { |
| 1423 | - // phpcs:enable |
|
| 1423 | + // phpcs:enable |
|
| 1424 | 1424 | global $langs; |
| 1425 | 1425 | |
| 1426 | 1426 | $tab = array(); |
@@ -1542,7 +1542,7 @@ discard block |
||
| 1542 | 1542 | } |
| 1543 | 1543 | } |
| 1544 | 1544 | |
| 1545 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1545 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1546 | 1546 | /** |
| 1547 | 1547 | * Return array with list of possible values for type of contacts |
| 1548 | 1548 | * |
@@ -1555,7 +1555,7 @@ discard block |
||
| 1555 | 1555 | */ |
| 1556 | 1556 | public function liste_type_contact($source = 'internal', $order = 'position', $option = 0, $activeonly = 0, $code = '') |
| 1557 | 1557 | { |
| 1558 | - // phpcs:enable |
|
| 1558 | + // phpcs:enable |
|
| 1559 | 1559 | global $langs; |
| 1560 | 1560 | |
| 1561 | 1561 | if (empty($order)) { |
@@ -1759,7 +1759,7 @@ discard block |
||
| 1759 | 1759 | return $result; |
| 1760 | 1760 | } |
| 1761 | 1761 | |
| 1762 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1762 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1763 | 1763 | /** |
| 1764 | 1764 | * Load object contact with id=$this->contact_id into $this->contact |
| 1765 | 1765 | * |
@@ -1768,7 +1768,7 @@ discard block |
||
| 1768 | 1768 | */ |
| 1769 | 1769 | public function fetch_contact($contactid = null) |
| 1770 | 1770 | { |
| 1771 | - // phpcs:enable |
|
| 1771 | + // phpcs:enable |
|
| 1772 | 1772 | if (empty($contactid)) { |
| 1773 | 1773 | $contactid = $this->contact_id; |
| 1774 | 1774 | } |
@@ -1784,7 +1784,7 @@ discard block |
||
| 1784 | 1784 | return $result; |
| 1785 | 1785 | } |
| 1786 | 1786 | |
| 1787 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1787 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1788 | 1788 | /** |
| 1789 | 1789 | * Load the third party of object, from id $this->socid or $this->fk_soc, into this->thirdparty |
| 1790 | 1790 | * |
@@ -1793,7 +1793,7 @@ discard block |
||
| 1793 | 1793 | */ |
| 1794 | 1794 | public function fetch_thirdparty($force_thirdparty_id = 0) |
| 1795 | 1795 | { |
| 1796 | - // phpcs:enable |
|
| 1796 | + // phpcs:enable |
|
| 1797 | 1797 | if (empty($this->socid) && empty($this->fk_soc) && empty($force_thirdparty_id)) { |
| 1798 | 1798 | return 0; |
| 1799 | 1799 | } |
@@ -1860,7 +1860,7 @@ discard block |
||
| 1860 | 1860 | } |
| 1861 | 1861 | } |
| 1862 | 1862 | |
| 1863 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1863 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1864 | 1864 | /** |
| 1865 | 1865 | * Load data for barcode into properties ->barcode_type* |
| 1866 | 1866 | * Properties ->barcode_type that is id of barcode. Type is used to find other properties, but |
@@ -1870,7 +1870,7 @@ discard block |
||
| 1870 | 1870 | */ |
| 1871 | 1871 | public function fetch_barcode() |
| 1872 | 1872 | { |
| 1873 | - // phpcs:enable |
|
| 1873 | + // phpcs:enable |
|
| 1874 | 1874 | global $conf; |
| 1875 | 1875 | |
| 1876 | 1876 | dol_syslog(get_class($this) . '::fetch_barcode this->element=' . $this->element . ' this->barcode_type=' . $this->barcode_type); |
@@ -1909,7 +1909,7 @@ discard block |
||
| 1909 | 1909 | return 0; |
| 1910 | 1910 | } |
| 1911 | 1911 | |
| 1912 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1912 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1913 | 1913 | /** |
| 1914 | 1914 | * Load the project with id $this->fk_project into this->project |
| 1915 | 1915 | * |
@@ -1917,11 +1917,11 @@ discard block |
||
| 1917 | 1917 | */ |
| 1918 | 1918 | public function fetch_project() |
| 1919 | 1919 | { |
| 1920 | - // phpcs:enable |
|
| 1920 | + // phpcs:enable |
|
| 1921 | 1921 | return $this->fetch_projet(); |
| 1922 | 1922 | } |
| 1923 | 1923 | |
| 1924 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1924 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1925 | 1925 | /** |
| 1926 | 1926 | * Load the project with id $this->fk_project into this->project |
| 1927 | 1927 | * |
@@ -1929,7 +1929,7 @@ discard block |
||
| 1929 | 1929 | */ |
| 1930 | 1930 | public function fetch_projet() |
| 1931 | 1931 | { |
| 1932 | - // phpcs:enable |
|
| 1932 | + // phpcs:enable |
|
| 1933 | 1933 | include_once DOL_DOCUMENT_ROOT . '/projet/class/project.class.php'; |
| 1934 | 1934 | |
| 1935 | 1935 | if (empty($this->fk_project) && !empty($this->fk_projet)) { |
@@ -1947,7 +1947,7 @@ discard block |
||
| 1947 | 1947 | return $result; |
| 1948 | 1948 | } |
| 1949 | 1949 | |
| 1950 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1950 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1951 | 1951 | /** |
| 1952 | 1952 | * Load the product with id $this->fk_product into this->product |
| 1953 | 1953 | * |
@@ -1955,7 +1955,7 @@ discard block |
||
| 1955 | 1955 | */ |
| 1956 | 1956 | public function fetch_product() |
| 1957 | 1957 | { |
| 1958 | - // phpcs:enable |
|
| 1958 | + // phpcs:enable |
|
| 1959 | 1959 | include_once DOL_DOCUMENT_ROOT . '/product/class/product.class.php'; |
| 1960 | 1960 | |
| 1961 | 1961 | if (empty($this->fk_product)) { |
@@ -1969,7 +1969,7 @@ discard block |
||
| 1969 | 1969 | return $result; |
| 1970 | 1970 | } |
| 1971 | 1971 | |
| 1972 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1972 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1973 | 1973 | /** |
| 1974 | 1974 | * Load the user with id $userid into this->user |
| 1975 | 1975 | * |
@@ -1978,14 +1978,14 @@ discard block |
||
| 1978 | 1978 | */ |
| 1979 | 1979 | public function fetch_user($userid) |
| 1980 | 1980 | { |
| 1981 | - // phpcs:enable |
|
| 1981 | + // phpcs:enable |
|
| 1982 | 1982 | $user = new User($this->db); |
| 1983 | 1983 | $result = $user->fetch($userid); |
| 1984 | 1984 | $this->user = $user; |
| 1985 | 1985 | return $result; |
| 1986 | 1986 | } |
| 1987 | 1987 | |
| 1988 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1988 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 1989 | 1989 | /** |
| 1990 | 1990 | * Read linked origin object. |
| 1991 | 1991 | * Set ->origin_object |
@@ -1995,7 +1995,7 @@ discard block |
||
| 1995 | 1995 | */ |
| 1996 | 1996 | public function fetch_origin() |
| 1997 | 1997 | { |
| 1998 | - // phpcs:enable |
|
| 1998 | + // phpcs:enable |
|
| 1999 | 1999 | if ($this->origin == 'shipping') { |
| 2000 | 2000 | $this->origin = 'expedition'; |
| 2001 | 2001 | } |
@@ -2222,7 +2222,7 @@ discard block |
||
| 2222 | 2222 | } |
| 2223 | 2223 | } |
| 2224 | 2224 | |
| 2225 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2225 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2226 | 2226 | /** |
| 2227 | 2227 | * Load properties id_previous and id_next by comparing $fieldid with $this->ref |
| 2228 | 2228 | * |
@@ -2234,7 +2234,7 @@ discard block |
||
| 2234 | 2234 | */ |
| 2235 | 2235 | public function load_previous_next_ref($filter, $fieldid, $nodbprefix = 0) |
| 2236 | 2236 | { |
| 2237 | - // phpcs:enable |
|
| 2237 | + // phpcs:enable |
|
| 2238 | 2238 | global $conf, $user; |
| 2239 | 2239 | |
| 2240 | 2240 | if (!$this->table_element) { |
@@ -3174,7 +3174,7 @@ discard block |
||
| 3174 | 3174 | |
| 3175 | 3175 | // TODO: Move line related operations to CommonObjectLine? |
| 3176 | 3176 | |
| 3177 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3177 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3178 | 3178 | /** |
| 3179 | 3179 | * Save a new position (field rang) for details lines. |
| 3180 | 3180 | * You can choose to set position for lines with already a position or lines without any position defined. |
@@ -3186,7 +3186,7 @@ discard block |
||
| 3186 | 3186 | */ |
| 3187 | 3187 | public function line_order($renum = false, $rowidorder = 'ASC', $fk_parent_line = true) |
| 3188 | 3188 | { |
| 3189 | - // phpcs:enable |
|
| 3189 | + // phpcs:enable |
|
| 3190 | 3190 | if (!$this->table_element_line) { |
| 3191 | 3191 | dol_syslog(get_class($this) . "::line_order was called on object with property table_element_line not defined", LOG_ERR); |
| 3192 | 3192 | return -1; |
@@ -3298,7 +3298,7 @@ discard block |
||
| 3298 | 3298 | return $rows; |
| 3299 | 3299 | } |
| 3300 | 3300 | |
| 3301 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3301 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3302 | 3302 | /** |
| 3303 | 3303 | * Update a line to have a lower rank |
| 3304 | 3304 | * |
@@ -3308,7 +3308,7 @@ discard block |
||
| 3308 | 3308 | */ |
| 3309 | 3309 | public function line_up($rowid, $fk_parent_line = true) |
| 3310 | 3310 | { |
| 3311 | - // phpcs:enable |
|
| 3311 | + // phpcs:enable |
|
| 3312 | 3312 | $this->line_order(false, 'ASC', $fk_parent_line); |
| 3313 | 3313 | |
| 3314 | 3314 | // Get rang of line |
@@ -3318,7 +3318,7 @@ discard block |
||
| 3318 | 3318 | $this->updateLineUp($rowid, $rang); |
| 3319 | 3319 | } |
| 3320 | 3320 | |
| 3321 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3321 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3322 | 3322 | /** |
| 3323 | 3323 | * Update a line to have a higher rank |
| 3324 | 3324 | * |
@@ -3328,7 +3328,7 @@ discard block |
||
| 3328 | 3328 | */ |
| 3329 | 3329 | public function line_down($rowid, $fk_parent_line = true) |
| 3330 | 3330 | { |
| 3331 | - // phpcs:enable |
|
| 3331 | + // phpcs:enable |
|
| 3332 | 3332 | $this->line_order(false, 'ASC', $fk_parent_line); |
| 3333 | 3333 | |
| 3334 | 3334 | // Get rang of line |
@@ -3371,7 +3371,7 @@ discard block |
||
| 3371 | 3371 | } |
| 3372 | 3372 | } |
| 3373 | 3373 | |
| 3374 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3374 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3375 | 3375 | /** |
| 3376 | 3376 | * Update position of line with ajax (rang) |
| 3377 | 3377 | * |
@@ -3380,7 +3380,7 @@ discard block |
||
| 3380 | 3380 | */ |
| 3381 | 3381 | public function line_ajaxorder($rows) |
| 3382 | 3382 | { |
| 3383 | - // phpcs:enable |
|
| 3383 | + // phpcs:enable |
|
| 3384 | 3384 | $num = count($rows); |
| 3385 | 3385 | for ($i = 0; $i < $num; $i++) { |
| 3386 | 3386 | $this->updateRangOfLine($rows[$i], ($i + 1)); |
@@ -3499,7 +3499,7 @@ discard block |
||
| 3499 | 3499 | return 0; |
| 3500 | 3500 | } |
| 3501 | 3501 | |
| 3502 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3502 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3503 | 3503 | /** |
| 3504 | 3504 | * Get max value used for position of line (rang) |
| 3505 | 3505 | * |
@@ -3508,7 +3508,7 @@ discard block |
||
| 3508 | 3508 | */ |
| 3509 | 3509 | public function line_max($fk_parent_line = 0) |
| 3510 | 3510 | { |
| 3511 | - // phpcs:enable |
|
| 3511 | + // phpcs:enable |
|
| 3512 | 3512 | $positionfield = 'rang'; |
| 3513 | 3513 | if (in_array($this->table_element, array('bom_bom', 'product_attribute'))) { |
| 3514 | 3514 | $positionfield = 'position'; |
@@ -3546,7 +3546,7 @@ discard block |
||
| 3546 | 3546 | return 0; |
| 3547 | 3547 | } |
| 3548 | 3548 | |
| 3549 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3549 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3550 | 3550 | /** |
| 3551 | 3551 | * Update external ref of element |
| 3552 | 3552 | * |
@@ -3555,7 +3555,7 @@ discard block |
||
| 3555 | 3555 | */ |
| 3556 | 3556 | public function update_ref_ext($ref_ext) |
| 3557 | 3557 | { |
| 3558 | - // phpcs:enable |
|
| 3558 | + // phpcs:enable |
|
| 3559 | 3559 | if (!$this->table_element) { |
| 3560 | 3560 | dol_syslog(get_class($this) . "::update_ref_ext was called on object with property table_element not defined", LOG_ERR); |
| 3561 | 3561 | return -1; |
@@ -3575,7 +3575,7 @@ discard block |
||
| 3575 | 3575 | } |
| 3576 | 3576 | } |
| 3577 | 3577 | |
| 3578 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3578 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3579 | 3579 | /** |
| 3580 | 3580 | * Update note of element |
| 3581 | 3581 | * |
@@ -3586,7 +3586,7 @@ discard block |
||
| 3586 | 3586 | */ |
| 3587 | 3587 | public function update_note($note, $suffix = '', $notrigger = 0) |
| 3588 | 3588 | { |
| 3589 | - // phpcs:enable |
|
| 3589 | + // phpcs:enable |
|
| 3590 | 3590 | global $user; |
| 3591 | 3591 | |
| 3592 | 3592 | if (!$this->table_element) { |
@@ -3663,7 +3663,7 @@ discard block |
||
| 3663 | 3663 | } |
| 3664 | 3664 | } |
| 3665 | 3665 | |
| 3666 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3666 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3667 | 3667 | /** |
| 3668 | 3668 | * Update public note (kept for backward compatibility) |
| 3669 | 3669 | * |
@@ -3674,11 +3674,11 @@ discard block |
||
| 3674 | 3674 | */ |
| 3675 | 3675 | public function update_note_public($note) |
| 3676 | 3676 | { |
| 3677 | - // phpcs:enable |
|
| 3677 | + // phpcs:enable |
|
| 3678 | 3678 | return $this->update_note($note, '_public'); |
| 3679 | 3679 | } |
| 3680 | 3680 | |
| 3681 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3681 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3682 | 3682 | /** |
| 3683 | 3683 | * Update total_ht, total_ttc, total_vat, total_localtax1, total_localtax2 for an object (sum of lines). |
| 3684 | 3684 | * Must be called at end of methods addline or updateline. |
@@ -3691,7 +3691,7 @@ discard block |
||
| 3691 | 3691 | */ |
| 3692 | 3692 | public function update_price($exclspec = 0, $roundingadjust = 'none', $nodatabaseupdate = 0, $seller = null) |
| 3693 | 3693 | { |
| 3694 | - // phpcs:enable |
|
| 3694 | + // phpcs:enable |
|
| 3695 | 3695 | global $conf, $hookmanager, $action; |
| 3696 | 3696 | |
| 3697 | 3697 | $parameters = array('exclspec' => $exclspec, 'roundingadjust' => $roundingadjust, 'nodatabaseupdate' => $nodatabaseupdate, 'seller' => $seller); |
@@ -3970,7 +3970,7 @@ discard block |
||
| 3970 | 3970 | } |
| 3971 | 3971 | } |
| 3972 | 3972 | |
| 3973 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3973 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 3974 | 3974 | /** |
| 3975 | 3975 | * Add an object link into llx_element_element. |
| 3976 | 3976 | * |
@@ -3983,7 +3983,7 @@ discard block |
||
| 3983 | 3983 | */ |
| 3984 | 3984 | public function add_object_linked($origin = null, $origin_id = null, $f_user = null, $notrigger = 0) |
| 3985 | 3985 | { |
| 3986 | - // phpcs:enable |
|
| 3986 | + // phpcs:enable |
|
| 3987 | 3987 | global $user, $hookmanager, $action; |
| 3988 | 3988 | $origin = (!empty($origin) ? $origin : $this->origin); |
| 3989 | 3989 | $origin_id = (!empty($origin_id) ? $origin_id : $this->origin_id); |
@@ -5455,7 +5455,7 @@ discard block |
||
| 5455 | 5455 | } |
| 5456 | 5456 | |
| 5457 | 5457 | |
| 5458 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5458 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5459 | 5459 | /** |
| 5460 | 5460 | * Add resources to the current object : add entry into llx_element_resources |
| 5461 | 5461 | * Need $this->element & $this->id |
@@ -5468,7 +5468,7 @@ discard block |
||
| 5468 | 5468 | */ |
| 5469 | 5469 | public function add_element_resource($resource_id, $resource_type, $busy = 0, $mandatory = 0) |
| 5470 | 5470 | { |
| 5471 | - // phpcs:enable |
|
| 5471 | + // phpcs:enable |
|
| 5472 | 5472 | $this->db->begin(); |
| 5473 | 5473 | |
| 5474 | 5474 | $sql = "INSERT INTO " . $this->db->prefix() . "element_resources ("; |
@@ -5498,7 +5498,7 @@ discard block |
||
| 5498 | 5498 | } |
| 5499 | 5499 | } |
| 5500 | 5500 | |
| 5501 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5501 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5502 | 5502 | /** |
| 5503 | 5503 | * Delete a link to resource line |
| 5504 | 5504 | * |
@@ -5509,7 +5509,7 @@ discard block |
||
| 5509 | 5509 | */ |
| 5510 | 5510 | public function delete_resource($rowid, $element, $notrigger = 0) |
| 5511 | 5511 | { |
| 5512 | - // phpcs:enable |
|
| 5512 | + // phpcs:enable |
|
| 5513 | 5513 | global $user; |
| 5514 | 5514 | |
| 5515 | 5515 | $this->db->begin(); |
@@ -5979,7 +5979,7 @@ discard block |
||
| 5979 | 5979 | /* For triggers */ |
| 5980 | 5980 | |
| 5981 | 5981 | |
| 5982 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5982 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 5983 | 5983 | /** |
| 5984 | 5984 | * Call trigger based on this instance. |
| 5985 | 5985 | * Some context information may also be provided into array property this->context. |
@@ -5992,7 +5992,7 @@ discard block |
||
| 5992 | 5992 | */ |
| 5993 | 5993 | public function call_trigger($triggerName, $user) |
| 5994 | 5994 | { |
| 5995 | - // phpcs:enable |
|
| 5995 | + // phpcs:enable |
|
| 5996 | 5996 | global $langs, $conf; |
| 5997 | 5997 | |
| 5998 | 5998 | if (!empty(self::TRIGGER_PREFIX) && strpos($triggerName, self::TRIGGER_PREFIX . '_') !== 0) { |
@@ -6197,7 +6197,7 @@ discard block |
||
| 6197 | 6197 | return $ret; |
| 6198 | 6198 | } |
| 6199 | 6199 | |
| 6200 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6200 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 6201 | 6201 | /** |
| 6202 | 6202 | * Function to get extra fields of an object into $this->array_options |
| 6203 | 6203 | * This method is in most cases called by method fetch of objects but you can call it separately. |
@@ -6209,7 +6209,7 @@ discard block |
||
| 6209 | 6209 | */ |
| 6210 | 6210 | public function fetch_optionals($rowid = null, $optionsArray = null) |
| 6211 | 6211 | { |
| 6212 | - // phpcs:enable |
|
| 6212 | + // phpcs:enable |
|
| 6213 | 6213 | global $conf, $extrafields; |
| 6214 | 6214 | |
| 6215 | 6215 | if (empty($rowid)) { |
@@ -9064,7 +9064,7 @@ discard block |
||
| 9064 | 9064 | return array('dir' => $dir, 'file' => $file, 'originalfile' => $originalfile, 'altfile' => $altfile, 'email' => $email, 'capture' => $capture); |
| 9065 | 9065 | } |
| 9066 | 9066 | |
| 9067 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 9067 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 9068 | 9068 | /** |
| 9069 | 9069 | * Show photos of an object (nbmax maximum), into several columns |
| 9070 | 9070 | * |
@@ -9086,7 +9086,7 @@ discard block |
||
| 9086 | 9086 | */ |
| 9087 | 9087 | public function show_photos($modulepart, $sdir, $size = 0, $nbmax = 0, $nbbyrow = 5, $showfilename = 0, $showaction = 0, $maxHeight = 120, $maxWidth = 160, $nolink = 0, $overwritetitle = 0, $usesharelink = 0, $cache = '', $addphotorefcss = 'photoref') |
| 9088 | 9088 | { |
| 9089 | - // phpcs:enable |
|
| 9089 | + // phpcs:enable |
|
| 9090 | 9090 | global $conf, $user, $langs; |
| 9091 | 9091 | |
| 9092 | 9092 | include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; |
@@ -508,12 +508,12 @@ discard block |
||
| 508 | 508 | /** |
| 509 | 509 | * @var float Multicurrency total localta1 |
| 510 | 510 | */ |
| 511 | - public $multicurrency_total_localtax1; // not in database |
|
| 511 | + public $multicurrency_total_localtax1; // not in database |
|
| 512 | 512 | |
| 513 | 513 | /** |
| 514 | 514 | * @var float Multicurrency total localtax2 |
| 515 | 515 | */ |
| 516 | - public $multicurrency_total_localtax2; // not in database |
|
| 516 | + public $multicurrency_total_localtax2; // not in database |
|
| 517 | 517 | |
| 518 | 518 | /** |
| 519 | 519 | * @var string |
@@ -3607,7 +3607,7 @@ discard block |
||
| 3607 | 3607 | $newsuffix = ''; |
| 3608 | 3608 | } |
| 3609 | 3609 | if (in_array($this->table_element, array('actioncomm', 'adherent', 'advtargetemailing', 'cronjob', 'establishment'))) { |
| 3610 | - $fieldusermod = "fk_user_mod"; |
|
| 3610 | + $fieldusermod = "fk_user_mod"; |
|
| 3611 | 3611 | } elseif ($this->table_element == 'ecm_files') { |
| 3612 | 3612 | $fieldusermod = "fk_user_m"; |
| 3613 | 3613 | } else { |
@@ -4554,14 +4554,14 @@ discard block |
||
| 4554 | 4554 | $sql .= ", date_validation = '" . $this->db->idate(dol_now()) . "'"; |
| 4555 | 4555 | } |
| 4556 | 4556 | $sql .= " WHERE rowid = " . ((int) $elementId); |
| 4557 | - $sql .= " AND " . $fieldstatus . " <> " . ((int) $status); // We avoid update if status already correct |
|
| 4557 | + $sql .= " AND " . $fieldstatus . " <> " . ((int) $status); // We avoid update if status already correct |
|
| 4558 | 4558 | |
| 4559 | 4559 | dol_syslog(get_class($this) . "::setStatut", LOG_DEBUG); |
| 4560 | 4560 | $resql = $this->db->query($sql); |
| 4561 | 4561 | if ($resql) { |
| 4562 | 4562 | $error = 0; |
| 4563 | 4563 | |
| 4564 | - $nb_rows_affected = $this->db->affected_rows($resql); // should be 1 or 0 if status was already correct |
|
| 4564 | + $nb_rows_affected = $this->db->affected_rows($resql); // should be 1 or 0 if status was already correct |
|
| 4565 | 4565 | |
| 4566 | 4566 | if ($nb_rows_affected > 0) { |
| 4567 | 4567 | if (empty($trigkey)) { |
@@ -4606,7 +4606,7 @@ discard block |
||
| 4606 | 4606 | if ($fieldstatus == 'tosell') { |
| 4607 | 4607 | $this->status = $status; |
| 4608 | 4608 | } elseif ($fieldstatus == 'tobuy') { |
| 4609 | - $this->status_buy = $status; // @phpstan-ignore-line |
|
| 4609 | + $this->status_buy = $status; // @phpstan-ignore-line |
|
| 4610 | 4610 | } else { |
| 4611 | 4611 | $this->statut = $status; |
| 4612 | 4612 | $this->status = $status; |
@@ -4715,7 +4715,7 @@ discard block |
||
| 4715 | 4715 | return -1; |
| 4716 | 4716 | } |
| 4717 | 4717 | |
| 4718 | - $arraytoscan = $this->childtables; // array('tablename'=>array('fk_element'=>'parentfield'), ...) or array('tablename'=>array('parent'=>table_parent, 'parentkey'=>'nameoffieldforparentfkkey'), ...) |
|
| 4718 | + $arraytoscan = $this->childtables; // array('tablename'=>array('fk_element'=>'parentfield'), ...) or array('tablename'=>array('parent'=>table_parent, 'parentkey'=>'nameoffieldforparentfkkey'), ...) |
|
| 4719 | 4719 | // For backward compatibility, we check if array is old format array('tablename1', 'tablename2', ...) |
| 4720 | 4720 | $tmparray = array_keys($this->childtables); |
| 4721 | 4721 | if (is_numeric($tmparray[0])) { |
@@ -5783,7 +5783,7 @@ discard block |
||
| 5783 | 5783 | $setsharekey = false; |
| 5784 | 5784 | if ($this->element == 'propal' || $this->element == 'proposal') { |
| 5785 | 5785 | if (getDolGlobalInt("PROPOSAL_ALLOW_ONLINESIGN")) { |
| 5786 | - $setsharekey = true; // feature to make online signature is not set or set to on (default) |
|
| 5786 | + $setsharekey = true; // feature to make online signature is not set or set to on (default) |
|
| 5787 | 5787 | } |
| 5788 | 5788 | if (getDolGlobalInt("PROPOSAL_ALLOW_EXTERNAL_DOWNLOAD")) { |
| 5789 | 5789 | $setsharekey = true; |
@@ -5841,7 +5841,7 @@ discard block |
||
| 5841 | 5841 | $ecmfile->gen_or_uploaded = 'generated'; |
| 5842 | 5842 | $ecmfile->description = ''; // indexed content |
| 5843 | 5843 | $ecmfile->keywords = ''; // keyword content |
| 5844 | - $ecmfile->src_object_type = $this->table_element; // $this->table_name is 'myobject' or 'mymodule_myobject'. |
|
| 5844 | + $ecmfile->src_object_type = $this->table_element; // $this->table_name is 'myobject' or 'mymodule_myobject'. |
|
| 5845 | 5845 | $ecmfile->src_object_id = $this->id; |
| 5846 | 5846 | |
| 5847 | 5847 | $result = $ecmfile->create($user); |
@@ -5893,7 +5893,7 @@ discard block |
||
| 5893 | 5893 | $maxwidthmini = $tmparraysize['maxwidthmini']; |
| 5894 | 5894 | $maxheightmini = $tmparraysize['maxheightmini']; |
| 5895 | 5895 | //$quality = $tmparraysize['quality']; |
| 5896 | - $quality = 50; // For thumbs, we force quality to 50 |
|
| 5896 | + $quality = 50; // For thumbs, we force quality to 50 |
|
| 5897 | 5897 | |
| 5898 | 5898 | // Create small thumbs for company (Ratio is near 16/9) |
| 5899 | 5899 | // Used on logon for example |
@@ -6190,7 +6190,7 @@ discard block |
||
| 6190 | 6190 | $savDisableCompute = $conf->disable_compute; |
| 6191 | 6191 | $conf->disable_compute = 1; |
| 6192 | 6192 | |
| 6193 | - $ret = $this->fetch($id); /* @phpstan-ignore-line */ |
|
| 6193 | + $ret = $this->fetch($id); /* @phpstan-ignore-line */ |
|
| 6194 | 6194 | |
| 6195 | 6195 | $conf->disable_compute = $savDisableCompute; |
| 6196 | 6196 | |
@@ -6294,8 +6294,8 @@ discard block |
||
| 6294 | 6294 | if (!empty($extrafields->attributes[$this->table_element]) && !empty($extrafields->attributes[$this->table_element]['computed'][$key])) { |
| 6295 | 6295 | //var_dump($conf->disable_compute); |
| 6296 | 6296 | if (empty($conf->disable_compute)) { |
| 6297 | - global $objectoffield; // We set a global variable to $objectoffield so |
|
| 6298 | - $objectoffield = $this; // we can use it inside computed formula |
|
| 6297 | + global $objectoffield; // We set a global variable to $objectoffield so |
|
| 6298 | + $objectoffield = $this; // we can use it inside computed formula |
|
| 6299 | 6299 | $this->array_options['options_' . $key] = dol_eval($extrafields->attributes[$this->table_element]['computed'][$key], 1, 0, '2'); |
| 6300 | 6300 | } |
| 6301 | 6301 | } |
@@ -6477,7 +6477,7 @@ discard block |
||
| 6477 | 6477 | // If old value encrypted in database is same than submitted new value, it means we don't change it, so we don't update. |
| 6478 | 6478 | if ($algo == 'dolcrypt') { // dolibarr reversible encryption |
| 6479 | 6479 | if (!preg_match('/^dolcrypt:/', $this->array_options[$key])) { |
| 6480 | - $new_array_options[$key] = dolEncrypt($this->array_options[$key]); // warning, must be called when on the master |
|
| 6480 | + $new_array_options[$key] = dolEncrypt($this->array_options[$key]); // warning, must be called when on the master |
|
| 6481 | 6481 | } else { |
| 6482 | 6482 | $new_array_options[$key] = $this->array_options[$key]; // Value is kept |
| 6483 | 6483 | } |
@@ -6488,7 +6488,7 @@ discard block |
||
| 6488 | 6488 | // If value has changed |
| 6489 | 6489 | if ($algo == 'dolcrypt') { // dolibarr reversible encryption |
| 6490 | 6490 | if (!preg_match('/^dolcrypt:/', $this->array_options[$key])) { |
| 6491 | - $new_array_options[$key] = dolEncrypt($this->array_options[$key]); // warning, must be called when on the master |
|
| 6491 | + $new_array_options[$key] = dolEncrypt($this->array_options[$key]); // warning, must be called when on the master |
|
| 6492 | 6492 | } else { |
| 6493 | 6493 | $new_array_options[$key] = $this->array_options[$key]; // Value is kept |
| 6494 | 6494 | } |
@@ -6500,7 +6500,7 @@ discard block |
||
| 6500 | 6500 | //var_dump('jjj'.$algo.' '.$this->oldcopy->array_options[$key].' -> '.$this->array_options[$key]); |
| 6501 | 6501 | // If this->oldcopy is not defined, we can't know if we change attribute or not, so we must keep value |
| 6502 | 6502 | if ($algo == 'dolcrypt' && !preg_match('/^dolcrypt:/', $this->array_options[$key])) { // dolibarr reversible encryption |
| 6503 | - $new_array_options[$key] = dolEncrypt($this->array_options[$key]); // warning, must be called when on the master |
|
| 6503 | + $new_array_options[$key] = dolEncrypt($this->array_options[$key]); // warning, must be called when on the master |
|
| 6504 | 6504 | } else { |
| 6505 | 6505 | $new_array_options[$key] = $this->array_options[$key]; // Value is kept |
| 6506 | 6506 | } |
@@ -6897,7 +6897,7 @@ discard block |
||
| 6897 | 6897 | if (isset($this->oldcopy->array_options["options_" . $key]) && $this->array_options["options_" . $key] == $this->oldcopy->array_options["options_" . $key]) { // If old value encrypted in database is same than submitted new value, it means we don't change it, so we don't update. |
| 6898 | 6898 | if ($algo == 'dolcrypt') { // dolibarr reversible encryption |
| 6899 | 6899 | if (!preg_match('/^dolcrypt:/', $this->array_options["options_" . $key])) { |
| 6900 | - $new_array_options["options_" . $key] = dolEncrypt($this->array_options["options_" . $key]); // warning, must be called when on the master |
|
| 6900 | + $new_array_options["options_" . $key] = dolEncrypt($this->array_options["options_" . $key]); // warning, must be called when on the master |
|
| 6901 | 6901 | } else { |
| 6902 | 6902 | $new_array_options["options_" . $key] = $this->array_options["options_" . $key]; // Value is kept |
| 6903 | 6903 | } |
@@ -6917,7 +6917,7 @@ discard block |
||
| 6917 | 6917 | } |
| 6918 | 6918 | } else { |
| 6919 | 6919 | if ($algo == 'dolcrypt' && !preg_match('/^dolcrypt:/', $this->array_options["options_" . $key])) { // dolibarr reversible encryption |
| 6920 | - $new_array_options["options_" . $key] = dolEncrypt($this->array_options["options_" . $key]); // warning, must be called when on the master |
|
| 6920 | + $new_array_options["options_" . $key] = dolEncrypt($this->array_options["options_" . $key]); // warning, must be called when on the master |
|
| 6921 | 6921 | } else { |
| 6922 | 6922 | $new_array_options["options_" . $key] = $this->array_options["options_" . $key]; // Value is kept |
| 6923 | 6923 | } |
@@ -7301,7 +7301,7 @@ discard block |
||
| 7301 | 7301 | } |
| 7302 | 7302 | $out = '<input type="text" class="flat ' . $morecss . ' maxwidthonsmartphone" name="' . $keyprefix . $key . $keysuffix . '" id="' . $keyprefix . $key . $keysuffix . '" value="' . $value . '" ' . ($moreparam ? $moreparam : '') . '> '; |
| 7303 | 7303 | } elseif ($type == 'select') { // combo list |
| 7304 | - $out = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 7304 | + $out = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 7305 | 7305 | if (!empty($conf->use_javascript_ajax) && !getDolGlobalString('MAIN_EXTRAFIELDS_DISABLE_SELECT2')) { |
| 7306 | 7306 | include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; |
| 7307 | 7307 | $out .= ajax_combobox($keyprefix . $key . $keysuffix, array(), 0); |
@@ -7333,7 +7333,7 @@ discard block |
||
| 7333 | 7333 | $out .= $tmpselect; |
| 7334 | 7334 | $out .= '</select>'; |
| 7335 | 7335 | } elseif ($type == 'sellist') { |
| 7336 | - $out = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 7336 | + $out = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 7337 | 7337 | if (!empty($conf->use_javascript_ajax) && !getDolGlobalString('MAIN_EXTRAFIELDS_DISABLE_SELECT2')) { |
| 7338 | 7338 | include_once DOL_DOCUMENT_ROOT . '/core/lib/ajax.lib.php'; |
| 7339 | 7339 | $out .= ajax_combobox($keyprefix . $key . $keysuffix, array(), 0); |
@@ -7343,7 +7343,7 @@ discard block |
||
| 7343 | 7343 | if (is_array($param['options'])) { |
| 7344 | 7344 | $param_list = array_keys($param['options']); |
| 7345 | 7345 | $InfoFieldList = explode(":", $param_list[0], 5); |
| 7346 | - if (! empty($InfoFieldList[4])) { |
|
| 7346 | + if (!empty($InfoFieldList[4])) { |
|
| 7347 | 7347 | $pos = 0; |
| 7348 | 7348 | $parenthesisopen = 0; |
| 7349 | 7349 | while (substr($InfoFieldList[4], $pos, 1) !== '' && ($parenthesisopen || $pos == 0 || substr($InfoFieldList[4], $pos, 1) != ':')) { |
@@ -7527,7 +7527,7 @@ discard block |
||
| 7527 | 7527 | $value_arr = explode(',', $value); |
| 7528 | 7528 | $out = $form->multiselectarray($keyprefix . $key . $keysuffix, (empty($param['options']) ? null : $param['options']), $value_arr, '', 0, $morecss, 0, '100%'); |
| 7529 | 7529 | } elseif ($type == 'radio') { |
| 7530 | - $out = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 7530 | + $out = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 7531 | 7531 | foreach ($param['options'] as $keyopt => $valopt) { |
| 7532 | 7532 | $out .= '<input class="flat ' . $morecss . '" type="radio" name="' . $keyprefix . $key . $keysuffix . '" id="' . $keyprefix . $key . $keysuffix . '" ' . ($moreparam ? $moreparam : ''); |
| 7533 | 7533 | $out .= ' value="' . $keyopt . '"'; |
@@ -7748,7 +7748,7 @@ discard block |
||
| 7748 | 7748 | $newval = $val; |
| 7749 | 7749 | $newval['type'] = 'varchar(256)'; |
| 7750 | 7750 | |
| 7751 | - $out = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 7751 | + $out = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment |
|
| 7752 | 7752 | if (!empty($value)) { |
| 7753 | 7753 | foreach ($value as $option) { |
| 7754 | 7754 | $out .= '<span><a class="' . dol_escape_htmltag($keyprefix . $key . $keysuffix) . '_del" href="javascript:;"><span class="fa fa-minus-circle valignmiddle"></span></a> '; |
@@ -9758,7 +9758,7 @@ discard block |
||
| 9758 | 9758 | if (!$error) { |
| 9759 | 9759 | $sql = "INSERT INTO " . $this->db->prefix() . $this->table_element; |
| 9760 | 9760 | $sql .= " (" . implode(", ", $keys) . ')'; |
| 9761 | - $sql .= " VALUES (" . implode(", ", $values) . ")"; // $values can contains 'abc' or 123 |
|
| 9761 | + $sql .= " VALUES (" . implode(", ", $values) . ")"; // $values can contains 'abc' or 123 |
|
| 9762 | 9762 | |
| 9763 | 9763 | $res = $this->db->query($sql); |
| 9764 | 9764 | if (!$res) { |
@@ -10051,7 +10051,7 @@ discard block |
||
| 10051 | 10051 | |
| 10052 | 10052 | // Update extrafield |
| 10053 | 10053 | if (!$error) { |
| 10054 | - $result = $this->insertExtraFields(); // This delete and reinsert extrafields |
|
| 10054 | + $result = $this->insertExtraFields(); // This delete and reinsert extrafields |
|
| 10055 | 10055 | if ($result < 0) { |
| 10056 | 10056 | $error++; |
| 10057 | 10057 | } |
@@ -10252,7 +10252,7 @@ discard block |
||
| 10252 | 10252 | $error++; |
| 10253 | 10253 | } else { |
| 10254 | 10254 | while ($obj = $this->db->fetch_object($resql)) { |
| 10255 | - $result = $this->fetch($obj->rowid); // @phpstan-ignore-line |
|
| 10255 | + $result = $this->fetch($obj->rowid); // @phpstan-ignore-line |
|
| 10256 | 10256 | if ($result < 0) { |
| 10257 | 10257 | $error++; |
| 10258 | 10258 | $this->errors[] = $this->error; |
@@ -10469,7 +10469,7 @@ discard block |
||
| 10469 | 10469 | ); |
| 10470 | 10470 | foreach ($fields as $key => $value) { |
| 10471 | 10471 | if (array_key_exists($key, $this->fields)) { |
| 10472 | - $this->{$key} = $value; // @phpstan-ignore-line |
|
| 10472 | + $this->{$key} = $value; // @phpstan-ignore-line |
|
| 10473 | 10473 | } |
| 10474 | 10474 | } |
| 10475 | 10475 | |
@@ -227,7 +227,7 @@ discard block |
||
| 227 | 227 | $this->withfckeditor = -1; // -1 = Auto |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 230 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 231 | 231 | /** |
| 232 | 232 | * Clear list of attached files in send mail form (also stored in session) |
| 233 | 233 | * |
@@ -235,7 +235,7 @@ discard block |
||
| 235 | 235 | */ |
| 236 | 236 | public function clear_attached_files() |
| 237 | 237 | { |
| 238 | - // phpcs:enable |
|
| 238 | + // phpcs:enable |
|
| 239 | 239 | global $conf, $user; |
| 240 | 240 | require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php'; |
| 241 | 241 | |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | unset($_SESSION["listofmimes" . $keytoavoidconflict]); |
| 253 | 253 | } |
| 254 | 254 | |
| 255 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 255 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 256 | 256 | /** |
| 257 | 257 | * Add a file into the list of attached files (stored in SECTION array) |
| 258 | 258 | * |
@@ -263,7 +263,7 @@ discard block |
||
| 263 | 263 | */ |
| 264 | 264 | public function add_attached_files($path, $file = '', $type = '') |
| 265 | 265 | { |
| 266 | - // phpcs:enable |
|
| 266 | + // phpcs:enable |
|
| 267 | 267 | $listofpaths = array(); |
| 268 | 268 | $listofnames = array(); |
| 269 | 269 | $listofmimes = array(); |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | } |
| 296 | 296 | } |
| 297 | 297 | |
| 298 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 298 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 299 | 299 | /** |
| 300 | 300 | * Remove a file from the list of attached files (stored in SECTION array) |
| 301 | 301 | * |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | */ |
| 305 | 305 | public function remove_attached_files($keytodelete) |
| 306 | 306 | { |
| 307 | - // phpcs:enable |
|
| 307 | + // phpcs:enable |
|
| 308 | 308 | $listofpaths = array(); |
| 309 | 309 | $listofnames = array(); |
| 310 | 310 | $listofmimes = array(); |
@@ -330,7 +330,7 @@ discard block |
||
| 330 | 330 | } |
| 331 | 331 | } |
| 332 | 332 | |
| 333 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 333 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 334 | 334 | /** |
| 335 | 335 | * Return list of attached files (stored in SECTION array) |
| 336 | 336 | * |
@@ -338,7 +338,7 @@ discard block |
||
| 338 | 338 | */ |
| 339 | 339 | public function get_attached_files() |
| 340 | 340 | { |
| 341 | - // phpcs:enable |
|
| 341 | + // phpcs:enable |
|
| 342 | 342 | $listofpaths = array(); |
| 343 | 343 | $listofnames = array(); |
| 344 | 344 | $listofmimes = array(); |
@@ -356,7 +356,7 @@ discard block |
||
| 356 | 356 | return array('paths' => $listofpaths, 'names' => $listofnames, 'mimes' => $listofmimes); |
| 357 | 357 | } |
| 358 | 358 | |
| 359 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 359 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 360 | 360 | /** |
| 361 | 361 | * Show the form to input an email |
| 362 | 362 | * this->withfile: 0=No attaches files, 1=Show attached files, 2=Can add new attached files |
@@ -369,11 +369,11 @@ discard block |
||
| 369 | 369 | */ |
| 370 | 370 | public function show_form($addfileaction = 'addfile', $removefileaction = 'removefile') |
| 371 | 371 | { |
| 372 | - // phpcs:enable |
|
| 372 | + // phpcs:enable |
|
| 373 | 373 | print $this->get_form($addfileaction, $removefileaction); |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 376 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 377 | 377 | /** |
| 378 | 378 | * Get the form to input an email |
| 379 | 379 | * this->withfile: 0=No attaches files, 1=Show attached files, 2=Can add new attached files |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | */ |
| 387 | 387 | public function get_form($addfileaction = 'addfile', $removefileaction = 'removefile') |
| 388 | 388 | { |
| 389 | - // phpcs:enable |
|
| 389 | + // phpcs:enable |
|
| 390 | 390 | global $conf, $langs, $user, $hookmanager, $form; |
| 391 | 391 | |
| 392 | 392 | // Required to show preview wof mail attachments |
@@ -886,7 +886,7 @@ |
||
| 886 | 886 | $maxfilesizearray = getMaxFileSizeArray(); |
| 887 | 887 | $maxmin = $maxfilesizearray['maxmin']; |
| 888 | 888 | if ($maxmin > 0) { |
| 889 | - $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 889 | + $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
| 890 | 890 | } |
| 891 | 891 | // Can add other files |
| 892 | 892 | if (!getDolGlobalString('FROM_MAIL_DONT_USE_INPUT_FILE_MULTIPLE')) { |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | public $location_incoterms; |
| 48 | 48 | |
| 49 | 49 | |
| 50 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 50 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 51 | 51 | /** |
| 52 | 52 | * Return incoterms information |
| 53 | 53 | * TODO Use a cache for label get |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | */ |
| 57 | 57 | public function display_incoterms() |
| 58 | 58 | { |
| 59 | - // phpcs:enable |
|
| 59 | + // phpcs:enable |
|
| 60 | 60 | $out = ''; |
| 61 | 61 | |
| 62 | 62 | $this->label_incoterms = ''; |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 48 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 49 | 49 | /** |
| 50 | 50 | * SetOpenIDServer |
| 51 | 51 | * |
@@ -54,11 +54,11 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function SetOpenIDServer($a) |
| 56 | 56 | { |
| 57 | - // phpcs:enable |
|
| 57 | + // phpcs:enable |
|
| 58 | 58 | $this->URLs['openid_server'] = $a; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 61 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 62 | 62 | /** |
| 63 | 63 | * SetOpenIDServer |
| 64 | 64 | * |
@@ -67,11 +67,11 @@ discard block |
||
| 67 | 67 | */ |
| 68 | 68 | public function SetTrustRoot($a) |
| 69 | 69 | { |
| 70 | - // phpcs:enable |
|
| 70 | + // phpcs:enable |
|
| 71 | 71 | $this->URLs['trust_root'] = $a; |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 74 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 75 | 75 | /** |
| 76 | 76 | * SetOpenIDServer |
| 77 | 77 | * |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function SetCancelURL($a) |
| 82 | 82 | { |
| 83 | - // phpcs:enable |
|
| 83 | + // phpcs:enable |
|
| 84 | 84 | $this->URLs['cancel'] = $a; |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 87 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 88 | 88 | /** |
| 89 | 89 | * SetApprovedURL |
| 90 | 90 | * |
@@ -93,11 +93,11 @@ discard block |
||
| 93 | 93 | */ |
| 94 | 94 | public function SetApprovedURL($a) |
| 95 | 95 | { |
| 96 | - // phpcs:enable |
|
| 96 | + // phpcs:enable |
|
| 97 | 97 | $this->URLs['approved'] = $a; |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 100 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 101 | 101 | /** |
| 102 | 102 | * SetRequiredFields |
| 103 | 103 | * |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | */ |
| 107 | 107 | public function SetRequiredFields($a) |
| 108 | 108 | { |
| 109 | - // phpcs:enable |
|
| 109 | + // phpcs:enable |
|
| 110 | 110 | if (is_array($a)) { |
| 111 | 111 | $this->fields['required'] = $a; |
| 112 | 112 | } else { |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | } |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 117 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 118 | 118 | /** |
| 119 | 119 | * SetOptionalFields |
| 120 | 120 | * |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | */ |
| 124 | 124 | public function SetOptionalFields($a) |
| 125 | 125 | { |
| 126 | - // phpcs:enable |
|
| 126 | + // phpcs:enable |
|
| 127 | 127 | if (is_array($a)) { |
| 128 | 128 | $this->fields['optional'] = $a; |
| 129 | 129 | } else { |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | } |
| 132 | 132 | } |
| 133 | 133 | |
| 134 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 134 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 135 | 135 | /** |
| 136 | 136 | * SetIdentity |
| 137 | 137 | * |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | */ |
| 141 | 141 | public function SetIdentity($a) |
| 142 | 142 | { |
| 143 | - // phpcs:enable |
|
| 143 | + // phpcs:enable |
|
| 144 | 144 | // Set Identity URL |
| 145 | 145 | if ( |
| 146 | 146 | (stripos($a, 'http://') === false) |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | $this->openid_url_identity = $a; |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 167 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 168 | 168 | /** |
| 169 | 169 | * GetIdentity |
| 170 | 170 | * |
@@ -172,12 +172,12 @@ discard block |
||
| 172 | 172 | */ |
| 173 | 173 | public function GetIdentity() |
| 174 | 174 | { |
| 175 | - // phpcs:enable |
|
| 175 | + // phpcs:enable |
|
| 176 | 176 | // Get Identity |
| 177 | 177 | return $this->openid_url_identity; |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 180 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 181 | 181 | /** |
| 182 | 182 | * SetOpenIDServer |
| 183 | 183 | * |
@@ -185,12 +185,12 @@ discard block |
||
| 185 | 185 | */ |
| 186 | 186 | public function GetError() |
| 187 | 187 | { |
| 188 | - // phpcs:enable |
|
| 188 | + // phpcs:enable |
|
| 189 | 189 | $e = $this->error; |
| 190 | 190 | return array('code' => $e[0], 'description' => $e[1]); |
| 191 | 191 | } |
| 192 | 192 | |
| 193 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 193 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 194 | 194 | /** |
| 195 | 195 | * ErrorStore |
| 196 | 196 | * |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | */ |
| 201 | 201 | public function ErrorStore($code, $desc = null) |
| 202 | 202 | { |
| 203 | - // phpcs:enable |
|
| 203 | + // phpcs:enable |
|
| 204 | 204 | $errs = array(); |
| 205 | 205 | $errs['OPENID_NOSERVERSFOUND'] = 'Cannot find OpenID Server TAG on Identity page.'; |
| 206 | 206 | if ($desc == null) { |
@@ -209,7 +209,7 @@ discard block |
||
| 209 | 209 | $this->error = array($code, $desc); |
| 210 | 210 | } |
| 211 | 211 | |
| 212 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 212 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 213 | 213 | /** |
| 214 | 214 | * IsError |
| 215 | 215 | * |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | */ |
| 218 | 218 | public function IsError() |
| 219 | 219 | { |
| 220 | - // phpcs:enable |
|
| 220 | + // phpcs:enable |
|
| 221 | 221 | if (count($this->error) > 0) { |
| 222 | 222 | return true; |
| 223 | 223 | } else { |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | return $r; |
| 246 | 246 | } |
| 247 | 247 | |
| 248 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 248 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 249 | 249 | /** |
| 250 | 250 | * OpenID_Standarize |
| 251 | 251 | * |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | */ |
| 255 | 255 | public function OpenID_Standarize($openid_identity = null) |
| 256 | 256 | { |
| 257 | - // phpcs:enable |
|
| 257 | + // phpcs:enable |
|
| 258 | 258 | if ($openid_identity === null) { |
| 259 | 259 | $openid_identity = $this->openid_url_identity; |
| 260 | 260 | } |
@@ -293,7 +293,7 @@ discard block |
||
| 293 | 293 | return $query; |
| 294 | 294 | } |
| 295 | 295 | |
| 296 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 296 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 297 | 297 | /** |
| 298 | 298 | * FSOCK_Request |
| 299 | 299 | * |
@@ -304,7 +304,7 @@ discard block |
||
| 304 | 304 | */ |
| 305 | 305 | public function FSOCK_Request($url, $method = "GET", $params = "") |
| 306 | 306 | { |
| 307 | - // phpcs:enable |
|
| 307 | + // phpcs:enable |
|
| 308 | 308 | $fp = fsockopen("ssl://www.myopenid.com", 443, $errno, $errstr, 3); // Connection timeout is 3 seconds |
| 309 | 309 | if (!$fp) { |
| 310 | 310 | $this->ErrorStore('OPENID_SOCKETERROR', $errstr); |
@@ -327,7 +327,7 @@ discard block |
||
| 327 | 327 | } |
| 328 | 328 | } |
| 329 | 329 | |
| 330 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 330 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 331 | 331 | /** |
| 332 | 332 | * HTML2OpenIDServer |
| 333 | 333 | * |
@@ -336,7 +336,7 @@ discard block |
||
| 336 | 336 | */ |
| 337 | 337 | public function HTML2OpenIDServer($content) |
| 338 | 338 | { |
| 339 | - // phpcs:enable |
|
| 339 | + // phpcs:enable |
|
| 340 | 340 | $get = array(); |
| 341 | 341 | |
| 342 | 342 | $matches1 = array(); |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | |
| 361 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 361 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 362 | 362 | /** |
| 363 | 363 | * Get openid server |
| 364 | 364 | * |
@@ -367,7 +367,7 @@ discard block |
||
| 367 | 367 | */ |
| 368 | 368 | public function GetOpenIDServer($url = '') |
| 369 | 369 | { |
| 370 | - // phpcs:enable |
|
| 370 | + // phpcs:enable |
|
| 371 | 371 | global $conf; |
| 372 | 372 | |
| 373 | 373 | include_once DOL_DOCUMENT_ROOT . '/core/lib/geturl.lib.php'; |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | return $servers[0]; |
| 393 | 393 | } |
| 394 | 394 | |
| 395 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 395 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 396 | 396 | /** |
| 397 | 397 | * GetRedirectURL |
| 398 | 398 | * |
@@ -400,7 +400,7 @@ discard block |
||
| 400 | 400 | */ |
| 401 | 401 | public function GetRedirectURL() |
| 402 | 402 | { |
| 403 | - // phpcs:enable |
|
| 403 | + // phpcs:enable |
|
| 404 | 404 | $params = array(); |
| 405 | 405 | $params['openid.return_to'] = urlencode($this->URLs['approved']); |
| 406 | 406 | $params['openid.mode'] = 'checkid_setup'; |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | return $this->URLs['openid_server'] . "?" . $this->array2url($params); |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 425 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 426 | 426 | /** |
| 427 | 427 | * Redirect |
| 428 | 428 | * |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | */ |
| 431 | 431 | public function Redirect() |
| 432 | 432 | { |
| 433 | - // phpcs:enable |
|
| 433 | + // phpcs:enable |
|
| 434 | 434 | $redirect_to = $this->GetRedirectURL(); |
| 435 | 435 | if (headers_sent()) { // Use JavaScript to redirect if content has been previously sent (not recommended, but safe) |
| 436 | 436 | echo '<script nonce="' . getNonce() . '" type="text/javascript">window.location=\''; |
@@ -441,7 +441,7 @@ discard block |
||
| 441 | 441 | } |
| 442 | 442 | } |
| 443 | 443 | |
| 444 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 444 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 445 | 445 | /** |
| 446 | 446 | * ValidateWithServer |
| 447 | 447 | * |
@@ -449,7 +449,7 @@ discard block |
||
| 449 | 449 | */ |
| 450 | 450 | public function ValidateWithServer() |
| 451 | 451 | { |
| 452 | - // phpcs:enable |
|
| 452 | + // phpcs:enable |
|
| 453 | 453 | $params = array( |
| 454 | 454 | 'openid.assoc_handle' => urlencode($_GET['openid_assoc_handle']), |
| 455 | 455 | 'openid.signed' => urlencode($_GET['openid_signed']), |