Diff for /loncom/interface/loncommon.pm between versions 1.547 and 1.548

version 1.547, 2007/07/07 00:53:24 version 1.548, 2007/07/11 20:32:15
Line 4939  sub simple_error_page { Line 4939  sub simple_error_page {
     }      }
 }  }
   
   =pod
   
   =item * &inhibit_menu_check($arg)
   
   Checks for a inhibitmenu state and generates output to preserve it
   
   Inputs:         $arg - can be any of
                        - undef - in which case the return value is a string 
                                  to add  into arguments list of a uri
                        - 'input' - in which case the return value is a HTML
                                    <form> <input> field of type hidden to
                                    preserve the value
                        - a url - in which case the return value is the url with
                                  the neccesary cgi args added to preserve the
                                  inhibitmenu state
                        - a ref to a url - no return value, but the string is
                                           updated to include the neccessary cgi
                                           args to preserve the inhibitmenu state
   
   =cut
   
   sub inhibit_menu_check {
       my ($arg) = @_;
       &get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']);
       if ($arg eq 'input') {
    if ($env{'form.inhibitmenu'}) {
       return '<input type="hidden" name="inhibitmenu" value="'.$env{'form.inhibitmenu'}.'" />';
    } else {
       return
    }
       }
       if ($env{'form.inhibitmenu'}) {
    if (ref($arg)) {
       $$arg .= '?inhibitmenu='.$env{'form.inhibitmenu'};
    } elsif ($arg eq '') {
       $arg .= 'inhibitmenu='.$env{'form.inhibitmenu'};
    } else {
       $arg .= '?inhibitmenu='.$env{'form.inhibitmenu'};
    }
       }
       if (!ref($arg)) {
    return $arg;
       }
   }
   
 ###############################################  ###############################################
   
 =pod  =pod

Removed from v.1.547  
changed lines
  Added in v.1.548


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>