Bug fixes
authorwolfpac444 <wolfpac444>
Sat, 29 Mar 2003 00:02:24 +0000 (00:02 +0000)
committerwolfpac444 <wolfpac444>
Sat, 29 Mar 2003 00:02:24 +0000 (00:02 +0000)
C4/Date.pm
koha-tmpl/intranet-tmpl/default/en/search.marc/search.tmpl
search.marc/search.pl
search.pl

index 59a4fcc..5e3a6cf 100644 (file)
@@ -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__
index c906c98..a005d80 100644 (file)
@@ -4,12 +4,6 @@
     <TMPL_INCLUDE NAME="cat-top.inc">
 </TMPL_IF>
 
-<TMPL_IF NAME="loggedinuser">
-    <p align=left>Logged in as: <TMPL_VAR NAME="loggedinuser"> [<a href=/cgi-bin/koha/logout.pl>Log Out</a>]</p>
-<TMPL_ELSE>
-    <p align=left><a href=/cgi-bin/koha/userpage.pl>Log In</a> to Koha</p>
-</TMPL_IF>
-
 <center>
 
 <form name="f" method="post">
index 3724e82..a096eac 100755 (executable)
@@ -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);
index f430dba..52bd22e 100755 (executable)
--- 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) {