X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/0e5cca951eafa6193153f171b89a3bbf255152ef..19047d45c1ce27cd5f3e4c4d3a1dfdd384bf8f0d:/lib/functions.php?ds=inline diff --git a/lib/functions.php b/lib/functions.php old mode 100755 new mode 100644 index bc119a3..c613d4a --- a/lib/functions.php +++ b/lib/functions.php @@ -90,6 +90,18 @@ jirafeau_gen_random ($l) return $code; } +function is_ssl() { + if ( isset($_SERVER['HTTPS']) ) { + if ( 'on' == strtolower($_SERVER['HTTPS']) ) + return true; + if ( '1' == $_SERVER['HTTPS'] ) + return true; + } elseif ( isset($_SERVER['SERVER_PORT']) && ( '443' == $_SERVER['SERVER_PORT'] ) ) { + return true; + } + return false; +} + function jirafeau_human_size ($octets) { @@ -491,10 +503,10 @@ show_errors () } } -function check_errors () +function check_errors ($cfg) { if (file_exists (JIRAFEAU_ROOT . 'install.php') - && !file_exists (JIRAFEAU_ROOT . 'lib/config.local.php')) + && !($cfg['installation_done'] === true)) { header('Location: install.php'); exit;