Passed
Push — 1.10.x ( 6bd950...f9cbcd )
by Yannick
619:37 queued 578:35
created
main/auth/external_login/facebook-php-sdk/src/Facebook/GraphUser.php 1 patch
Indentation   +77 added lines, -77 removed lines patch added patch discarded remove patch
@@ -32,104 +32,104 @@
 block discarded – undo
32 32
 class GraphUser extends GraphObject
33 33
 {
34 34
 
35
-  /**
36
-   * Returns the ID for the user as a string if present.
37
-   *
38
-   * @return string|null
39
-   */
40
-  public function getId()
41
-  {
35
+    /**
36
+     * Returns the ID for the user as a string if present.
37
+     *
38
+     * @return string|null
39
+     */
40
+    public function getId()
41
+    {
42 42
     return $this->getProperty('id');
43
-  }
43
+    }
44 44
 
45
-  /**
46
-   * Returns the name for the user as a string if present.
47
-   *
48
-   * @return string|null
49
-   */
50
-  public function getName()
51
-  {
45
+    /**
46
+     * Returns the name for the user as a string if present.
47
+     *
48
+     * @return string|null
49
+     */
50
+    public function getName()
51
+    {
52 52
     return $this->getProperty('name');
53
-  }
53
+    }
54 54
   
55
-  public function getEmail()
56
-  {
55
+    public function getEmail()
56
+    {
57 57
     return $this->getProperty('email');
58
-  }
58
+    }
59 59
 
60
-  /**
61
-   * Returns the first name for the user as a string if present.
62
-   *
63
-   * @return string|null
64
-   */
65
-  public function getFirstName()
66
-  {
60
+    /**
61
+     * Returns the first name for the user as a string if present.
62
+     *
63
+     * @return string|null
64
+     */
65
+    public function getFirstName()
66
+    {
67 67
     return $this->getProperty('first_name');
68
-  }
68
+    }
69 69
 
70
-  /**
71
-   * Returns the middle name for the user as a string if present.
72
-   *
73
-   * @return string|null
74
-   */
75
-  public function getMiddleName()
76
-  {
70
+    /**
71
+     * Returns the middle name for the user as a string if present.
72
+     *
73
+     * @return string|null
74
+     */
75
+    public function getMiddleName()
76
+    {
77 77
     return $this->getProperty('middle_name');
78
-  }
78
+    }
79 79
 
80
-  /**
81
-   * Returns the last name for the user as a string if present.
82
-   *
83
-   * @return string|null
84
-   */
85
-  public function getLastName()
86
-  {
80
+    /**
81
+     * Returns the last name for the user as a string if present.
82
+     *
83
+     * @return string|null
84
+     */
85
+    public function getLastName()
86
+    {
87 87
     return $this->getProperty('last_name');
88
-  }
88
+    }
89 89
   
90
-  /**
91
-   * Returns the gender for the user as a string if present.
92
-   *
93
-   * @return string|null
94
-   */
95
-  public function getGender()
96
-  {
90
+    /**
91
+     * Returns the gender for the user as a string if present.
92
+     *
93
+     * @return string|null
94
+     */
95
+    public function getGender()
96
+    {
97 97
     return $this->getProperty('gender');
98
-  }
98
+    }
99 99
 
100
-  /**
101
-   * Returns the Facebook URL for the user as a string if available.
102
-   *
103
-   * @return string|null
104
-   */
105
-  public function getLink()
106
-  {
100
+    /**
101
+     * Returns the Facebook URL for the user as a string if available.
102
+     *
103
+     * @return string|null
104
+     */
105
+    public function getLink()
106
+    {
107 107
     return $this->getProperty('link');
108
-  }
108
+    }
109 109
 
110
-  /**
111
-   * Returns the users birthday, if available.
112
-   *
113
-   * @return \DateTime|null
114
-   */
115
-  public function getBirthday()
116
-  {
110
+    /**
111
+     * Returns the users birthday, if available.
112
+     *
113
+     * @return \DateTime|null
114
+     */
115
+    public function getBirthday()
116
+    {
117 117
     $value = $this->getProperty('birthday');
118 118
     if ($value) {
119
-      return new \DateTime($value);
119
+        return new \DateTime($value);
120 120
     }
121 121
     return null;
122
-  }
122
+    }
123 123
 
124
-  /**
125
-   * Returns the current location of the user as a FacebookGraphLocation
126
-   *   if available.
127
-   *
128
-   * @return GraphLocation|null
129
-   */
130
-  public function getLocation()
131
-  {
124
+    /**
125
+     * Returns the current location of the user as a FacebookGraphLocation
126
+     *   if available.
127
+     *
128
+     * @return GraphLocation|null
129
+     */
130
+    public function getLocation()
131
+    {
132 132
     return $this->getProperty('location', GraphLocation::className());
133
-  }
133
+    }
134 134
 
135 135
 }
