X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FOutput.pm;h=e1be3e7faf4072440bd0ebccdf6d1524c9d60ba1;hb=d03c8443a4c5a4549a3ee37df201f031b40b2f41;hp=21002c04d32136c023980f583d07776ccfcf7092;hpb=226af0485d72031a0f63d06269f6b8e78fab15db;p=koha_fer diff --git a/C4/Output.pm b/C4/Output.pm index 21002c04d3..e1be3e7faf 100644 --- a/C4/Output.pm +++ b/C4/Output.pm @@ -42,13 +42,13 @@ BEGIN { @ISA = qw(Exporter); @EXPORT_OK = qw(&is_ajax ajax_fail); # More stuff should go here instead - %EXPORT_TAGS = ( all =>[qw(&themelanguage &gettemplate setlanguagecookie pagination_bar + %EXPORT_TAGS = ( all =>[qw(setlanguagecookie pagination_bar &output_with_http_headers &output_ajax_with_http_headers &output_html_with_http_headers)], ajax =>[qw(&output_with_http_headers &output_ajax_with_http_headers is_ajax)], html =>[qw(&output_with_http_headers &output_html_with_http_headers)] ); push @EXPORT, qw( - &themelanguage &gettemplate setlanguagecookie getlanguagecookie pagination_bar + setlanguagecookie getlanguagecookie pagination_bar ); push @EXPORT, qw( &output_html_with_http_headers &output_ajax_with_http_headers &output_with_http_headers FormatData FormatNumber @@ -125,7 +125,7 @@ This function returns HTML, without any language dependency. =cut sub pagination_bar { - my $base_url = (@_ ? shift : $ENV{SCRIPT_NAME} . $ENV{QUERY_STRING}) or return undef; + my $base_url = (@_ ? shift : $ENV{SCRIPT_NAME} . $ENV{QUERY_STRING}) or return; my $nb_pages = (@_) ? shift : 1; my $current_page = (@_) ? shift : undef; # delay default until later my $startfrom_name = (@_) ? shift : 'page'; @@ -267,7 +267,7 @@ $status is an HTTP status message, like '403 Authentication Required'. It defaul =cut -sub output_with_http_headers($$$$;$) { +sub output_with_http_headers { my ( $query, $cookie, $data, $content_type, $status ) = @_; $status ||= '200 OK'; @@ -305,7 +305,7 @@ sub output_with_http_headers($$$$;$) { print $query->header($options), $data; } -sub output_html_with_http_headers ($$$;$) { +sub output_html_with_http_headers { my ( $query, $cookie, $data, $status ) = @_; output_with_http_headers( $query, $cookie, $data, 'html', $status ); }