@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | $id = GETPOST('id', 'int') ?: GETPOST('idBBC_vols', 'int'); |
51 | 51 | $action = GETPOST('action', 'alpha'); |
52 | -$permissiondellink=$user->rights->flightlog->vol->financial; |
|
52 | +$permissiondellink = $user->rights->flightlog->vol->financial; |
|
53 | 53 | |
54 | 54 | $object = new Bbcvols($db); |
55 | 55 | |
@@ -57,8 +57,8 @@ discard block |
||
57 | 57 | $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); |
58 | 58 | |
59 | 59 | // Load object |
60 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
61 | -include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; |
|
60 | +include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
61 | +include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; |
|
62 | 62 | |
63 | 63 | // Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array |
64 | 64 | $hookmanager->initHooks(array('bbcvols')); |
@@ -85,13 +85,13 @@ discard block |
||
85 | 85 | FLIGHTLOG_ACTION_HANDLE_ADD_DAMAGE => [AddFlightDamageController::class, 'view'], |
86 | 86 | ]; |
87 | 87 | |
88 | - if(isset($routes[$action])){ |
|
88 | + if (isset($routes[$action])) { |
|
89 | 89 | $controllerName = $routes[$action][0]; |
90 | 90 | $actionName = $routes[$action][1]; |
91 | 91 | |
92 | 92 | $response = call_user_func([new $controllerName($db), $actionName]); |
93 | 93 | |
94 | - if($response instanceof \FlightLog\Http\Web\Response\Redirect){ |
|
94 | + if ($response instanceof \FlightLog\Http\Web\Response\Redirect) { |
|
95 | 95 | if (headers_sent()) { |
96 | 96 | echo(sprintf("<script>location.href='%s'</script>", $response->getUrl())); |
97 | 97 | exit; |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | } |
103 | 103 | |
104 | 104 | include $response->getTemplate(); |
105 | - }else{ |
|
105 | + } else { |
|
106 | 106 | echo 'Route non trouvée.'; |
107 | 107 | } |
108 | 108 | ?> |
@@ -114,13 +114,13 @@ discard block |
||
114 | 114 | // Buttons |
115 | 115 | print '<div class="tabsAction">' . "\n"; |
116 | 116 | |
117 | -if($user->rights->flightlog->vol->financial){ |
|
118 | - print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/flightlog/card_tab_damage.php?id=' . $object->id.'&action='.FLIGHTLOG_ACTION_ADD_DAMAGE.'">' . $langs->trans("Ajouter") . '</a></div>' . "\n"; |
|
117 | +if ($user->rights->flightlog->vol->financial) { |
|
118 | + print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/flightlog/card_tab_damage.php?id=' . $object->id . '&action=' . FLIGHTLOG_ACTION_ADD_DAMAGE . '">' . $langs->trans("Ajouter") . '</a></div>' . "\n"; |
|
119 | 119 | } |
120 | 120 | |
121 | 121 | print '</div>' . "\n"; |
122 | 122 | |
123 | -if($user->rights->flightlog->vol->financial && $object instanceof Bbcvols && $form instanceof Form){ |
|
123 | +if ($user->rights->flightlog->vol->financial && $object instanceof Bbcvols && $form instanceof Form) { |
|
124 | 124 | print '<div class="fichecenter"><div class="fichehalfleft">'; |
125 | 125 | $form->showLinkedObjectBlock($object); |
126 | 126 | print '</div></div>'; |