Browse Source

Minor fixes when edit a forum inside a category

José Loguercio 9 years ago
parent
commit
b79a75a56f
1 changed files with 3 additions and 3 deletions
  1. 3 3
      main/forum/forumfunction.inc.php

+ 3 - 3
main/forum/forumfunction.inc.php

@@ -704,10 +704,10 @@ function store_forum($values, $courseInfo = array(), $returnId = false)
             'forum_image'=> $sql_image,
             'forum_comment'=> $values['forum_comment'],
             'forum_category'=> $values['forum_category'],
-            'allow_anonymous'=> $values['allow_anonymous_group']['allow_anonymous'],
+            'allow_anonymous'=> isset($values['allow_anonymous_group']['allow_anonymous']) ? $values['allow_anonymous_group']['allow_anonymous'] : null,
             'allow_edit'=> $values['students_can_edit_group']['students_can_edit'],
-            'approval_direct_post'=> $values['approval_direct_group']['approval_direct'],
-            'allow_attachments'=> $values['allow_attachments_group']['allow_attachments'],
+            'approval_direct_post'=> isset($values['approval_direct_group']['approval_direct']) ? $values['approval_direct_group']['approval_direct'] : null,
+            'allow_attachments'=> isset($values['allow_attachments_group']['allow_attachments']) ? $values['allow_attachments_group']['allow_attachments'] : null,
             'allow_new_threads'=>  $values['allow_new_threads_group']['allow_new_threads'],
             'default_view'=> $values['default_view_type_group']['default_view_type'],
             'forum_of_group'=> $values['group_forum'],