Index: main/trunk/greenstone2/common-src/cgi-bin/gsdlCGI.pm
===================================================================
--- main/trunk/greenstone2/common-src/cgi-bin/gsdlCGI.pm	(revision 30620)
+++ main/trunk/greenstone2/common-src/cgi-bin/gsdlCGI.pm	(revision 30624)
@@ -513,5 +513,5 @@
 	# assume the GS3 web folder is in the default location
 	if(!defined $gsdl3home) { 
-	    $gsdl3home = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "web");
+	    $gsdl3home = &FileUtils::filenameConcatenate($ENV{'GSDL3SRCHOME'}, "web");
 	    $self->{'gsdl3home'} = $gsdl3home;
 	} 
@@ -519,12 +519,12 @@
     }
     
-    my $gsdl_bin_script = &util::filename_cat($gsdlhome,"bin","script");
+    my $gsdl_bin_script = &FileUtils::filenameConcatenate($gsdlhome,"bin","script");
     &util::envvar_prepend("PATH",$gsdl_bin_script);
     
-    my $gsdl_bin_os = &util::filename_cat($gsdlhome,"bin",$gsdlos);
+    my $gsdl_bin_os = &FileUtils::filenameConcatenate($gsdlhome,"bin",$gsdlos);
     &util::envvar_prepend("PATH",$gsdl_bin_os);
     
     # set up ImageMagick for the remote server in parallel to what setup.bash does
-    my $magick_home = &util::filename_cat($gsdl_bin_os,"imagemagick");
+    my $magick_home = &FileUtils::filenameConcatenate($gsdl_bin_os,"imagemagick");
     if(-e $magick_home) {
 	&util::envvar_prepend("PATH", $magick_home);
@@ -534,6 +534,6 @@
 	# no harm (that I can see) in keeping them in
 
-	my $magick_bin = &util::filename_cat($magick_home,"bin");
-	my $magick_lib = &util::filename_cat($magick_home,"lib");
+	my $magick_bin = &FileUtils::filenameConcatenate($magick_home,"bin");
+	my $magick_lib = &FileUtils::filenameConcatenate($magick_home,"lib");
 
 	&util::envvar_prepend("PATH", $magick_bin);
@@ -552,14 +552,14 @@
 
     # set up GhostScript for the remote server in parallel to what setup.bash does
-    my $ghostscript_home = &util::filename_cat($gsdl_bin_os,"ghostscript");
+    my $ghostscript_home = &FileUtils::filenameConcatenate($gsdl_bin_os,"ghostscript");
     if(-e $ghostscript_home) {
-	my $ghostscript_bin = &util::filename_cat($ghostscript_home,"bin");
+	my $ghostscript_bin = &FileUtils::filenameConcatenate($ghostscript_home,"bin");
 	&util::envvar_prepend("PATH", $ghostscript_bin);
 
 	if(!defined $ENV{'GS_LIB'} || $ENV{'GS_LIB'} eq "") {
-	    $ENV{'GS_LIB'} = &util::filename_cat($ghostscript_home,"share","ghostscript","8.63","lib");	    
+	    $ENV{'GS_LIB'} = &FileUtils::filenameConcatenate($ghostscript_home,"share","ghostscript","8.63","lib");	    
 	}
 	if(!defined $ENV{'GS_FONTPATH'} || $ENV{'GS_FONTPATH'} eq "") {
-	    $ENV{'GS_FONTPATH'} = &util::filename_cat($ghostscript_home,"share","ghostscript","8.63","Resource","Font");
+	    $ENV{'GS_FONTPATH'} = &FileUtils::filenameConcatenate($ghostscript_home,"share","ghostscript","8.63","Resource","Font");
 	}
     }
@@ -574,10 +574,10 @@
 	#my ($perl_home) = ($perl_bin_dir =~ m/(.*)[\\|\/]bin[\\|\/]?$/);
 	my ($tailname,$perl_home) = File::Basename::fileparse($perl_bin_dir, "\\.(?:[^\\.]+?)\$");
-	$ENV{'PERL5LIB'} = &util::filename_cat($perl_home, "lib");
+	$ENV{'PERL5LIB'} = &FileUtils::filenameConcatenate($perl_home, "lib");
 
 	if($gsdlos eq "darwin") {
-	    &util::envvar_prepend("DYLD_LIBRARY_PATH", &util::filename_cat($perl_home,"5.8.9","darwin-thread-multi-2level","CORE"));
+	    &util::envvar_prepend("DYLD_LIBRARY_PATH", &FileUtils::filenameConcatenate($perl_home,"5.8.9","darwin-thread-multi-2level","CORE"));
 	} elsif($gsdlos eq "linux") {
-	    &util::envvar_prepend("LD_LIBRARY_PATH", &util::filename_cat($perl_home,"5.8.9","i686-linux-thread-multi","CORE"));
+	    &util::envvar_prepend("LD_LIBRARY_PATH", &FileUtils::filenameConcatenate($perl_home,"5.8.9","i686-linux-thread-multi","CORE"));
 	}
     }
@@ -587,5 +587,5 @@
 	# is from SVN, the user must have their own Perl and put it on the PATH or set
 	# perlpath in the gsdl site config file.
