Merge branch '1.10.x' of github.com:chamilo/chamilo-lms into 1.10.x

1.10.x
Yannick Warnier 9 years ago
commit 77de2230bb
  1. 2
      app/Migrations/AbstractMigrationChamilo.php
  2. 6
      main/admin/settings.lib.php
  3. 2
      main/admin/sub_language_add.php
  4. 2
      main/admin/user_list.php
  5. 2
      main/admin/user_update_import.php
  6. 2
      main/attendance/attendance_controller.php
  7. 8
      main/auth/cas/lib/CAS/PGTStorage/pgt-db.php
  8. 14
      main/auth/cas/lib/CAS/PGTStorage/pgt-file.php
  9. 4
      main/auth/cas/lib/CAS/PGTStorage/pgt-main.php
  10. 3
      main/auth/courses_controller.php
  11. 7
      main/auth/external_login/facebook-php-sdk/src/Facebook/Entities/AccessToken.php
  12. 4
      main/auth/external_login/facebook-php-sdk/src/Facebook/Entities/SignedRequest.php
  13. 1
      main/auth/external_login/facebook-php-sdk/src/Facebook/HttpClients/FacebookGuzzleHttpClient.php
  14. 6
      main/auth/external_login/facebook.inc.php
  15. 2
      main/auth/external_login/functions.inc.php
  16. 4
      main/auth/key/key_auth.class.php
  17. 5
      main/auth/ldap/authldap.php
  18. 1
      main/auth/openid/login.php
  19. 16
      main/auth/openid/openid.lib.php
  20. 2
      main/auth/reset.php
  21. 2
      main/auth/shibboleth/app/model/shibboleth_store.class.php
  22. 3
      main/auth/shibboleth/app/model/user.class.php
  23. 3
      main/auth/shibboleth/app/shibboleth.class.php
  24. 6
      main/auth/shibboleth/app/view/shibboleth_display.class.php

@ -124,7 +124,7 @@ abstract class AbstractMigrationChamilo extends AbstractMigration
}
/**
* @param $variable
* @param string $variable
* @return mixed
*/
public function getConfigurationValue($variable)

@ -1031,7 +1031,7 @@ function get_template_data($from, $number_of_items, $column, $direction)
* display the edit and delete icons in the sortable table
*
* @param integer $id the id of the template
* @return html code for the link to edit and delete the template
* @return string code for the link to edit and delete the template
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
* @version August 2008
@ -1050,7 +1050,7 @@ function actions_filter($id)
* Display the image of the template in the sortable table
*
* @param string $image the image
* @return html code for the image
* @return string code for the image
*
* @author Patrick Cool <patrick.cool@UGent.be>, Ghent University, Belgium
* @version August 2008
@ -1257,7 +1257,7 @@ function select_timezone_value()
/**
* Returns an array containing the list of options used to populate the gradebook_number_decimals variable
* This function is called through a call_user_func() in the generate_settings_form function.
* @return array List of gradebook_number_decimals options
* @return string[] List of gradebook_number_decimals options
*
* @author Guillaume Viguier <guillaume.viguier@beeznest.com>
*/

