diff --git a/error/missing-extensions.php b/error/missing-extensions.php index d6c2864..ecc0b3b 100644 --- a/error/missing-extensions.php +++ b/error/missing-extensions.php @@ -14,8 +14,11 @@
The following PHP extensions are required by litebans-php but were not found:
- pdo_mysql
"; + $ext
"; + } } $phpini = php_ini_loaded_file(); diff --git a/inc/init.php b/inc/init.php index 5b47dbc..df3540b 100644 --- a/inc/init.php +++ b/inc/init.php @@ -7,6 +7,6 @@ function redirect($url, $showtext = true) { die(""); } -if (!extension_loaded("pdo_mysql")) { +if (!extension_loaded("pdo_mysql") || !extension_loaded("intl")) { redirect("error/missing-extensions.php"); } diff --git a/inc/page.php b/inc/page.php index bbd9740..76c7ea3 100644 --- a/inc/page.php +++ b/inc/page.php @@ -22,7 +22,7 @@ class Page { $this->lang = new en_US(); } - $this->formatter = new IntlDateFormatter($settings->lang, IntlDateFormatter::LONG, IntlDateFormatter::NONE, $this->settings->timezone, IntlDateFormatter::GREGORIAN, $settings->date_format); + $this->formatter = new IntlDateFormatter($settings->lang, IntlDateFormatter::LONG, IntlDateFormatter::NONE, $settings->timezone, IntlDateFormatter::GREGORIAN, $settings->date_format); $this->conn = $settings->conn; $this->settings = $settings;