From 423b1d7563ea1ca46044418588bb631d9f586483 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Thu, 25 Feb 2010 11:04:53 -0500 Subject: [PATCH] Added a filesize check for existing_db.sql in updater to stop update process if the expoerted database dump is smaller then about 60 KB. --- install/update.php | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/install/update.php b/install/update.php index 9bc4dd7..9484a55 100644 --- a/install/update.php +++ b/install/update.php @@ -149,6 +149,8 @@ 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') < 60000) 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'; copy('existing_db.sql',$backup_db_name); -- Gitblit v1.9.1