[LON-CAPA-cvs] cvs: loncom /publisher lonpubdir.pm
www
www at source.lon-capa.org
Wed Oct 26 13:31:41 EDT 2011
www Wed Oct 26 17:31:41 2011 EDT
Modified files:
/loncom/publisher lonpubdir.pm
Log:
Bug #1320: declutter
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.132 loncom/publisher/lonpubdir.pm:1.133
--- loncom/publisher/lonpubdir.pm:1.132 Tue Oct 25 22:04:20 2011
+++ loncom/publisher/lonpubdir.pm Wed Oct 26 17:31:40 2011
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Construction Space Directory Lister
#
-# $Id: lonpubdir.pm,v 1.132 2011/10/25 22:04:20 www Exp $
+# $Id: lonpubdir.pm,v 1.133 2011/10/26 17:31:40 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -448,13 +448,12 @@
my ($r, $reqfile, $here, $dirname, $modtime, $resdir, $bombs, $numdir) = @_;
# construct the display filename: the directory name unless ..:
-
+
+ my $actionitem;
+
my $disfilename = $dirname;
- if ($dirname eq '..') {
- $disfilename = '<i>'.&mt('Parent Directory').'</i>';
- }
# Don't display directory itself, and there is no way up from root directory
- unless ( (($dirname eq '..') && ($reqfile=~/^\/[^\/]+\/[^\/]+$/)) || ($dirname eq '.')) {
+ unless ((($dirname eq '..') && ($reqfile=~/^\/[^\/]+\/[^\/]+$/)) || ($dirname eq '.')) {
my $kaputt=0;
foreach (keys %{$bombs}) {
if ($_=~m:^\Q$resdir\E/\Q$disfilename\E/:) { $kaputt=1; last; }
@@ -467,10 +466,9 @@
&Apache::lonpublisher::metaeval(
&Apache::lonnet::getfile($r->dir_config('lonDocRoot').$here.'/'.$dirname.'/default.meta')
);
-#
- my $actionitem = '';
- if ($here eq '..') {
+ if ($dirname eq '..') {
$actionitem = &mt('Go to ...');
+ $disfilename = '<i>'.&mt('Parent Directory').'</i>';
} else {
$actionitem =
'<form name="dirselect_'.$$numdir.
More information about the LON-CAPA-cvs
mailing list