Browse Source

Minor - flint fixes

Julio Montoya 6 years ago
parent
commit
c5280cbb77

+ 0 - 1
main/auth/courses_categories.php

@@ -8,7 +8,6 @@
  *
  * @package chamilo.auth
  */
-
 if (isset($_REQUEST['action']) && Security::remove_XSS($_REQUEST['action']) !== 'subscribe') {
     $stok = Security::get_token();
 } else {

+ 0 - 1
main/auth/courses_controller.php

@@ -58,7 +58,6 @@ class CoursesController
 
     /**
      * It's used for listing categories, render to categories_list view.
-     *
      */
     public function categoryList()
     {

+ 2 - 2
main/inc/ajax/message.ajax.php

@@ -18,13 +18,13 @@ switch ($action) {
         $listInbox = [];
         if (api_get_setting('allow_message_tool') == 'true') {
             $list = MessageManager::getNumberOfMessages(true, true);
-            foreach ($list as $row){
+            foreach ($list as $row) {
                 $user = api_get_user_info($row['user_sender_id']);
                 $temp['title'] = $row['title'];
                 $temp['date'] = $row['send_date'];
                 $temp['fullname'] = $user['complete_name'];
                 $temp['email'] = $user['email'];
-                $temp['url'] = api_get_path(WEB_PATH). 'main/messages/view_message.php?id='.$row['id'];
+                $temp['url'] = api_get_path(WEB_PATH).'main/messages/view_message.php?id='.$row['id'];
                 $listInbox[] = $temp;
             }
         }

+ 6 - 5
main/inc/lib/message.lib.php

@@ -50,8 +50,8 @@ class MessageManager
      * Gets the total number of messages, used for the inbox sortable table.
      *
      * @param bool $unread
-     *
      * @param bool $listRead
+     *
      * @return int
      */
     public static function getNumberOfMessages($unread = false, $listRead = false)
@@ -59,9 +59,9 @@ class MessageManager
         $table = Database::get_main_table(TABLE_MESSAGE);
         $list = null;
         if ($unread) {
-            $condition_msg_status = ' msg_status = ' . MESSAGE_STATUS_UNREAD . ' ';
+            $condition_msg_status = ' msg_status = '.MESSAGE_STATUS_UNREAD.' ';
         } else {
-            $condition_msg_status = ' msg_status IN(' . MESSAGE_STATUS_NEW . ',' . MESSAGE_STATUS_UNREAD . ') ';
+            $condition_msg_status = ' msg_status IN('.MESSAGE_STATUS_NEW.','.MESSAGE_STATUS_UNREAD.') ';
         }
 
         $keyword = Session::read('message_search_keyword');
@@ -77,7 +77,7 @@ class MessageManager
         }
         $sql .= " FROM $table
                   WHERE $condition_msg_status AND
-                    user_receiver_id=" . api_get_user_id() . "
+                    user_receiver_id=".api_get_user_id()."
                     $keywordCondition
                 ";
         $result = Database::query($sql);
@@ -85,11 +85,12 @@ class MessageManager
             while ($row = Database::fetch_array($result, 'ASSOC')) {
                 $list[] = $row;
             }
+
             return $list;
         } else {
             $count = Database::fetch_array($result);
             if ($result) {
-                return (int)$count['number_messages'];
+                return (int) $count['number_messages'];
             }
         }
 

+ 18 - 18
main/inc/lib/sessionmanager.lib.php

@@ -124,25 +124,25 @@ class SessionManager
      *
      * @author Carlos Vargas <carlos.vargas@beeznest.com>, from existing code
      *
-     * @param string $name
-     * @param string $startDate                    (YYYY-MM-DD hh:mm:ss)
-     * @param string $endDate                      (YYYY-MM-DD hh:mm:ss)
-     * @param string $displayStartDate             (YYYY-MM-DD hh:mm:ss)
-     * @param string $displayEndDate               (YYYY-MM-DD hh:mm:ss)
-     * @param string $coachStartDate               (YYYY-MM-DD hh:mm:ss)
-     * @param string $coachEndDate                 (YYYY-MM-DD hh:mm:ss)
-     * @param mixed  $coachId                      If int, this is the session coach id,
-     *                                             if string, the coach ID will be looked for from the user table
+     * @param string   $name
+     * @param string   $startDate                    (YYYY-MM-DD hh:mm:ss)
+     * @param string   $endDate                      (YYYY-MM-DD hh:mm:ss)
+     * @param string   $displayStartDate             (YYYY-MM-DD hh:mm:ss)
+     * @param string   $displayEndDate               (YYYY-MM-DD hh:mm:ss)
+     * @param string   $coachStartDate               (YYYY-MM-DD hh:mm:ss)
+     * @param string   $coachEndDate                 (YYYY-MM-DD hh:mm:ss)
+     * @param mixed    $coachId                      If int, this is the session coach id,
+     *                                               if string, the coach ID will be looked for from the user table
      * @param int      $sessionCategoryId            ID of the session category in which this session is registered
-     * @param int    $visibility                   Visibility after end date (0 = read-only, 1 = invisible, 2 = accessible)
-     * @param bool   $fixSessionNameIfExists
-     * @param string $duration
-     * @param string $description                  Optional. The session description
-     * @param int    $showDescription              Optional. Whether show the session description
-     * @param array  $extraFields
-     * @param int    $sessionAdminId               Optional. If this sessions was created by a session admin, assign it to him
-     * @param bool   $sendSubscriptionNotification Optional.
-     *                                             Whether send a mail notification to users being subscribed
+     * @param int      $visibility                   Visibility after end date (0 = read-only, 1 = invisible, 2 = accessible)
+     * @param bool     $fixSessionNameIfExists
+     * @param string   $duration
+     * @param string   $description                  Optional. The session description
+     * @param int      $showDescription              Optional. Whether show the session description
+     * @param array    $extraFields
+     * @param int      $sessionAdminId               Optional. If this sessions was created by a session admin, assign it to him
+     * @param bool     $sendSubscriptionNotification Optional.
+     *                                               Whether send a mail notification to users being subscribed
      * @param int|null $accessUrlId                  Optional.
      *
      * @return mixed Session ID on success, error message otherwise

+ 1 - 1
main/inc/lib/social.lib.php

@@ -399,8 +399,8 @@ class SocialManager extends UserManager
      * @author isaac flores paz
      *
      * @param int $userId
-     *
      * @param $limit
+     *
      * @return array
      */
     public static function get_list_invitation_of_friends_by_user_id($userId, $limit)

+ 1 - 1
main/social/invitations.php

@@ -89,7 +89,7 @@ $social_menu_block = SocialManager::show_social_menu('invitations');
 $socialInvitationsBlock = '<div id="id_response" align="center"></div>';
 
 $user_id = api_get_user_id();
-$list_get_invitation = SocialManager::get_list_invitation_of_friends_by_user_id($user_id,0);
+$list_get_invitation = SocialManager::get_list_invitation_of_friends_by_user_id($user_id, 0);
 $list_get_invitation_sent = SocialManager::get_list_invitation_sent_by_user_id($user_id);
 $pending_invitations = $userGroupModel->get_groups_by_user(
     $user_id,