- # FIXME
- # instead of getting a hash, then reading/writing to it at least twice
- # and up to four times, maybe this should be a different function -
- # areAquisitionsSimple() which returns a boolean
- my %systemprefs=systemprefs();
- ($systemprefs{'acquisitions'}) || ($systemprefs{'acquisitions'}='normal');
- if ($systemprefs{'acquisitions'} eq 'simple') {
- print $input->redirect("/cgi-bin/koha/acqui.simple/addbooks.pl");
- } elsif ($systemprefs{'acquisitions'} eq 'normal') {
- print $input ->redirect("/acquisitions");
- } else {
- print $input ->redirect("/acquisitions");
- }
+ my $aq_type = C4::Context->preference("acquisitions") || "normal";
+ # Get the acquisition preference. This should be:
+ # "simple" - minimal information required
+ # "normal" - full information required
+ # other - Same as "normal"
+
+ if ($aq_type eq 'simple') {
+ print $input->redirect("/cgi-bin/koha/acqui.simple/addbooks.pl");
+ } elsif ($aq_type eq 'normal') {
+ print $input ->redirect("/acquisitions");
+ } else {
+ print $input ->redirect("/acquisitions");
+ }