[Koha-cvs] CVS: koha/search.marc search.pl,1.24,1.25

Chris Cormack rangi at users.sourceforge.net
Fri Jul 29 02:56:24 CEST 2005


Update of /cvsroot/koha/koha/search.marc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13898

Modified Files:
	search.pl 
Log Message:
If MARC is switched off, it will now jump to detail.pl instead of
MARCdetail.pl when only one result is found
This provides for a more consistent experience


Index: search.pl
===================================================================
RCS file: /cvsroot/koha/koha/search.marc/search.pl,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -r1.24 -r1.25
*** search.pl	4 May 2005 09:04:52 -0000	1.24
--- search.pl	29 Jul 2005 00:56:22 -0000	1.25
***************
*** 143,147 ****
  	if ($total == 1) {
  	 # if only 1 answer, jump directly to the biblio
! 	     print $query->redirect("/cgi-bin/koha/MARCdetail.pl?bib=".@$results[0]->{biblionumber});
  		 exit
  	}
--- 143,156 ----
  	if ($total == 1) {
  	 # if only 1 answer, jump directly to the biblio
! 	    # here we need to check if MARC searching is turned on or off.
! 	    # if on, go to MARCdetail.pl else go to
! 	    # detail.pl
! 	    my $marc_bool = C4::Context->boolean_preference("MARC") || 0;
! 	    if ($marc_bool eq "1") {                              
! 		print $query->redirect("/cgi-bin/koha/MARCdetail.pl?bib=".@$results[0]->{biblionumber});
! 	    }
! 	    else {
! 		print $query->redirect("/cgi-bin/koha/detail.pl?bib=".@$results[0]->{biblionumber});
! 	    }
  		 exit
  	}





More information about the Koha-cvs mailing list