Diff for /loncom/interface/loncommon.pm between versions 1.1021 and 1.1024

version 1.1021, 2011/10/17 12:41:30 version 1.1024, 2011/10/25 22:04:16
Line 4546  Returns: Path to the Construction Space Line 4546  Returns: Path to the Construction Space
   
 sub authorspace {  sub authorspace {
     my $caname = '';      my $caname = '';
       my $cadom = '';
     if ($env{'request.role'} =~ /^ca|^aa/) {      if ($env{'request.role'} =~ /^ca|^aa/) {
         (undef,$caname) =          ($cadom,$caname) =
             ($env{'request.role'}=~/($match_domain)\/($match_username)$/);              ($env{'request.role'}=~/($match_domain)\/($match_username)$/);
     } else {      } else {
         $caname = $env{'user.name'};          $caname = $env{'user.name'};
           $cadom = $env{'user.domain'};
     }      }
     return '/priv/'.$caname.'/';      return '/priv/'.$cadom.'/'.$caname.'/';
 }  }
   
 ##############################################  ##############################################
Line 4590  Returns: HTML div with CSTR path and rec Line 4592  Returns: HTML div with CSTR path and rec
 sub CSTR_pageheader {  sub CSTR_pageheader {
     # this is for resources; directories have customtitle, and crumbs      # this is for resources; directories have customtitle, and crumbs
             # and select recent are created in lonpubdir.pm                # and select recent are created in lonpubdir.pm  
     my ($uname,$thisdisfn)=      my ($udom,$uname,$thisdisfn)=
         ($env{'request.filename'} =~ m|^/home/([^/]+)/public_html/(.*)|);          ($env{'request.filename'} =~ m|^/home/httpd/html/priv/([^/]+)/([^/]+)/(.*)$|);
     my $formaction='/priv/'.$uname.'/'.$thisdisfn;      my $formaction='/priv/'.$udom.'/'.$uname.'/'.$thisdisfn;
     $formaction=~s/\/+/\//g;      $formaction=~s/\/+/\//g;
   
     my $parentpath = '';      my $parentpath = '';
Line 4610  sub CSTR_pageheader { Line 4612  sub CSTR_pageheader {
         .'<b>'.&mt('Construction Space:').'</b> '          .'<b>'.&mt('Construction Space:').'</b> '
         .'<form name="dirs" method="post" action="'.$formaction          .'<form name="dirs" method="post" action="'.$formaction
         .'" target="_top">' #FIXME lonpubdir: target="_parent"          .'" target="_top">' #FIXME lonpubdir: target="_parent"
         .&Apache::lonhtmlcommon::crumbs($uname.'/'.$parentpath,'_top','/priv',undef,undef);          .&Apache::lonhtmlcommon::crumbs($uname.'/'.$parentpath,'_top','/priv/'.$udom,undef,undef);
   
     if ($lastitem) {      if ($lastitem) {
         $output .=          $output .=
Line 8448  sub ask_for_embedded_content { Line 8450  sub ask_for_embedded_content {
         $getpropath = 1;          $getpropath = 1;
     } elsif (($actionurl eq '/adm/upload') || ($actionurl eq '/adm/testbank') ||      } elsif (($actionurl eq '/adm/upload') || ($actionurl eq '/adm/testbank') ||
              ($actionurl eq '/adm/imsimport')) {                ($actionurl eq '/adm/imsimport')) { 
         ($uname,my $rest) = ($args->{'current_path'} =~ m{/priv/($match_username)/?(.*)$});          my ($udom,$uname,$rest) = ($args->{'current_path'} =~ m{/priv/($match_domain)/($match_username)/?(.*)$});
         $url = '/home/'.$uname.'/public_html/';          $url = '/home/httpd/html/priv/'.$udom.'/'.$uname.'/';
         $toplevel = $url;          $toplevel = $url;
         if ($rest ne '') {          if ($rest ne '') {
             $url .= $rest;              $url .= $rest;
Line 8938  sub modify_html_refs { Line 8940  sub modify_html_refs {
         $container = $env{'form.primaryurl'};          $container = $env{'form.primaryurl'};
     } else {      } else {
         $container = $env{'form.filename'};          $container = $env{'form.filename'};
         $container =~ s{^/priv/(\Q$uname\E)/(.*)}{/home/$1/public_html/$2};  
     }      }
     my (%allfiles,%codebase,$output,$content);      my (%allfiles,%codebase,$output,$content);
     my @changes = &get_env_multiple('form.namechange');      my @changes = &get_env_multiple('form.namechange');

Removed from v.1.1021  
changed lines
  Added in v.1.1024


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