From aaa005ec33e88df3fdaf04cd541a2c935682941d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gauvain=20Boich=C3=A9?= Date: Thu, 2 Apr 2020 18:25:50 +0200 Subject: [PATCH] Changement d'heure --- includes/functions.php | 2 +- includes/functions_display.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index c6ae59b..c116eb2 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -4130,7 +4130,7 @@ function page_header($page_title = '', $display_online_list = false, $item_id = } $current_hour = date('H'); - $day_state = $current_hour >= 6 && $current_hour <= 18 ? 'jour' : 'nuit'; + $day_state = $current_hour >= 4 && $current_hour <= 16 ? 'jour' : 'nuit'; // The following assigns all _common_ variables that may be used at any point in a template. $template->assign_vars(array( diff --git a/includes/functions_display.php b/includes/functions_display.php index cf0ad1c..ccd7c9e 100644 --- a/includes/functions_display.php +++ b/includes/functions_display.php @@ -422,7 +422,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod } $current_hour = date('H'); - $day_state = $current_hour >= 6 && $current_hour <= 18 ? 'jour' : 'nuit'; + $day_state = $current_hour >= 4 && $current_hour <= 16 ? 'jour' : 'nuit'; $forum_image = str_replace(".", "_$day_state.", $row['forum_image']); $cat_row = array( @@ -606,7 +606,7 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod } $current_hour = date('H'); - $day_state = $current_hour >= 6 && $current_hour <= 18 ? 'jour' : 'nuit'; + $day_state = $current_hour >= 4 && $current_hour <= 16 ? 'jour' : 'nuit'; $forum_image = str_replace(".", "_$day_state.", $row['forum_image']); $forum_row = array(