Skip to content

Commit 56e1610

Browse files
author
Till Brehm
committed
Merge branch 'stable-3.1' into 'stable-3.1'
Stable 3.1 See merge request !484
2 parents 83d3c44 + f18e529 commit 56e1610

File tree

1 file changed

+39
-30
lines changed

1 file changed

+39
-30
lines changed

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

Lines changed: 39 additions & 30 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,38 +415,40 @@
408415
}
409416

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

445454
?>

0 commit comments

Comments
 (0)