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

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 19 Jun 2003 20:23:39 -0000


albertel		Thu Jun 19 16:23:39 2003 EDT

  Modified files:              
    /loncom/publisher	loncfile.pm 
  Log:
  - defaults to creating a resource if 'Select Action' is left (BUG#1705)
  - change to use method POST rather than GET, (BUG#1520)
  
  
Index: loncom/publisher/loncfile.pm
diff -u loncom/publisher/loncfile.pm:1.29 loncom/publisher/loncfile.pm:1.30
--- loncom/publisher/loncfile.pm:1.29	Mon Mar 10 13:34:14 2003
+++ loncom/publisher/loncfile.pm	Thu Jun 19 16:23:39 2003
@@ -9,7 +9,7 @@
 #  and displays a page showing the results of the action.
 #
 #
-# $Id: loncfile.pm,v 1.29 2003/03/10 18:34:14 albertel Exp $
+# $Id: loncfile.pm,v 1.30 2003/06/19 20:23:39 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -412,7 +412,7 @@
    &Debug($request, "Cancel url is: ".$cancelurl);
    $request->print('<p><input type="submit" value="Continue" /></p></form>');
    $request->print('<form action="'.$cancelurl.
-		   '" method="GET"><p><input type="submit" value="Cancel" /></p></form>');
+		   '" method="POST"><p><input type="submit" value="Cancel" /></p></form>');
 
 }
 
@@ -792,9 +792,9 @@
 	&Debug($request, "Dest url is: ".$dest);
 	$request->print('</form>');
 	$request->print('<form action="'.$dest.
-			'" method="GET"><p><input type="submit" value="Continue" /></p></form>');
+			'" method="POST"><p><input type="submit" value="Continue" /></p></form>');
 	$request->print('<form action="'.$cancelurl.
-			'" method="GET"><p><input type="submit" value="Cancel" /></p></form>');
+			'" method="POST"><p><input type="submit" value="Cancel" /></p></form>');
     }
 }
 
@@ -865,7 +865,8 @@
 	    $ENV{'form.action'} eq 'newhtmlfile' ||
 	    $ENV{'form.action'} eq 'newproblemfile' ||
             $ENV{'form.action'} eq 'newpagefile' ||
-            $ENV{'form.action'} eq 'newsequencefile') {
+            $ENV{'form.action'} eq 'newsequencefile' ||
+            $ENV{'form.action'} eq 'Select Action') {
       if($ENV{'form.newfilename'}) {
 	  my $newfilename = $ENV{'form.newfilename'};
 	  if (!defined($dir)) {
@@ -1295,10 +1296,11 @@
 	   $ENV{'form.action'} eq 'newhtmlfile' ||
 	   $ENV{'form.action'} eq 'newproblemfile' ||
            $ENV{'form.action'} eq 'newpagefile' ||
-           $ENV{'form.action'} eq 'newsequencefile' ) {
+           $ENV{'form.action'} eq 'newsequencefile' ||
+           $ENV{'form.action'} eq 'Select Action' ) {
       $r->print('<h3>New Resource</h3>');
   } else {
-     $r->print('<p>Unknown Action</p></body></html>');
+     $r->print('<p>Unknown Action '.$ENV{'form.action'}.' </p></body></html>');
      return OK;  
   }
   if ($ENV{'form.phase'} eq 'two') {