Skip to content

Commit 23d561f

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents c08c3ef + 5f22050 commit 23d561f

File tree

12 files changed

+99
-45
lines changed

12 files changed

+99
-45
lines changed

install/dist/lib/fedora.lib.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,12 @@ function configure_postfix($options = '')
9696
//* mysql-virtual_policy_greylist.cf
9797
$this->process_postfix_config('mysql-virtual_policy_greylist.cf');
9898

99+
//* mysql-virtual_gids.cf.master
100+
$this->process_postfix_config('mysql-virtual_gids.cf');
101+
102+
//* mysql-virtual_uids.cf
103+
$this->process_postfix_config('mysql-virtual_uids.cf');
104+
99105
//* postfix-dkim
100106
$full_file_name=$config_dir.'/tag_as_originating.re';
101107
if(is_file($full_file_name)) {
@@ -182,6 +188,7 @@ function configure_postfix($options = '')
182188
//if(!is_file('/var/lib/mailman/data/aliases')) touch('/var/lib/mailman/data/aliases');
183189
if(is_file('/var/lib/mailman/data/aliases')) unlink('/var/lib/mailman/data/aliases');
184190
if(!is_link('/var/lib/mailman/data/aliases')) symlink('/etc/mailman/aliases', '/var/lib/mailman/data/aliases');
191+
if(!is_dir('/etc/mailman')) mkdir('/etc/mailman');
185192
if(!is_file('/etc/mailman/aliases')) touch('/etc/mailman/aliases');
186193
exec('postalias /var/lib/mailman/data/aliases');
187194
if(!is_file('/etc/mailman/virtual-mailman')) touch('/etc/mailman/virtual-mailman');

install/dist/lib/opensuse.lib.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ function configure_postfix($options = '')
9393
//* mysql-virtual_policy_greylist.cf
9494
$this->process_postfix_config('mysql-virtual_policy_greylist.cf');
9595

96+
//* mysql-virtual_gids.cf.master
97+
$this->process_postfix_config('mysql-virtual_gids.cf');
98+
99+
//* mysql-virtual_uids.cf
100+
$this->process_postfix_config('mysql-virtual_uids.cf');
101+
96102
//* postfix-dkim
97103
$full_file_name=$config_dir.'/tag_as_originating.re';
98104
if(is_file($full_file_name)) {

install/lib/install.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ function edit_xinetd_conf($service){
618618

619619
//* Converts a ini string to array
620620
function ini_to_array($ini) {
621-
$config = '';
621+
$config = array();
622622
$ini = str_replace("\r\n", "\n", $ini);
623623
$lines = explode("\n", $ini);
624624
foreach($lines as $line) {

install/lib/installer_base.lib.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -961,8 +961,14 @@ public function configure_postfix($options = '') {
961961
//* mysql-virtual_outgoing_bcc.cf
962962
$this->process_postfix_config('mysql-virtual_outgoing_bcc.cf');
963963

964-
//* mysql-virtual_policy_greylist.cf
965-
$this->process_postfix_config('mysql-virtual_policy_greylist.cf');
964+
//* mysql-virtual_policy_greylist.cf
965+
$this->process_postfix_config('mysql-virtual_policy_greylist.cf');
966+
967+
//* mysql-virtual_gids.cf.master
968+
$this->process_postfix_config('mysql-virtual_gids.cf');
969+
970+
//* mysql-virtual_uids.cf
971+
$this->process_postfix_config('mysql-virtual_uids.cf');
966972

967973
//* postfix-dkim
968974
$full_file_name=$config_dir.'/tag_as_originating.re';
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
ALTER TABLE `dns_rr` CHANGE `data` `data` TEXT NOT NULL DEFAULT '';
2-
ALTER TABLE `web_domain` DROP INDEX `serverdomain`, ADD UNIQUE `serverdomain` ( `server_id` , `ip_address`, `domain` );
1+
ALTER TABLE `dns_rr` CHANGE `data` `data` TEXT NOT NULL;
2+
ALTER TABLE `web_domain` DROP INDEX `serverdomain`, ADD UNIQUE `serverdomain` ( `server_id` , `ip_address`, `domain` );

install/sql/ispconfig3.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ CREATE TABLE `dns_rr` (
490490
`zone` int(11) unsigned NOT NULL DEFAULT '0',
491491
`name` varchar(255) NOT NULL DEFAULT '',
492492
`type` enum('A','AAAA','ALIAS','CNAME','DS','HINFO','LOC','MX','NAPTR','NS','PTR','RP','SRV','TXT','TLSA','DNSKEY') default NULL,
493-
`data` TEXT NOT NULL DEFAULT '',
493+
`data` TEXT NOT NULL,
494494
`aux` int(11) unsigned NOT NULL default '0',
495495
`ttl` int(11) unsigned NOT NULL default '3600',
496496
`active` enum('N','Y') NOT NULL default 'Y',

interface/lib/classes/db_mysql.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ public function query($sQuery = '') {
314314
* @return array result row or NULL if none found
315315
*/
316316
public function queryOneRecord($sQuery = '') {
317-
if(!preg_match('/limit \d+\s*,\s*\d+$/i', $sQuery)) $sQuery .= ' LIMIT 0,1';
317+
if(!preg_match('/limit \d+\s*(,\s*\d+)?$/i', $sQuery)) $sQuery .= ' LIMIT 0,1';
318318

319319
$aArgs = func_get_args();
320320
$oResult = call_user_func_array(array(&$this, 'query'), $aArgs);

interface/lib/classes/ispcmail.inc.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,6 +602,10 @@ private function _smtp_login() {
602602
if($this->smtp_crypt == 'tls') {
603603
fputs($this->_smtp_conn, 'STARTTLS' . $this->_crlf);
604604
fgets($this->_smtp_conn, 515);
605+
606+
stream_context_set_option($this->_smtp_conn, 'ssl', 'verify_host', false);
607+
stream_context_set_option($this->_smtp_conn, 'ssl', 'verify_peer', false);
608+
stream_context_set_option($this->_smtp_conn, 'ssl', 'allow_self_signed', true);
605609
stream_socket_enable_crypto($this->_smtp_conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT);
606610
}
607611

interface/web/mail/form/mail_user.tform.php

Lines changed: 41 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@
4141
$app->uses('getconf');
4242
$global_config = $app->getconf->get_global_config();
4343

44+
$backup_available = true;
45+
if(!$app->auth->is_admin()) {
46+
$client_group_id = $_SESSION['s']['user']['default_group'];
47+
$client = $app->db->queryOneRecord("SELECT limit_backup FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
48+
if($client['limit_backup'] != 'y') $backup_available = false;
49+
}
50+
4451
$form["title"] = "Mailbox";
4552
$form["description"] = "";
4653
$form["name"] = "mail_user";
@@ -408,40 +415,40 @@
408415
}
409416

410417
//* Backup
411-
if ($global_config['mail']['mailbox_show_backup_tab'] === 'y') {
412-
$form["tabs"]['backup'] = array (
413-
'title' => "Backup",
414-
'width' => 100,
415-
'template' => "templates/mail_user_backup.htm",
416-
'readonly' => false,
417-
'fields' => array (
418-
##################################
419-
# Begin Datatable fields
420-
##################################
421-
'backup_interval' => array (
422-
'datatype' => 'VARCHAR',
423-
'formtype' => 'SELECT',
424-
'default' => '',
425-
'value' => array('none' => 'no_backup_txt', 'daily' => 'daily_backup_txt', 'weekly' => 'weekly_backup_txt', 'monthly' => 'monthly_backup_txt')
426-
),
427-
'backup_copies' => array (
428-
'datatype' => 'INTEGER',
429-
'formtype' => 'SELECT',
430-
'default' => '',
431-
'value' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10')
432-
),
433-
##################################
434-
# ENDE Datatable fields
435-
##################################
436-
),
437-
'plugins' => array (
438-
'backup_records' => array (
439-
'class' => 'plugin_backuplist_mail',
440-
'options' => array(
441-
)
442-
)
443-
)
444-
);
418+
if ($backup_available) {
419+
$form["tabs"]['backup'] = array (
420+
'title' => "Backup",
421+
'width' => 100,
422+
'template' => "templates/mail_user_backup.htm",
423+
'readonly' => false,
424+
'fields' => array (
425+
##################################
426+
# Begin Datatable fields
427+
##################################
428+
'backup_interval' => array (
429+
'datatype' => 'VARCHAR',
430+
'formtype' => 'SELECT',
431+
'default' => '',
432+
'value' => array('none' => 'no_backup_txt', 'daily' => 'daily_backup_txt', 'weekly' => 'weekly_backup_txt', 'monthly' => 'monthly_backup_txt')
433+
),
434+
'backup_copies' => array (
435+
'datatype' => 'INTEGER',
436+
'formtype' => 'SELECT',
437+
'default' => '',
438+
'value' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10')
439+
),
440+
##################################
441+
# ENDE Datatable fields
442+
##################################
443+
),
444+
'plugins' => array (
445+
'backup_records' => array (
446+
'class' => 'plugin_backuplist_mail',
447+
'options' => array(
448+
)
449+
)
450+
)
451+
);
445452
}
446453

447454
?>

interface/web/sites/web_vhost_domain_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ function onShowEnd() {
339339
if($app->functions->intval($this->dataRecord["server_id"]) > 0) {
340340
// check if server is in client's servers or add it.
341341
$chk_sid = explode(',', $client['web_servers']);
342-
if(in_array($this->dataRecord["server_id"], $client['web_servers']) == false) {
342+
if(in_array($this->dataRecord["server_id"], $chk_sid) == false) {
343343
if($client['web_servers'] != '') $client['web_servers'] .= ',';
344344
$client['web_servers'] .= $app->functions->intval($this->dataRecord["server_id"]);
345345
}

0 commit comments

Comments
 (0)