Please login to merge, or discard this patch.
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/ldap_import_all_users.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 /**
4
- * This script executes the importation of all users in the LDAP repository
5
- * into Chamilo 
6
- * @package chamilo.auth.ldap
7
- */
4
+     * This script executes the importation of all users in the LDAP repository
5
+     * into Chamilo 
6
+     * @package chamilo.auth.ldap
7
+     */
8 8
 /**
9
- * Init
10
- */
9
+     * Init
10
+     */
11 11
 if (PHP_SAPI != 'cli') {
12 12
     die ('For security reasons, this script can only be launched from cron or from the command line');
13 13
 }
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/authldap.php 1 patch
Indentation   +33 added lines, -34 removed lines patch added patch discarded remove patch
@@ -46,10 +46,9 @@  discard block
 block discarded – undo
46 46
     - Universite Jean Monet (J Dubois / Michel Courbon)
47 47
     - Michel Panckoucke for reporting and fixing a bug
48 48
     - Patrick Cool: fixing security hole
49
-
50
-    *    @author Roan Embrechts
51
-    *    @version 3.0
52
-    *    @package chamilo.auth.ldap
49
+ *    @author Roan Embrechts
50
+ *    @version 3.0
51
+ *    @package chamilo.auth.ldap
53 52
  * Note:
54 53
  * If you are using a firewall, you might need to check port 389 is open in
55 54
  * order for Chamilo to communicate with the LDAP server.
@@ -211,8 +210,8 @@  discard block
 block discarded – undo
211 210
     $language = api_get_setting('platformLanguage');
212 211
     if (empty($language)) { $language = 'english'; }
213 212
     $_userId = UserManager::create_user($prenom, $nom, $status,
214
-                     $email, $uname, $password, $official_code,
215
-                     $language,'', '', 'ldap');
213
+                        $email, $uname, $password, $official_code,
214
+                        $language,'', '', 'ldap');
216 215
 
217 216
     //echo "new user added to Chamilo, id = $_userId";
218 217
 
@@ -271,7 +270,7 @@  discard block
 block discarded – undo
271 270
         // Open anonymous LDAP connection
272 271
         $result=false;
273 272
         $ldap_bind_res = ldap_handle_bind($ds,$result);
274
-	// Executing the search with the $filter parametr
273
+    // Executing the search with the $filter parametr
275 274
         //error_log('Searching for '.$filter.' on LDAP server',0);
276 275
         $sr=ldap_search($ds,$ldap_basedn,$filter);
277 276
         $info = ldap_get_entries($ds, $sr);
@@ -304,10 +303,10 @@  discard block
 block discarded – undo
304 303
     }
305 304
 } // end of check
306 305
 /**
307
- * Set the protocol version with version from config file (enables LDAP version 3)
308
- * @param    resource    The LDAP connexion resource, passed by reference.
309
- * @return    void
310
- */
306
+     * Set the protocol version with version from config file (enables LDAP version 3)
307
+     * @param    resource    The LDAP connexion resource, passed by reference.
308
+     * @return    void
309
+     */
311 310
 function ldap_set_version(&$resource) {
312 311
     //error_log('Entering ldap_set_version(&$resource)',0);
313 312
     global $ldap_version;
@@ -320,11 +319,11 @@  discard block
 block discarded – undo
320 319
     }
321 320
 }
322 321
 /**
323
- * Handle bind (whether authenticated or not)
324
- * @param    resource    The LDAP handler to which we are connecting (by reference)
325
- * @param    resource    The LDAP bind handler we will be modifying
326
- * @return    boolean        Status of the bind assignment. True for success, false for failure.
327
- */
322
+     * Handle bind (whether authenticated or not)
323
+     * @param    resource    The LDAP handler to which we are connecting (by reference)
324
+     * @param    resource    The LDAP bind handler we will be modifying
325
+     * @return    boolean        Status of the bind assignment. True for success, false for failure.
326
+     */
328 327
 function ldap_handle_bind(&$ldap_handler,&$ldap_bind) {
329 328
     //error_log('Entering ldap_handle_bind(&$ldap_handler,&$ldap_bind)',0);
330 329
     global $ldap_rdn,$ldap_pass, $extldap_config;
@@ -350,10 +349,10 @@  discard block
 block discarded – undo
350 349
     }
