]> git.mjollnir.org Git - moodle.git/commitdiff
Avoid one notice when creating a new glossary.
authorstronk7 <stronk7>
Sun, 8 Aug 2004 18:31:09 +0000 (18:31 +0000)
committerstronk7 <stronk7>
Sun, 8 Aug 2004 18:31:09 +0000 (18:31 +0000)
mod/glossary/mod.html

index feb8614d81923bf232c0ee175374ef5b92afcbe8..49f2a4099d63a4c290132a187acc978c754e48ba 100644 (file)
@@ -241,8 +241,10 @@ if (!$mainglossary or $mainglossary->id == $form->instance ) {
         //get and update available formats
         $recformats = glossary_get_available_formats();
         //reload current format, because of it has changed (deleted format)
-        if ($currentglossary = get_record("glossary",'id',$form->id)) {
-            $form->displayformat = $currentglossary->displayformat;
+        if (isset($form->id)) {
+            if ($currentglossary = get_record("glossary",'id',$form->id)) {
+                $form->displayformat = $currentglossary->displayformat;
+            }
         }
     
         $formats = array();