[Koha-cvs] CVS: koha/opac opac-main.pl,1.16.2.1,1.16.2.2

Owen Leonard oleonard at users.sourceforge.net
Wed Aug 10 18:06:47 CEST 2005


Update of /cvsroot/koha/koha/opac
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15122/opac

Modified Files:
      Tag: rel_2_2
	opac-main.pl 
Log Message:
- Skipping over CVS directory when compiling list of available languages
- Won't pass languages array to template if there is only one language available

Index: opac-main.pl
===================================================================
RCS file: /cvsroot/koha/koha/opac/opac-main.pl,v
retrieving revision 1.16.2.1
retrieving revision 1.16.2.2
diff -C2 -r1.16.2.1 -r1.16.2.2
*** opac-main.pl	6 Jun 2005 14:16:13 -0000	1.16.2.1
--- opac-main.pl	10 Aug 2005 16:06:45 -0000	1.16.2.2
***************
*** 42,45 ****
--- 42,46 ----
  foreach my $language (getalllanguages()) {
  	next if $language eq 'images';
+ 	next if $language eq 'CVS';
  	my $selected='0';
  #                            next if $currently_selected_languages->{$language};
***************
*** 47,55 ****
  	$counter++;
  }
  
  $template->param(CGIitemtype => $CGIitemtype,
  				suggestion => C4::Context->preference("suggestion"),
  				virtualshelves => C4::Context->preference("virtualshelves"),
- 				languages => \@options,
  				textmessaging => $borrower->{textmessaging},
  				opaclargeimage => C4::Context->preference("opaclargeimage"),
--- 48,59 ----
  	$counter++;
  }
+ my $languages_count = @options;
  
+ if($languages_count > 1){
+ 		$template->param(languages => \@options);
+ }
  $template->param(CGIitemtype => $CGIitemtype,
  				suggestion => C4::Context->preference("suggestion"),
  				virtualshelves => C4::Context->preference("virtualshelves"),
  				textmessaging => $borrower->{textmessaging},
  				opaclargeimage => C4::Context->preference("opaclargeimage"),





More information about the Koha-cvs mailing list