SWITCH: {
if ($module eq 'acquisitions') { acquisitions(); last SWITCH; }
+ if ($module eq 'search') { catalogue_search(); last SWITCH; }
if ($module eq 'somethingelse') { somethingelse(); last SWITCH; }
}
}
}
+sub catalogue_search {
+ my $aq_type = C4::Context->preference("marc") || "ON";
+ my $query = new CGI;
+ my $type = $query->param('type');
+ if ($aq_type eq 'ON') {
+ print $input->redirect("/cgi-bin/koha/search.marc/search.pl?type=$type");
+ } else {
+ print $input ->redirect("/cgi-bin/koha/catalogue-home.pl");
+ }
+}
sub somethingelse {
# just an example subroutine