From faf3f50d20530148c87961c276fe61faced2452c Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Fri, 14 Nov 2008 09:46:55 -0500 Subject: [PATCH] Fixed some bugs and missing descriptions in dns manager. Fixed bugs in installer. A backup file of the database is stored in /root during update. --- install/update.php | 11 +++++++---- 1 files changed, 7 insertions(+), 4 deletions(-) diff --git a/install/update.php b/install/update.php index d2b4c01..6c7ce67 100644 --- a/install/update.php +++ b/install/update.php @@ -52,6 +52,7 @@ //** Installer/updater logfile define('ISPC_LOG_FILE', '/var/log/ispconfig_install.log'); +define('ISPC_INSTALL_ROOT', realpath(dirname(__FILE__).'/../')); //** Check for ISPConfig 2.x versions if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) { @@ -144,7 +145,7 @@ } // create a backup copy of the ispconfig database in the root folder -$backup_db_name = '/root/ispconfig_db_backup_'.date('Y-m-d').'.sql'; +$backup_db_name = '/root/ispconfig_db_backup_'.@date('Y-m-d_h-i').'.sql'; copy('existing_db.sql',$backup_db_name); exec("chmod 700 $backup_db_name"); exec("chown root:root $backup_db_name"); @@ -157,9 +158,11 @@ $tpl_ini_array = ini_to_array(rf('tpl/server.ini.master')); // update the new template with the old values -foreach($old_ini_array as $tmp_section_name => $tmp_section_content) { - foreach($tmp_section_content as $tmp_var_name => $tmp_var_content) { - $tpl_ini_array[$tmp_section_name][$tmp_var_name] = $tmp_var_content; +if(is_array($old_ini_array)) { + foreach($old_ini_array as $tmp_section_name => $tmp_section_content) { + foreach($tmp_section_content as $tmp_var_name => $tmp_var_content) { + $tpl_ini_array[$tmp_section_name][$tmp_var_name] = $tmp_var_content; + } } } -- Gitblit v1.9.1