Diff for /loncom/interface/lonmenu.pm between versions 1.354 and 1.356

version 1.354, 2011/10/24 23:29:33 version 1.356, 2011/10/31 13:44:30
Line 491  sub innerregister { Line 491  sub innerregister {
                     $uploaded = &is_course_upload($file,$cnum,$cdom);                      $uploaded = &is_course_upload($file,$cnum,$cdom);
                 }                  }
                 if (!$uploaded) {                  if (!$uploaded) {
                     $file=~s/^($match_domain)\/($match_username)/\/priv\/$1\/$2/;                   
                       $file=~s{^($match_domain)/($match_username)}{/priv/$1/$2};
   
                     # Check that the user has permission to edit this resource                      # Check that the user has permission to edit this resource
                     ($cfuname,$cfudom)=&Apache::loncacc::constructaccess($file);                      my $setpriv = 1;
                       ($cfuname,$cfudom)=&Apache::loncacc::constructaccess($file,$setpriv);
                     if (defined($cfudom)) {                      if (defined($cfudom)) {
         $home=&Apache::lonnet::homeserver($cfuname,$cfudom);          $home=&Apache::lonnet::homeserver($cfuname,$cfudom);
         my $allowed=0;          my $allowed=0;
Line 575  sub innerregister { Line 578  sub innerregister {
 # We are in construction space  # We are in construction space
 #  #
   
               my $londocroot = $Apache::lonnet::perlvar{'lonDocRoot'};
     my ($udom,$uname,$thisdisfn) =      my ($udom,$uname,$thisdisfn) =
  ($env{'request.filename'}=~m|^/home/httpd/html/priv/([^/]+)/([^/]+)/(.*)$|);   ($env{'request.filename'}=~m{^\Q$londocroot/priv/\E([^/]+)/([^/]+)/(.*)$});
             my $currdir = '/priv/'.$udom.'/'.$uname.'/'.$thisdisfn;              my $currdir = '/priv/'.$udom.'/'.$uname.'/'.$thisdisfn;
             if ($currdir =~ m-/$-) {              if ($currdir =~ m-/$-) {
                 $is_const_dir = 1;                  $is_const_dir = 1;

Removed from v.1.354  
changed lines
  Added in v.1.356


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