Commit faf3f50d authored by tbrehm's avatar tbrehm

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.
parent a753a438
......@@ -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');
......
......@@ -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();
......
......@@ -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;
}
}
}
......
......@@ -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]];
......
This diff is collapsed.
<h2><tmpl_var name="list_head_txt"></h2>
<div class="panel panel_list_dns_soa">
<div class="pnl_toolsarea">
<fieldset><legend>Tools</legend>
<div class="buttons">
<button class="iconstxt icoAdd" type="button" onClick="loadContent('dns/dns_soa_edit.php');">
<span>{tmpl_var name="add_new_record_txt"}</span>
</button>
</div>
</fieldset>
</div>
<div class="pnl_listarea">
<fieldset><legend><tmpl_var name="list_head_txt"></legend>
<table class="list">
<thead>
<tr>
<th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th>
<th class="tbl_col_server_id" scope="col"><tmpl_var name="server_id_txt"></th>
<th class="tbl_col_origin" scope="col"><tmpl_var name="origin_txt"></th>
<th class="tbl_col_ns" scope="col"><tmpl_var name="ns_txt"></th>
<th class="tbl_col_mbox" scope="col"><tmpl_var name="mbox_txt"></th>
<th class="tbl_col_buttons" scope="col">&nbsp;</th>
</tr>
<tr>
<td class="tbl_col_active"><select name="search_active" onChange="submitForm('pageForm','dns/dns_soa_list.php');">{tmpl_var name='search_active'}</select></td>
<td class="tbl_col_server_id"><select name="search_server_id" onChange="submitForm('pageForm','dns/dns_soa_list.php');">{tmpl_var name='search_server_id'}</select></td>
<td class="tbl_col_origin"><input type="text" name="search_origin" value="{tmpl_var name='search_origin'}" /></td>
<td class="tbl_col_ns"><input type="text" name="search_ns" value="{tmpl_var name='search_ns'}" /></td>
<td class="tbl_col_mbox"><input type="text" name="search_mbox" value="{tmpl_var name='search_mbox'}" /></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','dns/dns_soa_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
</tr>
</thead>
<tbody>
<tmpl_loop name="records">
<tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
<td class="tbl_col_active"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="active"}</a></td>
<td class="tbl_col_server_id"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_id"}</a></td>
<td class="tbl_col_origin"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="origin"}</a></td>
<td class="tbl_col_ns"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="ns"}</a></td>
<td class="tbl_col_mbox"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="mbox"}</a></td>
<td class="tbl_col_buttons">
<div class="buttons icons16">
<a class="icons16 icoDelete" href="javascript: del_record('dns/dns_soa_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
</div>
</td>
</tr>
</tmpl_loop>
</tbody>
<tfoot>
<tr>
<td class="tbl_footer tbl_paging" colspan="6"><tmpl_var name="paging"></td>
</tr>
</tfoot>
</table>
</fieldset>
</div>
</div>
<h2><tmpl_var name="list_head_txt"></h2>
<div class="panel panel_list_dns_soa">
<div class="pnl_toolsarea">
<fieldset><legend>Tools</legend>
<div class="buttons">
<button class="iconstxt icoAdd" type="button" onClick="loadContent('dns/dns_soa_edit.php');">
<span>{tmpl_var name="add_new_record_txt"}</span>
</button>
</div>
</fieldset>
</div>
<div class="pnl_listarea">
<fieldset><legend><tmpl_var name="list_head_txt"></legend>
<table class="list">
<thead>
<tr>
<th class="tbl_col_active" scope="col"><tmpl_var name="active_txt"></th>
<th class="tbl_col_server_id" scope="col"><tmpl_var name="server_id_txt"></th>
<th class="tbl_col_origin" scope="col"><tmpl_var name="origin_txt"></th>
<th class="tbl_col_ns" scope="col"><tmpl_var name="ns_txt"></th>
<th class="tbl_col_mbox" scope="col"><tmpl_var name="mbox_txt"></th>
<th class="tbl_col_buttons" scope="col">&nbsp;</th>
</tr>
<tr>
<td class="tbl_col_active"><select name="search_active" onChange="submitForm('pageForm','dns/dns_soa_list.php');">{tmpl_var name='search_active'}</select></td>
<td class="tbl_col_server_id"><select name="search_server_id" onChange="submitForm('pageForm','dns/dns_soa_list.php');">{tmpl_var name='search_server_id'}</select></td>
<td class="tbl_col_origin"><input type="text" name="search_origin" value="{tmpl_var name='search_origin'}" /></td>
<td class="tbl_col_ns"><input type="text" name="search_ns" value="{tmpl_var name='search_ns'}" /></td>
<td class="tbl_col_mbox"><input type="text" name="search_mbox" value="{tmpl_var name='search_mbox'}" /></td>
<td class="tbl_col_buttons"><div class="buttons"><button type="button" class="icons16 icoFilter" name="Filter" id="Filter" value="{tmpl_var name="filter_txt"}" onClick="submitForm('pageForm','dns/dns_soa_list.php');"><span>{tmpl_var name="filter_txt"}</span></button></div></td>
</tr>
</thead>
<tbody>
<tmpl_loop name="records">
<tr class="tbl_row_<tmpl_if name='__EVEN__'}even<tmpl_else>uneven</tmpl_if>">
<td class="tbl_col_active"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');"><img src="themes/{tmpl_var name='theme'}/icons/{tmpl_var name='_active_'}" border="0" /></a></td>
<td class="tbl_col_server_id"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="server_id"}</a></td>
<td class="tbl_col_origin"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="origin"}</a></td>
<td class="tbl_col_ns"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="ns"}</a></td>
<td class="tbl_col_mbox"><a href="#" onClick="loadContent('dns/dns_soa_edit.php?id={tmpl_var name='id'}');">{tmpl_var name="mbox"}</a></td>
<td class="tbl_col_buttons">
<div class="buttons icons16">
<a class="icons16 icoDelete" href="javascript: del_record('dns/dns_soa_del.php?id={tmpl_var name='id'}&phpsessid={tmpl_var name='phpsessid'}','{tmpl_var name='delete_confirmation'}');"><span>{tmpl_var name='delete_txt'}</span></a>
</div>
</td>
</tr>
</tmpl_loop>
</tbody>
<tfoot>
<tr>
<td class="tbl_footer tbl_paging" colspan="6"><tmpl_var name="paging"></td>
</tr>
</tfoot>
</table>
</fieldset>
</div>
</div>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment