fixing virtual shelves (unfinished)
authorPaul POULAIN <paul@koha-fr.org>
Wed, 28 Nov 2007 22:00:56 +0000 (16:00 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Tue, 4 Dec 2007 21:49:58 +0000 (15:49 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
virtualshelves/shelves.pl

index 30cb1c8..f661545 100755 (executable)
@@ -87,7 +87,6 @@ if ( $query->param('modifyshelfcontents') ) {
     my $barcode     = $query->param('addbarcode');
     my ($item) = GetItem( 0, $barcode );
        my ($biblio) = GetBiblioFromItemNumber($item->{'itemnumber'});
-
     if ( ShelfPossibleAction( $loggedinuser, $shelfnumber, 'manage' ) ) {
         AddToShelf( $biblio->{'biblionumber'}, $shelfnumber );
         foreach ( $query->param ) {
@@ -158,6 +157,8 @@ SWITCH: {
                     }
                 );
             }
+            print $query->redirect("/cgi-bin/koha/virtualshelves/shelves.pl?viewshelf=$shelfnumber");
+            exit;
         }
         my @paramsloop;
         foreach ( $query->param() ) {
@@ -169,10 +170,12 @@ SWITCH: {
                     $line{'status'} = $status;
                     $line{'count'}  = $count;
                 }
+                print $query->redirect("/cgi-bin/koha/virtualshelves/shelves.pl");
+                exit;
             }
 
             #if the shelf is not deleted, %line points on null
-            push( @paramsloop, \%line );
+            push( @paramsloop, \%line );
         }
         $template->param( paramsloop => \@paramsloop );
         my ($shelflist) = GetShelves( $loggedinuser, 2 );