]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl Update Location from new labeled media
authorEric Bollengier <eric@eb.homelinux.org>
Sat, 20 Jan 2007 10:08:34 +0000 (10:08 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Sat, 20 Jan 2007 10:08:34 +0000 (10:08 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4026 91ce42f0-d328-0410-95d8-f526ca767f89

gui/bweb/lib/Bweb.pm

index 53077ca908599cc14000023e26ac73ffaf014e39..fadbbe1b909a2dc8b0c354f6cb47b29809517e28 100644 (file)
@@ -3030,6 +3030,19 @@ sub label_barcodes
                       slots => $slots) ;
     $b->close();
     print "</pre>";
+
+    $self->dbh_do("
+  UPDATE Media 
+       SET LocationId =   (SELECT LocationId 
+                             FROM Location 
+                            WHERE Location = '$arg->{ach}'),
+
+     WHERE Media.PoolId = (SELECT PoolId 
+                             FROM Pool
+                            WHERE Name = 'Scratch')
+       AND LocationId = 0
+");
+
 }
 
 sub purge