@@ -5392,50 +4517,22 @@ END_BLOCK
###############################################
sub check_ip_acc {
- my ($acc,$clientip)=@_;
+ my ($acc)=@_;
&Apache::lonxml::debug("acc is $acc");
if (!defined($acc) || $acc =~ /^\s*$/ || $acc =~/^\s*no\s*$/i) {
return 1;
}
my $allowed=0;
- my $ip;
- if (($ENV{'REMOTE_ADDR'} eq '127.0.0.1') ||
- ($ENV{'REMOTE_ADDR'} eq &Apache::lonnet::get_host_ip($Apache::lonnet::perlvar{'lonHostID'}))) {
- $ip = $env{'request.host'} || $ENV{'REMOTE_ADDR'} || $clientip;
- } else {
- my $remote_ip = &Apache::lonnet::get_requestor_ip();
- $ip = $remote_ip || $env{'request.host'} || $clientip;
- }
+ my $ip=$env{'request.host'} || $ENV{'REMOTE_ADDR'};
my $name;
- my %access = (
- allowfrom => 1,
- denyfrom => 0,
- );
- my @allows;
- my @denies;
- foreach my $item (split(',',$acc)) {
- $item =~ s/^\s*//;
- $item =~ s/\s*$//;
- if ($item =~ /^\!(.+)$/) {
- push(@denies,$1);
- } else {
- push(@allows,$item);
- }
- }
- my $numdenies = scalar(@denies);
- my $numallows = scalar(@allows);
- my $count = 0;
- foreach my $pattern (@denies,@allows) {
- $count ++;
- my $acctype = 'allowfrom';
- if ($count <= $numdenies) {
- $acctype = 'denyfrom';
- }
+ foreach my $pattern (split(',',$acc)) {
+ $pattern =~ s/^\s*//;
+ $pattern =~ s/\s*$//;
if ($pattern =~ /\*$/) {
#35.8.*
$pattern=~s/\*//;
- if ($ip =~ /^\Q$pattern\E/) { $allowed=$access{$acctype}; }
+ if ($ip =~ /^\Q$pattern\E/) { $allowed=1; }
} elsif ($pattern =~ /(\d+\.\d+\.\d+)\.\[(\d+)-(\d+)\]$/) {
#35.8.3.[34-56]
my $low=$2;
@@ -5443,7 +4540,7 @@ sub check_ip_acc {
$pattern=$1;
if ($ip =~ /^\Q$pattern\E/) {
my $last=(split(/\./,$ip))[3];
- if ($last <=$high && $last >=$low) { $allowed=$access{$acctype}; }
+ if ($last <=$high && $last >=$low) { $allowed=1; }
}
} elsif ($pattern =~ /^\*/) {
#*.msu.edu
@@ -5453,10 +4550,10 @@ sub check_ip_acc {
my $netaddr=inet_aton($ip);
($name)=gethostbyaddr($netaddr,AF_INET);
}
- if ($name =~ /\Q$pattern\E$/i) { $allowed=$access{$acctype}; }
+ if ($name =~ /\Q$pattern\E$/i) { $allowed=1; }
} elsif ($pattern =~ /\d+\.\d+\.\d+\.\d+/) {
#127.0.0.1
- if ($ip =~ /^\Q$pattern\E/) { $allowed=$access{$acctype}; }
+ if ($ip =~ /^\Q$pattern\E/) { $allowed=1; }
} else {
#some.name.com
if (!defined($name)) {
@@ -5464,16 +4561,9 @@ sub check_ip_acc {
my $netaddr=inet_aton($ip);
($name)=gethostbyaddr($netaddr,AF_INET);
}
- if ($name =~ /\Q$pattern\E$/i) { $allowed=$access{$acctype}; }
- }
- if ($allowed =~ /^(0|1)$/) { last; }
- }
- if ($allowed eq '') {
- if ($numdenies && !$numallows) {
- $allowed = 1;
- } else {
- $allowed = 0;
+ if ($name =~ /\Q$pattern\E$/i) { $allowed=1; }
}
+ if ($allowed) { last; }
}
return $allowed;
}
@@ -5529,39 +4619,23 @@ sub get_domainconf {
if (keys(%{$domconfig{'login'}})) {
foreach my $key (keys(%{$domconfig{'login'}})) {
if (ref($domconfig{'login'}{$key}) eq 'HASH') {
- if (($key eq 'loginvia') || ($key eq 'headtag')) {
- if (ref($domconfig{'login'}{$key}) eq 'HASH') {
- foreach my $hostname (keys(%{$domconfig{'login'}{$key}})) {
- if (ref($domconfig{'login'}{$key}{$hostname}) eq 'HASH') {
- if ($key eq 'loginvia') {
- if ($domconfig{'login'}{'loginvia'}{$hostname}{'server'}) {
- my $server = $domconfig{'login'}{'loginvia'}{$hostname}{'server'};
- $designhash{$udom.'.login.loginvia'} = $server;
- if ($domconfig{'login'}{'loginvia'}{$hostname}{'serverpath'} eq 'custom') {
- $designhash{$udom.'.login.loginvia_'.$hostname} = $server.':'.$domconfig{'login'}{'loginvia'}{$hostname}{'custompath'};
- } else {
- $designhash{$udom.'.login.loginvia_'.$hostname} = $server.':'.$domconfig{'login'}{'loginvia'}{$hostname}{'serverpath'};
- }
+ if ($key eq 'loginvia') {
+ if (ref($domconfig{'login'}{'loginvia'}) eq 'HASH') {
+ foreach my $hostname (keys(%{$domconfig{'login'}{'loginvia'}})) {
+ if (ref($domconfig{'login'}{'loginvia'}{$hostname}) eq 'HASH') {
+ if ($domconfig{'login'}{'loginvia'}{$hostname}{'server'}) {
+ my $server = $domconfig{'login'}{'loginvia'}{$hostname}{'server'};
+ $designhash{$udom.'.login.loginvia'} = $server;
+ if ($domconfig{'login'}{'loginvia'}{$hostname}{'serverpath'} eq 'custom') {
+
+ $designhash{$udom.'.login.loginvia_'.$hostname} = $server.':'.$domconfig{'login'}{'loginvia'}{$hostname}{'custompath'};
+ } else {
+ $designhash{$udom.'.login.loginvia_'.$hostname} = $server.':'.$domconfig{'login'}{'loginvia'}{$hostname}{'serverpath'};
}
- } elsif ($key eq 'headtag') {
- if ($domconfig{'login'}{'headtag'}{$hostname}{'url'}) {
- $designhash{$udom.'.login.headtag_'.$hostname} = $domconfig{'login'}{'headtag'}{$hostname}{'url'};
+ if ($domconfig{'login'}{'loginvia'}{$hostname}{'exempt'}) {
+ $designhash{$udom.'.login.loginvia_exempt_'.$hostname} = $domconfig{'login'}{'loginvia'}{$hostname}{'exempt'};
}
}
- if ($domconfig{'login'}{$key}{$hostname}{'exempt'}) {
- $designhash{$udom.'.login.'.$key.'_exempt_'.$hostname} = $domconfig{'login'}{$key}{$hostname}{'exempt'};
- }
- }
- }
- }
- } elsif ($key eq 'saml') {
- if (ref($domconfig{'login'}{$key}) eq 'HASH') {
- foreach my $host (keys(%{$domconfig{'login'}{$key}})) {
- if (ref($domconfig{'login'}{$key}{$host}) eq 'HASH') {
- $designhash{$udom.'.login.'.$key.'_'.$host} = 1;
- foreach my $item ('text','img','alt','url','title','window','notsso') {
- $designhash{$udom.'.login.'.$key.'_'.$item.'_'.$host} = $domconfig{'login'}{$key}{$host}{$item};
- }
}
}
}
@@ -5629,7 +4703,7 @@ sub get_legacy_domconf {
my $designdir=$Apache::lonnet::perlvar{'lonTabDir'}.'/lonDomColors';
my $designfile = $designdir.'/'.$udom.'.tab';
if (-e $designfile) {
- if ( open (my $fh,'<',$designfile) ) {
+ if ( open (my $fh,"<$designfile") ) {
while (my $line = <$fh>) {
next if ($line =~ /^\#/);
chomp($line);
@@ -5669,12 +4743,8 @@ sub domainlogo {
&Apache::lonnet::repcopy($local_name);
}
$imgsrc = &lonhttpdurl($imgsrc);
- }
- my $alttext = $domain;
- if ($designhash{$domain.'.login.alttext_domlogo'} ne '') {
- $alttext = $designhash{$domain.'.login.alttext_domlogo'};
- }
- return '
';
+ }
+ return '
';
} elsif (defined(&Apache::lonnet::domain($domain,'description'))) {
return &Apache::lonnet::domain($domain,'description');
} else {
@@ -5731,7 +4801,7 @@ sub designparm {
Inputs: $url (usually will be undef).
-Returns: Path to Authoring Space containing the resource or
+Returns: Path to Construction Space containing the resource or
directory being viewed (or for which action is being taken).
If $url is provided, and begins /priv/
/
the path will be that portion of the $context argument.
@@ -5792,18 +4862,14 @@ sub head_subbox {
Input: (optional) filename from which breadcrumb trail is built.
In most cases no input as needed, as $env{'request.filename'}
is appropriate for use in building the breadcrumb trail.
- frameset flag
- If page header is being requested for use in a frameset, then
- the second (option) argument -- frameset will be true, and
- the target attribute set for links should be target="_parent".
Returns: HTML div with CSTR path and recent box
- To be included on Authoring Space pages
+ To be included on Construction Space pages
=cut
sub CSTR_pageheader {
- my ($trailfile,$frameset) = @_;
+ my ($trailfile) = @_;
if ($trailfile eq '') {
$trailfile = $env{'request.filename'};
}
@@ -5813,7 +4879,7 @@ sub CSTR_pageheader {
my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'};
my ($udom,$uname,$thisdisfn)=
- ($trailfile =~ m{^\Q$londocroot\E/priv/([^/]+)/([^/]+)(?:|/(.*))$});
+ ($trailfile =~ m{^\Q$londocroot\E/priv/([^/]+)/([^/]+)/(.*)$});
my $formaction = "/priv/$udom/$uname/$thisdisfn";
$formaction =~ s{/+}{/}g;
@@ -5826,21 +4892,13 @@ sub CSTR_pageheader {
$lastitem = $thisdisfn;
}
- my ($target,$crumbtarget) = (' target="_top"','_top');
- if ($frameset) {
- $target = ' target="_parent"';
- $crumbtarget = '_parent';
- } elsif (($env{'request.deeplink.login'}) && ($env{'request.deeplink.target'})) {
- $target = ' target="'.$env{'request.deeplink.target'}.'"';
- $crumbtarget = $env{'request.deeplink.target'};
- }
-
my $output =
''
.&Apache::loncommon::help_open_menu('','',3,'Authoring') #FIXME: Broken? Where is it?
- .''.&mt('Authoring Space:').' '
- .''
- .&Apache::lonmenu::constspaceform($frameset)
+ .&Apache::lonmenu::constspaceform()
.'
';
return $output;
@@ -5896,47 +4954,11 @@ Inputs:
=item * $bgcolor, used to override the bgcolor on a webpage to a specific value
-=item * $no_inline_link, if true and in remote mode, don't show the
- 'Switch To Inline Menu' link
-
=item * $args, optional argument valid values are
no_auto_mt_title -> prevents &mt()ing the title arg
- use_absolute -> for external resource or syllabus, this will
- contain https:// if server uses
- https (as per hosts.tab), but request is for http
- hostname -> hostname, from $r->hostname().
-
-=item * $advtoolsref, optional argument, ref to an array containing
- inlineremote items to be added in "Functions" menu below
- breadcrumbs.
-
-=item * $ltiscope, optional argument, will be one of: resource, map or
- course, if LON-CAPA is in LTI Provider context. Value is
- the scope of use, i.e., launch was for access to a single, a map
- or the entire course.
-
-=item * $ltiuri, optional argument, if LON-CAPA is in LTI Provider
- context, this will contain the URL for the landing item in
- the course, after launch from an LTI Consumer
-
-=item * $ltimenu, optional argument, if LON-CAPA is in LTI Provider
- context, this will contain a reference to hash of items
- to be included in the page header and/or inline menu.
-
-=item * $menucoll, optional argument, if specific menu collection is in
- effect, either set as the default for the course, or set for
- the deeplink paramater for $env{'request.deeplink.login'}
- then $menucoll will be the number of that collection.
-
-=item * $menuref, optional argument, reference to a hash, containing the
- menu options included for the menu in effect, based on the
- configuration for the numbered menu collection in use.
-
-=item * $showncrumbsref, reference to a scalar. Calls to lonmenu::innerregister
- within &bodytag() can result in calls to lonhtmlcommon::breadcrumbs(),
- if so, $showncrumbsref is set there to 1, and will propagate back
- via &bodytag() to &start_page(), to prevent lonhtmlcommon::breadcrumbs()
- being called a second time.
+ inherit_jsmath -> when creating popup window in a page,
+ should it have jsmath forced on by the
+ current page
=back
@@ -5949,8 +4971,7 @@ other decorations will be returned.
sub bodytag {
my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,
- $no_nav_bar,$bgcolor,$no_inline_link,$args,$advtoolsref,
- $ltiscope,$ltiuri,$ltimenu,$menucoll,$menuref,$showncrumbsref)=@_;
+ $no_nav_bar,$bgcolor,$args)=@_;
my $public;
if ((($env{'user.name'} eq 'public') && ($env{'user.domain'} eq 'public'))
@@ -5958,8 +4979,6 @@ sub bodytag {
$public = 1;
}
if (!$args->{'no_auto_mt_title'}) { $title = &mt($title); }
- my $httphost = $args->{'use_absolute'};
- my $hostname = $args->{'hostname'};
$function = &get_users_function() if (!$function);
my $img = &designparm($function.'.img',$domain);
@@ -5975,43 +4994,20 @@ sub bodytag {
@design{keys(%$addentries)} = @$addentries{keys(%$addentries)};
# role and realm
- my ($role,$realm) = split(m{\./},$env{'request.role'},2);
- if ($realm) {
- $realm = '/'.$realm;
- }
- if ($role eq 'ca') {
+ my ($role,$realm) = split(/\./,$env{'request.role'},2);
+ if ($role eq 'ca') {
my ($rdom,$rname) = ($realm =~ m{^/($match_domain)/($match_username)$});
$realm = &plainname($rname,$rdom);
}
# realm
- my ($cid,$sec);
if ($env{'request.course.id'}) {
- $cid = $env{'request.course.id'};
- if ($env{'request.course.sec'}) {
- $sec = $env{'request.course.sec'};
- }
- } elsif ($realm =~ m{^/($match_domain)/($match_courseid)(?:|/(\w+))$}) {
- if (&Apache::lonnet::is_course($1,$2)) {
- $cid = $1.'_'.$2;
- $sec = $3;
- }
- }
- if ($cid) {
if ($env{'request.role'} !~ /^cr/) {
$role = &Apache::lonnet::plaintext($role,&course_type());
- } elsif ($role =~ m{^cr/($match_domain)/\1-domainconfig/(\w+)$}) {
- if ($env{'request.role.desc'}) {
- $role = $env{'request.role.desc'};
- } else {
- $role = &mt('Helpdesk[_1]',' '.$2);
- }
- } else {
- $role = (split(/\//,$role,4))[-1];
}
- if ($sec) {
- $role .= (' 'x2).'- '.&mt('section:').' '.$sec;
+ if ($env{'request.course.sec'}) {
+ $role .= (' 'x2).'- '.&mt('section:').' '.$env{'request.course.sec'};
}
- $realm = $env{'course.'.$cid.'.description'};
+ $realm = $env{'course.'.$env{'request.course.id'}.'.description'};
} else {
$role = &Apache::lonnet::plaintext($role);
}
@@ -6022,143 +5018,80 @@ sub bodytag {
# construct main body tag
my $bodytag = "".
- &Apache::lontexconvert::init_math_support();
-
- &get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']);
+ &Apache::lontexconvert::init_math_support($args->{'inherit_jsmath'});
- if (($bodyonly) || ($no_nav_bar) || ($env{'form.inhibitmenu'} eq 'yes')) {
+ if ($bodyonly) {
return $bodytag;
- }
+ }
+ my $name = &plainname($env{'user.name'},$env{'user.domain'});
if ($public) {
undef($role);
+ } else {
+ $name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'},
+ undef,'LC_menubuttons_link');
}
-
- my $showcrstitle = 1;
- if (($cid) && ($env{'request.lti.login'})) {
- if (ref($ltimenu) eq 'HASH') {
- unless ($ltimenu->{'role'}) {
- undef($role);
- }
- unless ($ltimenu->{'coursetitle'}) {
- $realm=' ';
- $showcrstitle = 0;
- }
- }
- } elsif (($cid) && ($menucoll)) {
- if (ref($menuref) eq 'HASH') {
- unless ($menuref->{'role'}) {
- undef($role);
- }
- unless ($menuref->{'crs'}) {
- $realm=' ';
- $showcrstitle = 0;
- }
- }
- }
-
+
my $titleinfo = ''.$title.'
';
#
# Extra info if you are the DC
my $dc_info = '';
- if (($env{'user.adv'}) && ($env{'request.course.id'}) && $showcrstitle &&
- (exists($env{'user.role.dc./'.$env{'course.'.$cid.'.domain'}.'/'}))) {
+ if ($env{'user.adv'} && exists($env{'user.role.dc./'.
+ $env{'course.'.$env{'request.course.id'}.
+ '.domain'}.'/'})) {
+ my $cid = $env{'request.course.id'};
$dc_info = $cid.' '.$env{'course.'.$cid.'.internal.coursecode'};
$dc_info =~ s/\s+$//;
}
- my $crstype;
- if ($cid) {
- $crstype = $env{'course.'.$cid.'.type'};
- } elsif ($args->{'crstype'}) {
- $crstype = $args->{'crstype'};
- }
-
- $role = '('.$role.')' if ($role && !$env{'browser.mobile'});
-
- if ($env{'request.state'} eq 'construct') { $forcereg=1; }
-
+ $role = '('.$role.')' if $role;
+ &get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']);
+ if ($no_nav_bar || $env{'form.inhibitmenu'} eq 'yes') {
+ return $bodytag;
+ }
- my $funclist;
- if (($env{'environment.remote'} eq 'on') && ($env{'request.state'} ne 'construct')) {
- $bodytag .= Apache::lonhtmlcommon::scripttag(Apache::lonmenu::utilityfunctions($httphost), 'start')."\n".
- Apache::lonmenu::serverform();
- my $forbodytag;
- &Apache::lonmenu::prepare_functions($env{'request.noversionuri'},
- $forcereg,$args->{'group'},
- $args->{'bread_crumbs'},
- $advtoolsref,'','',\$forbodytag);
- unless (ref($args->{'bread_crumbs'}) eq 'ARRAY') {
- $funclist = $forbodytag;
- }
- } else {
+ if ($env{'request.state'} eq 'construct') { $forcereg=1; }
# if ($env{'request.state'} eq 'construct') {
# $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls
# }
- $bodytag .= Apache::lonhtmlcommon::scripttag(
- Apache::lonmenu::utilityfunctions($httphost), 'start');
-
- unless ($args->{'no_primary_menu'}) {
- my ($left,$right) = Apache::lonmenu::primary_menu($crstype,$ltimenu,$menucoll,$menuref,
- $args->{'links_disabled'},
- $args->{'links_target'});
- if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) {
- if ($dc_info) {
- $dc_info = qq|$dc_info|;
- }
- $bodytag .= qq|$left $role
- $realm $dc_info
|;
- return $bodytag;
- }
- unless ($env{'request.symb'} =~ m/\.page___\d+___/) {
- $bodytag .= qq|$left $role
|;
- }
- $bodytag .= $right;
+ if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) {
+ if ($dc_info) {
+ $dc_info = qq|$dc_info|;
+ }
+ $bodytag .= qq|$name $role
+ $realm $dc_info
|;
+ return $bodytag;
+ }
- if ($dc_info) {
- $dc_info = &dc_courseid_toggle($dc_info);
- }
- $bodytag .= qq|$realm $dc_info
|;
+ unless ($env{'request.symb'} =~ m/\.page___\d+___/) {
+ $bodytag .= qq|$name $role
|;
}
- #if directed to not display the secondary menu, don't.
- if ($args->{'no_secondary_menu'}) {
- return $bodytag;
+ $bodytag .= Apache::lonhtmlcommon::scripttag(
+ Apache::lonmenu::utilityfunctions(), 'start');
+
+ $bodytag .= Apache::lonmenu::primary_menu();
+
+ if ($dc_info) {
+ $dc_info = &dc_courseid_toggle($dc_info);
}
+ $bodytag .= qq|$realm $dc_info
|;
+
#don't show menus for public users
if (!$public){
- unless ($args->{'no_inline_menu'}) {
- $bodytag .= Apache::lonmenu::secondary_menu($httphost,$ltiscope,$ltimenu,
- $args->{'no_primary_menu'},
- $menucoll,$menuref,
- $args->{'links_disabled'},
- $args->{'links_target'});
- }
+ $bodytag .= Apache::lonmenu::secondary_menu();
$bodytag .= Apache::lonmenu::serverform();
$bodytag .= Apache::lonhtmlcommon::scripttag('', 'end');
if ($env{'request.state'} eq 'construct') {
$bodytag .= &Apache::lonmenu::innerregister($forcereg,
- $args->{'bread_crumbs'},'','',$hostname,
- $ltiscope,$ltiuri,$showncrumbsref);
- } elsif ($forcereg) {
- $bodytag .= &Apache::lonmenu::innerregister($forcereg,undef,
- $args->{'group'},$args->{'hide_buttons'},
- $hostname,$ltiscope,$ltiuri,$showncrumbsref);
- } else {
- my $forbodytag;
- &Apache::lonmenu::prepare_functions($env{'request.noversionuri'},
- $forcereg,$args->{'group'},
- $args->{'bread_crumbs'},
- $advtoolsref,'',$hostname,
- \$forbodytag);
- unless (ref($args->{'bread_crumbs'}) eq 'ARRAY') {
- $bodytag .= $forbodytag;
- }
+ $args->{'bread_crumbs'});
+ } elsif ($forcereg) {
+ $bodytag .= &Apache::lonmenu::innerregister($forcereg);
}
}else{
# this is to seperate menu from content when there's no secondary
@@ -6168,54 +5101,6 @@ sub bodytag {
}
return $bodytag;
- }
-
-#
-# Top frame rendering, Remote is up
-#
-
- my $imgsrc = $img;
- if ($img =~ /^\/adm/) {
- $imgsrc = &lonhttpdurl($img);
- }
- my $upperleft='';
-
- my $help=($no_inline_link?''
- :&Apache::loncommon::top_nav_help('Help'));
-
- # Explicit link to get inline menu
- my $menu= ($no_inline_link?''
- :''.&mt('Switch to Inline Menu Mode').'');
-
- if ($dc_info) {
- $dc_info = qq|($dc_info)|;
- }
-
- my $name = &plainname($env{'user.name'},$env{'user.domain'});
- unless ($public) {
- $name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'},
- undef,'LC_menubuttons_link');
- }
-
- unless ($env{'form.inhibitmenu'}) {
- $bodytag .= qq|$name $role
- $realm $dc_info
|;
- }
- if ($env{'request.state'} eq 'construct') {
- if (!$public){
- if ($env{'request.state'} eq 'construct') {
- $funclist = &Apache::lonhtmlcommon::scripttag(
- &Apache::lonmenu::utilityfunctions($httphost), 'start').
- &Apache::lonhtmlcommon::scripttag('','end').
- &Apache::lonmenu::innerregister($forcereg,
- $args->{'bread_crumbs'});
- }
- }
- }
- return $bodytag."\n".$funclist;
}
sub dc_courseid_toggle {
@@ -6247,19 +5132,12 @@ sub make_attr_string {
delete($attr_ref->{$key});
}
}
- if ($env{'environment.remote'} eq 'on') {
- $attr_ref->{'onload'} =
- &Apache::lonmenu::loadevents(). $on_load;
- $attr_ref->{'onunload'}=
- &Apache::lonmenu::unloadevents().$on_unload;
- } else {
- $attr_ref->{'onload'} = $on_load;
- $attr_ref->{'onunload'}= $on_unload;
- }
+ $attr_ref->{'onload'} = $on_load;
+ $attr_ref->{'onunload'}= $on_unload;
}
my $attr_string;
- foreach my $attr (sort(keys(%$attr_ref))) {
+ foreach my $attr (keys(%$attr_ref)) {
$attr_string .= " $attr=\"".$attr_ref->{$attr}.'" ';
}
return $attr_string;
@@ -6285,44 +5163,12 @@ i.e., $env{'internal.head.redirect'} exi
sub endbodytag {
my ($args) = @_;
- my $endbodytag;
- unless ((ref($args) eq 'HASH') && ($args->{'notbody'})) {
- $endbodytag='';
- }
+ my $endbodytag='