فهرست منبع

fix PHP warning

Julio 8 سال پیش
والد
کامیت
7e709550eb
1فایلهای تغییر یافته به همراه12 افزوده شده و 8 حذف شده
  1. 12 8
      main/inc/lib/userportal.lib.php

+ 12 - 8
main/inc/lib/userportal.lib.php

@@ -921,6 +921,8 @@ class IndexManager
             'profileCollapse'
         );
 
+        $diagnosis = '';
+
         if (api_is_drh() || api_is_student_boss()) {
             $diagnosis = Display::url(get_lang('DiagnosisManagement'), api_get_path(WEB_PATH).'load_search.php').'<br />';
             $diagnosis .= Display::url(get_lang('Diagnostic'), api_get_path(WEB_PATH).'search.php');
@@ -930,14 +932,16 @@ class IndexManager
             }
         }
 
-        $html .= self::show_right_block(
-            get_lang('Diagnostic'),
-            $diagnosis,
-            'profile_block',
-            null,
-            'profile',
-            'profileCollapse'
-        );
+        if (!empty($diagnosis)) {
+            $html .= self::show_right_block(
+                get_lang('Diagnostic'),
+                $diagnosis,
+                'profile_block',
+                null,
+                'profile',
+                'profileCollapse'
+            );
+        }
 
         return $html;
     }