--- loncom/interface/londocs.pm 2006/05/12 16:47:35 1.227
+++ loncom/interface/londocs.pm 2006/05/30 12:46:09 1.228
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.227 2006/05/12 16:47:35 albertel Exp $
+# $Id: londocs.pm,v 1.228 2006/05/30 12:46:09 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -42,6 +42,8 @@ use HTML::Entities;
use GDBM_File;
use Apache::lonlocal;
use Cwd;
+use lib '/home/httpd/lib/perl/';
+use LONCAPA;
my $iconpath;
@@ -950,9 +952,9 @@ sub breadcrumbs {
if ($env{'form.markedcopy_url'}) {
&Apache::lonnet::logthis('Found '.$env{'form.markedcopy_url'});
$cpinfo='&markedcopy_url='.
- &Apache::lonnet::escape($env{'form.markedcopy_url'}).
+ &escape($env{'form.markedcopy_url'}).
'&markedcopy_title='.
- &Apache::lonnet::escape($env{'form.markedcopy_title'});
+ &escape($env{'form.markedcopy_title'});
}
while (@folders) {
my $folder=shift(@folders);
@@ -960,12 +962,12 @@ sub breadcrumbs {
if ($folderpath) {$folderpath.='&';}
$folderpath.=$folder.'&'.$foldername;
my $url='/adm/coursedocs?folderpath='.
- &Apache::lonnet::escape($folderpath);
+ &escape($folderpath);
&Apache::lonhtmlcommon::add_breadcrumb(
{'href'=>$url.$cpinfo,
- 'title'=>&Apache::lonnet::unescape($foldername),
+ 'title'=>&unescape($foldername),
'text'=>''.
- &Apache::lonnet::unescape($foldername).''
+ &unescape($foldername).''
});
@@ -1170,8 +1172,8 @@ sub editor {
foreach (split(/\&/,$env{'form.importdetail'})) {
if (defined($_)) {
my ($name,$url)=split(/\=/,$_);
- $name=&Apache::lonnet::unescape($name);
- $url=&Apache::lonnet::unescape($url);
+ $name=&unescape($name);
+ $url=&unescape($url);
push @imports, $name, $url;
}
}
@@ -1324,14 +1326,14 @@ sub process_file_upload {
method="post" enctype="multipart/form-data">
-
+
';
$$upload_output .= 'Upload embedded files:
';
foreach my $embed_file (keys(%{$allfiles})) {
$$upload_output .= ''.$embed_file.
'
- ';
+ ';
my $attrib;
if (@{$$allfiles{$embed_file}} > 1) {
$attrib = join(':',@{$$allfiles{$embed_file}});
@@ -1342,7 +1344,7 @@ sub process_file_upload {
'';
if (exists($$codebase{$embed_file})) {
$$upload_output .=
- '';
+ '';
}
$$upload_output .= ' |
';
$num ++;
@@ -1385,7 +1387,7 @@ sub entryline {
my ($index,$title,$url,$folder,$allowed,$residx,$coursenum)=@_;
$title=~s/\&colon\;/\:/g;
$title=&HTML::Entities::encode(&HTML::Entities::decode(
- &Apache::lonnet::unescape($title)),'"<>&\'');
+ &unescape($title)),'"<>&\'');
my $renametitle=$title;
my $foldertitle=$title;
my $pagetitle=$title;
@@ -1405,21 +1407,21 @@ sub entryline {
my $folderpath;
if ($env{'form.folderpath'}) {
$container = 'sequence';
- $folderpath=&Apache::lonnet::escape($env{'form.folderpath'});
+ $folderpath=&escape($env{'form.folderpath'});
# $htmlfoldername=&HTML::Entities::encode($env{'form.foldername'},'<>&"');
}
my ($pagepath,$pagesymb);
if ($env{'form.pagepath'}) {
$container = 'page';
- $pagepath=&Apache::lonnet::escape($env{'form.pagepath'});
- $pagesymb=&Apache::lonnet::escape($env{'form.pagesymb'});
+ $pagepath=&escape($env{'form.pagepath'});
+ $pagesymb=&escape($env{'form.pagesymb'});
}
my $cpinfo='';
if ($env{'form.markedcopy_url'}) {
$cpinfo='&markedcopy_url='.
- &Apache::lonnet::escape($env{'form.markedcopy_url'}).
+ &escape($env{'form.markedcopy_url'}).
'&markedcopy_title='.
- &Apache::lonnet::escape($env{'form.markedcopy_title'});
+ &escape($env{'form.markedcopy_title'});
}
if ($allowed) {
my $incindex=$index+1;
@@ -1577,21 +1579,21 @@ END
} elsif ($url=~m|^/ext/|) {
$url='/adm/wrapper'.$url;
}
- $url.=(($url=~/\?/)?'&':'?').'symb='.&Apache::lonnet::escape($symb);
+ $url.=(($url=~/\?/)?'&':'?').'symb='.&escape($symb);
if ($container eq 'page') {
my $symb=$env{'form.pagesymb'};
$url=&Apache::lonnet::clutter((&Apache::lonnet::decode_symb($symb))[2]);
- $url.=(($url=~/\?/)?'&':'?').'symb='.&Apache::lonnet::escape($symb);
+ $url.=(($url=~/\?/)?'&':'?').'symb='.&escape($symb);
}
}
my $parameterset=' ';
if ($isfolder || $extension eq 'sequence') {
- my $foldername=&Apache::lonnet::escape($foldertitle);
+ my $foldername=&escape($foldertitle);
my $folderpath=$env{'form.folderpath'};
if ($folderpath) { $folderpath.='&' };
$folderpath.=$folderarg.'&'.$foldername;
- $url.='folderpath='.&Apache::lonnet::escape($folderpath).$cpinfo;
+ $url.='folderpath='.&escape($folderpath).$cpinfo;
$parameterset='