diff --git a/config.php.template b/config.php.template index cb94726..0e571ab 100644 --- a/config.php.template +++ b/config.php.template @@ -12,6 +12,7 @@ define("ADDRESS", "##address##"); define("POLICY_MAIL", "##policy_mail##"); //contact email in policy define("POLICY_PHONE", "##policy_phone##"); define("WHO_WE_ARE","##who_we_are##"); +define("POLICY_URL","##policy_url##"); define("INSTALL_OVERRIDE", false); define("DEFAULT_LANGUAGE", "en_GB"); diff --git a/install.php b/install.php index 426db4e..2c1b407 100644 --- a/install.php +++ b/install.php @@ -2,6 +2,8 @@ require_once("template.php"); define("WEB_URL", "."); //Website name define("NAME", _('Status page')); //Website name +define("MINIMUM_PHP_VERSION", "5.4.0"); +define("POLICY_URL", "policy.php"); //Default policy URL require_once("classes/locale-negotiator.php"); $negotiator = new LocaleNegotiator("en_GB"); @@ -126,6 +128,8 @@ if(isset($_POST['server']) && empty($message)) $config = str_replace("##policy_mail##", $_POST['policy_mail'], $config); $config = str_replace("##policy_phone##", $_POST['policy_phone'],$config); $config = str_replace("##who_we_are##", $_POST['who_we_are'], $config); + $policy_url_conf = ( ! empty($_POST['policy_url']) ) ? $_POST['policy_url'] : POLICY_URL; + $config = str_replace("##policy_url##", $policy_url_conf, $config); file_put_contents("config.php", $config); @@ -138,6 +142,50 @@ if(isset($_POST['server']) && empty($message)) } Template::render_header(_("Install")); ?> +

+ + MINIMUM_PHP_VERSION + if (strnatcmp(phpversion(), MINIMUM_PHP_VERSION) >= 0) { $preq_phpver = $preq_ok; } + + // Test for mysqlnd precense. The mysqlnd driver provides some extra functions that is not available + // if the plain mysql package is installed, and mysqli_get_client_stats is one of them. This is documented + // on the PHP site at http://www.php.net/manual/en/mysqlnd.stats.php + // This test is also discussed at https://stackoverflow.com/questions/1475701/how-to-know-if-mysqlnd-is-the-active-driver + if ( function_exists('mysqli_get_client_stats') ) { $preq_mysqlnd = $preq_ok; } + + // Check if we have access to write to location + if ( is_writable(__DIR__) ) { $preq_writedir = $preq_ok; } + +?> +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+

+
+
+ + " class="form-control"> +
+

diff --git a/template.php b/template.php index b5177d9..782f19e 100644 --- a/template.php +++ b/template.php @@ -138,7 +138,7 @@ class Template{
-
Copyright © Vojtěch Sajdl
+
 Copyright © Vojtěch Sajdl
@@ -157,7 +157,7 @@ class Template{
- +