Update functions.php

This commit is contained in:
Gauvain Boiché
2020-03-30 19:25:05 +02:00
parent e8bd98c22d
commit d926806907

View File

@@ -1946,8 +1946,6 @@ function meta_refresh($time, $url, $disable_cd_check = false)
// For XHTML compatibility we change back & to & // For XHTML compatibility we change back & to &
$url = str_replace('&', '&', $url); $url = str_replace('&', '&', $url);
$current_hour = date('H');
$day_state = $current_hour >= 6 && $current_hour <= 18 ? 'jour' : 'nuit';
$template->assign_vars(array( $template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="' . $time . '; url=' . $url . '" />') 'META' => '<meta http-equiv="refresh" content="' . $time . '; url=' . $url . '" />')
); );
@@ -4454,6 +4452,9 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
$template->assign_var('S_FORM_TOKEN_LOGIN', ''); $template->assign_var('S_FORM_TOKEN_LOGIN', '');
} }
$current_hour = date('H');
$day_state = $current_hour >= 6 && $current_hour <= 18 ? 'jour' : 'nuit';
// The following assigns all _common_ variables that may be used at any point in a template. // The following assigns all _common_ variables that may be used at any point in a template.
$template->assign_vars(array( $template->assign_vars(array(
'SITENAME' => $config['sitename'], 'SITENAME' => $config['sitename'],