From 6f8b5fe4757b151a042ea83adbce2eb6c218d104 Mon Sep 17 00:00:00 2001 From: Dan Untenzu Date: Fri, 17 Mar 2017 16:52:28 +0100 Subject: [PATCH] [FEATURE] Move fatal error method Move fatal error method to functions lib to use it in other scripts than install.php as well. --- install.php | 7 ------- lib/functions.php | 7 +++++++ lib/template/footer.php | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/install.php b/install.php index 9e05b8c..2739bc8 100644 --- a/install.php +++ b/install.php @@ -102,13 +102,6 @@ function jirafeau_add_ending_slash($path) return $path . ((substr($path, -1) == '/') ? '' : '/'); } -function jirafeau_fatal_error($errorText) -{ - echo '

Error

' . $errorText . '

'; - require(JIRAFEAU_ROOT . 'lib/template/footer.php'); - exit; -} - /** * Check installation **/ diff --git a/lib/functions.php b/lib/functions.php index 50ab345..d844e50 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -128,6 +128,13 @@ function jirafeau_get_datetimefield($timestamp) return $content; } +function jirafeau_fatal_error($errorText, $cfg = array()) +{ + echo '

Error

' . $errorText . '

'; + require(JIRAFEAU_ROOT . 'lib/template/footer.php'); + exit; +} + function jirafeau_clean_rm_link($link) { $p = s2p("$link"); diff --git a/lib/template/footer.php b/lib/template/footer.php index 9e39858..f33373f 100644 --- a/lib/template/footer.php +++ b/lib/template/footer.php @@ -9,7 +9,7 @@ ?> | '; echo '' . t('Terms of Service') . ''; } -- 2.34.1