Skip to content

Commit

Permalink
Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
catdesu committed May 14, 2024
1 parent 53d42f3 commit 1024670
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions orif/timbreuse/Controllers/PersonalEventPlannings.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,23 +368,13 @@ public function deleteSerieOrOccurrence(int $id) : RedirectResponse {
* @return string|RedirectResponse
*/
public function delete(int $id, int $action = 0) : string|RedirectResponse {
$isAdminView = url_is('*admin*');
$isUserAdmin = $_SESSION['user_access'] >= config('\User\Config\UserConfig')->access_lvl_admin;
$eventPlanning = $this->eventPlanningsModel->getWithLinkedData($id);
$userId = null;

if ($isUserAdmin) {
$isAdminView = true;
}

if (!$eventPlanning) {
return redirect()->back();
}

if (!is_null($eventPlanning['fk_user_sync_id'])) {
$userId = $eventPlanning['fk_user_sync_id'];
}

$route = $this->getPreviousRoute();

if (!((int)$eventPlanning['fk_user_sync_id'] == $this->getConnectedTimuserId()
Expand Down

0 comments on commit 1024670

Please sign in to comment.