[LON-CAPA-cvs] cvs: loncom(version_2_10_X) /publisher loncfile.pm lonpubdir.pm lonpublisher.pm lonretrieve.pm lonupload.pm

raeburn raeburn at source.lon-capa.org
Mon Nov 7 08:38:45 EST 2011


raeburn		Mon Nov  7 13:38:45 2011 EDT

  Modified files:              (Branch: version_2_10_X)
    /loncom/publisher	loncfile.pm lonpubdir.pm lonpublisher.pm 
                     	lonretrieve.pm lonupload.pm 
  Log:
  - Fix Construction breadcrumb trails for /adm/cfile, /adm/publish,    
    /adm/retrieve, /adm/upload.
  
  
Index: loncom/publisher/loncfile.pm
diff -u loncom/publisher/loncfile.pm:1.106 loncom/publisher/loncfile.pm:1.106.2.1
--- loncom/publisher/loncfile.pm:1.106	Tue Mar  1 01:36:55 2011
+++ loncom/publisher/loncfile.pm	Mon Nov  7 13:38:45 2011
@@ -9,7 +9,7 @@
 #  and displays a page showing the results of the action.
 #
 #
-# $Id: loncfile.pm,v 1.106 2011/03/01 01:36:55 raeburn Exp $
+# $Id: loncfile.pm,v 1.106.2.1 2011/11/07 13:38:45 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1475,7 +1475,7 @@
 |;
 	$loaditem{'onload'} = "writeDone()";
     }
-    
+
     # Breadcrumbs
     &Apache::lonhtmlcommon::clear_breadcrumbs();
     &Apache::lonhtmlcommon::add_breadcrumb({
@@ -1493,7 +1493,7 @@
 					     {'add_entries' => \%loaditem,})
              .&Apache::lonhtmlcommon::breadcrumbs()
              .&Apache::loncommon::head_subbox(
-                  &Apache::loncommon::CSTR_pageheader())
+                  &Apache::loncommon::CSTR_pageheader($fn))
     );
   
     $r->print('<h3>'.&mt('Location').': '.&display($fn).'</h3>');
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.125 loncom/publisher/lonpubdir.pm:1.125.4.1
--- loncom/publisher/lonpubdir.pm:1.125	Wed Nov 18 20:48:06 2009
+++ loncom/publisher/lonpubdir.pm	Mon Nov  7 13:38:45 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.125 2009/11/18 20:48:06 droeschl Exp $
+# $Id: lonpubdir.pm,v 1.125.4.1 2011/11/07 13:38:45 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -218,7 +218,7 @@
     }
 
     $r->print(&Apache::loncommon::head_subbox(
-                &Apache::loncommon::CSTR_pageheader(1)));
+                &Apache::loncommon::CSTR_pageheader()));
 
     my $esc_thisdisfn = &Apache::loncommon::escape_single($thisdisfn);
     my $doctitle = 'LON-CAPA '.&mt('Construction Space');
Index: loncom/publisher/lonpublisher.pm
diff -u loncom/publisher/lonpublisher.pm:1.267 loncom/publisher/lonpublisher.pm:1.267.2.1
--- loncom/publisher/lonpublisher.pm:1.267	Wed Jun  2 19:09:42 2010
+++ loncom/publisher/lonpublisher.pm	Mon Nov  7 13:38:45 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Publication Handler
 #
-# $Id: lonpublisher.pm,v 1.267 2010/06/02 19:09:42 www Exp $
+# $Id: lonpublisher.pm,v 1.267.2.1 2011/11/07 13:38:45 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2191,7 +2191,7 @@
     $r->print(&Apache::loncommon::start_page('Resource Publication',$js)
              .&Apache::lonhtmlcommon::breadcrumbs()
              .&Apache::loncommon::head_subbox(
-                  &Apache::loncommon::CSTR_pageheader()) # FIXME crumbs broken?
+                  &Apache::loncommon::CSTR_pageheader($fn))
     );
 
 
Index: loncom/publisher/lonretrieve.pm
diff -u loncom/publisher/lonretrieve.pm:1.42 loncom/publisher/lonretrieve.pm:1.42.2.1
--- loncom/publisher/lonretrieve.pm:1.42	Tue Dec 14 16:26:04 2010
+++ loncom/publisher/lonretrieve.pm	Mon Nov  7 13:38:45 2011
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Handler to retrieve an old version of a file
 #
-# $Id: lonretrieve.pm,v 1.42 2010/12/14 16:26:04 www Exp $
+# $Id: lonretrieve.pm,v 1.42.2.1 2011/11/07 13:38:45 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -292,7 +292,7 @@
 
   my $r=shift;
 
-  my $fn;
+  my ($fn,$trailfile);
 
 
 # Get query string for limited number of parameters
@@ -330,6 +330,7 @@
   }
 
   $fn=~s{/~($LONCAPA::username_re)}{};
+  $trailfile = "/home/$uname/public_html".$fn;
 
   &Apache::loncommon::content_type($r,'text/html');
   $r->send_http_header;
@@ -348,7 +349,7 @@
   $r->print(&Apache::loncommon::start_page('Retrieve Published Resources')
            .&Apache::lonhtmlcommon::breadcrumbs()
            .&Apache::loncommon::head_subbox(
-                &Apache::loncommon::CSTR_pageheader()) # FIXME crumbs broken?
+                &Apache::loncommon::CSTR_pageheader($trailfile))
     );
 
   $r->print('<p>'
Index: loncom/publisher/lonupload.pm
diff -u loncom/publisher/lonupload.pm:1.53 loncom/publisher/lonupload.pm:1.53.2.1
--- loncom/publisher/lonupload.pm:1.53	Sun Dec 26 03:09:11 2010
+++ loncom/publisher/lonupload.pm	Mon Nov  7 13:38:45 2011
@@ -2,7 +2,7 @@
 # The LearningOnline Network with CAPA
 # Handler to upload files into construction space
 #
-# $Id: lonupload.pm,v 1.53 2010/12/26 03:09:11 raeburn Exp $
+# $Id: lonupload.pm,v 1.53.2.1 2011/11/07 13:38:45 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -503,13 +503,15 @@
 	return HTTP_NOT_ACCEPTABLE;
     }
     
-    my $fn;
+    my ($fn,$trailfile);
     if ($env{'form.filename'}) {
 	$fn=$env{'form.filename'};
 	$fn=~s/^https?\:\/\/[^\/]+\///;
 	$fn=~s/^\///;
 	$fn=~s{(~|priv/)($LONCAPA::username_re)}{};
 	$fn=~s/\/+/\//g;
+        $trailfile = "/home/$uname/public_html/".$trailfile;
+        $trailfile=~s{//+}{/}g;
     } else {
 	$r->log_reason($env{'user.name'}.' at '.$env{'user.domain'}.
 		       ' unspecified filename for upload', $r->filename); 
@@ -534,7 +536,7 @@
                                              $javascript,
                                              {'bread_crumbs' => $brcrum,})
              .&Apache::loncommon::head_subbox(
-                &Apache::loncommon::CSTR_pageheader())
+                &Apache::loncommon::CSTR_pageheader($trailfile))
     );
   
     if (($uname ne $env{'user.name'}) || ($udom ne $env{'user.domain'})) {




More information about the LON-CAPA-cvs mailing list