# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id$
use strict; use warnings; #FIXME: turn off warnings before release
require Exporter;
use C4::Context;
use vars qw($VERSION @ISA @EXPORT);
-$VERSION = do { my @v = '$Revision$' =~ /\d+/g; shift(@v) . "." . join( "_", map { sprintf "%03d", $_ } @v ); };
-
=head1 NAME
C4::Languages - Perl Module containing language list functions for Koha
my @languages;
# find the available directory names
- my $dir=C4::Context->config('intranetdir')."/misc/sql-datas/";
+ my $dir=C4::Context->config('intranetdir')."/installer/data/";
opendir (MYDIR,$dir);
my @listdir= grep { !/^\.|CVS/ && -d "$dir/$_"} readdir(MYDIR);
closedir MYDIR;
my @languages;
my $lang;
- if ( $interface eq 'opac' ) {
+ if ($interface && $interface eq 'opac' ) {
$htdocs = C4::Context->config('opachtdocs');
if ( $theme and -d "$htdocs/$theme" ) {
(@languages) = _get_language_dirs($htdocs,$theme);
return _get_final_languages($all_languages,@languages);
}
}
- elsif ( $interface eq 'intranet' ) {
+ elsif ($interface && $interface eq 'intranet' ) {
$htdocs = C4::Context->config('intrahtdocs');
if ( $theme and -d "$htdocs/$theme" ) {
@languages = _get_language_dirs($htdocs,$theme);
__END__
-=back
-
=head1 AUTHOR
Joshua Ferraro