From 6149e17b80b0b3466db725831a6b95f54092756b Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 04 May 2009 08:52:24 -0400
Subject: [PATCH] Removed some unmaintained tables and files and introduced the pre_update.sql script for sql commands to be run before an update.

---
 install/update.php |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/install/update.php b/install/update.php
index 0c3a207..d72b8f9 100644
--- a/install/update.php
+++ b/install/update.php
@@ -119,6 +119,15 @@
 	$conf["mysql"]["admin_password"] = $inst->free_query('MySQL root password', $conf['mysql']['admin_password']);
 }
 
+//** load the pre update sql script do perform modifications on the database before the database is dumped
+if(is_file(ISPC_INSTALL_ROOT."/install/sql/pre_update.sql")) {
+	if($conf['mysql']['admin_password'] == '') {
+		caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' '".$conf['mysql']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/pre_update.sql' &> /dev/null", __FILE__, __LINE__, 'read in ispconfig3.sql', 'could not read in ispconfig3.sql');
+	} else {
+		caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -p'".$conf['mysql']['admin_password']."' '".$conf['mysql']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/pre_update.sql' &> /dev/null", __FILE__, __LINE__, 'read in ispconfig3.sql', 'could not read in ispconfig3.sql');
+	}
+}
+
 //** export the current database data
 if( !empty($conf["mysql"]["admin_password"]) ) {
 

--
Gitblit v1.9.1