-	$perl_bin_dir = &util::filename_cat($gsdlhome, "bin", "windows", "perl", "bin");
+	$perl_bin_dir = &FileUtils::filenameConcatenate($gsdlhome, "bin", "windows", "perl", "bin");
 	if(-e $perl_bin_dir) {
 	    &util::envvar_append("PATH", $perl_bin_dir);
@@ -606,10 +606,10 @@
     my @ext_homes = ();
 
-    my $gsdl_ext_home = &util::filename_cat($gsdlhome,"ext");
+    my $gsdl_ext_home = &FileUtils::filenameConcatenate($gsdlhome,"ext");
     push(@ext_homes,$gsdl_ext_home);
 
     if ($self->{'greenstone_version'} == 3) {
 	my $gsdl3srchome = $self->get_gsdl3_src_home();
-	my $gsdl3_ext_home = &util::filename_cat($gsdl3srchome,"ext");
+	my $gsdl3_ext_home = &FileUtils::filenameConcatenate($gsdl3srchome,"ext");
 	push(@ext_homes,$gsdl3_ext_home);
     }
@@ -624,14 +624,14 @@
 	    
 	    foreach my $ed (@pot_ext_dir) {
-		my $full_ext_dir = &util::filename_cat($ext_home,$ed);
+		my $full_ext_dir = &FileUtils::filenameConcatenate($ext_home,$ed);
 
 		if (-d $full_ext_dir) {
 
-		    my $full_ext_perllib_dir = &util::filename_cat($full_ext_dir,"perllib");
+		    my $full_ext_perllib_dir = &FileUtils::filenameConcatenate($full_ext_dir,"perllib");
 		    if (-d $full_ext_perllib_dir) {
 			unshift (@INC, $full_ext_perllib_dir);
 		    }
 
-		    my $full_inc_file = &util::filename_cat($full_ext_dir,
+		    my $full_inc_file = &FileUtils::filenameConcatenate($full_ext_dir,
 							    "$ed-setup.pl");
 		    if (-f $full_inc_file) {
@@ -677,7 +677,7 @@
     if($self->{'greenstone_version'} == 2 && defined $ENV{'GSDLHOME'}) {
 	if(defined $collection) {
-	    $collection_directory = &util::filename_cat($ENV{'GSDLHOME'}, "collect", $collection);
+	    $collection_directory = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, "collect", $collection);
 	} else {
-	    $collection_directory = &util::filename_cat($ENV{'GSDLHOME'}, "collect");
+	    $collection_directory = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, "collect");
 	}
     }
@@ -685,14 +685,14 @@
 	if(defined $ENV{'GSDL3HOME'}) {
 	    if(defined $collection) {
-		$collection_directory = &util::filename_cat($ENV{'GSDL3HOME'}, "sites", $site, "collect", $collection);
+		$collection_directory = &FileUtils::filenameConcatenate($ENV{'GSDL3HOME'}, "sites", $site, "collect", $collection);
 	    } else {
-		$collection_directory = &util::filename_cat($ENV{'GSDL3HOME'}, "sites", $site, "collect");
+		$collection_directory = &FileUtils::filenameConcatenate($ENV{'GSDL3HOME'}, "sites", $site, "collect");
 	    }
 	}
 	elsif(defined $ENV{'GSDL3SRCHOME'}) {
 	    if(defined $collection) {
-		$collection_directory = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "web", "sites", $site, "collect", $collection);
+		$collection_directory = &FileUtils::filenameConcatenate($ENV{'GSDL3SRCHOME'}, "web", "sites", $site, "collect", $collection);
 	    } else {
-		$collection_directory = &util::filename_cat($ENV{'GSDL3SRCHOME'}, "web", "sites", $site, "collect");
+		$collection_directory = &FileUtils::filenameConcatenate($ENV{'GSDL3SRCHOME'}, "web", "sites", $site, "collect");
 	    }
 	}
@@ -707,5 +707,5 @@
 
     my $prefix_dir = getcwd(); 
-    my $full_path = &util::filename_cat($prefix_dir,$local_dir);
+    my $full_path = &FileUtils::filenameConcatenate($prefix_dir,$local_dir);
     
     if ($prefix_dir !~ m/collect/) {
@@ -718,5 +718,5 @@
     }
 
-    &util::rm_r($full_path);
+    &FileUtils::removeFilesRecursive($full_path);
 }
 
@@ -728,5 +728,5 @@
 	my $java_home = $ENV{'JAVA_HOME'};
 	$java_home =~ s/\/$//;  # Remove trailing slash if present (Unix specific)
-	return &util::filename_cat($java_home, "bin", "java");
+	return &FileUtils::filenameConcatenate($java_home, "bin", "java");
     }
 
@@ -794,6 +794,6 @@
     
     my $java = get_java_path();
-    my $java_gsdl3_classpath = &util::filename_cat($gsdl3srchome, "web", "WEB-INF", "lib", "gsdl3.jar");
-    my $java_remaining_classpath = &util::filename_cat($gsdl3srchome, "web", "WEB-INF", "lib", "*"); # log4j etc
+    my $java_gsdl3_classpath = &FileUtils::filenameConcatenate($gsdl3srchome, "web", "WEB-INF", "lib", "gsdl3.jar");
+    my $java_remaining_classpath = &FileUtils::filenameConcatenate($gsdl3srchome, "web", "WEB-INF", "lib", "*"); # log4j etc
     my $java_classpath;
     my $gsdlos = $ENV{'GSDLOS'};
