[LON-CAPA-cvs] cvs: loncom /interface lonhelpmenu.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 26 Jun 2006 22:13:13 -0000
albertel Mon Jun 26 18:13:13 2006 EDT
Modified files:
/loncom/interface lonhelpmenu.pm
Log:
- eliminate unneeded function passing
Index: loncom/interface/lonhelpmenu.pm
diff -u loncom/interface/lonhelpmenu.pm:1.28 loncom/interface/lonhelpmenu.pm:1.29
--- loncom/interface/lonhelpmenu.pm:1.28 Mon Jun 26 18:09:01 2006
+++ loncom/interface/lonhelpmenu.pm Mon Jun 26 18:13:13 2006
@@ -37,7 +37,7 @@
sub handler {
my ($r) = @_;
- &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['page','function','faq','bug','topic','component_help','origurl','stayonpage']);
+ &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['page','faq','bug','topic','component_help','origurl','stayonpage']);
&Apache::loncommon::content_type($r,'text/html');
$r->send_http_header;
@@ -47,7 +47,6 @@
my $faq = $env{'form.faq'};
my $bug = $env{'form.bug'};
my $topic = $env{'form.topic'};
- my $function = $env{'form.function'};
my $component_help = $env{'form.component_help'};
my $origurl = $env{'form.origurl'};
my $stayOnPage = $env{'form.stayonpage'};
@@ -63,15 +62,15 @@
my $faqbaseurl = $Apache::lonnet::perlvar{'FAQHost'};
my $requestmail = $Apache::lonnet::perlvar{'lonSupportEMail'};
if ($env{'form.page'} eq 'banner') {
- &display_help_banner($r,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage);
+ &display_help_banner($r,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage);
} elsif ($env{'form.page'} eq 'body') {
- &display_help_mainpage($r,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail);
+ &display_help_mainpage($r,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail);
}
return OK;
}
sub display_help_banner {
- my ($r,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage) = @_;
+ my ($r,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail,$stayOnPage) = @_;
my $location=&Apache::loncommon::lonhttpdurl("/adm");
my $scripttag = '';
if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) {
@@ -84,7 +83,7 @@
actiontype = parent.bodyframe.document.logproblem.action.value;
}
catch(error) {
- parent.bodyframe.location = "/adm/support?origurl=$displayurl&function=$function";
+ parent.bodyframe.location = "/adm/support?origurl=$displayurl";
return;
}
if (actiontype) {
@@ -99,7 +98,7 @@
return;
}
}
- parent.bodyframe.location = "/adm/support?origurl=$displayurl&function=$function";
+ parent.bodyframe.location = "/adm/support?origurl=$displayurl";
return;
}
}
@@ -138,8 +137,7 @@
'marginheight' => "1");
my $start_page =
&Apache::loncommon::start_page('',$scripttag,
- {'function' => $function,
- 'add_entries' => \%body_layout,
+ {'add_entries' => \%body_layout,
'only_body' => 1,});
$r->print($start_page);
@@ -200,7 +198,7 @@
}
sub display_help_mainpage {
- my ($r,$function,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail) = @_;
+ my ($r,$faq,$bug,$topic,$component_url,$origurl,$bugurl,$faqbaseurl,$requestmail) = @_;
my %lt =&Apache::lonlocal::texthash(
'topp' => 'Topic Page',
@@ -227,8 +225,7 @@
'marginheight' => "0");
my $start_page =
&Apache::loncommon::start_page('Help Content',undef,
- {'function' => $function,
- 'add_entries' => \%body_layout,
+ {'add_entries' => \%body_layout,
'only_body' => 1,});
$r->print($start_page);
$r->print($lt{'chen'});
@@ -257,7 +254,7 @@
if ($requestmail =~ m/^[^\@]+\@[^\@]+$/) {
$r->print("
<ul>
- <li><a href=\"/adm/support?origurl=".&escape($origurl)."&function=$function\">$lt{'cont'}</a></li>
+ <li><a href=\"/adm/support?origurl=".&escape($origurl)."\">$lt{'cont'}</a></li>
</ul>
<p>$lt{'suhr'}");
unless ($env{'user.adv'}) {