Browse Source

Minor - format code.

Julio Montoya 10 years ago
parent
commit
9b386d3516
3 changed files with 8 additions and 11 deletions
  1. 1 2
      main/chat/chat.php
  2. 0 1
      main/chat/chat_hidden.php
  3. 7 8
      main/chat/chat_whoisonline.php

+ 1 - 2
main/chat/chat.php

@@ -1,5 +1,6 @@
 <?php
 /* For licensing terms, see /license.txt */
+
 /**
  * Chat tool
  * @package chamilo.chat
@@ -8,8 +9,6 @@
 $language_file = array('chat');
 require_once '../inc/global.inc.php';
 $current_course_tool  = TOOL_CHAT;
-
-require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
 $this_section = SECTION_COURSES;
 $nameTools = get_lang('ToolChat');
 

+ 0 - 1
main/chat/chat_hidden.php

@@ -13,7 +13,6 @@ define('FRAME', 'hidden');
 $language_file = array('chat');
 
 require_once '../inc/global.inc.php';
-require_once api_get_path(LIBRARY_PATH).'groupmanager.lib.php';
 require_once 'chat_functions.lib.php';
 
 $tbl_user = Database::get_main_table(TABLE_MAIN_USER);

+ 7 - 8
main/chat/chat_whoisonline.php

@@ -15,6 +15,7 @@ require_once '../inc/global.inc.php';
 $course = api_get_course_id();
 $group_id = api_get_group_id();
 $session_id = api_get_session_id();
+$user_id = api_get_user_id();
 $session_condition = api_get_session_condition($session_id);
 $group_condition = " AND to_group_id = '$group_id'";
 
@@ -25,16 +26,14 @@ if (!empty($group_id)) {
     $extra_condition = $session_condition;
 }
 
-$user_id = api_get_user_id();
-
 if (!empty($course)) {
     $showPic = isset($_GET['showPic']) ? intval($_GET['showPic']) : null;
-    $tbl_course_user			= Database::get_main_table(TABLE_MAIN_COURSE_USER);
-    $tbl_session_course_user	= Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
-    $tbl_session				= Database::get_main_table(TABLE_MAIN_SESSION);
-    $tbl_session_course			= Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
-    $tbl_user					= Database::get_main_table(TABLE_MAIN_USER);
-    $tbl_chat_connected			= Database::get_course_table(TABLE_CHAT_CONNECTED);
+    $tbl_course_user = Database::get_main_table(TABLE_MAIN_COURSE_USER);
+    $tbl_session_course_user = Database::get_main_table(TABLE_MAIN_SESSION_COURSE_USER);
+    $tbl_session = Database::get_main_table(TABLE_MAIN_SESSION);
+    $tbl_session_course = Database::get_main_table(TABLE_MAIN_SESSION_COURSE);
+    $tbl_user = Database::get_main_table(TABLE_MAIN_USER);
+    $tbl_chat_connected = Database::get_course_table(TABLE_CHAT_CONNECTED);
 
     $query = "SELECT username FROM $tbl_user WHERE user_id='".$user_id."'";
     $result = Database::query($query);