Bug 18736: (follow-up) Fix missing rounding and bad formatting
[koha.git] / C4 / Context.pm
index 7ce91b6..9b3f74d 100644 (file)
@@ -90,21 +90,21 @@ BEGIN {
     }          # else there is no browser to send fatals to!
 }
 
-use Encode;
-use ZOOM;
-use Koha::Caches;
-use POSIX ();
-use DateTime::TimeZone;
-use Module::Load::Conditional qw(can_load);
 use Carp;
 use DateTime::TimeZone;
+use Encode;
+use File::Spec;
+use Module::Load::Conditional qw(can_load);
+use POSIX ();
+use ZOOM;
 
 use C4::Boolean;
 use C4::Debug;
-use Koha;
-use Koha::Config;
+use Koha::Caches;
 use Koha::Config::SysPref;
 use Koha::Config::SysPrefs;
+use Koha::Config;
+use Koha;
 
 =head1 NAME
 
@@ -608,27 +608,12 @@ sub _new_Zconn {
     my $tried=0; # first attempt
     my $Zconn; # connection object
     my $elementSetName;
-    my $index_mode;
     my $syntax;
 
     $server //= "biblioserver";
 
-    if ( $server eq 'biblioserver' ) {
-        $index_mode = $context->{'config'}->{'zebra_bib_index_mode'} // 'dom';
-    } elsif ( $server eq 'authorityserver' ) {
-        $index_mode = $context->{'config'}->{'zebra_auth_index_mode'} // 'dom';
-    }
-
-    if ( $index_mode eq 'grs1' ) {
-        $elementSetName = 'F';
-        $syntax = ( $context->preference("marcflavour") eq 'UNIMARC' )
-                ? 'unimarc'
-                : 'usmarc';
-
-    } else { # $index_mode eq 'dom'
-        $syntax = 'xml';
-        $elementSetName = 'marcxml';
-    }
+    $syntax = 'xml';
+    $elementSetName = 'marcxml';
 
     my $host = $context->{'listen'}->{$server}->{'content'};
     my $user = $context->{"serverinfo"}->{$server}->{"user"};
@@ -1076,6 +1061,18 @@ sub only_my_library {
       && C4::Context->userenv->{branch};
 }
 
+=head3 temporary_directory
+
+Returns root directory for temporary storage
+
+=cut
+
+sub temporary_directory {
+    my ( $class ) = @_;
+    return C4::Context->config('tmp_path') || File::Spec->tmpdir;
+}
+
+
 1;
 
 __END__