[LON-CAPA-cvs] cvs: modules /gerd/harvesting lonindexer.pm
www
www at source.lon-capa.org
Wed Jul 11 14:04:04 EDT 2012
www Wed Jul 11 18:04:04 2012 EDT
Modified files:
/modules/gerd/harvesting lonindexer.pm
Log:
Removing (currently) unneeded code
Index: modules/gerd/harvesting/lonindexer.pm
diff -u modules/gerd/harvesting/lonindexer.pm:1.8 modules/gerd/harvesting/lonindexer.pm:1.9
--- modules/gerd/harvesting/lonindexer.pm:1.8 Wed Jul 11 13:23:21 2012
+++ modules/gerd/harvesting/lonindexer.pm Wed Jul 11 18:04:04 2012
@@ -5,7 +5,7 @@
#
# MODIFY $datapath VARIABLE FOR LOCATION OF DATA FILES
#
-# $Id: lonindexer.pm,v 1.8 2012/07/11 13:23:21 www Exp $
+# $Id: lonindexer.pm,v 1.9 2012/07/11 18:04:04 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1572,29 +1572,12 @@
my $output='';
my $embstyle=&Apache::loncommon::fileembstyle($curfext);
if ($embstyle eq 'ssi') {
- my $cache=$Apache::lonnet::perlvar{'lonDocRoot'}.$filelink.
- '.tmp';
- if ((!$env{'form.updatedisplay'}) &&
- (-e $cache)) {
- open(FH,$cache);
- $output=join("\n",<FH>);
- close(FH);
- } else {
-# In update display mode, remove old cache. This is done to retroactively
-# clean up course context renderings.
- if (-e $cache) {
- unlink($cache);
- }
- $output=&Apache::lonnet::ssi_body($filelink);
+ $output=&Apache::lonnet::ssi_body($filelink);
# Is access denied? Don't render, don't store
- if ($output=~/LONCAPAACCESSCONTROLERRORSCREEN/s) {
- $output='';
-# Was this rendered in course content? Don't store
- } elsif (!&Apache::lonnet::symbread($filelink)) {
- open(FH,">$cache");
- print FH $output;
- close(FH);
- }
+ $output=~s/\<applet(.+)\<\/applet(.*)\>/\<br \/\>Applet\<br \/\>/gsi;
+ $output=~s/\<embed(.+)\<\/embed(.*)\>/\<br \/\>Embedded Multimedia\<br \/\>/gsi;
+ if ($output=~/LONCAPAACCESSCONTROLERRORSCREEN/s) {
+ $output='';
}
} elsif ($embstyle eq 'img') {
$output='<img alt="'.&mt('Preview').'" src="'.$filelink.'" />';
More information about the LON-CAPA-cvs
mailing list