[Koha-cvs] koha/installer install.pl [rel_3_0]
Ryan Higgins
rch at liblime.com
Wed Feb 21 18:49:05 CET 2007
CVSROOT: /sources/koha
Module name: koha
Branch: rel_3_0
Changes by: Ryan Higgins <rych> 07/02/21 17:49:05
Modified files:
installer : install.pl
Log message:
add default port for mysql, add Languages.pm
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/installer/install.pl?cvsroot=koha&only_with_tag=rel_3_0&r1=1.1.2.5&r2=1.1.2.6
Patches:
Index: install.pl
===================================================================
RCS file: /sources/koha/koha/installer/Attic/install.pl,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -b -r1.1.2.5 -r1.1.2.6
--- install.pl 16 Feb 2007 13:14:08 -0000 1.1.2.5
+++ install.pl 21 Feb 2007 17:49:05 -0000 1.1.2.6
@@ -6,6 +6,7 @@
use InstallAuth;
use C4::Context;
use C4::Interface::CGI::Output;
+use C4::Languages;
use strict; # please develop with the strict pragma
@@ -209,6 +210,7 @@
$info{'dbms'}=(C4::Context->config("db_scheme")?C4::Context->config("db_scheme"):"mysql");
$info{'hostname'}=C4::Context->config("hostname");
($info{'hostname'},$info{'port'})=($1,$2) if $info{'hostname'}=~/([^:]*):([0-9]+)/;
+ $info{port} = 3306 unless ($info{port});
$info{'user'}=C4::Context->config("user");
$info{'password'}=C4::Context->config("pass");
my $op=$query->param('op');
@@ -225,6 +227,7 @@
#Framework importing and reports
my $lang;
my %hashlevel;
+
foreach my $file ($query->param('framework')){
undef $/;
my $strcmd="mysql ".($info{hostname}?"-h $info{hostname} ":"").($info{port}?"-P $info{port} ":"").($info{user}?"-u $info{user} ":"").($info{password}?"-p$info{password}":"")." $info{dbname} ";
@@ -251,21 +254,22 @@
# Could be VERY useful to have A Big file for a kind of library.
# But could also be useful to have some Authorised values data set prepared here.
# Framework Selection is achieved through checking boxes.
- my $langchoice=$query->param('fwklanguage');
+ my $langchoice=$query->param('fwklanguage') ;
$langchoice=$query->cookie('KohaOpacLanguage') unless ($langchoice);
my $dir=C4::Context->config('intranetdir')."/misc/sql-datas/";
opendir (MYDIR,$dir);
my @listdir= grep { !/^\.|CVS/ && -d "$dir/$_"} readdir(MYDIR);
closedir MYDIR;
+ my $frmwklangs = getFrameworkLanguages();
my @languages;
map{
- push @languages,{'dirname'=>$_, 'languagedescription'=>$language{$_},'checked'=>($_ eq $langchoice)} if ($language{$_});
- } @listdir;
+ push @languages,{'dirname'=>$_->{'language_code'}, 'languagedescription'=>$_->{'language_name'},'checked'=>($_->{'language_code'} eq $langchoice) } if ($_->{'language_code'});
+ } @$frmwklangs;
$template->param("languagelist"=>\@languages);
undef $/;
- my $dir=C4::Context->config('intranetdir')."/misc/sql-datas/$langchoice";
- opendir (MYDIR,$dir);
- my @listdir= grep { !/^\.|CVS/ && -d "$dir/$_"} readdir(MYDIR);
+ $dir=C4::Context->config('intranetdir')."/misc/sql-datas/$langchoice";
+ opendir (MYDIR,$dir) || warn "no open $dir";
+ @listdir= grep { !/^\.|CVS/ && -d "$dir/$_"} readdir(MYDIR);
closedir MYDIR;
my @levellist;
foreach my $requirelevel (@listdir){
@@ -331,12 +335,10 @@
# LANGUAGE SELECTION page by default
# using opendir + language Hash
- my $dir=C4::Context->config('intrahtdocs')."/prog/";
- opendir (MYDIR,$dir);
- my @listdir= grep { !/^\.|CVS/ && -d "$dir/$_"} readdir(MYDIR);
+ my $langavail = getTranslatedLanguages();
my @languages;
- foreach (@listdir){
- push @languages,{'value'=>$_, 'description'=>$language{$_}} if ($language{$_});
+ foreach (@$langavail){
+ push @languages,{'value'=>$_->{'language_code'}, 'description'=>$_->{'language_name'} } if ($_->{'language_code'});
}
$template->param(languages=>\@languages);
}
More information about the Koha-cvs
mailing list