[LON-CAPA-cvs] cvs: loncom /publisher loncfile.pm

www lon-capa-cvs-allow@mail.lon-capa.org
Tue, 27 May 2008 17:33:28 -0000


www		Tue May 27 13:33:28 2008 EDT

  Modified files:              
    /loncom/publisher	loncfile.pm 
  Log:
  Bug #2075: Get rid of "done" (or at least forward immediately)
  
  
Index: loncom/publisher/loncfile.pm
diff -u loncom/publisher/loncfile.pm:1.88 loncom/publisher/loncfile.pm:1.89
--- loncom/publisher/loncfile.pm:1.88	Tue Mar 11 22:46:38 2008
+++ loncom/publisher/loncfile.pm	Tue May 27 13:33:28 2008
@@ -9,7 +9,7 @@
 #  and displays a page showing the results of the action.
 #
 #
-# $Id: loncfile.pm,v 1.88 2008/03/12 02:46:38 raeburn Exp $
+# $Id: loncfile.pm,v 1.89 2008/05/27 17:33:28 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -109,6 +109,17 @@
     }
 }
 
+sub done {
+   my ($url)=@_;
+   my $done=&mt("Done");
+   return(<<ENDDONE);
+<a href="$url">$done</a>
+<script type="text/javascript">
+location.href="$url";
+</script>
+ENDDONE
+}
+
 =pod
 
 =item URLToPath($url)
@@ -435,7 +446,7 @@
 
 sub CloseForm2 {
     my ($request, $user, $fn) = @_;
-    $request->print('<h3><a href="'.&url($fn).'/">'.&mt('Done').'</a></h3>');
+    $request->print(&done(&url($fn)));
 }
 
 =pod
@@ -1256,7 +1267,7 @@
             $r->print('<h3><a href="'.&url($dest).'">'.&mt('Return to Directory').'</a></h3>');
             $r->print('<h3><a href="'.&url($dest_newname).'">'.$disp_newname.'</a></h3>');
         } else {
-	    $r->print('<h3><a href="'.&url($dest).'">'.&mt('Done').'</a></h3>');
+	    $r->print(&done(&url($dest)));
 	}
     }
 }