Passed
Push — 1.10.x ( 88b3ac...12c7e7 )
by Angel Fernando Quiroz
46:55
created
main/auth/external_login/facebook-php-sdk/autoload.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
  */
30 30
 
31 31
 if (version_compare(PHP_VERSION, '5.4.0', '<')) {
32
-  throw new Exception('The Facebook SDK v4 requires PHP version 5.4 or higher.');
32
+    throw new Exception('The Facebook SDK v4 requires PHP version 5.4 or higher.');
33 33
 }
34 34
 
35 35
 /**
@@ -42,29 +42,29 @@  discard block
 block discarded – undo
42 42
  */
43 43
 spl_autoload_register(function ($class)
44 44
 {
45
-  // project-specific namespace prefix
46
-  $prefix = 'Facebook\\';
45
+    // project-specific namespace prefix
46
+    $prefix = 'Facebook\\';
47 47
 
48
-  // base directory for the namespace prefix
49
-  $base_dir = defined('FACEBOOK_SDK_V4_SRC_DIR') ? FACEBOOK_SDK_V4_SRC_DIR : __DIR__ . '/src/Facebook/';
48
+    // base directory for the namespace prefix
49
+    $base_dir = defined('FACEBOOK_SDK_V4_SRC_DIR') ? FACEBOOK_SDK_V4_SRC_DIR : __DIR__ . '/src/Facebook/';
50 50
 
51
-  // does the class use the namespace prefix?
52
-  $len = strlen($prefix);
53
-  if (strncmp($prefix, $class, $len) !== 0) {
51
+    // does the class use the namespace prefix?
52
+    $len = strlen($prefix);
53
+    if (strncmp($prefix, $class, $len) !== 0) {
54 54
     // no, move to the next registered autoloader
55 55
     return;
56
-  }
56
+    }
57 57
 
58
-  // get the relative class name
59
-  $relative_class = substr($class, $len);
58
+    // get the relative class name
59
+    $relative_class = substr($class, $len);
60 60
 
61
-  // replace the namespace prefix with the base directory, replace namespace
62
-  // separators with directory separators in the relative class name, append
63
-  // with .php
64
-  $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
61
+    // replace the namespace prefix with the base directory, replace namespace
62
+    // separators with directory separators in the relative class name, append
63
+    // with .php
64
+    $file = $base_dir . str_replace('\\', '/', $relative_class) . '.php';
65 65
 
66
-  // if the file exists, require it
67
-  if (file_exists($file)) {
66
+    // if the file exists, require it
67
+    if (file_exists($file)) {
68 68
     require $file;
69
-  }
69
+    }
70 70
 });
71 71
\ No newline at end of file
Please login to merge, or discard this patch.
main/auth/external_login/facebook.inc.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,15 +1,15 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Licence: GPL
4
- * Please contact CBlue regarding any licences issues.
5
- * Author: [email protected]
6
- *  Copyright: CBlue SPRL, 20XX
7
- *
8
- * External login module : FACEBOOK
9
- *
10
- * This files provides the facebookConnect()  and facebook_get_url functions
11
- * Please edit the facebook.conf.php file to adapt it to your fb application parameter
12
- */
3
+     * Licence: GPL
4
+     * Please contact CBlue regarding any licences issues.
5
+     * Author: [email protected]
6
+     *  Copyright: CBlue SPRL, 20XX
7
+     *
8
+     * External login module : FACEBOOK
9
+     *
10
+     * This files provides the facebookConnect()  and facebook_get_url functions
11
+     * Please edit the facebook.conf.php file to adapt it to your fb application parameter
12
+     */
13 13
 
14 14
 require_once dirname(__FILE__) . '/../../inc/global.inc.php';
15 15
 require_once dirname(__FILE__) . '/facebook.init.php';
Please login to merge, or discard this patch.
main/auth/ldap/login.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,14 +28,14 @@
 block discarded – undo
28 28
 $loginLdapSucces = ldap_login($login, $password);
29 29
 
30 30
 if ($loginLdapSucces) {
31
-	$loginFailed = false;
32
-	$uidReset = true;
33
-	$_user['user_id'] = $uData['user_id'];
34
-	Session::write('_uid',$_uid);
31
+    $loginFailed = false;
32
+    $uidReset = true;
33
+    $_user['user_id'] = $uData['user_id'];
34
+    Session::write('_uid',$_uid);
35 35
     // Jand: copied from event_login in events.lib.php to enable login statistics:
36
-	Event::event_login($uData['user_id']);
36
+    Event::event_login($uData['user_id']);
37 37
 } else {
38
-	$loginFailed = true;
39
-	unset($_user['user_id']);
40
-	$uidReset = false;
38
+    $loginFailed = true;
39
+    unset($_user['user_id']);
40
+    $uidReset = false;
41 41
 }
Please login to merge, or discard this patch.
main/auth/ldap/newUser.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -8,9 +8,9 @@  discard block
 block discarded – undo
8 8
 * @package chamilo.auth.ldap
9 9
 */
10 10
 /**
11
- * when a user does not exist yet in dokeos,
12
- * but he or she does exist in the LDAP,
13
- * we add him to the dokeos database
11
+     * when a user does not exist yet in dokeos,
12
+     * but he or she does exist in the LDAP,
13
+     * we add him to the dokeos database
14 14
 */
15 15
 //require_once('../../inc/global.inc.php'); - this script should be loaded by the /index.php script anyway, so global is already loaded
16 16
 require_once('authldap.php');
@@ -21,17 +21,17 @@  discard block
 block discarded – undo
