@@ -209,11 +209,11 @@ discard block |
||
209 | 209 | /** |
210 | 210 | * Gives a list of people online now (and in the last $valid minutes) |
211 | 211 | * |
212 | - * @param $from |
|
212 | + * @param integer $from |
|
213 | 213 | * @param $number_of_items |
214 | 214 | * @param null $column |
215 | 215 | * @param null $direction |
216 | - * @param null $time_limit |
|
216 | + * @param integer $time_limit |
|
217 | 217 | * @param bool $friends |
218 | 218 | * @return array|bool For each line, a list of user IDs and login dates, or FALSE on error or empty results |
219 | 219 | */ |
@@ -435,6 +435,9 @@ discard block |
||
435 | 435 | } |
436 | 436 | } |
437 | 437 | |
438 | +/** |
|
439 | + * @param integer $uid |
|
440 | + */ |
|
438 | 441 | function who_is_online_in_this_course_count($uid, $time_limit, $coursecode=null) |
439 | 442 | { |
440 | 443 | if (empty($coursecode)) { |
@@ -113,12 +113,12 @@ discard block |
||
113 | 113 | friend_user_id<>'.((int) $user_id).' AND |
114 | 114 | user_id='.((int) $user_id); |
115 | 115 | if (isset($id_group) && $id_group > 0) { |
116 | - $sql.=' AND relation_type='.$id_group; |
|
116 | + $sql .= ' AND relation_type='.$id_group; |
|
117 | 117 | } |
118 | 118 | if (isset($search_name)) { |
119 | 119 | $search_name = trim($search_name); |
120 | 120 | $search_name = str_replace(' ', '', $search_name); |
121 | - $sql.=' AND friend_user_id IN ( |
|
121 | + $sql .= ' AND friend_user_id IN ( |
|
122 | 122 | SELECT user_id FROM '.$tbl_my_user.' |
123 | 123 | WHERE |
124 | 124 | firstName LIKE "%'.Database::escape_string($search_name).'%" OR |
@@ -432,7 +432,7 @@ discard block |
||
432 | 432 | { |
433 | 433 | $user_info = api_get_user_info($userId); |
434 | 434 | $success = get_lang('MessageSentTo'); |
435 | - $success.= ' : '.api_get_person_name($user_info['firstName'], $user_info['lastName']); |
|
435 | + $success .= ' : '.api_get_person_name($user_info['firstName'], $user_info['lastName']); |
|
436 | 436 | |
437 | 437 | if (isset($subject) && isset($content) && isset($userId)) { |
438 | 438 | $result = MessageManager::send_message($userId, $subject, $content); |
@@ -498,7 +498,7 @@ discard block |
||
498 | 498 | $user_in_course_status = CourseManager :: get_user_in_course_status(api_get_user_id(), $course_code); |
499 | 499 | |
500 | 500 | //$valor = api_get_settings_params(); |
501 | - $course_path = api_get_path(SYS_COURSE_PATH).$course_directory; // course path |
|
501 | + $course_path = api_get_path(SYS_COURSE_PATH).$course_directory; // course path |
|
502 | 502 | if (api_get_setting('course_images_in_courses_list') === 'true') { |
503 | 503 | if (file_exists($course_path.'/course-pic85x85.png')) { |
504 | 504 | $image = $my_course['course_info']['course_image']; |
@@ -526,7 +526,7 @@ discard block |
||
526 | 526 | if ($course_visibility != COURSE_VISIBILITY_HIDDEN && |
527 | 527 | ($course_visibility != COURSE_VISIBILITY_CLOSED || $user_in_course_status == COURSEMANAGER) |
528 | 528 | ) { |
529 | - $result .= '<span class="title">' . $course_title . '<span>'; |
|
529 | + $result .= '<span class="title">'.$course_title.'<span>'; |
|
530 | 530 | } else { |
531 | 531 | $result .= $course_title." ".get_lang('CourseClosed'); |
532 | 532 | } |
@@ -734,57 +734,57 @@ discard block |
||
734 | 734 | $links = '<ul class="nav nav-pills nav-stacked">'; |
735 | 735 | $active = $show == 'home' ? 'active' : null; |
736 | 736 | $links .= ' |
737 | - <li class="home-icon ' . $active . '"> |
|
738 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/home.php"> |
|
739 | - ' . $homeIcon . ' ' . get_lang('Home') . ' |
|
737 | + <li class="home-icon ' . $active.'"> |
|
738 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/home.php"> |
|
739 | + ' . $homeIcon.' '.get_lang('Home').' |
|
740 | 740 | </a> |
741 | 741 | </li>'; |
742 | 742 | $active = $show == 'messages' ? 'active' : null; |
743 | 743 | $links .= ' |
744 | - <li class="messages-icon ' . $active . '"> |
|
745 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'messages/inbox.php?f=social"> |
|
746 | - ' . $messagesIcon . ' ' . get_lang('Messages') . $count_unread_message . ' |
|
744 | + <li class="messages-icon ' . $active.'"> |
|
745 | + <a href="' . api_get_path(WEB_CODE_PATH).'messages/inbox.php?f=social"> |
|
746 | + ' . $messagesIcon.' '.get_lang('Messages').$count_unread_message.' |
|
747 | 747 | </a> |
748 | 748 | </li>'; |
749 | 749 | |
750 | 750 | //Invitations |
751 | 751 | $active = $show == 'invitations' ? 'active' : null; |
752 | 752 | $links .= ' |
753 | - <li class="invitations-icon ' . $active . '"> |
|
754 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php"> |
|
755 | - ' . $invitationsIcon . ' ' . get_lang('Invitations') . $total_invitations . ' |
|
753 | + <li class="invitations-icon ' . $active.'"> |
|
754 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/invitations.php"> |
|
755 | + ' . $invitationsIcon.' '.get_lang('Invitations').$total_invitations.' |
|
756 | 756 | </a> |
757 | 757 | </li>'; |
758 | 758 | |
759 | 759 | //Shared profile and groups |
760 | 760 | $active = $show == 'shared_profile' ? 'active' : null; |
761 | 761 | $links .= ' |
762 | - <li class="shared-profile-icon' . $active . '"> |
|
763 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/profile.php"> |
|
764 | - ' . $sharedProfileIcon . ' ' . get_lang('ViewMySharedProfile') . ' |
|
762 | + <li class="shared-profile-icon' . $active.'"> |
|
763 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/profile.php"> |
|
764 | + ' . $sharedProfileIcon.' '.get_lang('ViewMySharedProfile').' |
|
765 | 765 | </a> |
766 | 766 | </li>'; |
767 | 767 | $active = $show == 'friends' ? 'active' : null; |
768 | 768 | $links .= ' |
769 | - <li class="friends-icon ' . $active . '"> |
|
770 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/friends.php"> |
|
771 | - ' . $friendsIcon . ' ' . get_lang('Friends') . ' |
|
769 | + <li class="friends-icon ' . $active.'"> |
|
770 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/friends.php"> |
|
771 | + ' . $friendsIcon.' '.get_lang('Friends').' |
|
772 | 772 | </a> |
773 | 773 | </li>'; |
774 | 774 | $active = $show == 'browse_groups' ? 'active' : null; |
775 | 775 | $links .= ' |
776 | - <li class="browse-groups-icon ' . $active . '"> |
|
777 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/groups.php"> |
|
778 | - ' . $groupsIcon . ' ' . get_lang('SocialGroups') . ' |
|
776 | + <li class="browse-groups-icon ' . $active.'"> |
|
777 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/groups.php"> |
|
778 | + ' . $groupsIcon.' '.get_lang('SocialGroups').' |
|
779 | 779 | </a> |
780 | 780 | </li>'; |
781 | 781 | |
782 | 782 | //Search users |
783 | 783 | $active = $show == 'search' ? 'active' : null; |
784 | 784 | $links .= ' |
785 | - <li class="search-icon ' . $active . '"> |
|
786 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/search.php"> |
|
787 | - ' . $searchIcon . ' ' . get_lang('Search') . ' |
|
785 | + <li class="search-icon ' . $active.'"> |
|
786 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/search.php"> |
|
787 | + ' . $searchIcon.' '.get_lang('Search').' |
|
788 | 788 | </a> |
789 | 789 | </li>'; |
790 | 790 | |
@@ -792,9 +792,9 @@ discard block |
||
792 | 792 | $active = $show == 'myfiles' ? 'active' : null; |
793 | 793 | |
794 | 794 | $myFiles = ' |
795 | - <li class="myfiles-icon ' . $active . '"> |
|
796 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/myfiles.php"> |
|
797 | - ' . $filesIcon . ' ' . get_lang('MyFiles') . ' |
|
795 | + <li class="myfiles-icon ' . $active.'"> |
|
796 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/myfiles.php"> |
|
797 | + ' . $filesIcon.' '.get_lang('MyFiles').' |
|
798 | 798 | </a> |
799 | 799 | </li>'; |
800 | 800 | |
@@ -802,7 +802,7 @@ discard block |
||
802 | 802 | $myFiles = ''; |
803 | 803 | } |
804 | 804 | $links .= $myFiles; |
805 | - $links .='</ul>'; |
|
805 | + $links .= '</ul>'; |
|
806 | 806 | |
807 | 807 | $html .= Display::panelCollapse( |
808 | 808 | get_lang('SocialNetwork'), |
@@ -823,57 +823,57 @@ discard block |
||
823 | 823 | } |
824 | 824 | |
825 | 825 | if ($show == 'shared_profile') { |
826 | - $links = '<ul class="nav nav-pills nav-stacked">'; |
|
826 | + $links = '<ul class="nav nav-pills nav-stacked">'; |
|
827 | 827 | // My own profile |
828 | 828 | if ($show_full_profile && $user_id == intval(api_get_user_id())) { |
829 | 829 | $links .= ' |
830 | - <li class="home-icon ' . $active . '"> |
|
831 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/home.php"> |
|
832 | - ' . $homeIcon . ' ' . get_lang('Home') . ' |
|
830 | + <li class="home-icon ' . $active.'"> |
|
831 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/home.php"> |
|
832 | + ' . $homeIcon.' '.get_lang('Home').' |
|
833 | 833 | </a> |
834 | 834 | </li> |
835 | - <li class="messages-icon ' . $active . '"> |
|
836 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'messages/inbox.php?f=social"> |
|
837 | - ' . $messagesIcon . ' ' . get_lang('Messages') . $count_unread_message . ' |
|
835 | + <li class="messages-icon ' . $active.'"> |
|
836 | + <a href="' . api_get_path(WEB_CODE_PATH).'messages/inbox.php?f=social"> |
|
837 | + ' . $messagesIcon.' '.get_lang('Messages').$count_unread_message.' |
|
838 | 838 | </a> |
839 | 839 | </li>'; |
840 | 840 | $active = $show == 'invitations' ? 'active' : null; |
841 | 841 | $links .= ' |
842 | - <li class="invitations-icon' . $active . '"> |
|
843 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/invitations.php"> |
|
844 | - ' . $invitationsIcon . ' ' . get_lang('Invitations') . $total_invitations . ' |
|
842 | + <li class="invitations-icon' . $active.'"> |
|
843 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/invitations.php"> |
|
844 | + ' . $invitationsIcon.' '.get_lang('Invitations').$total_invitations.' |
|
845 | 845 | </a> |
846 | 846 | </li>'; |
847 | 847 | |
848 | 848 | $links .= ' |
849 | 849 | <li class="shared-profile-icon active"> |
850 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/profile.php"> |
|
851 | - ' . $sharedProfileIcon . ' ' . get_lang('ViewMySharedProfile') . ' |
|
850 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/profile.php"> |
|
851 | + ' . $sharedProfileIcon.' '.get_lang('ViewMySharedProfile').' |
|
852 | 852 | </a> |
853 | 853 | </li> |
854 | 854 | <li class="friends-icon"> |
855 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/friends.php"> |
|
856 | - ' . $friendsIcon . ' ' . get_lang('Friends') . ' |
|
855 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/friends.php"> |
|
856 | + ' . $friendsIcon.' '.get_lang('Friends').' |
|
857 | 857 | </a> |
858 | 858 | </li> |
859 | 859 | <li class="browse-groups-icon"> |
860 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/groups.php"> |
|
861 | - ' . $groupsIcon . ' ' . get_lang('SocialGroups') . ' |
|
860 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/groups.php"> |
|
861 | + ' . $groupsIcon.' '.get_lang('SocialGroups').' |
|
862 | 862 | </a> |
863 | 863 | </li>'; |
864 | 864 | $active = $show == 'search' ? 'active' : null; |
865 | 865 | $links .= ' |
866 | - <li class="search-icon ' . $active . '"> |
|
867 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/search.php"> |
|
868 | - ' . $searchIcon . ' ' . get_lang('Search') . ' |
|
866 | + <li class="search-icon ' . $active.'"> |
|
867 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/search.php"> |
|
868 | + ' . $searchIcon.' '.get_lang('Search').' |
|
869 | 869 | </a> |
870 | 870 | </li>'; |
871 | 871 | $active = $show == 'myfiles' ? 'active' : null; |
872 | 872 | |
873 | 873 | $myFiles = ' |
874 | - <li class="myfiles-icon ' . $active . '"> |
|
875 | - <a href="' . api_get_path(WEB_CODE_PATH) . 'social/myfiles.php"> |
|
876 | - ' . $filesIcon . ' ' . get_lang('MyFiles') . ' |
|
874 | + <li class="myfiles-icon ' . $active.'"> |
|
875 | + <a href="' . api_get_path(WEB_CODE_PATH).'social/myfiles.php"> |
|
876 | + ' . $filesIcon.' '.get_lang('MyFiles').' |
|
877 | 877 | </a> |
878 | 878 | </li>'; |
879 | 879 | |
@@ -919,7 +919,7 @@ discard block |
||
919 | 919 | $links .= '<li><a href="'.api_get_path(WEB_CODE_PATH).'social/invitations.php">'.Display::return_icon('invitation.png', get_lang('YouAlreadySentAnInvitation')).' '.get_lang('YouAlreadySentAnInvitation').'</a></li>'; |
920 | 920 | } else { |
921 | 921 | if (!$show_full_profile) { |
922 | - $links .= '<li><a class="btn-to-send-invitation" href="#" data-send-to="' . $user_id . '" title="'.get_lang('SendInvitation').'">'.Display :: return_icon('invitation.png', get_lang('SocialInvitationToFriends')).' '.get_lang('SendInvitation').'</a></li>'; |
|
922 | + $links .= '<li><a class="btn-to-send-invitation" href="#" data-send-to="'.$user_id.'" title="'.get_lang('SendInvitation').'">'.Display :: return_icon('invitation.png', get_lang('SocialInvitationToFriends')).' '.get_lang('SendInvitation').'</a></li>'; |
|
923 | 923 | } |
924 | 924 | } |
925 | 925 | |
@@ -1026,7 +1026,7 @@ discard block |
||
1026 | 1026 | foreach ($user_list as $uid) { |
1027 | 1027 | $user_info = api_get_user_info($uid, $checkIfUserOnline = true); |
1028 | 1028 | $lastname = $user_info['lastname']; |
1029 | - $firstname = $user_info['firstname']; |
|
1029 | + $firstname = $user_info['firstname']; |
|
1030 | 1030 | $completeName = $firstname.', '.$lastname; |
1031 | 1031 | |
1032 | 1032 | $user_rol = $user_info['status'] == 1 ? Display::return_icon('teacher.png', get_lang('Teacher'), null, ICON_SIZE_TINY) : Display::return_icon('user.png', get_lang('Student'), null, ICON_SIZE_TINY); |
@@ -1044,7 +1044,7 @@ discard block |
||
1044 | 1044 | } |
1045 | 1045 | $img = '<img class="img-responsive img-circle" title="'.$completeName.'" alt="'.$completeName.'" src="'.$userPicture.'">'; |
1046 | 1046 | |
1047 | - $url = null; |
|
1047 | + $url = null; |
|
1048 | 1048 | // Anonymous users can't have access to the profile |
1049 | 1049 | if (!api_is_anonymous()) { |
1050 | 1050 | if (api_get_setting('allow_social_tool') === 'true') { |
@@ -1199,13 +1199,13 @@ discard block |
||
1199 | 1199 | case SOCIAL_CENTER_PLUGIN: |
1200 | 1200 | $social_plugins = array(1, 2); |
1201 | 1201 | if (is_array($social_plugins) && count($social_plugins) > 0) { |
1202 | - $content.= '<div id="social-plugins">'; |
|
1202 | + $content .= '<div id="social-plugins">'; |
|
1203 | 1203 | foreach ($social_plugins as $plugin) { |
1204 | - $content.= '<div class="social-plugin-item">'; |
|
1205 | - $content.= $plugin; |
|
1206 | - $content.= '</div>'; |
|
1204 | + $content .= '<div class="social-plugin-item">'; |
|
1205 | + $content .= $plugin; |
|
1206 | + $content .= '</div>'; |
|
1207 | 1207 | } |
1208 | - $content.= '</div>'; |
|
1208 | + $content .= '</div>'; |
|
1209 | 1209 | } |
1210 | 1210 | break; |
1211 | 1211 | case SOCIAL_LEFT_PLUGIN: |
@@ -1276,12 +1276,12 @@ discard block |
||
1276 | 1276 | if (!in_array($extension, $allowedTypes)) { |
1277 | 1277 | $flag = false; |
1278 | 1278 | } else { |
1279 | - $newFileName = uniqid('') . '.' . $extension; |
|
1279 | + $newFileName = uniqid('').'.'.$extension; |
|
1280 | 1280 | if (!file_exists($pathMessageAttach)) { |
1281 | 1281 | @mkdir($pathMessageAttach, api_get_permissions_for_new_directories(), true); |
1282 | 1282 | } |
1283 | 1283 | |
1284 | - $newPath = $pathMessageAttach . $newFileName; |
|
1284 | + $newPath = $pathMessageAttach.$newFileName; |
|
1285 | 1285 | if (is_uploaded_file($fileAttach['tmp_name'])) { |
1286 | 1286 | @copy($fileAttach['tmp_name'], $newPath); |
1287 | 1287 | } |
@@ -1290,9 +1290,9 @@ discard block |
||
1290 | 1290 | $medium = self::resize_picture($newPath, IMAGE_WALL_MEDIUM_SIZE); |
1291 | 1291 | |
1292 | 1292 | $big = new Image($newPath); |
1293 | - $ok = $small && $small->send_image($pathMessageAttach . IMAGE_WALL_SMALL . '_' . $newFileName) && |
|
1294 | - $medium && $medium->send_image($pathMessageAttach . IMAGE_WALL_MEDIUM .'_' . $newFileName) && |
|
1295 | - $big && $big->send_image($pathMessageAttach . IMAGE_WALL_BIG . '_' . $newFileName); |
|
1293 | + $ok = $small && $small->send_image($pathMessageAttach.IMAGE_WALL_SMALL.'_'.$newFileName) && |
|
1294 | + $medium && $medium->send_image($pathMessageAttach.IMAGE_WALL_MEDIUM.'_'.$newFileName) && |
|
1295 | + $big && $big->send_image($pathMessageAttach.IMAGE_WALL_BIG.'_'.$newFileName); |
|
1296 | 1296 | |
1297 | 1297 | // Insert |
1298 | 1298 | $newFileName = $social.$newFileName; |
@@ -1386,7 +1386,7 @@ discard block |
||
1386 | 1386 | $start = '0000-00-00'; |
1387 | 1387 | } |
1388 | 1388 | |
1389 | - $isOwnWall = (api_get_user_id() == $userId && $userId == $friendId); |
|
1389 | + $isOwnWall = (api_get_user_id() == $userId && $userId == $friendId); |
|
1390 | 1390 | $messages = self::getWallMessages($userId, MESSAGE_STATUS_WALL, $idMessage, $start, $limit, $offset); |
1391 | 1391 | $formattedList = '<div class="sub-mediapost">'; |
1392 | 1392 | $users = array(); |
@@ -1401,20 +1401,20 @@ discard block |
||
1401 | 1401 | } |
1402 | 1402 | |
1403 | 1403 | $nameComplete = api_is_western_name_order() |
1404 | - ? $users[$userIdLoop]['firstname'] .' ' . $users[$userIdLoop]['lastname'] |
|
1405 | - : $users[$userIdLoop]['lastname'] . ' ' . $users[$userIdLoop]['firstname']; |
|
1404 | + ? $users[$userIdLoop]['firstname'].' '.$users[$userIdLoop]['lastname'] |
|
1405 | + : $users[$userIdLoop]['lastname'].' '.$users[$userIdLoop]['firstname']; |
|
1406 | 1406 | $url = api_get_path(WEB_CODE_PATH).'social/profile.php?u='.$userIdLoop; |
1407 | 1407 | $media = ''; |
1408 | 1408 | $media .= '<div class="rep-post">'; |
1409 | 1409 | $media .= '<div class="col-md-2 col-xs-2 social-post-answers">'; |
1410 | 1410 | $media .= '<div class="user-image pull-right">'; |
1411 | - $media .= '<a href="'.$url.'" ><img src="'. $users[$userIdLoop]['avatar'] . |
|
1411 | + $media .= '<a href="'.$url.'" ><img src="'.$users[$userIdLoop]['avatar']. |
|
1412 | 1412 | '" alt="'.$users[$userIdLoop]['complete_name'].'" class="avatar-thumb"></a>'; |
1413 | 1413 | $media .= '</div>'; |
1414 | 1414 | $media .= '</div>'; |
1415 | 1415 | $media .= '<div class="col-md-9 col-xs-9 social-post-answers">'; |
1416 | 1416 | $media .= '<div class="user-data">'; |
1417 | - $media .= '<div class="username">' . '<a href="'.$url.'">'.$nameComplete.'</a> <span>'.Security::remove_XSS($message['content']).'</span></div>'; |
|
1417 | + $media .= '<div class="username">'.'<a href="'.$url.'">'.$nameComplete.'</a> <span>'.Security::remove_XSS($message['content']).'</span></div>'; |
|
1418 | 1418 | $media .= '<div class="time timeago" title="'.$date.'">'.$date.'</div>'; |
1419 | 1419 | $media .= '<br />'; |
1420 | 1420 | $media .= '</div>'; |
@@ -1457,12 +1457,12 @@ discard block |
||
1457 | 1457 | * @param int $offset Wall messages offset |
1458 | 1458 | * @return array $data return user's starting wall messages along with message extra data |
1459 | 1459 | */ |
1460 | - public static function getWallMessagesPostHTML($userId, $friendId = 0, $start = null, $limit = 10, $offset= 0) |
|
1460 | + public static function getWallMessagesPostHTML($userId, $friendId = 0, $start = null, $limit = 10, $offset = 0) |
|
1461 | 1461 | { |
1462 | 1462 | if (empty($start)) { |
1463 | 1463 | $start = '0000-00-00'; |
1464 | 1464 | } |
1465 | - $isOwnWall = (api_get_user_id() == $userId && $userId == $friendId); |
|
1465 | + $isOwnWall = (api_get_user_id() == $userId && $userId == $friendId); |
|
1466 | 1466 | $messages = self::getWallMessages($userId, MESSAGE_STATUS_WALL_POST, null, $start, $limit, $offset); |
1467 | 1467 | $users = array(); |
1468 | 1468 | $data = array(); |
@@ -1521,7 +1521,7 @@ discard block |
||
1521 | 1521 | |
1522 | 1522 | $htmlReceiver = ''; |
1523 | 1523 | if ($authorId != $receiverId) { |
1524 | - $htmlReceiver = ' > <a href="'.$urlReceiver.'">' . $nameCompleteReceiver . '</a> '; |
|
1524 | + $htmlReceiver = ' > <a href="'.$urlReceiver.'">'.$nameCompleteReceiver.'</a> '; |
|
1525 | 1525 | } |
1526 | 1526 | |
1527 | 1527 | $wallImage = ''; |
@@ -1556,7 +1556,7 @@ discard block |
||
1556 | 1556 | $html .= '<div class="img-post">'; |
1557 | 1557 | $html .= $wallImage; |
1558 | 1558 | $html .= '</div>'; |
1559 | - $html .= '<p>'. Security::remove_XSS($message['content']).'</p>'; |
|
1559 | + $html .= '<p>'.Security::remove_XSS($message['content']).'</p>'; |
|
1560 | 1560 | $html .= '</div>'; |
1561 | 1561 | $html .= '</div>'; // end mediaPost |
1562 | 1562 | |
@@ -1732,18 +1732,18 @@ discard block |
||
1732 | 1732 | if ($number_friends != 0) { |
1733 | 1733 | if ($number_friends > $number_of_images) { |
1734 | 1734 | if (api_get_user_id() == $user_id) { |
1735 | - $friendHtml.= ' <span><a href="friends.php">'.get_lang('SeeAll').'</a></span>'; |
|
1735 | + $friendHtml .= ' <span><a href="friends.php">'.get_lang('SeeAll').'</a></span>'; |
|
1736 | 1736 | } else { |
1737 | - $friendHtml.= ' <span>' |
|
1737 | + $friendHtml .= ' <span>' |
|
1738 | 1738 | .'<a href="'.api_get_path(WEB_CODE_PATH).'social/profile_friends_and_groups.inc.php' |
1739 | 1739 | .'?view=friends&height=390&width=610&user_id='.$user_id.'"' |
1740 | 1740 | .'class="ajax" data-title="'.get_lang('SeeAll').'" title="'.get_lang('SeeAll').'" >'.get_lang('SeeAll').'</a></span>'; |
1741 | 1741 | } |
1742 | 1742 | } |
1743 | 1743 | |
1744 | - $friendHtml.= '<ul class="nav nav-list">'; |
|
1744 | + $friendHtml .= '<ul class="nav nav-list">'; |
|
1745 | 1745 | $j = 1; |
1746 | - for ($k=0; $k < $number_friends; $k++) { |
|
1746 | + for ($k = 0; $k < $number_friends; $k++) { |
|
1747 | 1747 | if ($j > $number_of_images) break; |
1748 | 1748 | |
1749 | 1749 | if (isset($friends[$k])) { |
@@ -1757,26 +1757,26 @@ discard block |
||
1757 | 1757 | $statusIcon = Display::span('', array('class' => 'offline_user_in_text')); |
1758 | 1758 | } |
1759 | 1759 | |
1760 | - $friendHtml.= '<li>'; |
|
1761 | - $friendHtml.= '<div>'; |
|
1760 | + $friendHtml .= '<li>'; |
|
1761 | + $friendHtml .= '<div>'; |
|
1762 | 1762 | |
1763 | 1763 | // the height = 92 must be the same in the image_friend_network span style in default.css |
1764 | 1764 | $friends_profile = UserManager::getUserPicture($friend['friend_user_id'], USER_IMAGE_SIZE_SMALL); |
1765 | - $friendHtml.= '<img src="'.$friends_profile.'" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$name_user.'"/>'; |
|
1765 | + $friendHtml .= '<img src="'.$friends_profile.'" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$name_user.'"/>'; |
|
1766 | 1766 | $link_shared = (empty($link_shared)) ? '' : '&'.$link_shared; |
1767 | - $friendHtml.= $statusIcon .'<a href="profile.php?' .'u=' . $friend['friend_user_id'] . $link_shared . '">' . $name_user .'</a>'; |
|
1768 | - $friendHtml.= '</div>'; |
|
1769 | - $friendHtml.= '</li>'; |
|
1767 | + $friendHtml .= $statusIcon.'<a href="profile.php?'.'u='.$friend['friend_user_id'].$link_shared.'">'.$name_user.'</a>'; |
|
1768 | + $friendHtml .= '</div>'; |
|
1769 | + $friendHtml .= '</li>'; |
|
1770 | 1770 | } |
1771 | 1771 | $j++; |
1772 | 1772 | } |
1773 | - $friendHtml.='</ul>'; |
|
1773 | + $friendHtml .= '</ul>'; |
|
1774 | 1774 | } else { |
1775 | - $friendHtml.= '<div class="">'.get_lang('NoFriendsInYourContactList').'<br />' |
|
1776 | - .'<a class="btn btn-primary" href="'.api_get_path(WEB_PATH).'whoisonline.php"><em class="fa fa-search"></em> '. get_lang('TryAndFindSomeFriends').'</a></div>'; |
|
1775 | + $friendHtml .= '<div class="">'.get_lang('NoFriendsInYourContactList').'<br />' |
|
1776 | + .'<a class="btn btn-primary" href="'.api_get_path(WEB_PATH).'whoisonline.php"><em class="fa fa-search"></em> '.get_lang('TryAndFindSomeFriends').'</a></div>'; |
|
1777 | 1777 | } |
1778 | 1778 | |
1779 | - $friendHtml = Display::panel($friendHtml, get_lang('SocialFriend').' (' . $number_friends . ')' ); |
|
1779 | + $friendHtml = Display::panel($friendHtml, get_lang('SocialFriend').' ('.$number_friends.')'); |
|
1780 | 1780 | |
1781 | 1781 | return $friendHtml; |
1782 | 1782 | } |
@@ -1797,9 +1797,9 @@ discard block |
||
1797 | 1797 | |
1798 | 1798 | if ($number_friends != 0) { |
1799 | 1799 | |
1800 | - $friendHtml.= '<div class="list-group">'; |
|
1800 | + $friendHtml .= '<div class="list-group">'; |
|
1801 | 1801 | $j = 1; |
1802 | - for ($k=0; $k < $number_friends; $k++) { |
|
1802 | + for ($k = 0; $k < $number_friends; $k++) { |
|
1803 | 1803 | if ($j > $number_of_images) { |
1804 | 1804 | break; |
1805 | 1805 | } |
@@ -1809,11 +1809,11 @@ discard block |
||
1809 | 1809 | $user_info_friend = api_get_user_info($friend['friend_user_id'], true); |
1810 | 1810 | |
1811 | 1811 | if ($user_info_friend['user_is_online']) { |
1812 | - $statusIcon = Display::return_icon('statusonline.png',get_lang('Online')); |
|
1813 | - $status=1; |
|
1812 | + $statusIcon = Display::return_icon('statusonline.png', get_lang('Online')); |
|
1813 | + $status = 1; |
|
1814 | 1814 | } else { |
1815 | - $statusIcon = Display::return_icon('statusoffline.png',get_lang('Offline')); |
|
1816 | - $status=0; |
|
1815 | + $statusIcon = Display::return_icon('statusoffline.png', get_lang('Offline')); |
|
1816 | + $status = 0; |
|
1817 | 1817 | } |
1818 | 1818 | |
1819 | 1819 | $friendAvatarMedium = UserManager::getUserPicture($friend['friend_user_id'], USER_IMAGE_SIZE_MEDIUM); |
@@ -1822,24 +1822,24 @@ discard block |
||
1822 | 1822 | $showLinkToChat = api_is_global_chat_enabled() && |
1823 | 1823 | $friend['friend_user_id'] != api_get_user_id(); |
1824 | 1824 | |
1825 | - if ($showLinkToChat){ |
|
1825 | + if ($showLinkToChat) { |
|
1826 | 1826 | $friendHtml .= '<a onclick="javascript:chatWith(\''.$friend['friend_user_id'].'\', \''.$name_user.'\', \''.$status.'\',\''.$friendAvatarSmall.'\')" href="javascript:void(0);" class="list-group-item">'; |
1827 | - $friendHtml .= $friend_avatar.' <span class="username">' . $name_user . '</span>'; |
|
1828 | - $friendHtml .= '<span class="status">' . $statusIcon . '</span>'; |
|
1827 | + $friendHtml .= $friend_avatar.' <span class="username">'.$name_user.'</span>'; |
|
1828 | + $friendHtml .= '<span class="status">'.$statusIcon.'</span>'; |
|
1829 | 1829 | } else { |
1830 | 1830 | $link_shared = empty($link_shared) ? '' : '&'.$link_shared; |
1831 | - $friendHtml .= '<a href="profile.php?' .'u=' . $friend['friend_user_id'] . $link_shared . '" class="list-group-item">'; |
|
1832 | - $friendHtml .= $friend_avatar.' <span class="username-all">' . $name_user . '</span>'; |
|
1831 | + $friendHtml .= '<a href="profile.php?'.'u='.$friend['friend_user_id'].$link_shared.'" class="list-group-item">'; |
|
1832 | + $friendHtml .= $friend_avatar.' <span class="username-all">'.$name_user.'</span>'; |
|
1833 | 1833 | } |
1834 | 1834 | |
1835 | 1835 | $friendHtml .= '</a>'; |
1836 | 1836 | } |
1837 | 1837 | $j++; |
1838 | 1838 | } |
1839 | - $friendHtml.='</div>'; |
|
1839 | + $friendHtml .= '</div>'; |
|
1840 | 1840 | } else { |
1841 | - $friendHtml.= '<div class="help">'.get_lang('NoFriendsInYourContactList').' ' |
|
1842 | - .'<a href="'.api_get_path(WEB_PATH).'whoisonline.php"><em class="fa fa-search"></em> '. get_lang('TryAndFindSomeFriends').'</a></div>'; |
|
1841 | + $friendHtml .= '<div class="help">'.get_lang('NoFriendsInYourContactList').' ' |
|
1842 | + .'<a href="'.api_get_path(WEB_PATH).'whoisonline.php"><em class="fa fa-search"></em> '.get_lang('TryAndFindSomeFriends').'</a></div>'; |
|
1843 | 1843 | } |
1844 | 1844 | |
1845 | 1845 | return $friendHtml; |
@@ -1857,7 +1857,7 @@ discard block |
||
1857 | 1857 | 'post', |
1858 | 1858 | api_get_path(WEB_CODE_PATH).'social/profile.php'.$userId, |
1859 | 1859 | null, |
1860 | - array('enctype' => 'multipart/form-data') , |
|
1860 | + array('enctype' => 'multipart/form-data'), |
|
1861 | 1861 | FormValidator::LAYOUT_HORIZONTAL |
1862 | 1862 | ); |
1863 | 1863 |
@@ -10,7 +10,7 @@ |
||
10 | 10 | $images_to_show = MAX_ONLINE_USERS; |
11 | 11 | |
12 | 12 | $page = intval($_REQUEST['online_page_nr']); |
13 | - $max_page = ceil(who_is_online_count()/$images_to_show); |
|
13 | + $max_page = ceil(who_is_online_count() / $images_to_show); |
|
14 | 14 | |
15 | 15 | $page_rows = ($page - 1) * MAX_ONLINE_USERS; |
16 | 16 |