diff --git a/public/main/forum/index.php b/public/main/forum/index.php index c997fba389..a60cee1d84 100644 --- a/public/main/forum/index.php +++ b/public/main/forum/index.php @@ -458,10 +458,11 @@ if (is_array($forumCategories)) { } }*/ // Validation when belongs to a session - $forumInfo['icon_session'] = api_get_session_image( + /*$forumInfo['icon_session'] = api_get_session_image( $forum->getSessionId(), $user - ); + );*/ + $forumInfo['icon_session'] = ''; if ('0' != $forum->getForumOfGroup()) { $forumOfGroup = $forum->getForumOfGroup(); $my_all_groups_forum_name = $all_groups[$forumOfGroup]['name'] ?? null; @@ -553,9 +554,10 @@ if (is_array($forumCategories)) { $forumInfo['last_post_text'] = Security::remove_XSS(cut($forum['last_post_text'], 140)); }*/ - if (api_is_allowed_to_edit(false, true) + /*if (api_is_allowed_to_edit(false, true) && !(0 == $forum->getSessionId() && 0 != $sessionId) - ) { + ) {*/ + if (api_is_allowed_to_edit(false, true)) { $toolActions .= '' .Display::return_icon('edit.png', get_lang('Edit'), [], ICON_SIZE_SMALL) diff --git a/public/main/forum/viewthread.php b/public/main/forum/viewthread.php index c79b63fb76..5022c6c4d2 100644 --- a/public/main/forum/viewthread.php +++ b/public/main/forum/viewthread.php @@ -319,7 +319,7 @@ if (($current_forum_category && // new thread link if (( api_is_allowed_to_edit(false, true) && - !(api_is_session_general_coach() && $forumEntity->getSessionId() != $sessionId)) || + !(api_is_session_general_coach())) || //&& $forumEntity->getSessionId() != $sessionId (1 == $forumEntity->getAllowNewThreads() && isset($_user['user_id'])) || (1 == $forumEntity->getAllowNewThreads() && !isset($_user['user_id']) && 1 == $forumEntity->getAllowAnonymous()) ) { @@ -460,7 +460,7 @@ foreach ($posts as $post) { if (($groupEntity && $tutorGroup) || (1 == $forumEntity->getAllowEdit() && $posterId == $userId) || (api_is_allowed_to_edit(false, true) && - !(api_is_session_general_coach() && $forumEntity->getSessionId() != $sessionId)) + !(api_is_session_general_coach())) //&& $forumEntity->getSessionId() != $sessionId ) { if (false == $locked && postIsEditableByStudent($forumEntity, $post)) { $editUrl = api_get_path(WEB_CODE_PATH).'forum/editpost.php?'.api_get_cidreq(); @@ -480,7 +480,7 @@ foreach ($posts as $post) { if (($groupEntity && $tutorGroup) || api_is_allowed_to_edit(false, true) && - !(api_is_session_general_coach() && $forumEntity->getSessionId() != $sessionId) + !(api_is_session_general_coach()) //&& $forumEntity->getSessionId() != $sessionId ) { if (false == $locked) { $deleteUrl = api_get_self().'?'.api_get_cidreq().'&'.http_build_query( @@ -514,8 +514,7 @@ foreach ($posts as $post) { if (api_is_allowed_to_edit(false, true) && !( - api_is_session_general_coach() && - $forumEntity->getSessionId() != $sessionId + api_is_session_general_coach() //&& $forumEntity->getSessionId() != $sessionId ) ) { $iconEdit .= return_visible_invisible_icon( @@ -738,7 +737,7 @@ foreach ($posts as $post) { $post['post_attachments'] .= ''.$attachment->getComment().''; if ((1 == $forumEntity->getAllowEdit() && $post['user_id'] == $userId) || (api_is_allowed_to_edit(false, true) && - !(api_is_session_general_coach() && $forumEntity->getSessionId() != $sessionId)) + !(api_is_session_general_coach())) //&& $forumEntity->getSessionId() != $sessionId ) { $post['post_attachments'] .= '