mirror of
https://gitlab.com/ruany/litebans-php.git
synced 2025-05-23 08:29:06 +00:00
Update extension checks
This commit is contained in:
parent
f3430a4316
commit
9de7a88f9a
@ -14,8 +14,11 @@
|
|||||||
<div class="text-warning">
|
<div class="text-warning">
|
||||||
The following PHP extensions are required by litebans-php but were not found:
|
The following PHP extensions are required by litebans-php but were not found:
|
||||||
<br>
|
<br>
|
||||||
<?php if (!extension_loaded("pdo_mysql")) {
|
<?php
|
||||||
echo "- <a class=\"text-danger\">pdo_mysql</a><br>";
|
foreach(array("pdo_mysql", "intl") as $ext) {
|
||||||
|
if (!extension_loaded($ext)) {
|
||||||
|
echo "- <a class=\"text-danger\">$ext</a><br>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$phpini = php_ini_loaded_file();
|
$phpini = php_ini_loaded_file();
|
||||||
|
|
||||||
|
@ -7,6 +7,6 @@ function redirect($url, $showtext = true) {
|
|||||||
die("<script data-cfasync=\"false\" type=\"text/javascript\">document.location=\"$url\";</script>");
|
die("<script data-cfasync=\"false\" type=\"text/javascript\">document.location=\"$url\";</script>");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!extension_loaded("pdo_mysql")) {
|
if (!extension_loaded("pdo_mysql") || !extension_loaded("intl")) {
|
||||||
redirect("error/missing-extensions.php");
|
redirect("error/missing-extensions.php");
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ class Page {
|
|||||||
$this->lang = new en_US();
|
$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->conn = $settings->conn;
|
||||||
$this->settings = $settings;
|
$this->settings = $settings;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user