koha-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Koha-devel] CVS: koha search.pl,1.3,1.4


From: Steve Tonnesen
Subject: [Koha-devel] CVS: koha search.pl,1.3,1.4
Date: Fri Oct 5 13:14:02 2001

Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv15276/koha

Modified Files:
        search.pl 
Log Message:
Changed search interface to allow searches on Illustrator.  This is
apparently a common search in elementary school libraries.


Index: search.pl
===================================================================
RCS file: /cvsroot/koha/koha/search.pl,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** search.pl   2001/03/06 21:16:10     1.3
--- search.pl   2001/10/05 20:13:20     1.4
***************
*** 3,9 ****
  #modified 9/11/1999 by address@hidden
  #adding an extra comment to play with CVS (Si, 19/11/99)
! #modified 29/12/99 by address@hidden to be usable by opac as well
  #modified by chris 10/11/00 to fix dewey search
- #modified by address@hidden 3/2/01 to fix glitch with " in titles
  
  use strict;
--- 3,8 ----
  #modified 9/11/1999 by address@hidden
  #adding an extra comment to play with CVS (Si, 19/11/99)
! #modified 29/12/99 by address@hidden to be usavle by opac as well
  #modified by chris 10/11/00 to fix dewey search
  
  use strict;
***************
*** 42,48 ****
  $search{'keyword'}=$keyword;
  $search{'front'}=validate($input->param('front'));
- 
  my $author=validate($input->param('author'));
  $search{'author'}=$author;
  my $subject=validate($input->param('subject'));
  $search{'subject'}=$subject;
--- 41,48 ----
  $search{'keyword'}=$keyword;
  $search{'front'}=validate($input->param('front'));
  my $author=validate($input->param('author'));
  $search{'author'}=$author;
+ my $illustrator=validate($input->param('illustrator'));
+ $search{'illustrator'}=$illustrator;
  my $subject=validate($input->param('subject'));
  $search{'subject'}=$subject;
