Skip to content

Commit 7a4248f

Browse files
committed
backup deaktiviert auf client-seite
Conflicts: interface/web/sites/form/web_vhost_domain.tform.php
1 parent f40d196 commit 7a4248f

File tree

1 file changed

+53
-2
lines changed

1 file changed

+53
-2
lines changed

interface/web/sites/form/web_vhost_domain.tform.php

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,14 @@
8282
$wildcard_available = true;
8383
if($vhostdomain_type != 'domain') $wildcard_available = false;
8484
$ssl_available = true;
85+
$backup_available = true;
8586
if(!$app->auth->is_admin()) {
8687
$client_group_id = $_SESSION["s"]["user"]["default_group"];
8788
$client = $app->db->queryOneRecord("SELECT limit_wildcard, limit_ssl FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
8889

8990
if($client['limit_wildcard'] != 'y') $wildcard_available = false;
9091
if($client['limit_ssl'] != 'y') $ssl_available = false;
92+
if($client['limit_backup'] != 'y') $backup_available = false;
9193
}
9294

9395
$app->uses('getconf');
@@ -561,8 +563,57 @@
561563
)
562564
);
563565

564-
if($_SESSION["s"]["user"]["typ"] == 'admin'
565-
|| ($web_config['reseller_can_use_options'] == 'y' && $app->auth->has_clients($_SESSION['s']['user']['userid']))) {
566+
567+
//* Backup
568+
if ($backup_available) {
569+
$form["tabs"]['backup'] = array (
570+
'title' => "Backup",
571+
'width' => 100,
572+
'template' => "templates/web_domain_backup.htm",
573+
'readonly' => false,
574+
'fields' => array (
575+
//#################################
576+
// Begin Datatable fields
577+
//#################################
578+
'backup_interval' => array (
579+
'datatype' => 'VARCHAR',
580+
'formtype' => 'SELECT',
581+
'default' => '',
582+
'value' => array('none' => 'no_backup_txt', 'daily' => 'daily_backup_txt', 'weekly' => 'weekly_backup_txt', 'monthly' => 'monthly_backup_txt')
583+
),
584+
'backup_copies' => array (
585+
'datatype' => 'INTEGER',
586+
'formtype' => 'SELECT',
587+
'default' => '',
588+
'value' => array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10')
589+
),
590+
'backup_excludes' => array (
591+
'datatype' => 'VARCHAR',
592+
'validators' => array ( 0 => array ( 'type' => 'REGEX',
593+
'regex' => '@^(?!.*\.\.)[-a-zA-Z0-9_/.~,*]*$@',
594+
'errmsg'=> 'backup_excludes_error_regex'),
595+
),
596+
'formtype' => 'TEXT',
597+
'default' => '',
598+
'value' => '',
599+
'width' => '30',
600+
'maxlength' => '255'
601+
),
602+
//#################################
603+
// ENDE Datatable fields
604+
//#################################
605+
),
606+
'plugins' => array (
607+
'backup_records' => array (
608+
'class' => 'plugin_backuplist',
609+
'options' => array(
610+
)
611+
)
612+
)
613+
);
614+
}
615+
616+
if($_SESSION["s"]["user"]["typ"] == 'admin') {
566617

567618
$form["tabs"]['advanced'] = array (
568619
'title' => "Options",

0 commit comments

Comments
 (0)