| @@ 214-222 (lines=9) @@ | ||
| 211 | $flightType->fetch($object->fk_type); |
|
| 212 | $balloon->fetch($object->BBC_ballons_idBBC_ballons); |
|
| 213 | ||
| 214 | } else { |
|
| 215 | // Creation KO |
|
| 216 | if (!empty($object->errors)) { |
|
| 217 | setEventMessages(null, $object->errors, 'errors'); |
|
| 218 | } else { |
|
| 219 | setEventMessages($object->error, null, 'errors'); |
|
| 220 | } |
|
| 221 | $action = 'edit'; |
|
| 222 | } |
|
| 223 | } else { |
|
| 224 | $action = 'edit'; |
|
| 225 | } |
|
| @@ 236-242 (lines=7) @@ | ||
| 233 | setEventMessages("RecordDeleted", null, 'mesgs'); |
|
| 234 | header("Location: " . dol_buildpath('/flightlog/list.php', 1)); |
|
| 235 | exit; |
|
| 236 | } else { |
|
| 237 | if (!empty($object->errors)) { |
|
| 238 | setEventMessages(null, $object->errors, 'errors'); |
|
| 239 | } else { |
|
| 240 | setEventMessages($object->error, null, 'errors'); |
|
| 241 | } |
|
| 242 | } |
|
| 243 | } |
|
| 244 | ||
| 245 | // Action to delete |
|
| @@ 254-260 (lines=7) @@ | ||
| 251 | if ($result > 0) { |
|
| 252 | setEventMessages("Facturé", null, 'mesgs'); |
|
| 253 | $action = 'show'; |
|
| 254 | } else { |
|
| 255 | if (!empty($object->errors)) { |
|
| 256 | setEventMessages(null, $object->errors, 'errors'); |
|
| 257 | } else { |
|
| 258 | setEventMessages($object->error, null, 'errors'); |
|
| 259 | } |
|
| 260 | } |
|
| 261 | } |
|
| 262 | } |
|
| 263 | ||