From 16f422a8f7305ad6d9e91dc8b3681e72465e0b92 Mon Sep 17 00:00:00 2001 From: wolfpac444 Date: Sat, 29 Mar 2003 00:02:24 +0000 Subject: [PATCH] Bug fixes --- C4/Date.pm | 41 +++------------------- .../default/en/search.marc/search.tmpl | 6 ---- search.marc/search.pl | 5 ++- search.pl | 1 - 4 files changed, 6 insertions(+), 47 deletions(-) diff --git a/C4/Date.pm b/C4/Date.pm index 59a4fcc98c..5e3a6cfdd6 100644 --- a/C4/Date.pm +++ b/C4/Date.pm @@ -1,3 +1,5 @@ +#!/usr/bin/perl -w + package C4::Date; use strict; @@ -15,9 +17,10 @@ $VERSION = 0.01; @EXPORT = qw( &display_date_format &format_date - &format_date_in_iso ); + + sub get_date_format { #Get the database handle @@ -65,19 +68,16 @@ sub format_date if ( $dateformat eq "us" ) { - Date_Init("DateFormat=US"); $olddate = ParseDate($olddate); $newdate = UnixDate($olddate,'%m/%d/%Y'); } elsif ( $dateformat eq "metric" ) { - Date_Init("DateFormat=metric"); $olddate = ParseDate($olddate); $newdate = UnixDate($olddate,'%d/%m/%Y'); } elsif ( $dateformat eq "iso" ) { - Date_Init("DateFormat=iso"); $olddate = ParseDate($olddate); $newdate = UnixDate($olddate,'%Y-%m-%d'); } @@ -87,37 +87,4 @@ sub format_date } } -sub format_date_in_iso -{ - my $olddate = shift; - my $newdate; - - my $dateformat = get_date_format(); - - if ( $dateformat eq "us" ) - { - Date_Init("DateFormat=US"); - $olddate = ParseDate($olddate); - } - elsif ( $dateformat eq "metric" ) - { - Date_Init("DateFormat=metric"); - $olddate = ParseDate($olddate); - } - elsif ( $dateformat eq "iso" ) - { - Date_Init("DateFormat=iso"); - $olddate = ParseDate($olddate); - } - else - { - return "9999-99-99"; - } - - $newdate = UnixDate($olddate, '%Y-%m-%d'); - - return $newdate; -} - 1; -__END__ diff --git a/koha-tmpl/intranet-tmpl/default/en/search.marc/search.tmpl b/koha-tmpl/intranet-tmpl/default/en/search.marc/search.tmpl index c906c9887a..a005d801af 100644 --- a/koha-tmpl/intranet-tmpl/default/en/search.marc/search.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/search.marc/search.tmpl @@ -4,12 +4,6 @@ - -

Logged in as: [Log Out]

- -

Log In to Koha

-
-
diff --git a/search.marc/search.pl b/search.marc/search.pl index 3724e8257c..a096eacdd4 100755 --- a/search.marc/search.pl +++ b/search.marc/search.pl @@ -68,8 +68,7 @@ if ($op eq "do_search") { flagsrequired => {catalogue => 1}, debug => 1, }); - $template->param(loggedinuser => $loggedinuser, - result => \@results); + #$template->param(result => \@results); } else { ($template, $loggedinuser, $cookie) @@ -80,7 +79,7 @@ if ($op eq "do_search") { flagsrequired => {catalogue => 1}, debug => 1, }); - $template->param(loggedinuser => $loggedinuser); + #$template->param(loggedinuser => $loggedinuser); my $tagslib; if ($type eq "opac") { $tagslib = &MARCgettagslib($dbh,1); diff --git a/search.pl b/search.pl index f430dbaa68..52bd22e4fe 100755 --- a/search.pl +++ b/search.pl @@ -169,7 +169,6 @@ $template->param(search => $search); $template->param(searchdesc => $searchdesc); $template->param(SEARCH_RESULTS => $resultsarray); #$template->param(includesdir => $includes); -$template->param(loggedinuser => $loggedinuser); my @numbers = (); if ($count>10) { -- 2.11.0