From d7b7394ec0addbd2d79552558454439c74c2ac1c Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Mon, 21 Jan 2008 08:16:03 +0000 Subject: [PATCH] Accept any volume is not in 2.0 --- bacula-backup/edit_pool.cgi | 13 +++++++++---- bacula-backup/save_pool.cgi | 5 ++++- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/bacula-backup/edit_pool.cgi b/bacula-backup/edit_pool.cgi index f2804bb89..4b4e0ea27 100755 --- a/bacula-backup/edit_pool.cgi +++ b/bacula-backup/edit_pool.cgi @@ -14,11 +14,14 @@ if ($in{'new'}) { 'value' => 'yes' }, { 'name' => 'AutoPrune', 'value' => 'yes' }, - { 'name' => 'Accept Any Volume', - 'value' => 'yes' }, { 'name' => 'Volume Retention', 'value' => '365 days' }, ]; + if (&get_bacula_version_cached() < 2) { + push(@$mems, + { 'name' => 'Accept Any Volume', + 'value' => 'yes' }); + } $pool = { 'members' => $mems }; } else { @@ -61,8 +64,10 @@ print &ui_table_row($text{'pool_recycle'}, &bacula_yesno("recycle", "Recycle", $mems)); print &ui_table_row($text{'pool_auto'}, &bacula_yesno("auto", "AutoPrune", $mems)); -print &ui_table_row($text{'pool_any'}, - &bacula_yesno("any", "Accept Any Volume", $mems)); +if (&get_bacula_version_cached() < 2) { + print &ui_table_row($text{'pool_any'}, + &bacula_yesno("any", "Accept Any Volume", $mems)); + } # All done print &ui_table_end(); diff --git a/bacula-backup/save_pool.cgi b/bacula-backup/save_pool.cgi index 3d5b09902..48f411bde 100755 --- a/bacula-backup/save_pool.cgi +++ b/bacula-backup/save_pool.cgi @@ -60,7 +60,10 @@ else { # Save yes/no options &save_directive($conf, $pool, "Recycle", $in{'recycle'} || undef, 1); &save_directive($conf, $pool, "AutoPrune", $in{'auto'} || undef, 1); - &save_directive($conf, $pool, "Accept Any Volume", $in{'any'} || undef, 1); + if (&get_bacula_version_cached() < 2) { + &save_directive($conf, $pool, "Accept Any Volume", + $in{'any'} || undef, 1); + } # Create or update if ($in{'new'}) {