[LON-CAPA-cvs] cvs: loncom /publisher loncfile.pm
raeburn
raeburn at source.lon-capa.org
Sat May 21 21:09:55 EDT 2016
raeburn Sun May 22 01:09:55 2016 EDT
Modified files:
/loncom/publisher loncfile.pm
Log:
- Eliminate some <span> tags and include LC_error class in <p> tag instead.
Index: loncom/publisher/loncfile.pm
diff -u loncom/publisher/loncfile.pm:1.123 loncom/publisher/loncfile.pm:1.124
--- loncom/publisher/loncfile.pm:1.123 Mon Jan 19 15:36:11 2015
+++ loncom/publisher/loncfile.pm Sun May 22 01:09:54 2016
@@ -9,7 +9,7 @@
# and displays a page showing the results of the action.
#
#
-# $Id: loncfile.pm,v 1.123 2015/01/19 15:36:11 goltermann Exp $
+# $Id: loncfile.pm,v 1.124 2016/05/22 01:09:54 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -279,28 +279,28 @@
$published=~s{^\Q$londocroot/priv/\E}{$londocroot/res/};
my ($type,$result);
if ( -d $construct ) {
- return ('error','<p><span class="LC_error">'.&mt('Error: destination for operation is an existing directory.').'</span></p>');
+ return ('error','<p class="LC_error">'.&mt('Error: destination for operation is an existing directory.').'</p>');
}
if ( -e $published) {
if ( -e $construct ) {
$type = 'warning';
- $result.='<p><span class="LC_warning">'.&mt('Warning: target file exists, and has been published!').'</span></p>';
+ $result.='<p class="LC_warning">'.&mt('Warning: target file exists, and has been published!').'</p>';
} else {
my $published_type = (-d $published) ? 'directory' : 'file';
if ($published_type eq $creating) {
$type = 'warning';
- $result.='<p><span class="LC_warning">'.&mt("Warning: a published $published_type of this name exists.").'</span></p>';
+ $result.='<p class="LC_warning">'.&mt("Warning: a published $published_type of this name exists.").'</p>';
} else {
$type = 'error';
- $result.='<p><span class="LC_error">'.&mt("Error: a published $published_type of this name exists.").'</span></p>';
+ $result.='<p class="LC_error">'.&mt("Error: a published $published_type of this name exists.").'</p>';
}
}
} elsif ( -e $construct) {
$type = 'warning';
- $result.='<p><span class="LC_warning">'.&mt('Warning: target file exists!').'</span></p>';
+ $result.='<p class="LC_warning">'.&mt('Warning: target file exists!').'</p>';
}
return ($type,$result);
@@ -344,7 +344,7 @@
if ($old=~m:(.*)/+([^/]+)\.(\w+)$:) { $oldsuffix=$3; }
if (lc($oldsuffix) ne lc($newsuffix)) {
$result.=
- '<p><span class="LC_warning">'.&mt('Warning: change of MIME type!').'</span></p>';
+ '<p class="LC_warning">'.&mt('Warning: change of MIME type!').'></p>';
}
return $result;
}
@@ -367,27 +367,27 @@
my ($newpath)=($dest=~m|(.*)/|);
($newpath,$error)=&relativeDest($fn,$newpath,$uname,$udom);
if (! -d "$newpath") {
- $request->print('<p><span class="LC_warning">'
+ $request->print('<p 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 filename."
,&display($newpath))
- .'</span></p>');
+ .'</p>');
$dest=~s|.*/||;
}
}
if ($dest =~ /\.(\d+)\.(\w+)$/){
- $request->print('<p><span class="LC_warning">'
+ $request->print('<p class="LC_warning">'
.&mt('Bad filename [_1]',&display($dest))
.'<br />'
.&mt('[_1](name).(number).(extension)[_2] not allowed.','<tt>','</tt>')
.'<br />'
.&mt('Removing the [_1].number.[_2] from requested filename.','<tt>','</tt>')
- .'</span></p>');
+ .'</p>');
$dest =~ s/\.(\d+)(\.\w+)$/$2/;
}
if ($foundbad) {
- $request->print('<p><span class="LC_warning">'
+ $request->print('<p class="LC_warning">'
.&mt('Invalid characters in requested name have been removed.')
- .'</span></p>'
+ .'</p>'
);
}
return ($dest,$error);
More information about the LON-CAPA-cvs
mailing list