Skip to content
Snippets Groups Projects
Commit 56e1610b authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch 'stable-3.1' into 'stable-3.1'

Stable 3.1



See merge request !484
parents 83d3c44c f18e5292
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,13 @@ global $app; ...@@ -41,6 +41,13 @@ global $app;
$app->uses('getconf'); $app->uses('getconf');
$global_config = $app->getconf->get_global_config(); $global_config = $app->getconf->get_global_config();
$backup_available = true;
if(!$app->auth->is_admin()) {
$client_group_id = $_SESSION['s']['user']['default_group'];
$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);
if($client['limit_backup'] != 'y') $backup_available = false;
}
$form["title"] = "Mailbox"; $form["title"] = "Mailbox";
$form["description"] = ""; $form["description"] = "";
$form["name"] = "mail_user"; $form["name"] = "mail_user";
...@@ -408,38 +415,40 @@ if ($_SESSION["s"]["user"]["typ"] == 'admin' && $global_config['mail']['mailbox_ ...@@ -408,38 +415,40 @@ if ($_SESSION["s"]["user"]["typ"] == 'admin' && $global_config['mail']['mailbox_
} }
//* Backup //* Backup
$form["tabs"]['backup'] = array ( if ($backup_available) {
'title' => "Backup", $form["tabs"]['backup'] = array (
'width' => 100, 'title' => "Backup",
'template' => "templates/mail_user_backup.htm", 'width' => 100,
'readonly' => false, 'template' => "templates/mail_user_backup.htm",
'fields' => array ( 'readonly' => false,
################################## 'fields' => array (
# Begin Datatable fields ##################################
################################## # Begin Datatable fields
'backup_interval' => array ( ##################################
'datatype' => 'VARCHAR', 'backup_interval' => array (
'formtype' => 'SELECT', 'datatype' => 'VARCHAR',
'default' => '', 'formtype' => 'SELECT',
'value' => array('none' => 'no_backup_txt', 'daily' => 'daily_backup_txt', 'weekly' => 'weekly_backup_txt', 'monthly' => 'monthly_backup_txt') 'default' => '',
), 'value' => array('none' => 'no_backup_txt', 'daily' => 'daily_backup_txt', 'weekly' => 'weekly_backup_txt', 'monthly' => 'monthly_backup_txt')
'backup_copies' => array ( ),
'datatype' => 'INTEGER', 'backup_copies' => array (
'formtype' => 'SELECT', 'datatype' => 'INTEGER',
'default' => '', 'formtype' => 'SELECT',
'value' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10') 'default' => '',
'value' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10')
),
##################################
# ENDE Datatable fields
##################################
), ),
################################## 'plugins' => array (
# ENDE Datatable fields 'backup_records' => array (
################################## 'class' => 'plugin_backuplist_mail',
), 'options' => array(
'plugins' => array ( )
'backup_records' => array (
'class' => 'plugin_backuplist_mail',
'options' => array(
) )
) )
) );
); }
?> ?>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment