diff --git a/admin/api_settings.php b/admin/api_settings.php index 02c7a5ea..61a14abc 100644 --- a/admin/api_settings.php +++ b/admin/api_settings.php @@ -141,7 +141,7 @@ require_once(HESK_PATH . 'inc/show_admin_nav.inc.php'); User Security 1 ORDER BY `" . hesk_dbEscape($order_by) . "`"); -$categories = []; +$categories = array(); while ($row = hesk_dbFetchAssoc($rs)) { if (!$_SESSION['isadmin'] && !in_array($row['id'], $_SESSION['categories'])) { continue; diff --git a/api/businesslogic/ticket_retriever.php b/api/businesslogic/ticket_retriever.php index 1f91da1e..eaa06d5c 100644 --- a/api/businesslogic/ticket_retriever.php +++ b/api/businesslogic/ticket_retriever.php @@ -10,7 +10,7 @@ function get_ticket_for_staff($hesk_settings, $user, $id = NULL) { if ($id === NULL) { $original_tickets = $tickets; - $tickets = []; + $tickets = array(); foreach ($original_tickets as $ticket) { $ticket = remove_common_properties($ticket); $ticket = convert_to_camel_case($ticket); diff --git a/api/businesslogic/user_retriever.php b/api/businesslogic/user_retriever.php index c184f5be..69b3f330 100644 --- a/api/businesslogic/user_retriever.php +++ b/api/businesslogic/user_retriever.php @@ -6,7 +6,7 @@ function retrieve_user($hesk_settings, $id = NULL) { if ($id === NULL) { $original_users = $users; - $users = []; + $users = array(); foreach ($original_users as $user) { $user = remove_unneeded_properties($user); $user = convert_to_camel_case($user); diff --git a/api/dao/canned_dao.php b/api/dao/canned_dao.php index 07725436..e4700491 100644 --- a/api/dao/canned_dao.php +++ b/api/dao/canned_dao.php @@ -12,7 +12,7 @@ function get_canned_response($hesk_settings, $id = NULL) { return NULL; } - $results = []; + $results = array(); while ($row = hesk_dbFetchAssoc($response)) { $row['id'] = intval($row['id']); diff --git a/api/dao/category_dao.php b/api/dao/category_dao.php index 24e0ddf7..d92ea51c 100644 --- a/api/dao/category_dao.php +++ b/api/dao/category_dao.php @@ -12,7 +12,7 @@ function get_category($hesk_settings, $id = NULL) { return NULL; } - $results = []; + $results = array(); while ($row = hesk_dbFetchAssoc($response)) { $row['id'] = intval($row['id']); $row['displayOrder'] = intval($row['cat_order']); diff --git a/api/dao/status_dao.php b/api/dao/status_dao.php index fba8b4ba..160ddd2d 100644 --- a/api/dao/status_dao.php +++ b/api/dao/status_dao.php @@ -12,7 +12,7 @@ function get_status($hesk_settings, $id = NULL) { return NULL; } - $results = []; + $results = array(); while ($row = hesk_dbFetchAssoc($response)) { $row['id'] = intval($row['ID']); unset($row['ID']); @@ -37,7 +37,7 @@ function get_status($hesk_settings, $id = NULL) { $language_rs = hesk_dbQuery($language_sql); if (hesk_dbNumRows($language_rs) > 0) { $row['key'] = NULL; - $row['keys'] = []; + $row['keys'] = array(); } while ($language_row = hesk_dbFetchAssoc($language_rs)) { unset($language_row['id']); diff --git a/api/dao/ticket_dao.php b/api/dao/ticket_dao.php index fbf10fc3..88ae5047 100644 --- a/api/dao/ticket_dao.php +++ b/api/dao/ticket_dao.php @@ -31,7 +31,7 @@ function get_ticket_for_id($hesk_settings, $user, $id = NULL) { } function build_results($response) { - $results = []; + $results = array(); while ($row = hesk_dbFetchAssoc($response)) { $row['id'] = intval($row['id']); $row['category'] = intval($row['category']); diff --git a/api/dao/ticket_template_dao.php b/api/dao/ticket_template_dao.php index 6335378d..118ba218 100644 --- a/api/dao/ticket_template_dao.php +++ b/api/dao/ticket_template_dao.php @@ -12,7 +12,7 @@ function get_ticket_template($hesk_settings, $id = NULL) { return NULL; } - $results = []; + $results = array(); while ($row = hesk_dbFetchAssoc($response)) { $row['id'] = intval($row['id']); $row['displayOrder'] = intval($row['tpl_order']); diff --git a/api/dao/user_dao.php b/api/dao/user_dao.php index e7b343c8..f56158fb 100644 --- a/api/dao/user_dao.php +++ b/api/dao/user_dao.php @@ -13,7 +13,7 @@ function get_user($hesk_settings, $id = NULL) { return NULL; } - $results = []; + $results = array(); while ($row = hesk_dbFetchAssoc($response)) { $row['id'] = intval($row['id']); $row['isadmin'] = get_boolean($row['isadmin']); diff --git a/api/priority/index.php b/api/priority/index.php index 8ef5ecd7..d0e161d6 100644 --- a/api/priority/index.php +++ b/api/priority/index.php @@ -27,7 +27,7 @@ $request_method = $_SERVER['REQUEST_METHOD']; * } */ if ($request_method == 'GET') { - $results = []; + $results = array(); $critical['id'] = 0; $critical['key'] = 'critical'; $results[] = $critical; diff --git a/calendar.php b/calendar.php index c43e5308..48091c89 100644 --- a/calendar.php +++ b/calendar.php @@ -52,7 +52,7 @@ if ($modsForHesk_settings['enable_calendar'] != '1') { hesk_error($hesklang['calendar_disabled']); } -$categories = []; +$categories = array(); $orderBy = $modsForHesk_settings['category_order_column']; $categorySql = "SELECT * FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "categories` WHERE `usage` <> 1 AND `type` = '0' ORDER BY '" . $orderBy . "'"; $categoryRs = hesk_dbQuery($categorySql); diff --git a/cron/calendar_reminders.php b/cron/calendar_reminders.php index a0404b29..b45ddf2f 100644 --- a/cron/calendar_reminders.php +++ b/cron/calendar_reminders.php @@ -67,8 +67,8 @@ $sql = "SELECT `reminder`.`id` AS `reminder_id`, `reminder`.`user_id` AS `user_i AND `email_sent` = '0'"; $rs = hesk_dbQuery($sql); -$reminders_to_flag = []; -$tickets_to_flag = []; +$reminders_to_flag = array(); +$tickets_to_flag = array(); $included_email_functions = false; if (hesk_dbNumRows($rs) > 0 && !$skip_events) { @@ -150,12 +150,12 @@ $user_rs = hesk_dbQuery("SELECT `id`, `isadmin`, `categories`, `email`, FROM `" . hesk_dbEscape($hesk_settings['db_pfix']) . "users` WHERE `notify_overdue_unassigned` = '1' AND (`heskprivileges` LIKE '%can_view_tickets%' OR `isadmin` = '1')"); -$users = []; +$users = array(); while ($row = hesk_dbFetchAssoc($user_rs)) { $users[] = $row; } -$tickets_to_flag = []; +$tickets_to_flag = array(); while ($row = hesk_dbFetchAssoc($rs)) { if (mfh_sendOverdueTicketReminder($row, $users, $modsForHesk_settings)) { $tickets_to_flag[] = $row['id']; diff --git a/inc/email_functions.inc.php b/inc/email_functions.inc.php index 9b249330..a3ba0e6f 100644 --- a/inc/email_functions.inc.php +++ b/inc/email_functions.inc.php @@ -338,7 +338,7 @@ function mfh_sendOverdueTicketReminder($ticket, $users, $modsForHesk_settings) { $htmlMessage = hesk_getHtmlMessage('overdue_ticket', NULL, $modsForHesk_settings, 1, 0, 1); $htmlMessage = hesk_processMessage($htmlMessage, $ticket, 1, 1, 0, $modsForHesk_settings, 1); - $emails = []; + $emails = array(); if ($ticket['user_email'] != NULL) { $emails[] = $ticket['user_email']; } diff --git a/internal-api/dao/calendar_dao.php b/internal-api/dao/calendar_dao.php index cf379e85..2e8ae644 100644 --- a/internal-api/dao/calendar_dao.php +++ b/internal-api/dao/calendar_dao.php @@ -26,7 +26,7 @@ function get_events($start, $end, $hesk_settings, $staff = true) { $rs = hesk_dbQuery($sql); - $events = []; + $events = array(); while ($row = hesk_dbFetchAssoc($rs)) { // Skip the event if the user does not have access to it if ($staff && !$_SESSION['isadmin'] && !in_array($row['category'], $_SESSION['categories'])) { diff --git a/internal-api/dao/message_log_dao.php b/internal-api/dao/message_log_dao.php index 281c8496..cb8ddece 100644 --- a/internal-api/dao/message_log_dao.php +++ b/internal-api/dao/message_log_dao.php @@ -26,7 +26,7 @@ function search_log($hesk_settings, $location, $from_date, $to_date, $severity_i $rs = hesk_dbQuery($sql); - $results = []; + $results = array(); while ($row = hesk_dbFetchAssoc($rs)) { $row['timestamp'] = hesk_date($row['timestamp'], true); $results[] = $row;