From 32ad831139bfd3a3c0cc90433248f5401eeb3677 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Mon, 20 Aug 2007 13:23:07 +0000 Subject: [PATCH] ebl fix update of Media.LocationId field during label barcodes git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@5380 91ce42f0-d328-0410-95d8-f526ca767f89 --- gui/bweb/lib/Bweb.pm | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/gui/bweb/lib/Bweb.pm b/gui/bweb/lib/Bweb.pm index 5d5dc701e2..5f3c07ba13 100644 --- a/gui/bweb/lib/Bweb.pm +++ b/gui/bweb/lib/Bweb.pm @@ -3360,20 +3360,6 @@ sub label_barcodes $t += 60*scalar( @{ $arg->{slots} }) ; } - $self->dbh_do(" - UPDATE Media - SET LocationId = (SELECT LocationId - FROM Location - WHERE Location = '$arg->{ach}'), - - RecyclePoolId = (SELECT PoolId - FROM Pool - WHERE Name = 'Scratch') - - WHERE (LocationId = 0 OR LocationId IS NULL) - $slots_sql -"); - my $b = new Bconsole(pref => $self->{info}, timeout => $t,log_stdout => 1); print "

This command can take long time, be patient...

"; print "
" ;
@@ -3383,6 +3369,17 @@ sub label_barcodes
 		       slots => $slots) ;
     $b->close();
     print "
"; + + $self->dbh_do(" + UPDATE Media + SET LocationId = (SELECT LocationId + FROM Location + WHERE Location = '$arg->{ach}') + + WHERE (LocationId = 0 OR LocationId IS NULL) + $slots_sql +"); + } sub purge -- 2.39.5