Browse Source

Switching Languages.pm to EXPORT_OK -- don't export

all functions by default. Adding languages_loop to all
templates

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
3.0.x
Joshua Ferraro 17 years ago
parent
commit
b0dc874d4b
  1. 15
      C4/Languages.pm
  2. 6
      C4/Output.pm
  3. 5
      catalogue/search.pl

15
C4/Languages.pm

@ -22,7 +22,7 @@ package C4::Languages;
use strict; use warnings; #FIXME: turn off warnings before release
require Exporter;
use C4::Context;
use vars qw($VERSION @ISA @EXPORT);
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
=head1 NAME
@ -37,14 +37,9 @@ use C4::Languages;
=head1 FUNCTIONS
=cut
@ISA = qw(Exporter);
@EXPORT = qw(
&getFrameworkLanguages
&getTranslatedLanguages
&getAllLanguages
);
$VERSION = 3.00;
@ISA = qw(Exporter);
@EXPORT_OK = qw(getFrameworkLanguages getTranslatedLanguages getAllLanguages);
my $DEBUG = 0;
=head2 getFrameworkLanguages
@ -166,6 +161,7 @@ sub getAllLanguages {
language_name =>
"&#1575;&#1604;&#1593;&#1585;&#1576;&#1610;&#1577;",
language_locale_name => "Arabic",
bidi => "rtl",
,
},
{
@ -234,6 +230,7 @@ sub getAllLanguages {
language_code => "heb",
language_name => "&#1506;&#1489;&#1512;&#1497;&#1514;",
language_locale_name => "Hebrew",
bidi => "rtl",
,
},
{

6
C4/Output.pm

@ -29,8 +29,9 @@ use strict;
require Exporter;
use C4::Context;
use HTML::Template::Pro;
use C4::Languages qw(getTranslatedLanguages);
use HTML::Template::Pro;
use vars qw($VERSION @ISA @EXPORT);
# set the version for version checking
@ -99,6 +100,9 @@ sub gettemplate {
lang => $lang
);
# load the languages ( for switching from one template to another )
$template->param(languages_loop => getTranslatedLanguages($interface,$theme));
return $template;
}

5
catalogue/search.pl

@ -144,7 +144,7 @@ use C4::Context;
use C4::Output;
use C4::Auth;
use C4::Search;
use C4::Languages; # getAllLanguages
use C4::Languages qw(getAllLanguages);
use C4::Koha;
use POSIX qw(ceil floor);
use C4::Branch; # GetBranches
@ -239,9 +239,6 @@ $template->param(itemtypeloop => \@itemtypesloop);
# my ($ccodecount,@ccode_loop) = GetCcodes();
# $template->param(ccodeloop=>\@ccode_loop,);
# load the languages ( for switching from one template to another )
$template->param(languages_loop => getTranslatedLanguages('intranet','prog'));
# The following should only be loaded if we're bringing up the advanced search template
if ( $template_type eq 'advsearch' ) {

Loading…
Cancel
Save