351 350
 }
352 351
 /**
353
- * Get the total number of users on the platform
354
- * @see SortableTable#get_total_number_of_items()
355
- * @author    Mustapha Alouani
356
- */
352
+     * Get the total number of users on the platform
353
+     * @see SortableTable#get_total_number_of_items()
354
+     * @author    Mustapha Alouani
355
+     */
357 356
 function ldap_get_users() {
358 357
 
359 358
     global $ldap_basedn, $ldap_host, $ldap_port, $ldap_rdn, $ldap_pass, $ldap_search_dn, $extldap_user_correspondance;
@@ -564,35 +563,35 @@  discard block
 block discarded – undo
564 563
         foreach ($UserList as $enreg_user) {
565 564
             $enreg_user = (int) $enreg_user;
566 565
             Database::query("INSERT IGNORE ".
567
-              " INTO $tbl_session_rel_course_rel_user ".
568
-              "(session_id,c_id,user_id) VALUES ".
569
-              "('$id_session','$enreg_course','$enreg_user')");
566
+                " INTO $tbl_session_rel_course_rel_user ".
567
+                "(session_id,c_id,user_id) VALUES ".
568
+                "('$id_session','$enreg_course','$enreg_user')");
570 569
         }
571 570
         $sql = "SELECT COUNT(user_id) as nbUsers ".
572
-               " FROM $tbl_session_rel_course_rel_user " .
573
-               " WHERE session_id='$id_session' ".
574
-               " AND c_id='$enreg_course'";
571
+                " FROM $tbl_session_rel_course_rel_user " .
572
+                " WHERE session_id='$id_session' ".
573
+                " AND c_id='$enreg_course'";
575 574
         $rs = Database::query($sql);
576 575
         list($nbr_users) = Database::fetch_array($rs);
577 576
         Database::query("UPDATE $tbl_session_rel_course  ".
578
-               " SET nbr_users=$nbr_users " .
579
-               " WHERE session_id='$id_session' ".
580
-               " AND c_id='$enreg_course'");
577
+                " SET nbr_users=$nbr_users " .
578
+                " WHERE session_id='$id_session' ".
579
+                " AND c_id='$enreg_course'");
581 580
     }
582 581
     foreach ($UserList as $enreg_user) {
583 582
         $enreg_user = (int) $enreg_user;
584 583
         Database::query("INSERT IGNORE INTO $tbl_session_rel_user ".
585
-               " (session_id, user_id, registered_at) " .
586
-               " VALUES('$id_session','$enreg_user', '" . api_get_utc_datetime() . "')");
584
+                " (session_id, user_id, registered_at) " .
585
+                " VALUES('$id_session','$enreg_user', '" . api_get_utc_datetime() . "')");
587 586
     }
588 587
     // We update the number of users in the session
589 588
     $sql = "SELECT COUNT(user_id) as nbUsers FROM $tbl_session_rel_user ".
590
-           " WHERE session_id='$id_session' ".
591
-           " AND relation_type<>".SESSION_RELATION_TYPE_RRHH." ";
589
+            " WHERE session_id='$id_session' ".
590
+            " AND relation_type<>".SESSION_RELATION_TYPE_RRHH." ";
592 591
     $rs = Database::query($sql);
593 592
     list($nbr_users) = Database::fetch_array($rs);
594 593
     Database::query("UPDATE $tbl_session SET nbr_users=$nbr_users ".
595
-           " WHERE id='$id_session'");
594
+            " WHERE id='$id_session'");
596 595
 }
597 596
 
598 597
 function syncro_users() {
Please login to merge, or discard this patch.
main/auth/key/index.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Display nothing. This ensure Apache doesn't display the list of files and folders
4
- * when it is not propertly configured.
5
- *
6
- * @license see /license.txt
7
- * @author Laurent Opprecht <[email protected]>, Nicolas Rod for the University of Geneva
8
- */
9 3
\ No newline at end of file
4
+     * Display nothing. This ensure Apache doesn't display the list of files and folders
5
+     * when it is not propertly configured.
6
+     *
7
+     * @license see /license.txt
8
+     * @author Laurent Opprecht <[email protected]>, Nicolas Rod for the University of Geneva
9
+     */
10 10
\ No newline at end of file
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.