From faf3f50d20530148c87961c276fe61faced2452c Mon Sep 17 00:00:00 2001 From: tbrehm Date: Fri, 14 Nov 2008 14:46:55 +0000 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/install.php | 9 +- install/lib/installer_base.lib.php | 4 +- install/update.php | 11 +- interface/lib/classes/plugin_listview.inc.php | 2 +- interface/web/dns/templates/dns_a_list.htm | 164 +++++++++--------- interface/web/dns/templates/dns_soa_list.htm | 122 ++++++------- 6 files changed, 161 insertions(+), 151 deletions(-) diff --git a/install/install.php b/install/install.php index 5f46d0ad27..c283723e62 100644 --- a/install/install.php +++ b/install/install.php @@ -68,6 +68,7 @@ include_once('dist/conf/'.$dist['id'].'.conf.php'); //** Install logfile define('ISPC_LOG_FILE', '/var/log/ispconfig_install.log'); +define('ISPC_INSTALL_ROOT', realpath(dirname(__FILE__).'/../')); //**************************************************************************************************** //** Installer Interface @@ -140,7 +141,7 @@ if($install_mode == 'Standard') { //* Configure postfix $inst->configure_postfix(); - //* Configure postfix + //* Configure jailkit swriteln('Configuring Jailkit'); $inst->configure_jailkit(); @@ -271,6 +272,12 @@ if($install_mode == 'Standard') { system($conf['init_scripts'].'/'.$conf['courier']['courier-pop-ssl'].' restart'); } + //** Configure Jailkit + if(strtolower($inst->simple_query('Configure Jailkit', array('y','n'),'y') ) == 'y') { + swriteln('Configuring Jailkit'); + $inst->configure_jailkit(); + } + //** Configure Pureftpd if(strtolower($inst->simple_query('Configure FTP Server', array('y','n'),'y') ) == 'y') { swriteln('Configuring Pureftpd'); diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index e490de9db2..c5a689f1fd 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -132,10 +132,10 @@ class installer_base { $this->error('Stopped: Database already contains some tables.'); } else { if($cf['admin_password'] == '') { - caselog("mysql -h '".$cf['host']."' -u '".$cf['admin_user']."' '".$cf['database']."' < 'sql/ispconfig3.sql' &> /dev/null", + caselog("mysql -h '".$cf['host']."' -u '".$cf['admin_user']."' '".$cf['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/ispconfig3.sql' &> /dev/null", __FILE__, __LINE__, 'read in ispconfig3.sql', 'could not read in ispconfig3.sql'); } else { - caselog("mysql -h '".$cf['host']."' -u '".$cf['admin_user']."' -p'".$cf['admin_password']."' '".$cf['database']."' < 'sql/ispconfig3.sql' &> /dev/null", + caselog("mysql -h '".$cf['host']."' -u '".$cf['admin_user']."' -p'".$cf['admin_password']."' '".$cf['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/ispconfig3.sql' &> /dev/null", __FILE__, __LINE__, 'read in ispconfig3.sql', 'could not read in ispconfig3.sql'); } $db_tables = $this->db->getTables(); diff --git a/install/update.php b/install/update.php index d2b4c01dfb..6c7ce678b1 100644 --- a/install/update.php +++ b/install/update.php @@ -52,6 +52,7 @@ require_once('lib/installer_base.lib.php'); //** 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 @@ if( !empty($conf["mysql"]["admin_password"]) ) { } // 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 @@ unset($tmp_server_rec); $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; + } } } diff --git a/interface/lib/classes/plugin_listview.inc.php b/interface/lib/classes/plugin_listview.inc.php index dcd2803368..771cd5bf09 100644 --- a/interface/lib/classes/plugin_listview.inc.php +++ b/interface/lib/classes/plugin_listview.inc.php @@ -76,7 +76,7 @@ class plugin_listview extends plugin_base { if($field['formtype'] == "SELECT") { if(strtolower($rec[$key]) == 'y' or strtolower($rec[$key]) == 'n') { // Set a additional image variable for bolean fields - $rec['_'.$key.'_'] = (strtolower($rec[$key]) == 'y')?'list_icon_true.png':'list_icon_false.png'; + $rec['_'.$key.'_'] = (strtolower($rec[$key]) == 'y')?'x16/tick_circle.png':'x16/cross_circle.png'; } //* substitute value for select field @$rec[$key] = $field['value'][$rec[$key]]; diff --git a/interface/web/dns/templates/dns_a_list.htm b/interface/web/dns/templates/dns_a_list.htm index c93d33e2ae..c0dc4bff40 100644 --- a/interface/web/dns/templates/dns_a_list.htm +++ b/interface/web/dns/templates/dns_a_list.htm @@ -1,82 +1,82 @@ -
-
Tools -
- - - - - - - - - - -
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
{tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="origin"}{tmpl_var name="ns"}{tmpl_var name="mbox"} - -
-
-
+
+
Tools +
+ + + + + + + + + + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
{tmpl_var name="type"}{tmpl_var name="name"}{tmpl_var name="data"}{tmpl_var name="aux"} + +
+
+
diff --git a/interface/web/dns/templates/dns_soa_list.htm b/interface/web/dns/templates/dns_soa_list.htm index e7711fa7e5..3edece814b 100644 --- a/interface/web/dns/templates/dns_soa_list.htm +++ b/interface/web/dns/templates/dns_soa_list.htm @@ -1,61 +1,61 @@ -

- -
- -
-
Tools -
- -
-
-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 
{tmpl_var name="active"}{tmpl_var name="server_id"}{tmpl_var name="origin"}{tmpl_var name="ns"}{tmpl_var name="mbox"} - -
-
-
- -
+

+ +
+ +
+
Tools +
+ +
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
{tmpl_var name="server_id"}{tmpl_var name="origin"}{tmpl_var name="ns"}{tmpl_var name="mbox"} + +
+
+
+ +
-- GitLab