Accept any volume is not in 2.0
authorJamie Cameron <jcameron@webmin.com>
Mon, 21 Jan 2008 08:16:03 +0000 (08:16 +0000)
committerJamie Cameron <jcameron@webmin.com>
Mon, 21 Jan 2008 08:16:03 +0000 (08:16 +0000)
bacula-backup/edit_pool.cgi
bacula-backup/save_pool.cgi

index f2804bb..4b4e0ea 100755 (executable)
@@ -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();
index 3d5b099..48f411b 100755 (executable)
@@ -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'}) {