Skip to content

Commit c68e9b8

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1
2 parents 91ada5f + 60e884a commit c68e9b8

File tree

15 files changed

+88
-44
lines changed

15 files changed

+88
-44
lines changed

install/lib/installer_base.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ public function configure_mailman($status = 'insert') {
803803
}
804804

805805
//* Create aliasaes
806-
exec('/usr/lib/mailman/bin/genaliases 2>/dev/null');
806+
if($status == 'install') exec('/usr/lib/mailman/bin/genaliases 2>/dev/null');
807807

808808
if(!is_file('/var/lib/mailman/data/transport-mailman')) touch('/var/lib/mailman/data/transport-mailman');
809809
exec('/usr/sbin/postmap /var/lib/mailman/data/transport-mailman');

interface/lib/classes/db_mysql.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,6 @@ private function _query($sQuery = '') {
261261
$aArgs = func_get_args();
262262
$sQuery = call_user_func_array(array(&$this, '_build_query_string'), $aArgs);
263263
$this->securityScan($sQuery);
264-
265264
$this->_iQueryId = @mysqli_query($this->_iConnId, $sQuery);
266265
if (!$this->_iQueryId) {
267266
$this->_sqlerror('Falsche Anfrage / Wrong Query', 'SQL-Query = ' . $sQuery);
@@ -634,6 +633,7 @@ public function datalogSave($db_table, $action, $primary_field, $primary_id, $re
634633
$diffstr = serialize($diffrec_full);
635634
$username = $_SESSION['s']['user']['username'];
636635
$dbidx = $primary_field.':'.$primary_id;
636+
if(trim($username) == '') $username = 'none';
637637

638638
if($action == 'INSERT') $action = 'i';
639639
if($action == 'UPDATE') $action = 'u';

interface/lib/classes/remote.d/client.inc.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -404,10 +404,9 @@ public function client_delete_everything($session_id, $client_id)
404404
$app->db->query("DELETE FROM sys_user WHERE client_id = ?", $client_id);
405405

406406
//* Delete all records (sub-clients, mail, web, etc....) of this client.
407-
$tables = 'cron,client,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain,web_traffic,domain';
407+
$tables = 'cron,dns_rr,dns_soa,dns_slave,ftp_user,mail_access,mail_content_filter,mail_domain,mail_forwarding,mail_get,mail_user,mail_user_filter,shell_user,spamfilter_users,support_message,web_database,web_database_user,web_domain,web_traffic,domain,mail_mailinglist,client';
408408
$tables_array = explode(',', $tables);
409409
$client_group_id = $app->functions->intval($client_group['groupid']);
410-
411410
if($client_group_id > 1) {
412411
foreach($tables_array as $table) {
413412
if($table != '') {
@@ -418,7 +417,6 @@ public function client_delete_everything($session_id, $client_id)
418417
foreach($table_info as $tmp) {
419418
if($tmp['option'] == 'primary') $index_field = $tmp['name'];
420419
}
421-
422420
//* Delete the records
423421
if($index_field != '') {
424422
if(is_array($records)) {
@@ -441,7 +439,6 @@ public function client_delete_everything($session_id, $client_id)
441439
}
442440

443441
}
444-
445442
if (!$this->checkPerm($session_id, 'client_delete')) {
446443
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
447444
return false;

interface/lib/classes/remote.d/dns.inc.php

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

33
/*
4-
Copyright (c) 2007 - 2013, Till Brehm, projektfarm Gmbh
4+
Copyright (c) 2007 - 2016, Till Brehm, projektfarm Gmbh
55
All rights reserved.
66
77
Redistribution and use in source and binary forms, with or without modification,
@@ -196,6 +196,37 @@ public function dns_zone_get($session_id, $primary_id)
196196
$app->remoting_lib->loadFormDef('../dns/form/dns_soa.tform.php');
197197
return $app->remoting_lib->getDataRecord($primary_id);
198198
}
199+
200+
//* Add a slave zone
201+
public function dns_slave_add($session_id, $client_id, $params)
202+
{
203+
if(!$this->checkPerm($session_id, 'dns_zone_add')) {
204+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
205+
return false;
206+
}
207+
return $this->insertQuery('../dns/form/dns_slave.tform.php', $client_id, $params);
208+
}
209+
210+
//* Update a slave zone
211+
public function dns_slave_update($session_id, $client_id, $primary_id, $params)
212+
{
213+
if(!$this->checkPerm($session_id, 'dns_zone_update')) {
214+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
215+
return false;
216+
}
217+
$affected_rows = $this->updateQuery('../dns/form/dns_slave.tform.php', $client_id, $primary_id, $params);
218+
return $affected_rows;
219+
}
220+
221+
//* Delete a slave zone
222+
public function dns_slave_delete($session_id, $primary_id)
223+
{
224+
if(!$this->checkPerm($session_id, 'dns_zone_delete')) {
225+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
226+
return false;
227+
}
228+
return $this->deleteQuery('../dns/form/dns_slave.tform.php', $primary_id);
229+
}
199230

200231
//* Get record id by origin
201232
public function dns_zone_get_id($session_id, $origin)

interface/web/admin/system_config_edit.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ function onUpdateSave($sql) {
193193
"SELECT sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, domain " .
194194
"FROM web_domain WHERE type NOT IN ('subdomain','vhostsubdomain')";
195195
$app->db->query($sql);
196+
$sql = "REPLACE INTO domain (sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, domain ) " .
197+
"SELECT sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other, SUBSTRING(origin, 1, CHAR_LENGTH(origin) - 1) " .
198+
"FROM dns_soa";
199+
$app->db->query($sql);
196200
}
197201

198202
//die(print_r($_FILES));

interface/web/client/templates/client_edit_limits.htm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ <h1><tmpl_var name="list_head_txt"></h1>
2222
</select></div>
2323
</div>
2424
<div class="clear"><div class="right">
25-
<button class="btn btn-default formbutton-success" type="button" onclick="ISPConfig.addAdditionalTemplate();">{tmpl_var name="add_additional_template_txt"}</button>
25+
<button id="tpl_add_btn" class="btn btn-default formbutton-success" type="button" onclick="ISPConfig.addAdditionalTemplate();">{tmpl_var name="add_additional_template_txt"}</button>
2626
</div></div>
2727
<div class="form-group">
2828
<label class="col-sm-3 control-label">{tmpl_var name='active_template_additional_txt'}</label>
@@ -471,9 +471,9 @@ <h4 class="panel-title">
471471
.find('div.pnl_formsarea')
472472
.find('fieldset')
473473
.find('input,select,button')
474-
.not('#template_master,#template_additional,#default_mailserver,#default_webserver,#default_dbserver,#default_dnsserver,#default_slave_dnsserver,#customer_no_template,#customer_no_start,#customer_no_counter,#parent_client_id,#reseller')
474+
.not('#template_master,#template_additional,#default_mailserver,#tpl_add_btn,#default_webserver,#default_dbserver,#default_dnsserver,#default_slave_dnsserver,#customer_no_template,#customer_no_start,#customer_no_counter,#parent_client_id,#reseller')
475475
.click(function(e) {
476-
if(custom_template_selected()) return true;
476+
if(custom_template_selected()) return true;
477477
e.preventDefault();
478478
alert('{tmpl_var name="err_msg_master_tpl_set"}');
479479
})

interface/web/dashboard/dashboard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,13 @@
188188
$dashlets_config[$role.'_dashlets_left'] = trim($dashlets_config[$role.'_dashlets_left']);
189189
$dashlets_config[$role.'_dashlets_right'] = trim($dashlets_config[$role.'_dashlets_right']);
190190

191-
if($dashlets_config[$role.'_dashlets_left'] != ''){
191+
if($dashlets_config[$role.'_dashlets_left'] != '' || $dashlets_config[$role.'_dashlets_right'] != ''){
192192
preg_match_all('@\[(.*?)\]@', $dashlets_config[$role.'_dashlets_left'], $matches);
193193
$leftcol_dashlets = $matches[1];
194194
} else {
195195
$leftcol_dashlets = $default_leftcol_dashlets;
196196
}
197-
if($dashlets_config[$role.'_dashlets_right'] != ''){
197+
if($dashlets_config[$role.'_dashlets_right'] != '' || $dashlets_config[$role.'_dashlets_left'] != ''){
198198
preg_match_all('@\[(.*?)\]@', $dashlets_config[$role.'_dashlets_right'], $matches);
199199
$rightcol_dashlets = $matches[1];
200200
} else {

interface/web/sites/ajax_get_ip.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
$tmp = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ?", $client_group_id);
4848
$sql = "SELECT ip_address FROM server_ip WHERE ip_type = ? AND server_id = ? AND (client_id = 0 OR client_id=?)";
4949

50-
$ips = $app->db->queryAllRecords($sql, $ip_type, $server_id, $tmp['groupid']);
50+
$ips = $app->db->queryAllRecords($sql, $ip_type, $server_id, $tmp['client_id']);
5151
// $ip_select = "<option value=''></option>";
5252
if($ip_type == 'IPv4'){
5353
$ip_select = ($web_config['enable_ip_wildcard'] == 'y')?"*#":"";

interface/web/themes/default/assets/javascripts/ispconfig.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ var ISPConfig = {
544544
newVal[newVal.length] = 'n' + ISPConfig.new_tpl_add_id + ':' + addTplId;
545545
$('<li>' + addTplText + '</li>').attr('rel', 'n' + ISPConfig.new_tpl_add_id).append(delbtn).appendTo('#template_additional_list ul');
546546
$('#template_additional').val(newVal.join('/'));
547-
alert('additional template ' + addTplText + ' added to customer');
547+
//alert('additional template ' + addTplText + ' added to customer');
548548
} else {
549549
alert('no additional template selcted');
550550
}
@@ -566,7 +566,7 @@ var ISPConfig = {
566566
newVal[newVal.length] = oldVal[i];
567567
}
568568
$('#template_additional').val(newVal.join('/'));
569-
alert('additional template ' + addTplText + ' deleted from customer');
569+
//alert('additional template ' + addTplText + ' deleted from customer');
570570
} else if(tpl_add != '') {
571571
// old style
572572
var addTemplate = document.getElementById('tpl_add_select').value.split('|',2);
@@ -587,7 +587,7 @@ var ISPConfig = {
587587
newVal = newVal.replace(repl, '');
588588
newVal = newVal.replace('//', '/');
589589
$('#template_additional').val(newVal);
590-
alert('additional template ' + addTplText + ' deleted from customer');
590+
//alert('additional template ' + addTplText + ' deleted from customer');
591591
} else {
592592
alert('no additional template selcted');
593593
}

server/conf/php_fpm_pool.conf.master

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ listen.allowed_clients = 127.0.0.1
66
</tmpl_if>
77
<tmpl_if name='use_socket'>
88
listen = <tmpl_var name='fpm_socket'>
9-
listen.owner = <tmpl_var name='fpm_user'>
10-
listen.group = <tmpl_var name='fpm_group'>
9+
listen.owner = <tmpl_var name='fpm_listen_user'>
10+
listen.group = <tmpl_var name='fpm_listen_group'>
1111
listen.mode = <tmpl_var name='fpm_listen_mode'>
1212
</tmpl_if>
1313

0 commit comments

Comments
 (0)