]> git.mjollnir.org Git - moodle.git/commitdiff
Now action is checked and defaults to edit.
authorstronk7 <stronk7>
Sat, 28 Aug 2004 11:13:48 +0000 (11:13 +0000)
committerstronk7 <stronk7>
Sat, 28 Aug 2004 11:13:48 +0000 (11:13 +0000)
Thanks skodak!

Bug 1813
(http://moodle.org/bugs/bug.php?op=show&bugid=1813)

Merged from MOODLE_14_STABLE

mod/glossary/comment.php

index bb7c649ce3281ebfcc333ef090e63a695dc2d3b6..b8be1fd1c2b240f04b2ad404c8d785ed50dcf8ab 100644 (file)
@@ -8,7 +8,7 @@
     require_variable($eid);            // Entry ID
     optional_variable($cid,0);         // Comment ID
 
-    optional_variable($action,"add");     // Action to perform
+    optional_variable($action,"edit");     // Action to perform
     optional_variable($confirm,0);     // Confirm the action
 
     $action = strtolower($action);
     switch ( $action ){
         case "add":
             $straction = get_string("addingcomment","glossary");
-        break;
+            break;
         case "edit":
             $straction = get_string("editingcomment","glossary");
-        break;
+            break;
         case "delete":
             $straction = get_string("deletingcomment","glossary");
-        break;
+            break;
+        default:
+            $action = "edit";
+            $straction = get_string("editingcomment","glossary");
+            break;
     }
     $strglossaries = get_string("modulenameplural", "glossary");
     $strglossary = get_string("modulename", "glossary");