+sub addbiblio {
+ my $marc_bool = C4::Context->boolean_preference("MARC") || 0;
+ if ($marc_bool eq "1") {
+ print $input->redirect("/cgi-bin/koha/acqui.simple/addbooks.pl");
+ } else {
+ print $input->redirect("/cgi-bin/koha/acqui.simple/addbiblio-nomarc.pl");
+ }
+}
+
+sub catalogue_search {
+ my $marc_p = $input->param('marc');
+ $marc_p = C4::Context->boolean_preference('marc') unless defined $marc_p;
+ $marc_p = 'ON' unless defined $marc_p;
+ my $keyword=$input->param('keyword');
+ my $query = new CGI;
+ my $type = $query->param('type');
+ if ($keyword) {
+ if ($marc_p) {
+ print $input->redirect("/cgi-bin/koha/search.marc/search.pl?type=$type");
+ } else {
+ print $input ->redirect("/cgi-bin/koha/search.pl?keyword=$keyword");
+ }
+ } else {
+ if ($marc_p) {
+ print $input->redirect("/cgi-bin/koha/search.marc/search.pl?type=$type");
+ } else {
+ print $input ->redirect("/cgi-bin/koha/catalogue-home.pl");
+ }
+ }
+}