use C4::Biblio;
use CGI;
use C4::VirtualShelves;
-# use C4::Circulation; # not really used
use C4::Auth;
use C4::Output;
$shelfnumber = AddShelf( $newvirtualshelf, $loggedinuser, $category ) if $newvirtualshelf;
+# verify user is authorized to perform the action on the shelf...
+my $authorized = 1 if ( (ShelfPossibleAction( $loggedinuser, $selectedshelf )) );
+
# multiple bibs might come in as '/' delimited string (from where, i don't see), or as array.
my $multiple = 0;
if ($shelfnumber && ($shelfnumber != -1)) {
for my $bib (@biblionumber){
&AddToShelfFromBiblio($bib,$shelfnumber);
- }
+ }
print $query->header;
print "<html><body onload=\"window.close();\"><div>Please close this window to continue.</div></body></html>";
exit;
multiple => (scalar(@biblios) > 1),
total => scalar @biblios,
biblios => \@biblios,
+ authorized => $authorized,
);
output_html_with_http_headers $query, $cookie, $template->output;