|
|
|
@ -12,6 +12,7 @@ require_once api_get_path(LIBRARY_PATH).'group_portal_manager.lib.php'; |
|
|
|
|
require_once api_get_path(LIBRARY_PATH).'social.lib.php'; |
|
|
|
|
require_once api_get_path(LIBRARY_PATH).'message.lib.php'; |
|
|
|
|
require_once api_get_path(LIBRARY_PATH).'text.lib.php'; |
|
|
|
|
require_once api_get_path(LIBRARY_PATH).'mail.lib.inc.php'; |
|
|
|
|
|
|
|
|
|
api_block_anonymous_users(); |
|
|
|
|
|
|
|
|
@ -137,7 +138,8 @@ if (isset($_POST['token']) && $_POST['token'] === $_SESSION['sec_token']) { |
|
|
|
|
// display error messages |
|
|
|
|
if (is_string($res)) { |
|
|
|
|
Display::display_error_message($res); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Security::clear_token(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -175,6 +177,7 @@ echo '<div id="social-content">'; |
|
|
|
|
echo '<div id="social-content-right">'; |
|
|
|
|
|
|
|
|
|
if ($group_id != 0 ) { |
|
|
|
|
|
|
|
|
|
$group_info = GroupPortalManager::get_group_data($group_id); |
|
|
|
|
//Loading group information |
|
|
|
|
if (isset($_GET['status']) && $_GET['status']=='sent') { |
|
|
|
@ -277,7 +280,7 @@ if ($group_id != 0 ) { |
|
|
|
|
} elseif ($result['relation_type'] == GROUP_USER_PERMISSION_MODERATOR) { |
|
|
|
|
$name .= Display::return_icon('moderator_star.png', get_lang('Moderator'), array('style'=>'vertical-align:middle')); |
|
|
|
|
} |
|
|
|
|
$count_users_group = count(GroupPortalManager::get_all_users_by_group($id)); |
|
|
|
|
$count_users_group = count(GroupPortalManager::get_users_by_group($id, false, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0 , 1000)); |
|
|
|
|
if ($count_users_group == 1 ) { |
|
|
|
|
$count_users_group = $count_users_group.' '.get_lang('Member'); |
|
|
|
|
} else { |
|
|
|
@ -303,7 +306,7 @@ if ($group_id != 0 ) { |
|
|
|
|
$id = $result['id']; |
|
|
|
|
$url_open = '<a href="groups.php?id='.$id.'">'; |
|
|
|
|
$url_close = '</a>'; |
|
|
|
|
$count_users_group = count(GroupPortalManager::get_all_users_by_group($id)); |
|
|
|
|
$count_users_group = count(GroupPortalManager::get_users_by_group($id, false, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0 , 1000)); |
|
|
|
|
if ($count_users_group == 1 ) { |
|
|
|
|
$count_users_group = $count_users_group.' '.get_lang('Member'); |
|
|
|
|
} else { |
|
|
|
@ -329,14 +332,15 @@ if ($group_id != 0 ) { |
|
|
|
|
foreach ($results as $result) { |
|
|
|
|
$id = $result['id']; |
|
|
|
|
$url_open = '<a href="groups.php?id='.$id.'">'; |
|
|
|
|
$url_close = '</a>'; |
|
|
|
|
if ($result['count'] == 1 ) { |
|
|
|
|
$result['count'] = $result['count'].' '.get_lang('Member'); |
|
|
|
|
} else { |
|
|
|
|
$result['count'] = $result['count'].' '.get_lang('Members'); |
|
|
|
|
} |
|
|
|
|
$count_users_group = $result['count']; |
|
|
|
|
$url_close = '</a>'; |
|
|
|
|
|
|
|
|
|
$count_users_group = count(GroupPortalManager::get_users_by_group($id, false, array(GROUP_USER_PERMISSION_ADMIN, GROUP_USER_PERMISSION_READER, GROUP_USER_PERMISSION_MODERATOR), 0 , 1000)); |
|
|
|
|
if ($count_users_group == 1 ) { |
|
|
|
|
$count_users_group = $count_users_group.' '.get_lang('Member'); |
|
|
|
|
} else { |
|
|
|
|
$count_users_group = $count_users_group.' '.get_lang('Members'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$name = api_strtoupper(cut($result['name'],30,true)); |
|
|
|
|
$picture = GroupPortalManager::get_picture_group($result['id'], $result['picture_uri'],80); |
|
|
|
|
$result['picture_uri'] = '<img class="social-groups-image" src="'.$picture['file'].'" hspace="4" height="50" border="2" align="left" width="50" />'; |
|
|
|
|