Bug 15839: Koha::Reviews - Remove approvereview & unapprovereview
[srvgit] / opac / opac-addbybiblionumber.pl
index b8ad330..a5decf7 100755 (executable)
@@ -38,8 +38,13 @@ our $newvirtualshelf = $query->param('newvirtualshelf');
 our $category          = $query->param('category');
 our $authorized          = 1;
 our $errcode           = 0;
-our @biblios;
+our @biblios = ();
 
+# if virtualshelves is disabled, leave immediately
+if ( ! C4::Context->preference('virtualshelves') ) {
+    print $query->redirect("/cgi-bin/koha/errors/404.pl");
+    exit;
+}
 
 if (scalar(@biblionumber) == 1) {
     @biblionumber = (split /\//,$biblionumber[0]);