Completed
Pull Request — 1.11.x (#1421)
by José
46:34 queued 10:32
created
main/auth/gotocourse.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
 
42 42
     $msg .= '<div class="well_login">';
43 43
     $msg .= $form->return_form();
44
-    $msg .='</div>';
44
+    $msg .= '</div>';
45 45
     if (api_is_cas_activated()) {
46 46
         $msg .= "</div>";
47 47
     }
Please login to merge, or discard this patch.
main/auth/conditional_login/complete_phone_number.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 $url =  api_get_path(WEB_PATH).'main/auth/conditional_login/complete_phone_number.php';
6 6
 
7 7
 if (! isset($_SESSION['conditional_login']['uid']))
8
-  die("Not Authorised");
8
+    die("Not Authorised");
9 9
 ?>
10 10
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
11 11
 <html lang="fr" xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml">
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,9 +2,9 @@  discard block
 block discarded – undo
2 2
 /* For licensing terms, see /license.txt */
3 3
 
4 4
 require_once dirname(__FILE__).'/../../inc/global.inc.php';
5
-$url =  api_get_path(WEB_PATH).'main/auth/conditional_login/complete_phone_number.php';
5
+$url = api_get_path(WEB_PATH).'main/auth/conditional_login/complete_phone_number.php';
6 6
 
7
-if (! isset($_SESSION['conditional_login']['uid']))
7
+if (!isset($_SESSION['conditional_login']['uid']))
8 8
   die("Not Authorised");
9 9
 ?>
10 10
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
   </body>
21 21
 </html>
22 22
 <?php
23
-if (isset($_POST['submit'])){
23
+if (isset($_POST['submit'])) {
24 24
     $u = api_get_user_info($_SESSION['conditional_login']['uid']);
25 25
     $u['phone'] = $_POST['phone_number'];
26 26
     $password = null; // we don't want to change the password
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,8 +4,9 @@
 block discarded – undo
4 4
 require_once dirname(__FILE__).'/../../inc/global.inc.php';
5 5
 $url =  api_get_path(WEB_PATH).'main/auth/conditional_login/complete_phone_number.php';
6 6
 
7
-if (! isset($_SESSION['conditional_login']['uid']))
7
+if (! isset($_SESSION['conditional_login']['uid'])) {
8 8
   die("Not Authorised");
9
+}
9 10
 ?>
10 11
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
11 12
 <html lang="fr" xml:lang="fr" xmlns="http://www.w3.org/1999/xhtml">
Please login to merge, or discard this patch.
main/auth/my_progress.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -54,16 +54,16 @@  discard block
 block discarded – undo
54 54
         }
55 55
         $course_info = api_get_course_info_by_id($result['c_id']);
56 56
         $course_image = '<img src="'.$course_info['course_image_large'].'">';
57
-        $dates .= '<li><a href="#'.$login.'">' . api_convert_and_format_date($login, DATE_FORMAT_SHORT) . '</a></li>';
57
+        $dates .= '<li><a href="#'.$login.'">'.api_convert_and_format_date($login, DATE_FORMAT_SHORT).'</a></li>';
58 58
         $issues .= '<li id ="'.$login.'">';
59 59
         $issues .= '<div class="img-course">'.$course_image.'</div>';
60 60
         
61 61
         $issues .= '<div class="text-course">';
62
-        $issues .= '<p>' . sprintf(
62
+        $issues .= '<p>'.sprintf(
63 63
                 get_lang('YouHaveEnteredTheCourseXInY'),
64
-                '" '. $courseInfo['name'] .' "',
64
+                '" '.$courseInfo['name'].' "',
65 65
                 api_convert_and_format_date($login, DATE_TIME_FORMAT_LONG) 
66
-                ) . '</p>';
66
+                ).'</p>';
67 67
         $issues .= '</div>'; 
68 68
         $issues .= '</li>';
69 69
         $count++;
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
     $content .= '<div class="row">';
83 83
     $content .= '<div class="col-md-12">';
84 84
     $content .= '<div id="my_timeline">';
85
-    $content .= '<ul id="dates">' . $dates . '</ul>';
86
-    $content .= '<ul id="issues">' . $issues . '</ul>';
85
+    $content .= '<ul id="dates">'.$dates.'</ul>';
86
+    $content .= '<ul id="issues">'.$issues.'</ul>';
87 87
     $content .= '<div id="grad_left"></div>';
88 88
     $content .= '<div id="grad_right"></div>';
89 89
     $content .= '<a href="#" id="prev"></a>';
Please login to merge, or discard this patch.
main/auth/external_login/updateUser.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
main/auth/external_login/newUser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
main/auth/external_login/ldap_import_all_users.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@
 block discarded – undo
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
  */
Please login to merge, or discard this patch.
main/auth/external_login/newUser.ldap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@
 block discarded – undo
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) {
Please login to merge, or discard this patch.
main/auth/external_login/ldap.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -303,7 +303,7 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
main/auth/external_login/functions.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
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
Please login to merge, or discard this patch.