Use api_get_user_id()

pull/2487/head
jmontoyaa 9 years ago
parent 54bd5a5635
commit bd69383898
  1. 2
      main/social/friends.php
  2. 2
      main/social/group_add.php
  3. 2
      main/social/group_edit.php
  4. 2
      main/social/group_invitation.php
  5. 2
      main/social/group_topics.php
  6. 2
      main/social/group_view.php
  7. 2
      main/social/group_waiting_list.php
  8. 2
      main/social/groups.php
  9. 2
      main/social/invitations.php
  10. 2
      main/social/myfiles.php
  11. 8
      main/social/profile.php
  12. 2
      main/social/search.php

@ -156,7 +156,7 @@ if (count($friends) == 0) {
$social_right_content .= '</div>';
$tpl = new Template(get_lang('Social'));
SocialManager::setSocialUserBlock($tpl, $user_id, 'friends');
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'friends');
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_right_content', $social_right_content);

@ -47,7 +47,7 @@ $social_menu_block = SocialManager::show_social_menu('group_add');
$social_right_content = $form->returnForm();
$tpl = new Template(null);
SocialManager::setSocialUserBlock($tpl, $user_id, null, null);
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), null, null);
$tpl->setHelp('Groups');
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_right_content', $social_right_content);

@ -59,7 +59,7 @@ $social_right_content = $form->returnForm();
$tpl = new Template(get_lang('Edit'));
SocialManager::setSocialUserBlock($tpl, $user_id, 'groups', $group_id);
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'groups', $group_id);
$tpl->setHelp('Groups');
$tpl->assign('social_menu_block', $social_left_content);

@ -199,7 +199,7 @@ if (is_array($members) && count($members)>0) {
}
$tpl = new Template(null);
SocialManager::setSocialUserBlock($tpl, $user_id, 'groups', $group_id);
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'groups', $group_id);
$social_menu_block = SocialManager::show_social_menu('member_list', $group_id);
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->setHelp('Groups');

@ -218,7 +218,7 @@ $social_menu_block = SocialManager::show_social_menu('member_list', $group_id);
$tpl = new Template(null);
$tpl->setHelp('Groups');
// Block Social Avatar
SocialManager::setSocialUserBlock($tpl, $user_id, 'groups', $group_id);
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'groups', $group_id);
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_friend_block', $friend_html);
$tpl->assign('group_message', $group_message);

@ -321,7 +321,7 @@ if ($is_group_member || $group_info['visibility'] == GROUP_PERMISSION_OPEN) {
$tpl = new Template(null);
// Block Social Avatar
SocialManager::setSocialUserBlock($tpl, $user_id, 'groups', $group_id);
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'groups', $group_id);
//Block Social Menu
$social_menu_block = SocialManager::show_social_menu('groups', $group_id);
$tpl->setHelp('Groups');

@ -112,7 +112,7 @@ if (empty($new_member_list) > 0) {
$tpl = new Template(null);
SocialManager::setSocialUserBlock($tpl, $user_id, 'groups', $group_id);
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'groups', $group_id);
$social_menu_block = SocialManager::show_social_menu('member_list', $group_id);
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->setHelp('Groups');

@ -280,7 +280,7 @@ $social_right_content .= Display::tabs($headers, array($newest_content, $popular
$tpl = new Template(null);
// Block Social Avatar
SocialManager::setSocialUserBlock($tpl, $user_id, $show_menu);
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), $show_menu);
$show_menu = 'browse_groups';
if (isset($_GET['view']) && $_GET['view'] == 'mygroups') {
$show_menu = $_GET['view'];

@ -233,7 +233,7 @@ if (count($pending_invitations) > 0) {
}
$tpl = new Template(null);
SocialManager::setSocialUserBlock($tpl, $user_id, 'invitations');
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'invitations');
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_invitations_block',$socialInvitationsBlock);
$tpl->assign('content', $content);

@ -103,7 +103,7 @@ if (isset($_GET['cidReq'])) {
) . '</a>';
}
$tpl = new Template();
SocialManager::setSocialUserBlock($tpl, $user_id, 'myfiles');
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'myfiles');
$editor = new \Chamilo\CoreBundle\Component\Editor\Editor();
$editor = $tpl->fetch('default/'.$editor->getEditorStandAloneTemplate());

@ -678,7 +678,13 @@ if ($show_full_profile) {
$tpl = new Template(get_lang('Social'));
// Block Avatar Social
SocialManager::setSocialUserBlock($tpl, $user_id, 'shared_profile', 0, $show_full_profile);
SocialManager::setSocialUserBlock(
$tpl,
api_get_user_id(),
'shared_profile',
0,
$show_full_profile
);
$tpl->assign('social_friend_block', $friend_html);
$tpl->assign('social_menu_block', $social_menu_block);

@ -235,7 +235,7 @@ if ($query != '' || ($query_vars['search_type']=='1' && count($query_vars)>2) )
$tpl = new Template($tool_name);
// Block Social Avatar
SocialManager::setSocialUserBlock($tpl, $user_id, 'search');
SocialManager::setSocialUserBlock($tpl, api_get_user_id(), 'search');
$tpl->assign('social_menu_block', $social_menu_block);
$tpl->assign('social_search', $block_search);
$tpl->assign('search_form', $searchForm);

Loading…
Cancel
Save