@@ -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) { |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | |
| 160 | 160 | $object->fields = dol_sort_array($object->fields, 'position'); |
| 161 | 161 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 162 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 162 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 163 | 163 | |
| 164 | 164 | include DOL_DOCUMENT_ROOT . '/core/actions_changeselectedfields.inc.php'; |
| 165 | 165 | |
@@ -359,7 +359,7 @@ discard block |
||
| 359 | 359 | |
| 360 | 360 | // Output page |
| 361 | 361 | |
| 362 | -llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-resource page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 362 | +llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'mod-resource page-list bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll |
|
| 363 | 363 | |
| 364 | 364 | $arrayofselected = is_array($toselect) ? $toselect : array(); |
| 365 | 365 | |
@@ -145,12 +145,12 @@ |
||
| 145 | 145 | $messagewarning .= '</div>'; |
| 146 | 146 | |
| 147 | 147 | if ($result <= 0 && $edituser->error == 'USERNOTFOUND') { |
| 148 | - usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
| 148 | + usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
| 149 | 149 | $message .= $messagewarning; |
| 150 | 150 | $username = ''; |
| 151 | 151 | } else { |
| 152 | 152 | if (empty($edituser->email)) { |
| 153 | - usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
| 153 | + usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s) |
|
| 154 | 154 | $message .= $messagewarning; |
| 155 | 155 | } else { |
| 156 | 156 | $newpassword = $edituser->setPassword($user, '', 1); |
@@ -450,7 +450,7 @@ |
||
| 450 | 450 | print '<td class="liste_titre right" width="5"> </td>'; |
| 451 | 451 | print "</tr>\n"; |
| 452 | 452 | |
| 453 | - $object->fetch($object->id, '', true); // true to force load of all users, member of the group |
|
| 453 | + $object->fetch($object->id, '', true); // true to force load of all users, member of the group |
|
| 454 | 454 | |
| 455 | 455 | if (!empty($object->members)) { |
| 456 | 456 | foreach ($object->members as $useringroup) { |
@@ -80,7 +80,7 @@ |
||
| 80 | 80 | } |
| 81 | 81 | $result = restrictedArea($user, 'tax', $object->id, 'chargesociales', 'charges'); |
| 82 | 82 | |
| 83 | -$permissiontoadd = $user->hasRight('tax', 'charges', 'creer'); // Used by the include of actions_dellink.inc.php |
|
| 83 | +$permissiontoadd = $user->hasRight('tax', 'charges', 'creer'); // Used by the include of actions_dellink.inc.php |
|
| 84 | 84 | |
| 85 | 85 | |
| 86 | 86 | /* |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | } |
| 82 | 82 | $result = restrictedArea($user, 'tax', '', 'tva', 'charges'); |
| 83 | 83 | |
| 84 | -$permissiontoadd = $user->hasRight('tax', 'charges', 'creer'); // Used by the include of actions_dellink.inc.php |
|
| 84 | +$permissiontoadd = $user->hasRight('tax', 'charges', 'creer'); // Used by the include of actions_dellink.inc.php |
|
| 85 | 85 | |
| 86 | 86 | |
| 87 | 87 | /* |