version 1.46, 2003/09/16 20:00:57
|
version 1.47, 2003/09/25 20:39:32
|
Line 2308 BUTTONS
|
Line 2308 BUTTONS
|
my @fileList; |
my @fileList; |
|
|
# If the subdirectory is in local CSTR space |
# If the subdirectory is in local CSTR space |
if ($subdir =~ m|/home/([^/]+)/public_html|) { |
my $metadir; |
|
if ($subdir =~ m|/home/([^/]+)/public_html/(.*)|) { |
my $user = $1; |
my $user = $1; |
my $domain = $Apache::lonnet::perlvar{'lonDefDomain'}; |
my $domain = $Apache::lonnet::perlvar{'lonDefDomain'}; |
|
$metadir='/res/'.$domain.'/'.$user.'/'.$2; |
|
@fileList = &Apache::lonnet::dirlist($subdir, $domain, $user, ''); |
|
} elsif ($subdir =~ m|^~([^/]+)/(.*)$|) { |
|
$subdir='/home/'.$1.'/public_html/'.$2; |
|
my $user = $1; |
|
my $domain = $Apache::lonnet::perlvar{'lonDefDomain'}; |
|
$metadir='/res/'.$domain.'/'.$user.'/'.$2; |
@fileList = &Apache::lonnet::dirlist($subdir, $domain, $user, ''); |
@fileList = &Apache::lonnet::dirlist($subdir, $domain, $user, ''); |
} else { |
} else { |
# local library server resource space |
# local library server resource space |
Line 2349 BUTTONS
|
Line 2357 BUTTONS
|
} |
} |
|
|
# Get the title |
# Get the title |
my $title = Apache::lonpubdir::getTitleString($fileName); |
my $title = Apache::lonpubdir::getTitleString(($metadir?$metadir:$subdir) .'/'. $file); |
|
|
# Netscape 4 is stupid and there's nowhere to put the |
# Netscape 4 is stupid and there's nowhere to put the |
# information on the input tag that the file is Published, |
# information on the input tag that the file is Published, |
Line 2387 BUTTONS
|
Line 2395 BUTTONS
|
$result .= "</table>\n"; |
$result .= "</table>\n"; |
|
|
if (!$choices) { |
if (!$choices) { |
$result .= '<font color="#FF0000">There are no files available to select in this directory. Please go back and select another option.</font><br /><br />'; |
$result .= '<font color="#FF0000">There are no files available to select in this directory ('.$subdir.'). Please go back and select another option.</font><br /><br />'; |
} |
} |
|
|
$result .= $buttons; |
$result .= $buttons; |