bugfix: fixed quelling of warning if $db_port not specified
[koha_fer] / C4 / Languages.pm
index 9444c63..8a8ae2e 100644 (file)
@@ -18,15 +18,12 @@ package C4::Languages;
 # 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 
@@ -69,7 +66,7 @@ sub getFrameworkLanguages {
     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;
@@ -109,7 +106,7 @@ sub getTranslatedLanguages {
     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);
@@ -122,7 +119,7 @@ sub getTranslatedLanguages {
             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);