From: Eric Bollengier Date: Fri, 26 Oct 2007 15:45:51 +0000 (+0000) Subject: ebl Fix multiple media prune/purge X-Git-Tag: Release-3.0.0~2328 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=87373dff8dd080c978bb52c31b31b1bb641ba69f;p=bacula%2Fbacula ebl Fix multiple media prune/purge git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5813 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/gui/bweb/lib/Bconsole.pm b/gui/bweb/lib/Bconsole.pm index a264ada3fd..45ec5d4183 100644 --- a/gui/bweb/lib/Bconsole.pm +++ b/gui/bweb/lib/Bconsole.pm @@ -370,9 +370,9 @@ sub _get_volume sub purge_volume { - my ($self, @volume) = @_; + my ($self, $volume) = @_; - my $sel = $self->_get_volume(@volume); + my $sel = $self->_get_volume($volume); my $ret; if ($sel) { $ret = $self->send_cmd("purge $sel"); @@ -384,9 +384,9 @@ sub purge_volume sub prune_volume { - my ($self, @volume) = @_; + my ($self, $volume) = @_; - my $sel = $self->_get_volume(@volume); + my $sel = $self->_get_volume($volume); my $ret; if ($sel) { $ret = $self->send_cmd("prune $sel yes"); diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index b52f9fd3cd..d8c275ec44 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -3414,11 +3414,13 @@ sub purge my $b = new Bconsole(pref => $self->{info}, timeout => 60); - $self->display({ - content => $b->purge_volume(@volume), - title => "Purge media", - name => "purge volume=" . join(' volume=', @volume), - }, "command.tpl"); + foreach my $v (@volume) { + $self->display({ + content => $b->purge_volume($v), + title => "Purge media", + name => "purge volume=$v", + }, "command.tpl"); + } $b->close(); } @@ -3435,12 +3437,11 @@ sub prune foreach my $v (@volume) { $self->display({ - content => $b->prune_volume(@volume), + content => $b->prune_volume($v), title => "Prune volume", name => "prune volume=$v", }, "command.tpl"); } - $b->close(); }