From eccb77f7d5217b2a527e18eae6b364db7a1e607b Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 16 Jun 2010 10:12:38 -0400
Subject: [PATCH] Small theme changes.
---
install/lib/update.lib.php | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/install/lib/update.lib.php b/install/lib/update.lib.php
index 04551dc..81f8960 100644
--- a/install/lib/update.lib.php
+++ b/install/lib/update.lib.php
@@ -49,7 +49,11 @@
system("mysqldump -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -c -t --add-drop-table --create-options --quick --result-file=existing_db.sql ".$conf['mysql']['database']);
}
- if(filesize('existing_db.sql') < 30000) die('Possible problem with dumping the database. We will stop here. Please check the file existing_db.sql');
+ /*
+ * If we have a server with nothing in it except VE's then the database of thie server is empty.
+ * so the following line will no longer work!
+ */
+ //if(filesize('existing_db.sql') < 30000) die('Possible problem with dumping the database. We will stop here. Please check the file existing_db.sql');
// create a backup copy of the ispconfig database in the root folder
$backup_db_name = '/root/ispconfig_db_backup_'.@date('Y-m-d_h-i').'.sql';
@@ -95,10 +99,10 @@
//** load old data back into database
if( !empty($conf["mysql"]["admin_password"]) ) {
- system("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -p'".$conf['mysql']['admin_password']."' ".$conf['mysql']['database']." < existing_db.sql");
+ system("mysql --default-character-set=".$conf['mysql']['charset']." --force -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' -p'".$conf['mysql']['admin_password']."' ".$conf['mysql']['database']." < existing_db.sql");
} else {
- system("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' ".$conf['mysql']['database']." < existing_db.sql");
+ system("mysql --default-character-set=".$conf['mysql']['charset']." --force -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' ".$conf['mysql']['database']." < existing_db.sql");
}
--
Gitblit v1.9.1