Completed
Pull Request — 1.11.x (#1215)
by José
45:23
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/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/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.
main/reports/index.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -134,14 +134,14 @@
 block discarded – undo
134 134
                         <select class="input_field_12em link required" name="type" id="type">
135 135
 <?php
136 136
 foreach ($reports_template as $key => $value) {
137
-	echo '<option value="'.$key.'">'.$value['description'].'</option>';
137
+    echo '<option value="'.$key.'">'.$value['description'].'</option>';
138 138
 }
139 139
 ?>
140 140
                         </select><br />
141 141
                     </span>
142 142
 <?php
143 143
 foreach ($reports_template as $key => $value) {
144
-	echo $value['wizard'];
144
+    echo $value['wizard'];
145 145
 }
146 146
 ?>
147 147
                     <span id="format" class="step submit_step">
Please login to merge, or discard this patch.