Skip to content

Commit 87c15cc

Browse files
committed
Merge branch '1.10.x' of https://github.com/chamilo/chamilo-lms into 1.10.x
2 parents e7ed13b + c3a618a commit 87c15cc

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

main/forum/forumfunction.inc.php

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,7 @@ function store_forumcategory($values, $courseInfo = array(), $showMessage = true
542542
$new_max = $row['sort_max'] + 1;
543543
$session_id = api_get_session_id();
544544
$clean_cat_title = $values['forum_category_title'];
545+
$last_id = null;
545546

546547
if (isset($values['forum_category_id'])) {
547548
// Storing after edition.
@@ -701,17 +702,17 @@ function store_forum($values, $courseInfo = array(), $returnId = false)
701702
$params = [
702703
'forum_title'=> $values['forum_title'],
703704
'forum_image'=> $sql_image,
704-
'forum_comment'=> $values['forum_comment'],
705-
'forum_category'=> $values['forum_category'],
706-
'allow_anonymous'=> $values['allow_anonymous_group']['allow_anonymous'],
707-
'allow_edit'=> $values['students_can_edit_group']['students_can_edit'],
708-
'approval_direct_post'=> $values['approval_direct_group']['approval_direct'],
709-
'allow_attachments'=> $values['allow_attachments_group']['allow_attachments'],
710-
'allow_new_threads'=> $values['allow_new_threads_group']['allow_new_threads'],
711-
'default_view'=> $values['default_view_type_group']['default_view_type'],
712-
'forum_of_group'=> $values['group_forum'],
713-
'forum_group_public_private'=> $values['public_private_group_forum_group']['public_private_group_forum'],
714-
'forum_order'=> $new_max,
705+
'forum_comment'=> isset($values['forum_comment']) ? $values['forum_comment'] : null,
706+
'forum_category'=> isset($values['forum_category']) ? $values['forum_category'] : null,
707+
'allow_anonymous'=> isset($values['allow_anonymous_group']['allow_anonymous']) ? $values['allow_anonymous_group']['allow_anonymous'] : null,
708+
'allow_edit'=> isset($values['students_can_edit_group']['students_can_edit']) ? $values['students_can_edit_group']['students_can_edit'] : null,
709+
'approval_direct_post'=> isset($values['approval_direct_group']['approval_direct']) ? $values['approval_direct_group']['approval_direct'] : null,
710+
'allow_attachments'=> isset($values['allow_attachments_group']['allow_attachments']) ? $values['allow_attachments_group']['allow_attachments'] : null,
711+
'allow_new_threads'=> isset($values['allow_new_threads_group']['allow_new_threads']) ? $values['allow_new_threads_group']['allow_new_threads'] : null,
712+
'default_view'=> isset($values['default_view_type_group']['default_view_type']) ? $values['default_view_type_group']['default_view_type'] : null,
713+
'forum_of_group'=> isset($values['group_forum']) ? $values['group_forum'] : null,
714+
'forum_group_public_private'=> isset($values['public_private_group_forum_group']['public_private_group_forum']) ? $values['public_private_group_forum_group']['public_private_group_forum'] : null,
715+
'forum_order'=> isset($new_max) ? $new_max : null,
715716
'session_id'=> $session_id,
716717
];
717718

main/inc/ajax/social.ajax.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@
228228
SocialManager::readContentWithOpenGraph($url)
229229
);
230230
}
231-
echo $html;
231+
echo utf8_decode($html);
232232
break;
233233
default:
234234
echo '';

0 commit comments

Comments
 (0)