[LON-CAPA-cvs] cvs: loncom /publisher loncfile.pm lonpublisher.pm
www
www at source.lon-capa.org
Sat Oct 22 19:09:44 EDT 2011
www Sat Oct 22 23:09:44 2011 EDT
Modified files:
/loncom/publisher loncfile.pm lonpublisher.pm
Log:
Bug #1320
Index: loncom/publisher/loncfile.pm
diff -u loncom/publisher/loncfile.pm:1.107 loncom/publisher/loncfile.pm:1.108
--- loncom/publisher/loncfile.pm:1.107 Sat Oct 22 21:25:37 2011
+++ loncom/publisher/loncfile.pm Sat Oct 22 23:09:44 2011
@@ -9,7 +9,7 @@
# and displays a page showing the results of the action.
#
#
-# $Id: loncfile.pm,v 1.107 2011/10/22 21:25:37 www Exp $
+# $Id: loncfile.pm,v 1.108 2011/10/22 23:09:44 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -168,7 +168,8 @@
sub url {
my $fn=shift;
- $fn=~s/^\/home\/($match_username)\/public\_html/\/priv\/$1/;
+ $fn=~s/^\/home\/httpd\/html//;
+ $fn=~s/\/\.\//\//g;
$fn=&HTML::Entities::encode($fn,'<>"&');
return $fn;
}
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.270 loncom/publisher/lonpublisher.pm:1.271
--- loncom/publisher/lonpublisher.pm:1.270 Sat Oct 22 22:05:23 2011
+++ loncom/publisher/lonpublisher.pm Sat Oct 22 23:09:44 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Publication Handler
#
-# $Id: lonpublisher.pm,v 1.270 2011/10/22 22:05:23 www Exp $
+# $Id: lonpublisher.pm,v 1.271 2011/10/22 23:09:44 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -266,9 +266,9 @@
my ($logfile,$fn,$prefix)=@_;
unless (-e $fn) {
print($logfile 'No file '.$fn."\n");
- return '<div><b>'
- .&mt('No file: [_1]'
- ,'</b> <tt>'.&Apache::loncfile::display($fn).'</tt></div>');
+ return '<p class="LC_warning">'
+ .&mt('No file: [_1]',&Apache::loncfile::display($fn))
+ .'</p>';
}
print($logfile 'Processing '.$fn."\n");
my $metastring;
@@ -277,9 +277,9 @@
$metastring=join('',<$metafh>);
}
&metaeval($metastring,$prefix);
- return '<div><b>'
- .&mt('Processed file: [_1]'
- ,'</b> <tt>'.&Apache::loncfile::display($fn).'</tt></div>');
+ return '<p class="LC_info">'
+ .&mt('Processed file: [_1]',&Apache::loncfile::display($fn))
+ .'</p>';
}
#########################################
@@ -1228,7 +1228,7 @@
.'</p>'
.'<p><input type="submit" value="'
.&mt('Finalize Publication')
- .'" /> <a href="'.&Apache::loncfile::display($source).'">'.&mt('Cancel').'</a></p>';
+ .'" /> <a href="'.&Apache::loncfile::url($source).'">'.&mt('Cancel').'</a></p>';
}
$intr_scrout.=&Apache::lonhtmlcommon::start_pick_box();
$intr_scrout.=
@@ -1766,7 +1766,7 @@
# ------------------------------------------------ Provide link to new resource
unless ($batch) {
- my $thissrc=&Apache::loncfile::display($source);
+ my $thissrc=&Apache::loncfile::url($source);
my $thissrcdir=$thissrc;
$thissrcdir=~s/\/[^\/]+$/\//;
@@ -1852,8 +1852,7 @@
my $thisembstyle=&Apache::loncommon::fileembstyle($thistype);
$r->print('<h2>'
- .&mt('Publishing [_1]'
- ,'<span class="LC_filename">'.&Apache::loncfile::display($srcfile).'</span>')
+ .&mt('Publishing [_1]',&Apache::loncfile::display($srcfile))
.'</h2>'
);
More information about the LON-CAPA-cvs
mailing list