]> git.sur5r.net Git - bacula/bacula/commitdiff
ebl update RecyclePoolId to Scratch when label_barcodes
authorEric Bollengier <eric@eb.homelinux.org>
Mon, 22 Jan 2007 09:48:24 +0000 (09:48 +0000)
committerEric Bollengier <eric@eb.homelinux.org>
Mon, 22 Jan 2007 09:48:24 +0000 (09:48 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4030 91ce42f0-d328-0410-95d8-f526ca767f89

gui/bweb/lib/Bweb.pm

index 26716e26a1897a7d851b66ea1bdf32dea2cd26fe..d04a8b9e23e845db155fee31f53eeca1b12914f6 100644 (file)
@@ -3035,12 +3035,14 @@ sub label_barcodes
   UPDATE Media 
        SET LocationId =   (SELECT LocationId 
                              FROM Location 
-                            WHERE Location = '$arg->{ach}')
+                            WHERE Location = '$arg->{ach}'),
+
+           RecyclePoolId = PoolId
 
      WHERE Media.PoolId = (SELECT PoolId 
                              FROM Pool
                             WHERE Name = 'Scratch')
-       AND LocationId = 0
+       AND (LocationId = 0 OR LocationId IS NULL)
 ");
 
 }