[LON-CAPA-cvs] cvs: loncom /interface loncommon.pm /publisher lonpubdir.pm

www www at source.lon-capa.org
Tue Oct 25 18:04:20 EDT 2011


www		Tue Oct 25 22:04:20 2011 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
    /loncom/publisher	lonpubdir.pm 
  Log:
  Bug #1320
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1023 loncom/interface/loncommon.pm:1.1024
--- loncom/interface/loncommon.pm:1.1023	Mon Oct 24 22:02:41 2011
+++ loncom/interface/loncommon.pm	Tue Oct 25 22:04:16 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.1023 2011/10/24 22:02:41 www Exp $
+# $Id: loncommon.pm,v 1.1024 2011/10/25 22:04:16 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4546,13 +4546,15 @@
 
 sub authorspace {
     my $caname = '';
+    my $cadom = '';
     if ($env{'request.role'} =~ /^ca|^aa/) {
-        (undef,$caname) =
+        ($cadom,$caname) =
             ($env{'request.role'}=~/($match_domain)\/($match_username)$/);
     } else {
         $caname = $env{'user.name'};
+        $cadom = $env{'user.domain'};
     }
-    return '/priv/'.$caname.'/';
+    return '/priv/'.$cadom.'/'.$caname.'/';
 }
 
 ##############################################
@@ -4610,7 +4612,7 @@
         .'<b>'.&mt('Construction Space:').'</b> '
         .'<form name="dirs" method="post" action="'.$formaction
         .'" 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) {
         $output .=
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.131 loncom/publisher/lonpubdir.pm:1.132
--- loncom/publisher/lonpubdir.pm:1.131	Sat Oct 22 15:16:20 2011
+++ loncom/publisher/lonpubdir.pm	Tue Oct 25 22:04:20 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.131 2011/10/22 15:16:20 www Exp $
+# $Id: lonpubdir.pm,v 1.132 2011/10/25 22:04:20 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -138,7 +138,7 @@
     &Apache::loncommon::content_type($r,'text/html');
     $r->send_http_header;
 
-    my $formaction='/priv/'.$uname.$thisdisfn.'/';
+    my $formaction='/priv'.$thisdisfn.'/';
     $formaction=~s|/+|/|g;
     &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction);
 
@@ -150,7 +150,7 @@
     # breadcrumbs (and tools) will be created 
     # in start_page->bodytag->innerregister
 
-    $env{'request.noversionuri'}='/priv/'.$udom.'/'.$uname.$thisdisfn.'/';
+    $env{'request.noversionuri'}=$formaction;
     $r->print(&Apache::loncommon::start_page('Construction Space',undef));
 
     $r->print(&Apache::loncommon::head_subbox(
@@ -164,7 +164,7 @@
 top.document.title = '$esc_thisdisfn/ - $doctitle';
 // Store directory location for menu bar to find
 
-parent.lastknownpriv='/priv/$udom/$uname$esc_thisdisfn/';
+parent.lastknownpriv='/priv$esc_thisdisfn/';
 
 // Confirmation dialogues
 
@@ -319,7 +319,7 @@
             <option value="printdir">$lt{'prnt'}</option>
             <option value="delete">$lt{'dedr'}</option>
         </select>
-        <input type="hidden" name="filename" value="/priv/$udom/$uname$thisdisfn/" />
+        <input type="hidden" name="filename" value="/priv$thisdisfn/" />
       </fieldset>
     </form>
     <form name="publishdir" method="post" action="/adm/publish" target="_parent">
@@ -335,7 +335,7 @@
     <form name="upublisher" enctype="multipart/form-data" method="post" action="/adm/upload" target="_parent">
       <fieldset>
         <legend>$lt{'updc'}</legend>
-        <input type="hidden" name="filename" value="/priv/$udom/$uname$thisdisfn/" />
+        <input type="hidden" name="filename" value="/priv$thisdisfn/" />
         <input type="file" name="upfile" size="20" />
         <input type="button" value="$lt{'uplo'}"  onclick="checkUpload(this.form)" />
       </fieldset>
@@ -347,7 +347,7 @@
       <fieldset>
               <legend>$lt{'crea'}</legend>
 	      <span class="LC_nobreak">
-		<input type="hidden" name="filename" value="/priv/$udom/$uname$thisdisfn/" />
+		<input type="hidden" name="filename" value="/priv$thisdisfn/" />
                   <script type="text/javascript">
                     function validate_go() {
                         var selected = document.fileaction.action.selectedIndex;




More information about the LON-CAPA-cvs mailing list