@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | return $object; |
76 | 76 | } |
77 | 77 | |
78 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
78 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
79 | 79 | /** |
80 | 80 | * Assign custom values for canvas (for example into this->tpl to be used by templates) |
81 | 81 | * |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function assign_values(&$action, $id = 0, $ref = '') |
88 | 88 | { |
89 | - // phpcs:enable |
|
89 | + // phpcs:enable |
|
90 | 90 | global $conf, $langs, $db, $user, $mysoc, $canvas; |
91 | 91 | global $form, $formadmin, $formcompany; |
92 | 92 | |
@@ -379,7 +379,7 @@ discard block |
||
379 | 379 | } |
380 | 380 | } |
381 | 381 | |
382 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
382 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
383 | 383 | /** |
384 | 384 | * Assign POST values into object |
385 | 385 | * |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | */ |
389 | 389 | private function assign_post($action) |
390 | 390 | { |
391 | - // phpcs:enable |
|
391 | + // phpcs:enable |
|
392 | 392 | global $langs, $mysoc; |
393 | 393 | |
394 | 394 | $this->object->id = GETPOST("socid"); |
@@ -299,7 +299,7 @@ |
||
299 | 299 | $this->tpl['country'] = ($img ? $img . ' ' : '') . $this->object->country; |
300 | 300 | |
301 | 301 | $this->tpl['phone'] = dol_print_phone($this->object->phone, $this->object->country_code, 0, $this->object->id, 'AC_TEL'); |
302 | - $this->tpl['phone_mobile'] = dol_print_phone($this->object->phone_mobile, $this->object->country_code, 0, $this->object->id, 'AC_MOB'); |
|
302 | + $this->tpl['phone_mobile'] = dol_print_phone($this->object->phone_mobile, $this->object->country_code, 0, $this->object->id, 'AC_MOB'); |
|
303 | 303 | $this->tpl['fax'] = dol_print_phone($this->object->fax, $this->object->country_code, 0, $this->object->id, 'AC_FAX'); |
304 | 304 | $this->tpl['email'] = dol_print_email($this->object->email, 0, $this->object->id, 1); |
305 | 305 | $this->tpl['url'] = dol_print_url($this->object->url); |
@@ -22,7 +22,7 @@ |
||
22 | 22 | * \brief Popup screen to validate VAT |
23 | 23 | */ |
24 | 24 | |
25 | -if (! defined('NOTOKENRENEWAL')) { |
|
25 | +if (!defined('NOTOKENRENEWAL')) { |
|
26 | 26 | define('NOTOKENRENEWAL', '1'); |
27 | 27 | } // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on) |
28 | 28 |
@@ -134,20 +134,20 @@ discard block |
||
134 | 134 | $search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth'); |
135 | 135 | $search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear'); |
136 | 136 | $search_date_creation_startday = GETPOSTINT('search_date_creation_startday'); |
137 | -$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
137 | +$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver |
|
138 | 138 | $search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth'); |
139 | 139 | $search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear'); |
140 | 140 | $search_date_creation_endday = GETPOSTINT('search_date_creation_endday'); |
141 | -$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
141 | +$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver |
|
142 | 142 | |
143 | 143 | $search_date_modif_startmonth = GETPOSTINT('search_date_modif_startmonth'); |
144 | 144 | $search_date_modif_startyear = GETPOSTINT('search_date_modif_startyear'); |
145 | 145 | $search_date_modif_startday = GETPOSTINT('search_date_modif_startday'); |
146 | -$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
146 | +$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver |
|
147 | 147 | $search_date_modif_endmonth = GETPOSTINT('search_date_modif_endmonth'); |
148 | 148 | $search_date_modif_endyear = GETPOSTINT('search_date_modif_endyear'); |
149 | 149 | $search_date_modif_endday = GETPOSTINT('search_date_modif_endday'); |
150 | -$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
150 | +$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver |
|
151 | 151 | |
152 | 152 | $type = GETPOST('type', 'alpha'); |
153 | 153 | $place = GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : '0'; // $place is string id of table for Bar or Restaurant |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | |
322 | 322 | $object->fields = dol_sort_array($object->fields, 'position'); |
323 | 323 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
324 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
324 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
325 | 325 | |
326 | 326 | // Security check |
327 | 327 | $socid = GETPOSTINT('socid'); |
@@ -1152,7 +1152,7 @@ discard block |
||
1152 | 1152 | if (!empty($socid)) { |
1153 | 1153 | $url .= '&socid=' . $socid; |
1154 | 1154 | } |
1155 | - $newcardbutton = ''; |
|
1155 | + $newcardbutton = ''; |
|
1156 | 1156 | $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"] . '?mode=common' . preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition')); |
1157 | 1157 | $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"] . '?mode=kanban' . preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition')); |
1158 | 1158 | $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->hasRight('societe', 'creer')); |
@@ -1262,7 +1262,7 @@ discard block |
||
1262 | 1262 | } |
1263 | 1263 | |
1264 | 1264 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
1265 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1265 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
1266 | 1266 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
1267 | 1267 | $selectedfields .= ((count($arrayofmassactions) && $contextpage != 'poslist') ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
1268 | 1268 | |
@@ -1706,19 +1706,19 @@ discard block |
||
1706 | 1706 | print $hookmanager->resPrint; |
1707 | 1707 | if (!empty($arrayfields['s.datec']['checked'])) { |
1708 | 1708 | print_liste_field_titre($arrayfields['s.datec']['label'], $_SERVER["PHP_SELF"], "s.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap '); |
1709 | - $totalarray['nbfield']++; // For the column action |
|
1709 | + $totalarray['nbfield']++; // For the column action |
|
1710 | 1710 | } |
1711 | 1711 | if (!empty($arrayfields['s.tms']['checked'])) { |
1712 | 1712 | print_liste_field_titre($arrayfields['s.tms']['label'], $_SERVER["PHP_SELF"], "s.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); |
1713 | - $totalarray['nbfield']++; // For the column action |
|
1713 | + $totalarray['nbfield']++; // For the column action |
|
1714 | 1714 | } |
1715 | 1715 | if (!empty($arrayfields['s.status']['checked'])) { |
1716 | 1716 | print_liste_field_titre($arrayfields['s.status']['label'], $_SERVER["PHP_SELF"], "s.status", "", $param, '', $sortfield, $sortorder, 'center '); |
1717 | - $totalarray['nbfield']++; // For the column action |
|
1717 | + $totalarray['nbfield']++; // For the column action |
|
1718 | 1718 | } |
1719 | 1719 | if (!empty($arrayfields['s.import_key']['checked'])) { |
1720 | 1720 | print_liste_field_titre($arrayfields['s.import_key']['label'], $_SERVER["PHP_SELF"], "s.import_key", "", $param, '', $sortfield, $sortorder, 'center '); |
1721 | - $totalarray['nbfield']++; // For the column action |
|
1721 | + $totalarray['nbfield']++; // For the column action |
|
1722 | 1722 | } |
1723 | 1723 | // Action column |
1724 | 1724 | if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) { |
@@ -46,11 +46,11 @@ discard block |
||
46 | 46 | // Get parameters |
47 | 47 | $id = GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('socid'); |
48 | 48 | |
49 | -$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
49 | +$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
50 | 50 | $show_files = GETPOSTINT('show_files'); |
51 | -$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'websitelist'; // To manage different context of search |
|
52 | -$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
53 | -$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
51 | +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'websitelist'; // To manage different context of search |
|
52 | +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
53 | +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
54 | 54 | $toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
55 | 55 | $optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
56 | 56 | $mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) |
@@ -489,7 +489,7 @@ discard block |
||
489 | 489 | } |
490 | 490 | |
491 | 491 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
492 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
492 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
493 | 493 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
494 | 494 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
495 | 495 | |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
584 | 584 | $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
585 | 585 | } |
586 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
586 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
587 | 587 | if (!empty($arrayfields['t.' . $key]['checked'])) { |
588 | 588 | print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n"; |
589 | 589 | $totalarray['nbfield']++; |
@@ -39,15 +39,15 @@ discard block |
||
39 | 39 | $langs->loadLangs(array('mrp', 'other')); |
40 | 40 | |
41 | 41 | $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ... |
42 | -$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
|
43 | -$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? |
|
44 | -$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
45 | -$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
46 | -$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
42 | +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
|
43 | +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? |
|
44 | +$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
45 | +$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
46 | +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
47 | 47 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search |
48 | -$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
49 | -$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
50 | -$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) |
|
48 | +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
49 | +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
50 | +$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...) |
|
51 | 51 | |
52 | 52 | $id = GETPOSTINT('id'); |
53 | 53 | $ref = GETPOST('ref', 'alpha'); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $object = new Workstation($db); |
70 | 70 | $extrafields = new ExtraFields($db); |
71 | 71 | $diroutputmassaction = $conf->workstation->dir_output . '/temp/massgeneration/' . $user->id; |
72 | -$hookmanager->initHooks(array('workstationlist')); // Note that conf->hooks_modules contains array |
|
72 | +$hookmanager->initHooks(array('workstationlist')); // Note that conf->hooks_modules contains array |
|
73 | 73 | |
74 | 74 | // Fetch optionals attributes and labels |
75 | 75 | $extrafields->fetch_name_optionals_label($object->table_element); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | |
80 | 80 | // Default sort order (if not yet defined by previous GETPOST) |
81 | 81 | if (!$sortfield) { |
82 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
82 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
83 | 83 | $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition. |
84 | 84 | } |
85 | 85 | if (!$sortorder) { |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | |
152 | 152 | $object->fields = dol_sort_array($object->fields, 'position'); |
153 | 153 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
154 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
154 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
155 | 155 | |
156 | 156 | $permissiontoread = $user->hasRight('workstation', 'workstation', 'read'); |
157 | 157 | $permissiontoadd = $user->hasRight('workstation', 'workstation', 'write'); |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | $sql .= "t." . $db->escape($key) . ", "; |
322 | 322 | } |
323 | 323 | // Add fields from extrafields |
324 | -if (! empty($extrafields->attributes[$object->table_element]['label'])) { |
|
324 | +if (!empty($extrafields->attributes[$object->table_element]['label'])) { |
|
325 | 325 | foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { |
326 | 326 | // @phan-suppress-next-line PhanTypeArraySuspiciousNullable |
327 | 327 | $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef." . $key . ', ' : ''); |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | } |
330 | 330 | // Add groupby from hooks |
331 | 331 | $parameters = array(); |
332 | -$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook |
|
332 | +$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook |
|
333 | 333 | $sql .= $hookmanager->resPrint; |
334 | 334 | $sql = preg_replace('/,\s*$/', '', $sql); |
335 | 335 | |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | } |
499 | 499 | |
500 | 500 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
501 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
501 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
502 | 502 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
503 | 503 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
504 | 504 | |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
606 | 606 | $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
607 | 607 | } |
608 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
608 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
609 | 609 | if (!empty($arrayfields['t.' . $key]['checked'])) { |
610 | 610 | print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n"; |
611 | 611 | $totalarray['nbfield']++; |
@@ -47,19 +47,19 @@ discard block |
||
47 | 47 | $object = new Workstation($db); |
48 | 48 | $extrafields = new ExtraFields($db); |
49 | 49 | $diroutputmassaction = $conf->workstation->dir_output . '/temp/massgeneration/' . $user->id; |
50 | -$hookmanager->initHooks(array('workstationnote', 'globalcard')); // Note that conf->hooks_modules contains array |
|
50 | +$hookmanager->initHooks(array('workstationnote', 'globalcard')); // Note that conf->hooks_modules contains array |
|
51 | 51 | |
52 | 52 | // Fetch optionals attributes and labels |
53 | 53 | $extrafields->fetch_name_optionals_label($object->table_element); |
54 | 54 | |
55 | 55 | // Load object |
56 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
56 | +include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
57 | 57 | if ($id > 0 || !empty($ref)) { |
58 | 58 | $upload_dir = rtrim(getMultidirOutput($object, '', 1), '/'); |
59 | 59 | } |
60 | 60 | |
61 | -$permissionnote = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_setnotes.inc.php |
|
62 | -$permissiontoadd = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_addupdatedelete.inc.php |
|
61 | +$permissionnote = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_setnotes.inc.php |
|
62 | +$permissiontoadd = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_addupdatedelete.inc.php |
|
63 | 63 | |
64 | 64 | // Security check |
65 | 65 | $isdraft = 0; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | * Actions |
71 | 71 | */ |
72 | 72 | $parameters = array(); |
73 | -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
73 | +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
74 | 74 | if ($reshook < 0) { |
75 | 75 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
76 | 76 | } |
@@ -90,10 +90,10 @@ discard block |
||
90 | 90 | |
91 | 91 | // Permissions |
92 | 92 | $permissiontoread = $user->hasRight('workstation', 'workstation', 'read'); |
93 | -$permissiontoadd = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
93 | +$permissiontoadd = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
94 | 94 | $permissiontodelete = $user->hasRight('workstation', 'workstation', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DISABLED); |
95 | -$permissionnote = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_setnotes.inc.php |
|
96 | -$permissiondellink = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_dellink.inc.php |
|
95 | +$permissionnote = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_setnotes.inc.php |
|
96 | +$permissiondellink = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_dellink.inc.php |
|
97 | 97 | |
98 | 98 | $upload_dir = rtrim(getMultidirOutput($object, '', 1), '/'); |
99 | 99 | |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | |
109 | 109 | $parameters = array(); |
110 | -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
110 | +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
111 | 111 | if ($reshook < 0) { |
112 | 112 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
113 | 113 | } |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | } |
128 | 128 | } |
129 | 129 | |
130 | - $triggermodname = 'WORKSTATION_WORKSTATION_MODIFY'; // Name of trigger action code to execute when we modify record |
|
130 | + $triggermodname = 'WORKSTATION_WORKSTATION_MODIFY'; // Name of trigger action code to execute when we modify record |
|
131 | 131 | |
132 | 132 | // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen |
133 | 133 | include DOL_DOCUMENT_ROOT . '/core/actions_addupdatedelete.inc.php'; |
@@ -99,7 +99,7 @@ |
||
99 | 99 | */ |
100 | 100 | |
101 | 101 | $parameters = array('id' => $id); |
102 | -$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
102 | +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks |
|
103 | 103 | if ($reshook < 0) { |
104 | 104 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
105 | 105 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | $object = new Dolresource($db); |
46 | 46 | |
47 | 47 | // Load object |
48 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once |
|
48 | +include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once |
|
49 | 49 | |
50 | 50 | // Security check |
51 | 51 | if ($user->socid) { |