@ -28,7 +28,7 @@ $interbreadcrumb[] = array('url' => 'languages.php', 'name' => get_lang('Platfor
* @param string ISO code (fr_FR, ...)
* @param int Whether the sublanguage is published (0=unpublished, 1=published)
* @param int ID del idioma padre
* @return int New sub language ID or false on error
* @return false|string New sub language ID or false on error
*/
function add_sub_language($original_name, $english_name, $isocode, $sublanguage_available, $parent_id)
{

@ -288,7 +288,7 @@ function prepare_user_sql_query($is_count)
* This function defines globals.
* @param int $userId
*
* @return bool False on failure, redirection on success
* @return false|null False on failure, redirection on success
* @author Evie Embrechts
* @author Yannick Warnier <yannick.warnier@dokeos.com>
*/

@ -128,7 +128,7 @@ function complete_missing_data($user)
/**
* Update users from the imported data
* @param array $users List of users
* @return void
* @return false|null
* @uses global variable $inserted_in_course, which returns the list of courses the user was inserted in
*/

@ -206,7 +206,7 @@ class AttendanceController
/**
* Restores an attendance entry and fallback to attendances rendering
* @param int $attendanceId
* @param int $attendance_id
*/
public function attendance_restore($attendance_id)
{

@ -62,7 +62,7 @@ class PGTStorageDB extends PGTStorage
/**
* This method returns the PEAR DB URL to use to connect to the database.
*
* @return a PEAR DB URL
* @return string PEAR DB URL
*
* @private
*/
@ -105,7 +105,7 @@ class PGTStorageDB extends PGTStorage
/**
* This method returns the name of the table where PGT's are stored.
*
* @return the name of a table.
* @return string name of a table.
*
* @private
*/
@ -122,7 +122,7 @@ class PGTStorageDB extends PGTStorage
* This method returns an informational string giving the type of storage
* used by the object (used for debugging purposes).
*
* @return an informational string.
* @return string informational string.
* @public
*/
function getStorageType()
@ -148,7 +148,7 @@ class PGTStorageDB extends PGTStorage
/**
* The class constructor, called by CASClient::SetPGTStorageDB().
*
* @param $cas_parent the CASClient instance that creates the object.
* @param CASClient $cas_parent the CASClient instance that creates the object.
* @param $user the user to access the data with
* @param $password the user's password
* @param $database_type the type of the database hosting the data

@ -98,7 +98,7 @@ class PGTStorageFile extends PGTStorage
* This method returns an informational string giving the type of storage
* used by the object (used for debugging purposes).
*
* @return an informational string.
* @return string informational string.
* @public
*/
function getStorageType()
@ -110,7 +110,7 @@ class PGTStorageFile extends PGTStorage
* This method returns an informational string giving informations on the
* parameters of the storage.(used for debugging purposes).
*
* @return an informational string.
* @return string informational string.
* @public
*/
function getStorageInfo()
@ -125,9 +125,9 @@ class PGTStorageFile extends PGTStorage
/**
* The class constructor, called by CASClient::SetPGTStorageFile().
*
* @param $cas_parent the CASClient instance that creates the object.
* @param $format the format used to store the PGT's (`plain' and `xml' allowed).
* @param $path the path where the PGT's should be stored
* @param CASClient $cas_parent the CASClient instance that creates the object.
* @param string $format the format used to store the PGT's (`plain' and `xml' allowed).
* @param string $path the path where the PGT's should be stored
*
* @public
*/
@ -202,7 +202,7 @@ class PGTStorageFile extends PGTStorage
*
* @param $pgt_iou the PGT iou.
*
* @return a filename
* @return string filename
* @private
*/
function getPGTIouFilename($pgt_iou)
@ -243,7 +243,7 @@ class PGTStorageFile extends PGTStorage
*
* @param $pgt_iou the PGT iou
*
* @return the corresponding PGT, or FALSE on error
* @return false|string corresponding PGT, or FALSE on error
*
* @public
*/

@ -126,7 +126,7 @@ class PGTStorage
/**
* This method returns an error message set by PGTStorage::setErrorMessage().
*
* @return an error message when set by PGTStorage::setErrorMessage(), FALSE
* @return boolean error message when set by PGTStorage::setErrorMessage(), FALSE
* otherwise.
*
* @public
@ -153,7 +153,7 @@ class PGTStorage
/**
* This method tells if the storage has already been intialized.
*
* @return a boolean
* @return boolean boolean
*
* @protected
*/

@ -33,6 +33,7 @@ class CoursesController
* render to courses_list view
* @param string action
* @param string confirmation message(optional)
* @param string $action
*/
public function courses_list($action, $message = '')
{
@ -79,7 +80,7 @@ class CoursesController
/**
* It's used for listing courses with categories,
* render to courses_categories view
* @param $action
* @param string $action
* @param string $category_code
* @param string $message
* @param string $error

@ -62,6 +62,7 @@ class AccessToken
* @param string $accessToken
* @param int $expiresAt
* @param string|null machineId
* @param string $machineId
*/
public function __construct($accessToken, $expiresAt = 0, $machineId = null)
{
@ -97,7 +98,7 @@ class AccessToken
/**
* Getter for machineId.
*
* @return string|null
* @return string
*/
public function getMachineId()
{
@ -191,11 +192,11 @@ class AccessToken
/**
* Get a valid code from an access token.
*
* @param AccessToken|string $accessToken
* @param AccessToken $accessToken
* @param string|null $appId
* @param string|null $appSecret
*
* @return AccessToken
* @return string
*/
public static function getCodeFromAccessToken($accessToken, $appId = null, $appSecret = null)
{

@ -63,7 +63,7 @@ class SignedRequest
/**
* Returns the raw signed request data.
*
* @return string|null
* @return string
*/
public function getRawSignedRequest()
{
@ -84,7 +84,7 @@ class SignedRequest
* Returns a property from the signed request data if available.
*
* @param string $key
* @param mixed|null $default
* @param integer $default
*
* @return mixed|null
*/

@ -24,7 +24,6 @@
namespace Facebook\HttpClients;
use Facebook\FacebookSDKException;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\AdapterException;
use GuzzleHttp\Exception\RequestException;

@ -18,14 +18,8 @@ require_once dirname(__FILE__) . '/facebook-php-sdk/autoload.php';
use Facebook\FacebookSession;
use Facebook\FacebookRedirectLoginHelper;
use Facebook\FacebookRequest;
use Facebook\FacebookResponse;
use Facebook\FacebookSDKException;
use Facebook\FacebookRequestException;
use Facebook\FacebookAuthorizationException;
use Facebook\GraphObject;
use Facebook\Entities\AccessToken;
use Facebook\HttpClients\FacebookCurlHttpClient;
use Facebook\HttpClients\FacebookHttpable;
require_once dirname(__FILE__) . '/functions.inc.php';

@ -148,7 +148,7 @@ function external_add_user($u) {
* - language
* - courses : string of all courses code separated by '|'
* - admin : boolean
* @return boolean
* @return boolean|null
* @author ndiechburg <noel@cblue.be>
* */
function external_update_user($new_user) {

@ -65,6 +65,7 @@ class KeyAuth
* If empty it disables authentication.
*
* !! 10 chars max !!
* @param string $_
*/
public static function enable_services($_)
{
@ -254,6 +255,9 @@ class KeyAuth
return Request::get('cidReq', 0);
}
/**
* @return integer
*/
public function get_group_id()
{
return Request::get('gidReq', 0);

@ -67,7 +67,7 @@ require_once api_get_path(SYS_CODE_PATH).'auth/external_login/ldap.inc.php';
require 'ldap_var.inc.php';
/**
* Check login and password with LDAP
* @return true when login & password both OK, false otherwise
* @return boolean when login & password both OK, false otherwise
* @author Roan Embrechts (based on code from Universit<EFBFBD> Jean Monet)
*/
@ -305,7 +305,7 @@ function ldap_authentication_check ($uname, $passwd) {
} // end of check
/**
* Set the protocol version with version from config file (enables LDAP version 3)
* @param resource The LDAP connexion resource, passed by reference.
* @param resource resource LDAP connexion resource, passed by reference.
* @return void
*/
function ldap_set_version(&$resource) {
@ -323,6 +323,7 @@ function ldap_set_version(&$resource) {
* Handle bind (whether authenticated or not)
* @param resource The LDAP handler to which we are connecting (by reference)
* @param resource The LDAP bind handler we will be modifying
* @param boolean $ldap_bind
* @return boolean Status of the bind assignment. True for success, false for failure.
*/
function ldap_handle_bind(&$ldap_handler,&$ldap_bind) {

@ -337,6 +337,7 @@ function openid_verify_assertion($op_endpoint, $response) {
/**
* Make a HTTP request - This function has been copied straight over from Drupal 6 code (drupal_http_request)
* @param string $data
*/
function openid_http_request($url, $headers = array(), $method = 'GET', $data = NULL, $retry = 3) {
$result = new stdClass();

@ -121,6 +121,7 @@ function _openid_create_message($data) {
/**
* Encode a message from _openid_create_message for HTTP Post
* @param null|string $message
*/
function _openid_encode_message($message) {
$encoded_message = '';
@ -173,6 +174,7 @@ function _openid_nonce() {
/**
* Pull the href attribute out of an html link element.
* @param string $rel
*/
function _openid_link_href($rel, $html) {
$rel = preg_quote($rel);
@ -186,6 +188,7 @@ function _openid_link_href($rel, $html) {
/**
* Pull the http-equiv attribute out of an html meta element
* @param string $equiv
*/
function _openid_meta_httpequiv($equiv, $html) {
preg_match('|<meta\s+http-equiv=["\']' . $equiv . '["\'](.*)/?>|iU', $html, $matches);
@ -221,6 +224,10 @@ function _openid_signature($association, $message_array, $keys_to_sign) {
return base64_encode($signature);
}
/**
* @param string $key
* @param null|string $text
*/
function _openid_hmac($key, $text) {
if (strlen($key) > OPENID_SHA1_BLOCKSIZE) {
$key = _openid_sha1($key, true);
@ -256,6 +263,9 @@ function _openid_dh_long_to_base64($str) {
return base64_encode(_openid_dh_long_to_binary($str));
}
/**
* @param string $str
*/
function _openid_dh_binary_to_long($str) {
$bytes = array_merge(unpack('C*', $str));
@ -297,6 +307,9 @@ function _openid_dh_long_to_binary($long) {
return $string;
}
/**
* @param string $secret
*/
function _openid_dh_xorsecret($shared, $secret) {
$dh_shared_str = _openid_dh_long_to_binary($shared);
$sha1_dh_shared = _openid_sha1($dh_shared_str);
@ -308,6 +321,9 @@ function _openid_dh_xorsecret($shared, $secret) {
return $xsecret;
}
/**
* @param string $stop
*/
function _openid_dh_rand($stop) {
static $duplicate_cache = array();

@ -1,8 +1,6 @@
<?php
/* For license terms, see /license.txt */
use ChamiloSession as Session;
require_once '../inc/global.inc.php';
$token = isset($_GET['token']) ? $_GET['token'] : '';

@ -17,7 +17,7 @@ class ShibbolethStore
/**
*
* @return ShibbolethData
* @return ShibbolethStore
*/
public static function instance()
{

@ -56,6 +56,9 @@ class UserStore extends _UserStore
return $this->get(array('shibb_unique_id' => $id));
}
/**
* @param string $id
*/
public function shibboleth_id_exists($id)
{
return $this->exist(array('shibb_unique_id' => $id));

@ -128,7 +128,7 @@ class Shibboleth
/**
*
* @param ShibbolethUser $user
* @param ShibbolethUser $shibb_user
*/
public static function save($shibb_user)
{
@ -230,6 +230,7 @@ class Shibboleth
* Sends an email to the Chamilo and Shibboleth administrators in the name
* of the logged-in user.
*
* @param string $subject
*/
public static function email_admin($subject, $message)
{

@ -27,6 +27,9 @@ class ShibbolethDisplay
return $result;
}
/**
* @param string $message
*/
public function error_page($message)
{
$page_title = get_lang('ShibbolethLogin');
@ -37,6 +40,9 @@ class ShibbolethDisplay
die;
}
/**
* @param string $message
*/
public function message_page($message, $title = '')
{
$title = $title ? $title : get_lang('ShibbolethLogin');

Loading…
Cancel
Save