Jelajahi Sumber

Fix Flat and Nested View for show and prevent click the user img in post list redirect to the full page of chamilo when the forum is in LP - Refs #8104

José Loguercio 9 tahun lalu
induk
melakukan
117f9dba34

+ 4 - 1
main/forum/viewthread_flat.inc.php

@@ -121,7 +121,7 @@ if (isset($current_thread['thread_id'])) {
 
             if ($origin != 'learnpath') {
                 if (api_get_course_setting('allow_user_image_forum')) {
-                    $html .= '<div class="thumbnail">' . display_user_image($row['user_id'], $name) . '</div>';
+                    $html .= '<div class="thumbnail">' . display_user_image($row['user_id'], $name, $origin) . '</div>';
                 }
                 $html .= Display::tag(
                     'h4',
@@ -129,6 +129,9 @@ if (isset($current_thread['thread_id'])) {
                     array('class' => 'title-username')
                 );
             } else {
+                if (api_get_course_setting('allow_user_image_forum')) {
+                    $html .= '<div class="thumbnail">' . display_user_image($row['user_id'], $name, $origin) . '</div>';
+                }
                 $name = Display::tag('strong', "#" . $postCount--, ['class' => 'text-info']) . " | $name";
 
                 $html .= Display::tag(

+ 4 - 0
main/forum/viewthread_nested.inc.php

@@ -82,6 +82,10 @@ foreach ($rows as $post) {
             array('class' => 'title-username')
         );
     } else {
+        if (api_get_course_setting('allow_user_image_forum')) {
+            $html .= '<div class="thumbnail">' . display_user_image($post['user_id'], $name, $origin) . '</div>';
+        }
+        
         $html .= Display::tag(
             'p',
             $name,