Skip to content

Commit b181183

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents e67ff2f + f90e18f commit b181183

File tree

20 files changed

+178
-175
lines changed

20 files changed

+178
-175
lines changed

install/lib/install.lib.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ function get_distname() {
9292
$mainver = $ver;
9393
}
9494
switch ($mainver){
95+
case "16.10":
96+
$relname = "(Yakkety Yak)";
97+
$distconfid = 'ubuntu1604';
98+
break;
9599
case "16.04":
96100
$relname = "(Xenial Xerus)";
97101
$distconfid = 'ubuntu1604';

install/lib/installer_base.lib.php

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

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

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

install/tpl/debian6_dovecot2.conf.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ protocol pop3 {
5959
mail_plugins = quota
6060
}
6161
protocol lda {
62+
postmaster_address = webmaster@localhost
6263
mail_plugins = sieve quota
6364
}
6465
protocol lmtp {

install/tpl/debian_dovecot2.conf.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ protocol pop3 {
5757
mail_plugins = quota
5858
}
5959
protocol lda {
60+
postmaster_address = webmaster@localhost
6061
mail_plugins = sieve quota
6162
}
6263
protocol lmtp {

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: 24 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -198,24 +198,35 @@ public function dns_zone_get($session_id, $primary_id)
198198
}
199199

200200
//* 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-
}
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+
}
209220

210221
//* Delete a slave zone
211222
public function dns_slave_delete($session_id, $primary_id)
212223
{
213-
if(!$this->checkPerm($session_id, 'dns_zone_delete')) {
214-
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
215-
return false;
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);
216229
}
217-
return $this->deleteQuery('../dns/form/dns_slave.tform.php', $primary_id);
218-
}
219230

220231
//* Get record id by origin
221232
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 {

0 commit comments

Comments
 (0)