Update functions.php
This commit is contained in:
@@ -2986,7 +2986,7 @@ function phpbb_ip_normalise(string $address)
|
||||
|
||||
// If is ipv4
|
||||
if (stripos($ip_normalised, '::ffff:') === 0)
|
||||
{
|
||||
{
|
||||
$ip_normalised = substr($ip_normalised, 7);
|
||||
}
|
||||
}
|
||||
@@ -4129,6 +4129,9 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
||||
$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.
|
||||
$template->assign_vars(array(
|
||||
'SITENAME' => $config['sitename'],
|
||||
@@ -4243,8 +4246,8 @@ function page_header($page_title = '', $display_online_list = false, $item_id =
|
||||
'T_ICONS_PATH' => "{$web_path}{$config['icons_path']}/",
|
||||
'T_RANKS_PATH' => "{$web_path}{$config['ranks_path']}/",
|
||||
'T_UPLOAD_PATH' => "{$web_path}{$config['upload_path']}/",
|
||||
'T_STYLESHEET_LINK' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/stylesheet.css?assets_version=' . $config['assets_version'],
|
||||
'T_STYLESHEET_LANG_LINK'=> "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/' . $user->lang_name . '/stylesheet.css?assets_version=' . $config['assets_version'],
|
||||
'T_STYLESHEET_LINK' => "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/stylesheet_' . $day_state . '.css?assets_version=' . $config['assets_version'],
|
||||
'T_STYLESHEET_LANG_LINK'=> "{$web_path}styles/" . rawurlencode($user->style['style_path']) . '/theme/' . $user->lang_name . '/stylesheet_' . $day_state . '.css?assets_version=' . $config['assets_version'],
|
||||
'T_FONT_AWESOME_LINK' => !empty($config['allow_cdn']) && !empty($config['load_font_awesome_url']) ? $config['load_font_awesome_url'] : "{$web_path}assets/css/font-awesome.min.css?assets_version=" . $config['assets_version'],
|
||||
'T_JQUERY_LINK' => !empty($config['allow_cdn']) && !empty($config['load_jquery_url']) ? $config['load_jquery_url'] : "{$web_path}assets/javascript/jquery-3.4.1.min.js?assets_version=" . $config['assets_version'],
|
||||
'S_ALLOW_CDN' => !empty($config['allow_cdn']),
|
||||
|
||||
Reference in New Issue
Block a user