summaryrefslogtreecommitdiff
path: root/includes/pages
diff options
context:
space:
mode:
Diffstat (limited to 'includes/pages')
-rw-r--r--includes/pages/admin_active.php4
-rw-r--r--includes/pages/admin_arrive.php3
-rw-r--r--includes/pages/admin_groups.php2
-rw-r--r--includes/pages/admin_questions.php2
-rw-r--r--includes/pages/admin_rooms.php2
-rw-r--r--includes/pages/admin_shifts.php1
-rw-r--r--includes/pages/guest_login.php4
-rw-r--r--includes/pages/user_atom.php2
-rw-r--r--includes/pages/user_myshifts.php1
-rw-r--r--includes/pages/user_news.php2
-rw-r--r--includes/pages/user_settings.php1
-rw-r--r--includes/pages/user_shifts.php6
12 files changed, 10 insertions, 20 deletions
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 .= '<div class="col-md-4">' . form_spinner('type_' . $type['id'], $type['name'], $needed_angel_types[$type['id']]) . '</div>';
diff --git a/includes/pages/guest_login.php b/includes/pages/guest_login.php
index ed8b4dae..1d8a34dd 100644
--- a/includes/pages/guest_login.php
+++ b/includes/pages/guest_login.php
@@ -105,7 +105,7 @@ function guest_register() {
}
$selected_angel_types = array();
- foreach ($angel_types as $angel_type_id => $angel_type_name)
+ foreach (array_keys($angel_types) as $angel_type_id)
if (isset($_REQUEST['angel_types_' . $angel_type_id]))
$selected_angel_types[] = $angel_type_id;
@@ -252,7 +252,7 @@ function guest_logout() {
}
function guest_login() {
- global $user, $privileges;
+ global $privileges;
$nick = "";
diff --git a/includes/pages/user_atom.php b/includes/pages/user_atom.php
index c9420c91..e0093886 100644
--- a/includes/pages/user_atom.php
+++ b/includes/pages/user_atom.php
@@ -2,7 +2,7 @@
// publically available page to feed the news to feedreaders
function user_atom() {
- global $ical_shifts, $user, $DISPLAY_NEWS;
+ global $user, $DISPLAY_NEWS;
if (isset ($_REQUEST['key']) && preg_match("/^[0-9a-f]{32}$/", $_REQUEST['key']))
$key = $_REQUEST['key'];
diff --git a/includes/pages/user_myshifts.php b/includes/pages/user_myshifts.php
index 7d2472aa..946ff2e0 100644
--- a/includes/pages/user_myshifts.php
+++ b/includes/pages/user_myshifts.php
@@ -8,7 +8,6 @@ function myshifts_title() {
function user_myshifts() {
global $LETZTES_AUSTRAGEN;
global $user, $privileges;
- $msg = "";
if (isset($_REQUEST['id']) && in_array("user_shifts_admin", $privileges) && preg_match("/^[0-9]{1,}$/", $_REQUEST['id']) && sql_num_query("SELECT * FROM `User` WHERE `UID`='" . sql_escape($_REQUEST['id']) . "'") > 0) {
$id = $_REQUEST['id'];
diff --git a/includes/pages/user_news.php b/includes/pages/user_news.php
index 7c104095..289cd326 100644
--- a/includes/pages/user_news.php
+++ b/includes/pages/user_news.php
@@ -12,7 +12,7 @@ function meetings_title() {
}
function user_meetings() {
- global $DISPLAY_NEWS, $privileges, $user;
+ global $DISPLAY_NEWS, $user;
$html = '<div class="col-md-12"><h1>' . meetings_title() . '</h1>' . msg();
diff --git a/includes/pages/user_settings.php b/includes/pages/user_settings.php
index 466d3c3e..69b9d005 100644
--- a/includes/pages/user_settings.php
+++ b/includes/pages/user_settings.php
@@ -21,7 +21,6 @@ function user_settings() {
$jabber = $user['jabber'];
$hometown = $user['Hometown'];
$tshirt_size = $user['Size'];
- $password_hash = "";
$selected_theme = $user['color'];
$selected_language = $user['Sprache'];
$planned_arrival_date = $user['planned_arrival_date'];
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php
index 63ca2543..e4d20fdc 100644
--- a/includes/pages/user_shifts.php
+++ b/includes/pages/user_shifts.php
@@ -5,7 +5,7 @@ function shifts_title() {
}
function user_shifts() {
- global $user, $privileges, $max_freeloadable_shifts;
+ global $user, $privileges;
if (User_is_freeloader($user))
redirect(page_link_to('user_myshifts'));
@@ -162,7 +162,7 @@ function user_shifts() {
$needed_angel_types_info[] = $angel_types[$type_id]['name'] . ": " . $count;
}
- engelsystem_log("Updated shift '" . $name . "' from " . date("Y-m-d H:i", $start) . " to " . date("Y-m-d H:i", $end) . " with angel types " . join(", ", $needed_angel_types_info));
+ engelsystem_log("Updated shift '" . $shifttypes[$shifttype_id] . ", " . $title . "' from " . date("Y-m-d H:i", $start) . " to " . date("Y-m-d H:i", $end) . " with angel types " . join(", ", $needed_angel_types_info));
success(_("Shift updated."));
redirect(shift_link([
@@ -171,8 +171,6 @@ function user_shifts() {
}
}
- $room_select = html_select_key('rid', 'rid', $room_array, $rid);
-
$angel_types = "";
foreach ($types as $type)
$angel_types .= form_spinner('type_' . $type['id'], $type['name'], $needed_angel_types[$type['id']]);