@@ -82,7 +82,7 @@
}
$can_add = ( empty ( $ADD_LINK_IN_VIEWS ) || $ADD_LINK_IN_VIEWS != 'N' );
-$e_save = $re_save = array();
+$e_save = $re_save = [];
$viewusercnt = is_array($viewusers) ? count ($viewusers) : 0;
for ( $i = 0; $i < $viewusercnt; $i++ ) {
/* Pre-Load the repeated events for quicker access */
diff --git a/view_r.php b/view_r.php
index b54dec0e6..3183b040f 100644
--- a/view_r.php
+++ b/view_r.php
@@ -89,7 +89,7 @@
$printerStr = generate_printer_friendly ( 'view_r.php' );
set_today ( $date );
-print_header( array( 'js/popups.js/true' ) );
+print_header ( ['js/popups.js/true'] );
$thisdate = sprintf ( "%04d%02d%02d", $thisyear, $thismonth, $thisday );
@@ -205,8 +205,8 @@
// Step through each user and load events for that user.
// Store in $e_save[] (normal events) and $re_save[] (repeating events).
-$e_save = array();
-$re_save = array();
+$e_save = $re_save = [];
+
if ( ! $fit_to_window )
$uwf = $col_pixels . 'px';
else
@@ -307,7 +307,7 @@
// We need to store all the events and where they go before we begin
// printing any output.
-$all_day = array();
+$all_day = [];
//
// We loop through the events once checking for the start time. If we
@@ -319,10 +319,10 @@
// would change the first_slot value. There is then a gap above the all-day
// event.
//
-$am_part = array(); // am I a participant array
+$am_part = []; // am I a participant array
for ( $d = $start_ind; $d <= $end_ind; $d++ ) {
for ( $u = 0; $u < $viewusercnt; $u++ ) {
- $untimed = array();
+ $untimed = [];
$user = $viewusers[$u];
$events = $e_save[$u];
$repeated_events = $re_save[$u];
@@ -363,7 +363,7 @@
for ( $d = $start_ind; $d <= $end_ind; $d++ ) {
for ( $u = 0; $u < $viewusercnt; $u++ ) {
- $untimed = array();
+ $untimed = [];
$user = $viewusers[$u];
$events = $e_save[$u];
$repeated_events = $re_save[$u];
@@ -374,8 +374,7 @@
// Get static non-repeating events
$ev = get_entries ( $dateYmd, $get_unapproved, 1, 1 );
- $hour_arr = array();
- $rowspan_arr = array();
+ $hour_arr = $rowspan_arr = [];
$evcnt = count ( $ev );
$repcnt = count ( $rep );
for ( $i = 0; $i < $evcnt; $i++ ) {
@@ -487,7 +486,7 @@
echo "\n";
}
-$rowspan_day = array();
+$rowspan_day = [];
for ( $u = 0; $u < $viewusercnt; $u++ ) {
for ( $d = $start_ind; $d <= $end_ind; $d++ )
$rowspan_day[$u][$d] = 0;
diff --git a/view_t.php b/view_t.php
index 65f403f90..bd4da021a 100644
--- a/view_t.php
+++ b/view_t.php
@@ -285,7 +285,7 @@ function print_header_timebar() {
$printerStr = generate_printer_friendly ( 'view_t.php' );
-print_header( array( 'js/popups.js/true', 'js/dblclick_add.js/true' ) );
+print_header ( ['js/popups.js/true', 'js/dblclick_add.js/true'] );
if ( ! empty ( $error ) ) {
echo print_error( $error ) . print_trailer();
@@ -317,7 +317,7 @@ function print_header_timebar() {
// Additionally, we only want to put at most 6 users in one table since
// any more than that doesn't really fit in the page.
-$e_save = $re_save = array();
+$e_save = $re_save = [];
for ( $i = 0; $i < $viewusercnt; $i++ ) {
/* Pre-Load the repeated events for quicker access */
$repeated_events = read_repeated_events ( $viewusers[$i], $wkstart, $wkend, '' );
diff --git a/view_v.php b/view_v.php
index b37848ca1..16cc236a6 100644
--- a/view_v.php
+++ b/view_v.php
@@ -43,7 +43,7 @@
$can_add = ( empty ( $ADD_LINK_IN_VIEWS ) || $ADD_LINK_IN_VIEWS != 'N' );
-print_header( array( 'js/popups.js/true', 'js/dblclick_add.js/true' ) );
+print_header ( ['js/popups.js/true', 'js/dblclick_add.js/true'] );
echo '
diff --git a/week.php b/week.php
index d62ffcdcb..d74fa4414 100644
--- a/week.php
+++ b/week.php
@@ -94,7 +94,7 @@
$header[$i] . '';
$date = date ( 'Ymd', $days[$i] );
- $hour_arr = $rowspan_arr = $tk = array();
+ $hour_arr = $rowspan_arr = $tk = [];
// Get, combine and sort, static and repeating events for this date.
$ev = combine_and_sort_events ( get_entries ( $date, $get_unapproved ),
@@ -243,7 +243,7 @@
}
print_header(
- array( 'js/popups.js/true', 'js/dblclick_add.js/true' ),
+ ['js/popups.js/true', 'js/dblclick_add.js/true'],
generate_refresh_meta(), '', false, false, false, false );
echo <<