Updated code documentation

skala
Yannick Warnier 15 years ago
parent f8fd157fb6
commit c6de5bd62b
  1. 29
      user.php

@ -5,14 +5,17 @@
* Clean URls for the Social Network * Clean URls for the Social Network
* *
* The idea is to access to the user info more easily: * The idea is to access to the user info more easily:
* http://campus.chamilo.org/admin instead of http://campus.chamilo.org/main/social/profile.php?1 * http://campus.chamilo.org/admin instead of
* To use this you should rename the htaccess to .htaccess and check your virtualhost configuration * http://campus.chamilo.org/main/social/profile.php?1
* To use this you should rename the htaccess to .htaccess and check your
* virtualhost configuration
* *
* More improvements will come in the next version of Chamilo maybe in the 1.8.8 * More improvements will come in next versions of Chamilo maybe in the 1.8.8
* *
*/ */
/**
* Variables definitions and inclusions
*/
// name of the language file that needs to be included // name of the language file that needs to be included
$language_file = array('index','registration','messages','userInfo'); $language_file = array('index','registration','messages','userInfo');
@ -21,8 +24,14 @@ require_once 'main/inc/global.inc.php';
require_once api_get_path(LIBRARY_PATH).'social.lib.php'; require_once api_get_path(LIBRARY_PATH).'social.lib.php';
require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php'; require_once api_get_path(LIBRARY_PATH).'usermanager.lib.php';
/**
* Access permissions check
*/
api_block_anonymous_users(); api_block_anonymous_users();
/**
* Treat URL arguments
*/
$array_keys = array_keys($_GET); $array_keys = array_keys($_GET);
if (!empty($array_keys)) { if (!empty($array_keys)) {
@ -31,14 +40,6 @@ if (!empty($array_keys)) {
if ($friend_id) { if ($friend_id) {
SocialManager::display_individual_user($friend_id); SocialManager::display_individual_user($friend_id);
/*
if (api_get_setting('allow_social_tool') =='true') {
header('Location: main/social/profile.php?u='.$friend_id.'');
exit;
} else {
header('Location: whoisonline.php?id='.$friend_id.'');
exit;
}*/
} else { } else {
// we cant find your friend // we cant find your friend
header('Location: whoisonline.php'); header('Location: whoisonline.php');
@ -49,4 +50,4 @@ if (!empty($array_keys)) {
header('Location: whoisonline.php'); header('Location: whoisonline.php');
exit; exit;
} }
?>

Loading…
Cancel
Save