' .
diff --git a/help_docs.php b/help_docs.php
index 7f16dd2a4..171ac4ff1 100644
--- a/help_docs.php
+++ b/help_docs.php
@@ -8,7 +8,7 @@
if ( empty ( $HTTP_USER_AGENT ) )
$HTTP_USER_AGENT = $_SERVER['HTTP_USER_AGENT'];
-print_header ( '', '', '', true );
+print_header ( [], '', '', true );
echo $helpListStr . '
';
diff --git a/help_layers.php b/help_layers.php
index 0b54f74b5..7a0a9dd25 100644
--- a/help_layers.php
+++ b/help_layers.php
@@ -1,7 +1,7 @@
' . translate ( 'Help' ) . ': ' . translate ( 'Layers' ) . '
' .
diff --git a/help_pref.php b/help_pref.php
index 740141c23..85c60e317 100644
--- a/help_pref.php
+++ b/help_pref.php
@@ -2,7 +2,7 @@
require_once 'includes/init.php';
require_once 'includes/help_list.php';
-print_header ( '', '', '', true );
+print_header ( [], '', '', true );
echo $helpListStr . '
' . translate ( 'Help' ) . ': ' . translate ( 'Preferences' ) . '
' . translate ( 'Settings' ) . '
diff --git a/help_uac.php b/help_uac.php
index c068ea19b..634896141 100644
--- a/help_uac.php
+++ b/help_uac.php
@@ -5,7 +5,7 @@
$descStr =
translate ( 'Allows for fine control of user access and permissions. Users can also grant default and per individual permission if authorized by the administrator.' );
-print_header ( '', '', '', true, false, true );
+print_header ( [], '', '', true, false, true );
echo $helpListStr . '
' . translate ( 'Help' ) . ': '
diff --git a/includes/functions.php b/includes/functions.php
index 7d98f4e79..30e63678f 100644
--- a/includes/functions.php
+++ b/includes/functions.php
@@ -1758,7 +1758,7 @@ function error_check ( $nextURL, $redirect = true ) {
$ret = '';
if ( ! empty ( $error ) ) {
- print_header ( '', '', '', true );
+ print_header ( [], '', '', true );
$ret .= '
' . print_error ( $error ) . '
';
} else {
diff --git a/includes/init.php b/includes/init.php
index dc487c04b..ccb49cbee 100644
--- a/includes/init.php
+++ b/includes/init.php
@@ -155,7 +155,7 @@ function send_http_headers () {
* @param bool $IGNORED Parameter not used (ignored)
* @param bool $disableUTIL Do not include the util.js link
*/
-function print_header( $includes = '', $HeadX = '', $BodyX = '',
+function print_header ( $includes = '', $HeadX = '', $BodyX = '',
$disableCustom = false, $disableStyle = false, $disableRSS = false,
$IGNORED = false, $disableUTIL = false ) {
global $BGCOLOR, $browser, $charset, $CSP, $CUSTOM_HEADER, $CUSTOM_SCRIPT,
@@ -165,6 +165,8 @@ function print_header( $includes = '', $HeadX = '', $BodyX = '',
$self, $TABLECELLFG, $TEXTCOLOR, $THBG, $THFG, $TODAYCELLBG, $WEEKENDBG,
$ASSETS;
+ $id = '';
+
ob_start ();
if ( is_dir ( 'includes' ) ) {
@@ -218,9 +220,8 @@ function print_header( $includes = '', $HeadX = '', $BodyX = '',
if( ! empty( $js_ar ) )
foreach( $js_ar as $j ) {
- $i = 'includes/' . $j;
$ret .= '
- ';
+ ';
}
// Any other includes?
@@ -231,11 +232,10 @@ function print_header( $includes = '', $HeadX = '', $BodyX = '',
// Ignore since we handled it above
//$cs_ret .= '' . "\n";
} if( stristr( $inc, '.css' ) ) {
- $i = 'includes/' . $inc;
// Not added to $cs_ar because I think we want these,
// even if $disableStyle.
$cs_ret .= '
- ';
+ ';
} elseif( substr( $inc, 0, 12 ) == 'js/popups.js'
&& ! empty( $DISABLE_POPUPS ) && $DISABLE_POPUPS == 'Y' ) {
// Don't load popups.js if DISABLE_POPUPS.
@@ -256,7 +256,7 @@ function print_header( $includes = '', $HeadX = '', $BodyX = '',
} else {
$ret .= 'js_cacher.php?inc=' . $inc;
}
- $ret .= '">';
+ $ret .= '" defer>';
}
}
}
@@ -325,21 +325,28 @@ function print_header( $includes = '', $HeadX = '', $BodyX = '',
. '" rel="alternate" title="' . $appStr . ' [RSS 2.0]">' : '' )
// Do we need anything else inside the header tag?
// $HeadX moved here because linked CSS may override standard styles.
- . ( $HeadX ? '
- ' . $HeadX : '' ) . '
+ . "
+ $HeadX" . '
- id. */ . ' id="' . preg_replace( '/(_|.php)/', '',
- substr( $self, strrpos( $self, '/' ) + 1 ) ) . '"'
- // Add any extra parts to the tag.
- . ( empty( $BodyX ) ? '' : " $BodyX" ) . '>' . "\n"
- // Add custom header if enabled.
- . ( $CUSTOM_HEADER == 'Y' && ! $disableCustom
- ? load_template( $login, 'H' ) : '' );
+ tag.
+ . " $BodyX>\n"
+ // Add custom header if enabled.
+ . ( $CUSTOM_HEADER === 'Y' && ! $disableCustom
+ ? load_template ( $login, 'H' ) : '' );
+
// HTML includes needed for the top menu.
if( $MENU_ENABLED == 'Y' ) {
require_once 'menu.php';
diff --git a/minical.php b/minical.php
index 5dd93281c..d20cb4279 100644
--- a/minical.php
+++ b/minical.php
@@ -105,7 +105,7 @@
$enddate = mktime ( 23, 59, 59, $thismonth + 1, 0, $thisyear );
// Don't display custom header.
-print_header ( '', generate_refresh_meta(), '', true );
+print_header ( [], generate_refresh_meta(), '', true );
/* Pre-Load the repeated events for quicker access. */
$repeated_events = read_repeated_events ( $user, $startdate, $enddate, $cat_id );
diff --git a/pref.php b/pref.php
index 8a1062d63..6a02ce727 100644
--- a/pref.php
+++ b/pref.php
@@ -174,7 +174,7 @@ function save_pref( $prefs, $src) {
$openStr ="\"window.open( 'edit_template.php?type=%s&user=%s','cal_template','dependent,menubar,scrollbars,height=500,width=500,outerHeight=520,outerWidth=520' );\"";
$INC = [];
-print_header($INC, '', '');
+print_header();
?>
" . translate('Private');
+ echo ">" . translate('Private');
?>