From b99d02d72a034b66ccbf0953b9318d46aa9653cc Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 20 Aug 2007 16:43:31 +0000 Subject: [PATCH] ebl use update recyclepool= instead of SQL query git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5385 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/bweb/INSTALL | 2 -- gui/bweb/ReleaseNotes | 1 + gui/bweb/lib/Bweb.pm | 7 ++++--- gui/debian/changelog | 6 +++++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gui/bweb/INSTALL b/gui/bweb/INSTALL index 7f1b53bd5f..620ee32c4b 100644 --- a/gui/bweb/INSTALL +++ b/gui/bweb/INSTALL @@ -304,8 +304,6 @@ GRANT INSERT,UPDATE,DELETE ON bacula.Location TO 'bweb'@'%' IDENTIFIED BY 'password'; GRANT INSERT,UPDATE,DELETE ON bacula.LocationLog TO 'bweb'@'%' IDENTIFIED BY 'password'; -GRANT UPDATE (LocationId,Comment,RecyclePoolId) ON bacula.Media - TO 'bweb'@'%' IDENTIFIED BY 'password'; ################ GET MORE STATISTICS ########################### diff --git a/gui/bweb/ReleaseNotes b/gui/bweb/ReleaseNotes index 92d1dc8fe4..a4c3f51ee1 100644 --- a/gui/bweb/ReleaseNotes +++ b/gui/bweb/ReleaseNotes @@ -2,6 +2,7 @@ 2007/08/20 - fix update of locationid field during label barcodes + - use update recyclepool= instead of UPDATE Media SET RecyclePoolId 2007/08/11 - update install_bweb diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index 5f3c07ba13..e73ae94751 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -3217,6 +3217,10 @@ sub do_update_media $update .= " maxvolbytes=$arg->{maxvolbytes} " ; } + if (defined $arg->{poolrecycle}) { + $update .= " recyclepool=\"$arg->{poolrecycle}\" " ; + } + my $b = $self->get_bconsole(); $self->display({ @@ -3234,9 +3238,6 @@ sub do_update_media $loc = $self->dbh_quote($loc); # is checked by db push @q, "LocationId=(SELECT LocationId FROM Location WHERE Location=$loc)"; } - if ($arg->{poolrecycle}) { - push @q, "RecyclePoolId=(SELECT PoolId FROM Pool WHERE Name='$arg->{poolrecycle}')"; - } if (!$arg->{qcomment}) { $arg->{qcomment} = "''"; } diff --git a/gui/debian/changelog b/gui/debian/changelog index 31ba579de6..b9f2dffcdb 100644 --- a/gui/debian/changelog +++ b/gui/debian/changelog @@ -1,5 +1,9 @@ bweb (2.2.0-2) stable; urgency=low - + + * WARNING: 2.2.0-2 version don't support bacula 2.0.X anymore + * cleanup brestore + * update brestore_xxx only when job is in (T, f, A) + * use update recyclepool= instead of SQL query * fix Media.LocationId update during label barcodes -- Eric Bollengier Mon, 20 Aug 2007 15:15:47 +0000 -- 2.39.5