Diff for /loncom/xml/lonxml.pm between versions 1.548 and 1.549

version 1.548, 2014/06/21 23:36:05 version 1.549, 2014/07/27 11:20:13
Line 1751  sub handler { Line 1751  sub handler {
             }              }
  }   }
     }      }
       my $inhibit_menu;
     my %mystyle;      my %mystyle;
     my $result = '';      my $result = '';
     my $filecontents=&Apache::lonnet::getfile($file);      my $filecontents=&Apache::lonnet::getfile($file);
Line 1808  ENDNOTFOUND Line 1809  ENDNOTFOUND
     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
     ['rawmode']);      ['rawmode']);
     if ($env{'form.rawmode'}) { $result = $filecontents; }      if ($env{'form.rawmode'}) { $result = $filecontents; }
               if (($env{'request.state'} eq 'construct') &&
                   (($filetype eq 'css') || ($filetype eq 'js')) && ($ENV{'HTTP_REFERER'})) {
                   if ($ENV{'HTTP_REFERER'} =~ m{^https?\://[^\/]+/priv/$LONCAPA::match_domain/$LONCAPA::match_username/[^\?]+\.(x?html?|swf)(|\?)[^\?]*$}) {
                       $inhibit_menu = 1;
                   }
               }
             if (($filetype ne 'html') &&               if (($filetype ne 'html') && 
                 (!$env{'form.return_only_error_and_warning_counts'})) {                  (!$env{'form.return_only_error_and_warning_counts'}) &&
                   (!$inhibit_menu)) {
                 my $nochgview = 1;                  my $nochgview = 1;
                 my $controls = '';                  my $controls = '';
                     if ($env{'request.state'} eq 'construct') {                      if ($env{'request.state'} eq 'construct') {
Line 1847  ENDNOTFOUND Line 1855  ENDNOTFOUND
 #  #
 # Edit action? Insert editing commands  # Edit action? Insert editing commands
 #  #
     unless ($env{'request.state'} eq 'published') {      unless (($env{'request.state'} eq 'published') || ($inhibit_menu)) {
  if ($env{'form.editmode'} && (!($env{'form.viewmode'})) && (!($env{'form.discardview'})))   if ($env{'form.editmode'} && (!($env{'form.viewmode'})) && (!($env{'form.discardview'})))
  {   {
             my ($displayfile,$url,$symb,$itemtitle,$action);              my ($displayfile,$url,$symb,$itemtitle,$action);

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


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