Avoid one notice when creating a new glossary.

This commit is contained in:
stronk7 2004-08-08 18:31:09 +00:00
parent 33f48f030e
commit 48429e57e6

View 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();