[Koha-cvs] koha/installer install.pl

Ryan Higgins rch at liblime.com
Sat Mar 17 22:43:40 CET 2007


CVSROOT:	/sources/koha
Module name:	koha
Changes by:	Ryan Higgins <rych>	07/03/17 21:43:40

Modified files:
	installer      : install.pl 

Log message:
	sort frameworks

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/installer/install.pl?cvsroot=koha&r1=1.2&r2=1.3

Patches:
Index: install.pl
===================================================================
RCS file: /sources/koha/koha/installer/install.pl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- install.pl	9 Mar 2007 15:37:25 -0000	1.2
+++ install.pl	17 Mar 2007 21:43:40 -0000	1.3
@@ -220,8 +220,12 @@
     #Framework importing and reports
     my $lang;
     my %hashlevel;
+   # sort by filename -> prepend with numbers to specify order of insertion. 
     
-	foreach my $file ($query->param('framework')){
+	my @fnames = sort { my @aa = split /\/|\\/, ($a); my @bb = split /\/|\\/, ($b); $aa[-1] <=> $bb[-1] } $query->param('framework')  ;
+	
+	foreach my $file (@fnames){
+     warn $file;
       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} ";
       my $str = qx($strcmd < $file 2>&1);
@@ -289,8 +293,9 @@
         utf8::encode($lines) unless (utf8::is_utf8($lines));
         push @frameworklist,{'fwkname'=>$name, 'fwkfile'=>"$dir/$_",'fwkdescription'=>$lines};
       } @listname;
+	  my @fwks = sort { $a->{'fwkname'} <=> $b->{'fwkname'} } @frameworklist;
       $cell{"mandatory"}=($requirelevel=~/(mandatory|requi|oblig|necess)/i);
-      $cell{"frameworks"}=\@frameworklist;
+      $cell{"frameworks"}=\@fwks;
       $cell{"label"}=ucfirst($requirelevel);
       $cell{"code"}=lc($requirelevel);
       push @levellist,\%cell;





More information about the Koha-cvs mailing list