***************
*** 88,95 ****
        ($count,@results)=&KeywordSearch(\$blah,'intra',\%search,$num,$offset);
      } elsif ($search{'front'} ne '') {
!      $search{'keyword'}=$search{'front'};
!     ($count,@results)&KeywordSearch(\$blah,'intra',\%search,$num,$offset);
  #    print "hey";
!     }elsif ($title ne '' || $author ne '' || $dewey ne '' || $class ne '') {
        ($count,@results)=&CatSearch(\$blah,'loose',\%search,$num,$offset);
  #            print "hey";
--- 88,94 ----
        ($count,@results)=&KeywordSearch(\$blah,'intra',\%search,$num,$offset);
      } elsif ($search{'front'} ne '') {
!     ($count,@results)&FrontSearch(\$blah,'intra',\%search,$num,$offset);
  #    print "hey";
!     }elsif ($title ne '' || $author ne '' || $illustrator ne '' || $dewey ne 
'' || $class ne '') {
        ($count,@results)=&CatSearch(\$blah,'loose',\%search,$num,$offset);
  #            print "hey";
***************
*** 112,115 ****
--- 111,116 ----
    if ($subject ne ''){
     print mktablerow(1,$main,'<b>SUBJECT</b>','/images/background-mem.gif');
+   } elsif ($illustrator ne '') {
+    print mktablerow(7,$main,'<b>TITLE</b>','<b>AUTHOR</b>', 
'<b>ILLUSTRATOR<b>', 
bold('&copy;'),'<b>COUNT</b>',bold('LOCATION'),'','/images/background-mem.gif');
    } else {
     print 
mktablerow(6,$main,'<b>TITLE</b>','<b>AUTHOR</b>',bold('&copy;'),'<b>COUNT</b>',bold('LOCATION'),'','/images/background-mem.gif');
***************
*** 118,121 ****
--- 119,124 ----
    if ($subject ne ''){
     print mktablerow(6,$main,'<b>SUBJECT</b>',' &nbsp; ',' &nbsp; ');
+   } elsif ($illustrator ne '') {
+    print 
mktablerow(7,$main,'<b>TITLE</b>','<b>AUTHOR</b>','<b>ILLUSTRATOR</b>', 
bold('&copy;'),'<b>COUNT</b>',bold('BRANCH'),'');
    } else {
     print 
mktablerow(6,$main,'<b>TITLE</b>','<b>AUTHOR</b>',bold('&copy;'),'<b>COUNT</b>',bold('BRANCH'),'');
***************
*** 138,142 ****
      my $title2=$stuff[1];
      $title2=~ s/ /%20/g;
-     $title2=~ s/\W//g;
      if ($subject eq ''){
  #      print $stuff[0];
--- 141,144 ----
***************
*** 150,153 ****
--- 152,157 ----
        $word=~ s/\n//g;
        my $url="/cgi-bin/koha/search.pl?author=$word&type=$type";
+       $stuff[7]=$stuff[5];
+       $stuff[5]='';
        $stuff[0]=mklink($url,$stuff[0]);
        my 
($count,$lcount,$nacount,$fcount,$scount,$lostcount,$mending,$transit,$ocount)=itemcount($env,$stuff[2],$type);
***************
*** 222,229 ****
  
      if ($colour == 1){
!       print 
mktablerow(6,$secondary,$stuff[1],$stuff[0],$stuff[3],$stuff[4],$stuff[5],$stuff[6]);
        $colour=0;
!     } else{
!       print 
mktablerow(6,'white',$stuff[1],$stuff[0],$stuff[3],$stuff[4],$stuff[5],$stuff[6]);
        $colour=1;
      }
--- 226,241 ----
  
      if ($colour == 1){
!       if ($illustrator) {
!         print 
mktablerow(7,$secondary,$stuff[1],$stuff[0],$stuff[7],$stuff[3],$stuff[4],$stuff[5],$stuff[6]);
!       } else {
!         print 
mktablerow(6,$secondary,$stuff[1],$stuff[0],$stuff[3],$stuff[4],$stuff[5],$stuff[6]);
!       }
        $colour=0;
!     } else {
!       if ($illustrator) {
!         print 
mktablerow(7,'white',$stuff[1],$stuff[0],$stuff[7],$stuff[3],$stuff[4],$stuff[5],$stuff[6]);
!       } else {
!         print 
mktablerow(6,'white',$stuff[1],$stuff[0],$stuff[3],$stuff[4],$stuff[5],$stuff[6]);
!       }
        $colour=1;
      }
***************
*** 232,238 ****
  $offset=$num+$offset;
  if ($type ne 'opac'){
!  print mktablerow(6,$main,' &nbsp; ',' &nbsp; ',' &nbsp;',' 
&nbsp;','','','/images/background-mem.gif');
  } else {
!  print mktablerow(6,$main,' &nbsp; ',' &nbsp; ',' &nbsp;',' &nbsp; ','','');
  }
  print mktableft();
--- 244,258 ----
  $offset=$num+$offset;
  if ($type ne 'opac'){
!     if ($illustrator) {
!        print mktablerow(7,$main,' &nbsp; ',' &nbsp; ',' &nbsp;',' 
&nbsp;','','','','/images/background-mem.gif');
!     } else {
!        print mktablerow(6,$main,' &nbsp; ',' &nbsp; ',' &nbsp;',' 
&nbsp;','','','/images/background-mem.gif');
!     }
  } else {
!  if ($illustrator) {
!      print mktablerow(7,$main,' &nbsp; ',' &nbsp; ',' &nbsp;',' &nbsp; ','', 
'','');
!  } else {
!      print mktablerow(6,$main,' &nbsp; ',' &nbsp; ',' &nbsp;',' &nbsp; 
','','');
!  }
  }
  print mktableft();




reply via email to

[Prev in Thread] Current Thread [Next in Thread]