@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | protected function getRequestURL() |
215 | 215 | { |
216 | - return static::BASE_GRAPH_URL . '/' . $this->version . $this->path; |
|
216 | + return static::BASE_GRAPH_URL.'/'.$this->version.$this->path; |
|
217 | 217 | } |
218 | 218 | |
219 | 219 | /** |
@@ -235,7 +235,7 @@ discard block |
||
235 | 235 | } |
236 | 236 | |
237 | 237 | $connection = self::getHttpClientHandler(); |
238 | - $connection->addRequestHeader('User-Agent', 'fb-php-' . self::VERSION); |
|
238 | + $connection->addRequestHeader('User-Agent', 'fb-php-'.self::VERSION); |
|
239 | 239 | $connection->addRequestHeader('Accept-Encoding', '*'); // Support all available encodings. |
240 | 240 | |
241 | 241 | // ETag |
@@ -298,7 +298,7 @@ discard block |
||
298 | 298 | } |
299 | 299 | |
300 | 300 | if (strpos($url, '?') === false) { |
301 | - return $url . '?' . http_build_query($params, null, '&'); |
|
301 | + return $url.'?'.http_build_query($params, null, '&'); |
|
302 | 302 | } |
303 | 303 | |
304 | 304 | list($path, $query_string) = explode('?', $url, 2); |
@@ -307,7 +307,7 @@ discard block |
||
307 | 307 | // Favor params from the original URL over $params |
308 | 308 | $params = array_merge($params, $query_array); |
309 | 309 | |
310 | - return $path . '?' . http_build_query($params, null, '&'); |
|
310 | + return $path.'?'.http_build_query($params, null, '&'); |
|
311 | 311 | } |
312 | 312 | |
313 | 313 | } |
@@ -40,13 +40,13 @@ discard block |
||
40 | 40 | * @param string $class The fully-qualified class name. |
41 | 41 | * @return void |
42 | 42 | */ |
43 | -spl_autoload_register(function ($class) |
|
43 | +spl_autoload_register(function($class) |
|
44 | 44 | { |
45 | 45 | // project-specific namespace prefix |
46 | 46 | $prefix = 'Facebook\\'; |
47 | 47 | |
48 | 48 | // base directory for the namespace prefix |
49 | - $base_dir = defined('FACEBOOK_SDK_V4_SRC_DIR') ? FACEBOOK_SDK_V4_SRC_DIR : __DIR__ . '/src/Facebook/'; |
|
49 | + $base_dir = defined('FACEBOOK_SDK_V4_SRC_DIR') ? FACEBOOK_SDK_V4_SRC_DIR : __DIR__.'/src/Facebook/'; |
|
50 | 50 | |
51 | 51 | // does the class use the namespace prefix? |
52 | 52 | $len = strlen($prefix); |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | // replace the namespace prefix with the base directory, replace namespace |
62 | 62 | // separators with directory separators in the relative class name, append |
63 | 63 | // with .php |
64 | - $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php'; |
|
64 | + $file = $base_dir.str_replace('\\', '/', $relative_class).'.php'; |
|
65 | 65 | |
66 | 66 | // if the file exists, require it |
67 | 67 | if (file_exists($file)) { |
@@ -14,7 +14,7 @@ discard block |
||
14 | 14 | $wsUrl = ''; |
15 | 15 | |
16 | 16 | // include common authentication functions |
17 | -require_once dirname(__FILE__) . '/functions.inc.php'; |
|
17 | +require_once dirname(__FILE__).'/functions.inc.php'; |
|
18 | 18 | // call the login checker (defined below) |
19 | 19 | $isValid = loginWSAuthenticate($login, $password, $wsUrl); |
20 | 20 | |
@@ -61,8 +61,8 @@ discard block |
||
61 | 61 | $key = '-+*%$({[]})$%*+-'; |
62 | 62 | // Complete password con PKCS7-specific padding |
63 | 63 | $blockSize = 16; |
64 | - $padding = $blockSize - (strlen($password)%$blockSize); |
|
65 | - $password .= str_repeat(chr($padding),$padding); |
|
64 | + $padding = $blockSize - (strlen($password) % $blockSize); |
|
65 | + $password .= str_repeat(chr($padding), $padding); |
|
66 | 66 | $cipher = new Crypt_AES(CRYPT_AES_MODE_CFB); |
67 | 67 | $cipher->setKeyLength(128); |
68 | 68 | $cipher->setKey($key); |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | |
8 | 8 | use ChamiloSession as Session; |
9 | 9 | |
10 | -require_once(dirname(__FILE__) . '/functions.inc.php'); |
|
10 | +require_once(dirname(__FILE__).'/functions.inc.php'); |
|
11 | 11 | |
12 | 12 | //MAIN CODE |
13 | 13 | //$uData variable is set in local.inc.php |
@@ -36,6 +36,6 @@ discard block |
||
36 | 36 | //User cannot login |
37 | 37 | $loginFailed = true; |
38 | 38 | Session::erase('_uid'); |
39 | - header('Location: ' . api_get_path(WEB_PATH) . 'index.php?loginFailed=1&error=user_password_incorrect'); |
|
39 | + header('Location: '.api_get_path(WEB_PATH).'index.php?loginFailed=1&error=user_password_incorrect'); |
|
40 | 40 | exit; |
41 | 41 | } |
@@ -10,7 +10,7 @@ |
||
10 | 10 | |
11 | 11 | use ChamiloSession as Session; |
12 | 12 | |
13 | -require_once(dirname(__FILE__) . '/functions.inc.php'); |
|
13 | +require_once(dirname(__FILE__).'/functions.inc.php'); |
|
14 | 14 | |
15 | 15 | //MAIN CODE |
16 | 16 | //$login and $password variables are setted in main/inc/local.inc.php |
@@ -13,9 +13,9 @@ |
||
13 | 13 | } |
14 | 14 | use \ChamiloSession as Session; |
15 | 15 | |
16 | -require dirname(__FILE__) . '/../../inc/global.inc.php'; |
|
17 | -require dirname(__FILE__) . '/ldap.inc.php'; |
|
18 | -require dirname(__FILE__) . '/../../inc/conf/auth.conf.php'; |
|
16 | +require dirname(__FILE__).'/../../inc/global.inc.php'; |
|
17 | +require dirname(__FILE__).'/ldap.inc.php'; |
|
18 | +require dirname(__FILE__).'/../../inc/conf/auth.conf.php'; |
|
19 | 19 | /** |
20 | 20 | * Code execution |
21 | 21 | */ |
@@ -39,8 +39,8 @@ |
||
39 | 39 | |
40 | 40 | use ChamiloSession as Session; |
41 | 41 | |
42 | -require_once dirname(__FILE__) . '/ldap.inc.php'; |
|
43 | -require_once dirname(__FILE__) . '/functions.inc.php'; |
|
42 | +require_once dirname(__FILE__).'/ldap.inc.php'; |
|
43 | +require_once dirname(__FILE__).'/functions.inc.php'; |
|
44 | 44 | |
45 | 45 | $ldap_user = extldap_authenticate($login, $password); |
46 | 46 | if ($ldap_user !== false) { |
@@ -303,7 +303,7 @@ |
||
303 | 303 | |
304 | 304 | // TODO the password, if encrypted at the source, will be encrypted twice, which makes it useless. Try to fix that. |
305 | 305 | $passwordKey = isset($extldap_user_correspondance['password']) ? $extldap_user_correspondance['password'] : 'userPassword'; |
306 | - $password = $data[$passwordKey][0]; |
|
306 | + $password = $data[$passwordKey][0]; |
|
307 | 307 | |
308 | 308 | // To ease management, we add the step-year (etape-annee) code |
309 | 309 | //$official_code = $etape."-".$annee; |
@@ -20,7 +20,7 @@ |
||
20 | 20 | //Those are the mandatory fields for user creation. |
21 | 21 | //See external_add_user function for all the fields you can have. |
22 | 22 | $table = USERINFO_TABLE; |
23 | - $sql = "SELECT * from $table where username='" . Database::escape_string($login) . "'"; |
|
23 | + $sql = "SELECT * from $table where username='".Database::escape_string($login)."'"; |
|
24 | 24 | $result = Database::query($sql); |
25 | 25 | |
26 | 26 | if (Database::num_rows($result) == 0) { //false password |