Added check for suggestions turned off. If off user is redirected to 404 error. If patron suggestions are off guest sugestions will also redirect to 404
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
exit;
}
+#If suggestions are turned off we redirect to 404 error. This will also redirect guest suggestions
+if ( ! C4::Context->preference('suggestion') ) {
+ print $input->redirect("/cgi-bin/koha/errors/404.pl");
+ exit;
+}
+
delete $$suggestion{$_} foreach qw<op suggestedbyme>;
$op = 'else' unless $op;