--- loncom/publisher/loncfile.pm 2008/12/19 14:01:16 1.91
+++ loncom/publisher/loncfile.pm 2009/05/26 16:29:56 1.99
@@ -9,7 +9,7 @@
# and displays a page showing the results of the action.
#
#
-# $Id: loncfile.pm,v 1.91 2008/12/19 14:01:16 raeburn Exp $
+# $Id: loncfile.pm,v 1.99 2009/05/26 16:29:56 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -361,13 +361,20 @@ sub cleanDest {
my ($newpath)=($dest=~m|(.*)/|);
$newpath=&relativeDest($fn,$newpath,$uname);
if (! -d "$newpath") {
- $request->print("
".&mt('You have requested to create file in directory [_1] which doesn\'t exist. The requested directory path has been removed from the requested file name.','"'.&display($newpath).'"')."
");
+ $request->print('
'
+ .&mt("You have requested to create file in directory [_1] which doesn't exist. The requested directory path has been removed from the requested file name."
+ ,'"'.&display($newpath).'"')
+ .'
');
$dest=~s|.*/||;
}
}
if ($dest =~ /\.(\d+)\.(\w+)$/){
$request->print(''
- .&mt('Bad filename [_1]. (name).(number).(extension) not allowed. Removing the .number. from requested filename.',&display($dest))
+ .&mt('Bad filename [_1]',''.&display($dest).'')
+ .' '
+ .&mt('[_1](name).(number).(extension)[_2] not allowed.','','')
+ .' '
+ .&mt('Removing the [_1].number.[_2] from requested filename.','','')
.'');
$dest =~ s/\.(\d+)(\.\w+)$/$2/;
}
@@ -416,7 +423,7 @@ sub CloseForm1 {
my ($request, $fn) = @_;
$request->print('');
$request->print('');
+ '" method="post">');
}
@@ -581,7 +588,7 @@ sub Delete1 {
if( -e $fn) {
$request->print('');
+ $fn.'" />');
if (-d $fn) {
unless (&empty_directory($fn,'Delete1')) {
$request->print('
'.
+ &mt('The name of the new file needs to end with an appropriate file extension to indicate the type of file to create.').' '.
+ &mt('The following are valid extensions: [_1].',$validexts).
+ '
'.
+ '
'.
+ '');
+ return;
+ }
+
$request->print('
'.&mt('Make new file').' '.&display($newfilename).'?