--- loncom/publisher/lonpublisher.pm 2003/03/07 17:52:37 1.113 +++ loncom/publisher/lonpublisher.pm 2003/03/07 17:55:05 1.114 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Publication Handler # -# $Id: lonpublisher.pm,v 1.113 2003/03/07 17:52:37 albertel Exp $ +# $Id: lonpublisher.pm,v 1.114 2003/03/07 17:55:05 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -809,7 +809,7 @@ sub publish { my %allow=(); unless ($logfile=Apache::File->new('>>'.$source.'.log')) { - return ('No write permission to user directory, FAIL',1); + return ('No write permission to user directory, FAIL',1); } print $logfile "\n\n================= Publish ".localtime()." Phase One ================\n"; @@ -823,7 +823,7 @@ sub publish { print $logfile "Copied original file to ".$copyfile."\n"; } else { print $logfile "Unable to write backup ".$copyfile.':'.$!."\n"; - return ("Failed to write backup copy, $!,FAIL",1); + return ("Failed to write backup copy, $!,FAIL",1); } # ------------------------------------------------------------- IDs and indices @@ -1202,14 +1202,14 @@ sub phasetwo { if ($target=~/\_\_\_/) { $r->print( - 'Unsupported character combination "___" in filename, FAIL'); + 'Unsupported character combination "___" in filename, FAIL'); return 0; } $distarget=~s/\/+/\//g; my $logfile; unless ($logfile=Apache::File->new('>>'.$source.'.log')) { $r->print( - 'No write permission to user directory, FAIL'); + 'No write permission to user directory, FAIL'); return 0; } print $logfile @@ -1250,7 +1250,7 @@ sub phasetwo { my $mfh; unless ($mfh=Apache::File->new('>'.$source.'.meta')) { return - 'Could not write metadata, FAIL'; + 'Could not write metadata, FAIL'; } foreach (sort keys %metadatafields) { unless ($_=~/\./) { @@ -1302,7 +1302,7 @@ sub phasetwo { my $srcd=$1; unless ($srcd=~/^\/home\/httpd\/html\/res/) { print $logfile "\nPANIC: Target dir is ".$srcd; - return "Invalid target directory, FAIL"; + return "Invalid target directory, FAIL"; } opendir(DIR,$srcd); while ($filename=readdir(DIR)) { @@ -1327,7 +1327,7 @@ sub phasetwo { $r->print('

Copied old target file'); } else { print $logfile "Unable to write ".$copyfile.':'.$!."\n"; - return "Failed to copy old target, $!, FAIL"; + return "Failed to copy old target, $!, FAIL"; } # --------------------------------------------------------------- Copy Metadata @@ -1341,7 +1341,7 @@ sub phasetwo { print $logfile "Unable to write metadata ".$copyfile.':'.$!."\n"; if (-e $target.'.meta') { return - "Failed to write old metadata copy, $!, FAIL"; + "Failed to write old metadata copy, $!, FAIL"; } } @@ -1372,7 +1372,7 @@ sub phasetwo { $r->print('

Copied source file'); } else { print $logfile "\nUnable to write ".$copyfile.':'.$!."\n"; - return "Failed to copy source, $!, FAIL"; + return "Failed to copy source, $!, FAIL"; } # --------------------------------------------------------------- Copy Metadata @@ -1385,7 +1385,7 @@ sub phasetwo { } else { print $logfile "\nUnable to write metadata ".$copyfile.':'.$!."\n"; return - "Failed to write metadata copy, $!, FAIL"; + "Failed to write metadata copy, $!, FAIL"; } $r->rflush; # --------------------------------------------------- Send update notifications