summaryrefslogtreecommitdiff
path: root/includes/pages
diff options
context:
space:
mode:
authormsquare <msquare@notrademark.de>2016-09-30 17:08:20 +0200
committermsquare <msquare@notrademark.de>2016-09-30 17:08:20 +0200
commit3738d071f86aa5016ce326a009a278085b41fb48 (patch)
tree4471faa1cde6985cdef4aa214994977a1534d13f /includes/pages
parent1debe567f5f9fdeff5a2afbaa4619992da67f437 (diff)
remove long array syntax
Diffstat (limited to 'includes/pages')
-rw-r--r--includes/pages/admin_active.php4
-rw-r--r--includes/pages/admin_groups.php4
-rw-r--r--includes/pages/admin_questions.php2
-rw-r--r--includes/pages/admin_rooms.php2
-rw-r--r--includes/pages/guest_stats.php2
-rw-r--r--includes/pages/user_shifts.php8
6 files changed, 11 insertions, 11 deletions
diff --git a/includes/pages/admin_active.php b/includes/pages/admin_active.php
index 733bd506..8d71b147 100644
--- a/includes/pages/admin_active.php
+++ b/includes/pages/admin_active.php
@@ -47,7 +47,7 @@ function admin_active() {
WHERE `User`.`Gekommen` = 1 AND `User`.`force_active`=0
GROUP BY `User`.`UID`
ORDER BY `force_active` DESC, `shift_length` DESC" . $limit);
- $user_nicks = array();
+ $user_nicks = [];
foreach ($users as $usr) {
sql_query("UPDATE `User` SET `Aktiv` = 1 WHERE `UID`='" . sql_escape($usr['UID']) . "'");
$user_nicks[] = User_Nick_render($usr);
@@ -139,7 +139,7 @@ function admin_active() {
$usr['force_active'] = glyph_bool($usr['force_active'] == 1);
$usr['tshirt'] = glyph_bool($usr['Tshirt'] == 1);
- $actions = array();
+ $actions = [];
if ($usr['Aktiv'] == 0) {
$actions[] = '<a href="' . page_link_to('admin_active') . '&amp;active=' . $usr['UID'] . ($show_all_shifts ? '&amp;show_all_shifts=' : '') . '&amp;search=' . $search . '">' . _("set active") . '</a>';
}
diff --git a/includes/pages/admin_groups.php b/includes/pages/admin_groups.php
index 69b6bf39..388e2c68 100644
--- a/includes/pages/admin_groups.php
+++ b/includes/pages/admin_groups.php
@@ -8,10 +8,10 @@ function admin_groups() {
$html = "";
$groups = sql_select("SELECT * FROM `Groups` ORDER BY `Name`");
if (! isset($_REQUEST["action"])) {
- $groups_table = array();
+ $groups_table = [];
foreach ($groups as $group) {
$privileges = sql_select("SELECT * FROM `GroupPrivileges` JOIN `Privileges` ON (`GroupPrivileges`.`privilege_id` = `Privileges`.`id`) WHERE `group_id`='" . sql_escape($group['UID']) . "'");
- $privileges_html = array();
+ $privileges_html = [];
foreach ($privileges as $priv) {
$privileges_html[] = $priv['name'];
diff --git a/includes/pages/admin_questions.php b/includes/pages/admin_questions.php
index f67c6ce8..8e7507da 100644
--- a/includes/pages/admin_questions.php
+++ b/includes/pages/admin_questions.php
@@ -22,7 +22,7 @@ function admin_questions() {
global $user;
if (! isset($_REQUEST['action'])) {
- $unanswered_questions_table = array();
+ $unanswered_questions_table = [];
$questions = sql_select("SELECT * FROM `Questions` WHERE `AID` IS NULL");
foreach ($questions as $question) {
$user_source = User($question['UID']);
diff --git a/includes/pages/admin_rooms.php b/includes/pages/admin_rooms.php
index 155fd7b3..d34d4386 100644
--- a/includes/pages/admin_rooms.php
+++ b/includes/pages/admin_rooms.php
@@ -107,7 +107,7 @@ function admin_rooms() {
}
sql_query("DELETE FROM `NeededAngelTypes` WHERE `room_id`='" . sql_escape($room_id) . "'");
- $needed_angeltype_info = array();
+ $needed_angeltype_info = [];
foreach ($angeltypes_count as $angeltype_id => $angeltype_count) {
$angeltype = AngelType($angeltype_id);
if ($angeltype === false) {
diff --git a/includes/pages/guest_stats.php b/includes/pages/guest_stats.php
index aec2d7d4..71fde137 100644
--- a/includes/pages/guest_stats.php
+++ b/includes/pages/guest_stats.php
@@ -5,7 +5,7 @@ function guest_stats() {
if (isset($_REQUEST['api_key'])) {
if ($_REQUEST['api_key'] == $api_key) {
- $stats = array();
+ $stats = [];
list($user_count) = sql_select("SELECT count(*) as `user_count` FROM `User`");
$stats['user_count'] = $user_count['user_count'];
diff --git a/includes/pages/user_shifts.php b/includes/pages/user_shifts.php
index b6a3c9f5..52167f14 100644
--- a/includes/pages/user_shifts.php
+++ b/includes/pages/user_shifts.php
@@ -660,9 +660,9 @@ function view_user_shifts() {
$style = " text-decoration: line-through;";
}
if (in_array('user_shifts_admin', $privileges)) {
- $entry_list[] = "<span style=\"$style\">" . User_Nick_render($entry) . ' ' . table_buttons(array(
+ $entry_list[] = "<span style=\"$style\">" . User_Nick_render($entry) . ' ' . table_buttons([
button(page_link_to('user_shifts') . '&entry_id=' . $entry['id'], glyph('trash'), 'btn-xs')
- )) . '</span>';
+ ]) . '</span>';
} else {
$entry_list[] = "<span style=\"$style\">" . User_Nick_render($entry) . "</span>";
}
@@ -796,9 +796,9 @@ function view_user_shifts() {
$freeloader = 0;
foreach ($entries as $entry) {
if (in_array('user_shifts_admin', $privileges)) {
- $member = User_Nick_render($entry) . ' ' . table_buttons(array(
+ $member = User_Nick_render($entry) . ' ' . table_buttons([
button(page_link_to('user_shifts') . '&entry_id=' . $entry['id'], glyph('trash'), 'btn-xs')
- ));
+ ]);
} else {
$member = User_Nick_render($entry);
}