diff --git a/includes/controller/angeltypes_controller.php b/includes/controller/angeltypes_controller.php index d6da427e..74a191a7 100644 --- a/includes/controller/angeltypes_controller.php +++ b/includes/controller/angeltypes_controller.php @@ -42,7 +42,7 @@ function angeltype_link($angeltype_id) { * Job description for all angeltypes (public to everyone) */ function angeltypes_about_controller() { - global $privileges, $user; + global $user; if (isset($user)) $angeltypes = AngelTypes_with_user($user); diff --git a/includes/controller/user_angeltypes_controller.php b/includes/controller/user_angeltypes_controller.php index c6115b6c..1c7addc9 100644 --- a/includes/controller/user_angeltypes_controller.php +++ b/includes/controller/user_angeltypes_controller.php @@ -23,7 +23,7 @@ function user_angeltypes_unconfirmed_hint() { * Remove all unconfirmed users from a specific angeltype. */ function user_angeltypes_delete_all_controller() { - global $user, $privileges; + global $user; if (! isset($_REQUEST['angeltype_id'])) { error(_("Angeltype doesn't exist.")); diff --git a/includes/controller/user_driver_licenses_controller.php b/includes/controller/user_driver_licenses_controller.php index d13d84d9..0118eeb4 100644 --- a/includes/controller/user_driver_licenses_controller.php +++ b/includes/controller/user_driver_licenses_controller.php @@ -30,7 +30,7 @@ function user_driver_license_required_hint() { * Route user driver licenses actions. */ function user_driver_licenses_controller() { - global $privileges, $user; + global $user; if (! isset($user)) redirect(page_link_to('')); diff --git a/includes/controller/users_controller.php b/includes/controller/users_controller.php index 404b7f9b..672cbb0f 100644 --- a/includes/controller/users_controller.php +++ b/includes/controller/users_controller.php @@ -4,7 +4,7 @@ * Route user actions. */ function users_controller() { - global $privileges, $user; + global $user; if (! isset($user)) redirect(page_link_to('')); diff --git a/includes/mailer/shifts_mailer.php b/includes/mailer/shifts_mailer.php index e50cd1a1..8189883a 100644 --- a/includes/mailer/shifts_mailer.php +++ b/includes/mailer/shifts_mailer.php @@ -60,7 +60,7 @@ function mail_shift_delete($shift) { $message = _("A Shift you are registered on was deleted:") . "\n"; $message .= $shift["name"] . "\n"; - $message .= $new_shift["title"] . "\n"; + $message .= $shift["title"] . "\n"; $message .= date("Y-m-d H:i", $shift["start"]) . " - " . date("H:i", $shift["end"]) . "\n"; $message .= $room["Name"] . "\n"; diff --git a/includes/mysqli_provider.php b/includes/mysqli_provider.php index d27a1d58..4a3f2a45 100644 --- a/includes/mysqli_provider.php +++ b/includes/mysqli_provider.php @@ -189,7 +189,6 @@ function sql_bool($boolean) { * @return int Count of result lines */ function sql_num_query($query) { - global $sql_connection; return sql_query($query)->num_rows; } diff --git a/includes/pages/admin_active.php b/includes/pages/admin_active.php index 3ff3e0fb..ab962a93 100644 --- a/includes/pages/admin_active.php +++ b/includes/pages/admin_active.php @@ -5,7 +5,7 @@ function admin_active_title() { } function admin_active() { - global $tshirt_sizes, $shift_sum_formula; + global $tshirt_sizes; $msg = ""; $search = ""; @@ -146,7 +146,7 @@ function admin_active() { } $shirt_statistics = []; - foreach ($tshirt_sizes as $size => $_) { + foreach (array_keys($tshirt_sizes) as $size) { if ($size != '') { $shirt_statistics[] = [ 'size' => $size, diff --git a/includes/pages/admin_arrive.php b/includes/pages/admin_arrive.php index a061df6a..9dcf8e4e 100644 --- a/includes/pages/admin_arrive.php +++ b/includes/pages/admin_arrive.php @@ -36,7 +36,6 @@ function admin_arrive() { $arrival_count_at_day = []; $planned_arrival_count_at_day = []; $planned_departure_count_at_day = []; - $table = ""; $users_matched = []; if ($search == "") $tokens = []; @@ -104,7 +103,7 @@ function admin_arrive() { ]; } - $planned_arrival_sum_at_day = []; + $planned_arrival_at_day = []; $planned_arrival_sum = 0; foreach ($planned_arrival_count_at_day as $day => $count) { $planned_arrival_sum += $count; diff --git a/includes/pages/admin_groups.php b/includes/pages/admin_groups.php index f43c63e9..bf6d08d0 100644 --- a/includes/pages/admin_groups.php +++ b/includes/pages/admin_groups.php @@ -4,8 +4,6 @@ function admin_groups_title() { } function admin_groups() { - global $user; - $html = ""; $groups = sql_select("SELECT * FROM `Groups` ORDER BY `Name`"); if (! isset($_REQUEST["action"])) { diff --git a/includes/pages/admin_questions.php b/includes/pages/admin_questions.php index e2fef880..6154cd6e 100644 --- a/includes/pages/admin_questions.php +++ b/includes/pages/admin_questions.php @@ -4,7 +4,7 @@ function admin_questions_title() { } function admin_new_questions() { - global $user, $privileges; + global $privileges; if (in_array("admin_questions", $privileges)) { $new_messages = sql_num_query("SELECT * FROM `Questions` WHERE `AID` IS NULL"); diff --git a/includes/pages/admin_rooms.php b/includes/pages/admin_rooms.php index 5621ba8f..2fc094f9 100644 --- a/includes/pages/admin_rooms.php +++ b/includes/pages/admin_rooms.php @@ -5,8 +5,6 @@ function admin_rooms_title() { } function admin_rooms() { - global $user; - $rooms_source = sql_select("SELECT * FROM `Room` ORDER BY `Name`"); $rooms = array(); foreach ($rooms_source as $room) diff --git a/includes/pages/admin_shifts.php b/includes/pages/admin_shifts.php index 346e9046..692f79a7 100644 --- a/includes/pages/admin_shifts.php +++ b/includes/pages/admin_shifts.php @@ -290,7 +290,6 @@ function admin_shifts() { if (! isset($_REQUEST['rid'])) $_REQUEST['rid'] = null; - $room_select = html_select_key('rid', 'rid', $room_array, $_REQUEST['rid']); $angel_types = ""; foreach ($types as $type) $angel_types .= '