From 5d4a28eb0d9e4256ea61f8269d5d13f359d12ca7 Mon Sep 17 00:00:00 2001 From: Mark Unwin Date: Mon, 18 Mar 2019 11:39:08 +1000 Subject: [PATCH] Change logon template to thorw warnings about not being about to retrieve config (and hence talk to DB). --- code_igniter/application/views/v_logon.php | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/code_igniter/application/views/v_logon.php b/code_igniter/application/views/v_logon.php index 2021e8d21..66ba3535a 100644 --- a/code_igniter/application/views/v_logon.php +++ b/code_igniter/application/views/v_logon.php @@ -53,7 +53,20 @@
config->config['internal_version'] < $this->config->config['web_internal_version']) { +if (empty($this->config->config['internal_version'])) { + $command = "mysql -u root -popenauditrootuserpassword -e \"DROP DATABASE IF EXISTS openaudit; CREATE DATABASE openaudit;\"
mysql -u root -popenauditrootuserpassword openaudit < /usr/local/open-audit/other/openaudit_mysql.sql"; + if (php_uname() == 'Windows NT') { + $command = "C:\\xampp\\mysql\\bin.exe -u root -popenauditrootuserpassword -e \"DROP DATABASE IF EXISTS openaudit; CREATE DATABASE openaudit;\"
C:\\xampp\\mysql\\bin.exe -u root -popenauditrootuserpassword openaudit < c:\\xampp\\mysql\\bin\\openaudit_mysql.sql"; + } +?> +
+
+ +
+
+config->config['internal_version']) and $this->config->config['internal_version'] < $this->config->config['web_internal_version']) { ?>
@@ -91,7 +104,8 @@
- + config->config['internal_version'])) { $disabled = 'disabled'; } ?> +