summaryrefslogtreecommitdiff
path: root/include/sanity_check.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/sanity_check.php')
-rwxr-xr-xinclude/sanity_check.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/sanity_check.php b/include/sanity_check.php
index c2ecee368..f06cf0a39 100755
--- a/include/sanity_check.php
+++ b/include/sanity_check.php
@@ -14,6 +14,12 @@
* If you come crying when stuff inevitably breaks, you will be mocked and told
* to get out. */
+ function make_self_url() {
+ $proto = is_server_https() ? 'https' : 'http';
+
+ return $proto . '://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
+ }
+
function make_self_url_path() {
$proto = is_server_https() ? 'https' : 'http';
$url_path = $proto . '://' . $_SERVER["HTTP_HOST"] . parse_url($_SERVER["REQUEST_URI"], PHP_URL_PATH);
@@ -50,6 +56,10 @@
array_push($errors, "PHP version 5.6.0 or newer required. You're using " . PHP_VERSION . ".");
}
+ if (!class_exists("UConverter")) {
+ array_push($errors, "PHP UConverter class is missing, it's provided by the Internationalization (intl) module.");
+ }
+
if (CONFIG_VERSION != EXPECTED_CONFIG_VERSION) {
array_push($errors, "Configuration file (config.php) has incorrect version. Update it with new options from config.php-dist and set CONFIG_VERSION to the correct value.");
}
@@ -176,6 +186,7 @@
}
if (count($errors) > 0 && $_SERVER['REQUEST_URI']) { ?>
+ <!DOCTYPE html>
<html>
<head>
<title>Startup failed</title>