From 78a5f65025931127e7632d4dbde97da7dc8671ff Mon Sep 17 00:00:00 2001 From: Paolo Date: Tue, 8 Mar 2022 14:46:38 +0100 Subject: [PATCH] - Added new parameter refresh to the view /views/templates/FHC-Header.php - /views/templates/FHC-Header.php calls the helper function printRefreshMeta - Added new function printRefreshMeta to application/helpers/hlp_header_helper.php --- application/helpers/hlp_header_helper.php | 15 +++++++++++++++ application/views/templates/FHC-Header.php | 3 +++ 2 files changed, 18 insertions(+) diff --git a/application/helpers/hlp_header_helper.php b/application/helpers/hlp_header_helper.php index f8bbb9ad2..63924f4c8 100644 --- a/application/helpers/hlp_header_helper.php +++ b/application/helpers/hlp_header_helper.php @@ -39,6 +39,21 @@ function printPageTitle($title) } } +/** + * Print the meta tag http-equiv refresh having as content the value of the given parameter + */ +function printRefreshMeta($refresh) +{ + if (is_numeric($refresh) && $refresh > 0) + { + echo ''; + } + else + { + show_error('The provided refresh parameter has to be a number greater then 0'); + } +} + /** * Generates tags for the style sheets you want to include, the parameter could by a string or an array of strings */ diff --git a/application/views/templates/FHC-Header.php b/application/views/templates/FHC-Header.php index f4ba1bb4b..8620f8d1c 100644 --- a/application/views/templates/FHC-Header.php +++ b/application/views/templates/FHC-Header.php @@ -10,6 +10,7 @@ // By default set the parameters to null $title = isset($title) ? $title : null; + $refresh = isset($refresh) ? $refresh : null; $customCSSs = isset($customCSSs) ? $customCSSs : null; $customJSs = isset($customJSs) ? $customJSs : null; $phrases = isset($phrases) ? $phrases : null; @@ -48,6 +49,8 @@ + +