21 21
 
22 22
 if ($ldap_login_success)
23 23
 {
24
-	//error_log('Found user '.$login.' on LDAP server',0);
25
-	/*
24
+    //error_log('Found user '.$login.' on LDAP server',0);
25
+    /*
26 26
 		In here, we know that
27 27
 		- the user does not exist in dokeos
28 28
 		- the users login and password are correct
29 29
 	*/
30
-	$info_array = ldap_find_user_info($login);
31
-	ldap_put_user_info_locally($login, $info_array);
30
+    $info_array = ldap_find_user_info($login);
31
+    ldap_put_user_info_locally($login, $info_array);
32 32
 } else {
33 33
     //error_log('Could not find '.$login.' on LDAP server',0);
34
-	$loginFailed = true;
35
-	unset($_user['user_id']);
36
-	$uidReset = false;
34
+    $loginFailed = true;
35
+    unset($_user['user_id']);
36
+    $uidReset = false;
37 37
 }
Please login to merge, or discard this patch.
main/auth/shibboleth/app/model/scaffold/user.class.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@
 block discarded – undo
17 17
 {
18 18
 
19 19
     /**
20
-    * Store for User objects. Interact with the database.
21
-    *
22
-    * @return UserStore 
23
-    */
20
+     * Store for User objects. Interact with the database.
21
+     *
22
+     * @return UserStore 
23
+     */
24 24
     public static function store()
25 25
     {
26 26
         static $result = false;
Please login to merge, or discard this patch.
main/auth/shibboleth/app/model/scaffold/admin.class.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@
 block discarded – undo
17 17
 {
18 18
 
19 19
     /**
20
-    * Store for Admin objects. Interact with the database.
21
-    *
22
-    * @return AdminStore 
23
-    */
20
+     * Store for Admin objects. Interact with the database.
21
+     *
22
+     * @return AdminStore 
23
+     */
24 24
     public static function store()
25 25
     {
26 26
         static $result = false;
Please login to merge, or discard this patch.
main/help/allowed_html_tags.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,10 +53,10 @@
 block discarded – undo
53 53
 $table_header[] = array('tag', true);
54 54
 $table_header[] = array('attributes', false);
55 55
 foreach ($tags as $tag => & $attributes) {
56
-	$row = array();
57
-	$row[] = '<kbd>'.$tag.'</kbd>';
58
-	$row[] = '<kbd>&nbsp;'.implode(', ', array_keys($attributes)).'</kbd>';
59
-	$table_data[] = $row;
56
+    $row = array();
57
+    $row[] = '<kbd>'.$tag.'</kbd>';
58
+    $row[] = '<kbd>&nbsp;'.implode(', ', array_keys($attributes)).'</kbd>';
59
+    $table_data[] = $row;
60 60
 }
61 61
 Display::display_sortable_table($table_header, $table_data, array(), array(), array('fullpage' => intval($_GET['fullpage'])));
62 62
 ?>
Please login to merge, or discard this patch.
main/help/faq.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,9 +41,9 @@
 block discarded – undo
41 41
         $form->display();
42 42
     }
43 43
 } else {
44
-	$faq_content = @(string)file_get_contents(api_get_path(SYS_APP_PATH).'home/'.$faq_file);
45
-	$faq_content = api_to_system_encoding($faq_content, api_detect_encoding(strip_tags($faq_content)));
46
-	echo $faq_content;
44
+    $faq_content = @(string)file_get_contents(api_get_path(SYS_APP_PATH).'home/'.$faq_file);
45
+    $faq_content = api_to_system_encoding($faq_content, api_detect_encoding(strip_tags($faq_content)));
46
+    echo $faq_content;
47 47
 }
48 48
 
49 49
 Display::display_footer();
Please login to merge, or discard this patch.
main/reports/reports.lib.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,9 +14,9 @@  discard block
 block discarded – undo
14 14
 
15 15
 // load templates 
16 16
 function reports_loadTemplates() {
17
-	global $reports_enabled_templates, $reports_template;
18
-	foreach ($reports_enabled_templates as $t)
19
-		require_once 'templates/'.$t.'.reports.php';
17
+    global $reports_enabled_templates, $reports_template;
18
+    foreach ($reports_enabled_templates as $t)
19
+        require_once 'templates/'.$t.'.reports.php';
20 20
 }
21 21
 
22 22
 
@@ -149,18 +149,18 @@  discard block
 block discarded – undo
149 149
  */
150 150
 // return tools ID (parametre is a constant from main_api
151 151
 function reports_getToolId($tool) {
152
-	$tools = array_flip(api_get_tools_lists());
153
-	if (array_key_exists($tool, $tools)) 
154
-		return $tools[$tool];
155
-	else
156
-		return null;
152
+    $tools = array_flip(api_get_tools_lists());
153
+    if (array_key_exists($tool, $tools)) 
154
+        return $tools[$tool];
155
+    else
156
+        return null;
157 157
 }
158 158
 
159 159
 // return a sql clause returning triplet of (course, $session, $uid) the
160 160
 // current user is authorized to reed
161 161
 function reports_getVisibilitySQL () {
162
-	return "select cru.user_id from ".Database::get_main_table(TABLE_MAIN_COURSE_USER).' cru';
163
-	// fixme sessions
162
+    return "select cru.user_id from ".Database::get_main_table(TABLE_MAIN_COURSE_USER).' cru';
163
+    // fixme sessions
164 164
 }
165 165
 
166 166
 // this function execute keys_query (SQL statement)
Please login to merge, or discard this patch.