[LON-CAPA-cvs] cvs: loncom /publisher loncfile.pm
bisitz
bisitz@source.lon-capa.org
Wed, 02 Dec 2009 09:53:02 -0000
bisitz Wed Dec 2 09:53:02 2009 EDT
Modified files:
/loncom/publisher loncfile.pm
Log:
Don't apply "LC_filename" twice. Sub routine "display" already wraps filename in "LC_filename".
Index: loncom/publisher/loncfile.pm
diff -u loncom/publisher/loncfile.pm:1.102 loncom/publisher/loncfile.pm:1.103
--- loncom/publisher/loncfile.pm:1.102 Fri Aug 28 01:08:48 2009
+++ loncom/publisher/loncfile.pm Wed Dec 2 09:53:02 2009
@@ -9,7 +9,7 @@
# and displays a page showing the results of the action.
#
#
-# $Id: loncfile.pm,v 1.102 2009/08/28 01:08:48 raeburn Exp $
+# $Id: loncfile.pm,v 1.103 2009/12/02 09:53:02 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -363,14 +363,14 @@
if (! -d "$newpath") {
$request->print('<p><span class="LC_warning">'
.&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."
- ,'<span class="LC_filename">'.&display($newpath).'</span>')
+ ,&display($newpath))
.'</span></p>');
$dest=~s|.*/||;
}
}
if ($dest =~ /\.(\d+)\.(\w+)$/){
$request->print('<p><span class="LC_warning">'
- .&mt('Bad filename [_1]','<span class="LC_filename">'.&display($dest).'</span>')
+ .&mt('Bad filename [_1]',&display($dest))
.'<br />'
.&mt('[_1](name).(number).(extension)[_2] not allowed.','<tt>','</tt>')
.'<br />'
@@ -552,8 +552,9 @@
$request->print('<input type="hidden" name="newfilename" value="'
.$newfilename.'" />'
.'<p>'
- .&mt($action.' [_1] to [_2]?'
- ,&display($fn),&display($newfilename))
+ .&mt($action.' [_1] to [_2]?',
+ &display($fn),
+ &display($newfilename))
.'</p>'
);
&CloseForm1($request, $fn);
@@ -563,8 +564,8 @@
}
} else {
$request->print('<p class="LC_error">'
- .&mt('No such file: [_1]'
- ,'<span class="LC_filename">'.&display($fn).'</span>')
+ .&mt('No such file: [_1]',
+ &display($fn))
.'</p></form>'
);
return;
@@ -625,15 +626,15 @@
}
}
$request->print('<p>'
- .&mt('Delete [_1]?'
- ,'<span class="LC_filename">'.&display($fn).'</span>')
+ .&mt('Delete [_1]?',
+ &display($fn))
.'</p>'
);
&CloseForm1($request, $fn);
} else {
$request->print('<p class="LC_error">'
- .&mt('No such file: [_1]'
- ,'<span class="LC_filename">'.&display($fn).'</span>')
+ .&mt('No such file: [_1]',
+ &display($fn))
.'</p></form>'
);
}
@@ -689,19 +690,20 @@
$request->print('<br /><a href="'.&url($fn).'">'.&mt('Cancel').'</a>');
return;
}
- $request->print('<input type="hidden" name="newfilename" value="'
- .$newfilename.'" />'
- .'<p>'
- .&mt('Copy [_1] to [_2]?'
- ,'<span class="LC_filename">'.&display($fn).'</span>'
- ,'<span class="LC_filename">'.&display($newfilename).'</span>')
- .'</p>'
+ $request->print(
+ '<input type="hidden" name="newfilename"'
+ .' value="'.$newfilename.'" />'
+ .'<p>'
+ .&mt('Copy [_1] to [_2]?',
+ &display($fn),
+ &display($newfilename))
+ .'</p>'
);
&CloseForm1($request, $fn);
} else {
$request->print('<p class="LC_error">'
- .&mt('No such file: [_1]'
- ,'<span class="LC_filename">'.&display($fn).'</span>')
+ .&mt('No such file: [_1]',
+ &display($fn))
.'</p></form>'
);
}
@@ -762,8 +764,8 @@
$request->print('<input type="hidden" name="newfilename" value="'
.$newfilename.'" />'
.'<p>'
- .&mt('Make new directory [_1]?'
- ,'<span class="LC_filename">'.&display($newfilename).'</span>')
+ .&mt('Make new directory [_1]?',
+ &display($newfilename))
.'</p>'
);
&CloseForm1($request, $fn);
@@ -776,15 +778,15 @@
if( -e $fn) {
$request->print('<input type="hidden" name="newfilename" value="'.$fn.'" />');
$request->print('<p>'
- .&mt('Decompress [_1]?'
- ,'<span class="LC_filename">'.&display($fn).'</span>')
+ .&mt('Decompress [_1]?',
+ &display($fn))
.'</p>'
);
&CloseForm1($request, $fn);
} else {
$request->print('<p class="LC_error">'
- .&mt('No such file: [_1]'
- ,'<span class="LC_filename">'.&display($fn).'</span>')
+ .&mt('No such file: [_1]',
+ &display($fn))
.'</p></form>'
);
}
@@ -1069,10 +1071,11 @@
unlink $tmp2;
}
} else {
- $request->print('<p>'
- .&mt('No such file: [_1]'
- ,'<span class="LC_filename">'.&display($oldfile).'</span>')
- .'</p></form>'
+ $request->print(
+ '<p>'
+ .&mt('No such file: [_1]',
+ &display($oldfile))
+ .'</p></form>'
);
return 0;
}