From c8c7edae75cdaf81c85f9d0a0fddcb47320f5713 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 07 Sep 2011 11:41:57 -0400
Subject: [PATCH] Fixed: FS#1623 - vhost.conf.master placed in /root overrides vhost.conf.master in ispconfig/server/conf
---
install/lib/update.lib.php | 30 ++++++++++++++++++++++++++++--
1 files changed, 28 insertions(+), 2 deletions(-)
diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php
index 4cc7355..4a1af3a 100644
--- a/install/lib/update.lib.php
+++ b/install/lib/update.lib.php
@@ -79,6 +79,32 @@
}
}
+function checkDbHealth() {
+ global $conf;
+
+ //* Array containing non OK tables (can be repaired, crashed, corrupt)
+ $notok = array();
+
+ echo "Checking ISPConfig database .. ";
+ exec("mysqlcheck -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -p'".$conf['mysql']['admin_password']."' -r ".$conf["mysql"]["database"], $result);
+ for( $i=0; $i<sizeof($result);$i++) {
+ if ( substr($result[$i], -2) != "OK" ) {
+ $notok[] = $result[$i];
+ }
+ }
+
+ if ( sizeof($notok) > 0 ) {
+ echo "\nSome tables where not 'OK'. Please check the list below.\n\n";
+ foreach ($notok as $key => $value) {
+ echo "$value\n";
+ }
+ echo "\nPress enter to continue or CTRL-C to cancel the installation ..";
+ sread();
+ }
+ else
+ echo "OK\n";
+}
+
function updateDbAndIni() {
global $inst, $conf;
@@ -95,8 +121,8 @@
$conf['services']['file'] = ($tmp['file_server'] == 1)?true:false;
$conf['services']['db'] = ($tmp['db_server'] == 1)?true:false;
$conf['services']['vserver'] = ($tmp['vserver_server'] == 1)?true:false;
- $conf['services']['proxy'] = ($tmp['proxy_server'] == 1)?true:false;
- $conf['services']['firewall'] = ($tmp['firewall_server'] == 1)?true:false;
+ $conf['services']['proxy'] = (isset($tmp['proxy_server']) && $tmp['proxy_server'] == 1)?true:false;
+ $conf['services']['firewall'] = (isset($tmp['firewall_server']) && $tmp['firewall_server'] == 1)?true:false;
$conf['postfix']['vmail_mailbox_base'] = $ini_array['mail']['homedir_path'];
--
Gitblit v1.9.1