Completed
Pull Request — 1.11.x (#1215)
by José
45:23
created
main/auth/profile.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 $userGeolocalization = api_get_setting('enable_profile_user_address_geolocalization') == 'true';
34 34
 
35 35
 $htmlHeadXtra[] = api_get_password_checker_js('#username', '#password1');
36
-$htmlHeadXtra[] = '<link  href="'. api_get_path(WEB_PATH) .'web/assets/cropper/dist/cropper.min.css" rel="stylesheet">';
37
-$htmlHeadXtra[] = '<script src="'. api_get_path(WEB_PATH) .'web/assets/cropper/dist/cropper.min.js"></script>';
36
+$htmlHeadXtra[] = '<link  href="'.api_get_path(WEB_PATH).'web/assets/cropper/dist/cropper.min.css" rel="stylesheet">';
37
+$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_PATH).'web/assets/cropper/dist/cropper.min.js"></script>';
38 38
 if ($userGeolocalization) {
39 39
     $htmlHeadXtra[] = '<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?sensor=true" ></script>';
40 40
 }
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 if ($userGeolocalization) {
154 154
     $htmlHeadXtra[] = '<script>
155 155
     $(document).ready(function() {
156
-        var address = "' . $user_data['address'] . '";
156
+        var address = "' . $user_data['address'].'";
157 157
         initializeGeo(address, false);
158 158
 
159 159
         $("#geolocalization").on("click", function() {
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             };
179 179
 
180 180
             var geoError = function(error) {
181
-                alert("Geocode ' . get_lang('Error') . ': " + error);
181
+                alert("Geocode ' . get_lang('Error').': " + error);
182 182
             };
183 183
 
184 184
             var geoOptions = {
@@ -229,11 +229,11 @@  discard block
 block discarded – undo
229 229
                             infowindow.open(map, marker);
230 230
                         });
231 231
                     } else {
232
-                        alert("' . get_lang("NotFound") . '");
232
+                        alert("' . get_lang("NotFound").'");
233 233
                     }
234 234
 
235 235
                 } else {
236
-                    alert("Geocode ' . get_lang('Error') . ': " + status);
236
+                    alert("Geocode ' . get_lang('Error').': " + status);
237 237
                 }
238 238
             });
239 239
         }
@@ -263,10 +263,10 @@  discard block
 block discarded – undo
263 263
 if (api_is_western_name_order()) {
264 264
     //    FIRST NAME and LAST NAME
265 265
     $form->addElement('text', 'firstname', get_lang('FirstName'), array('size' => 40));
266
-    $form->addElement('text', 'lastname',  get_lang('LastName'),  array('size' => 40));
266
+    $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40));
267 267
 } else {
268 268
     //    LAST NAME and FIRST NAME
269
-    $form->addElement('text', 'lastname',  get_lang('LastName'),  array('size' => 40));
269
+    $form->addElement('text', 'lastname', get_lang('LastName'), array('size' => 40));
270 270
     $form->addElement('text', 'firstname', get_lang('FirstName'), array('size' => 40));
271 271
 }
272 272
 if (api_get_setting('profile', 'name') !== 'true') {
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 $form->applyFilter(array('lastname', 'firstname'), 'stripslashes');
276 276
 $form->applyFilter(array('lastname', 'firstname'), 'trim');
277 277
 $form->applyFilter(array('lastname', 'firstname'), 'html_filter');
278
-$form->addRule('lastname' , get_lang('ThisFieldIsRequired'), 'required');
278
+$form->addRule('lastname', get_lang('ThisFieldIsRequired'), 'required');
279 279
 $form->addRule('firstname', get_lang('ThisFieldIsRequired'), 'required');
280 280
 
281 281
 //    USERNAME
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
     $form->freeze('email');
319 319
 }
320 320
 
321
-if (api_get_setting('registration', 'email') == 'true' &&  api_get_setting('profile', 'email') == 'true') {
321
+if (api_get_setting('registration', 'email') == 'true' && api_get_setting('profile', 'email') == 'true') {
322 322
     $form->applyFilter('email', 'stripslashes');
323 323
     $form->applyFilter('email', 'trim');
324 324
     $form->addRule('email', get_lang('ThisFieldIsRequired'), 'required');
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
 
512 512
 // the $jquery_ready_content variable collects all functions that
513 513
 // will be load in the $(document).ready javascript function
514
-$htmlHeadXtra[] ='<script>
514
+$htmlHeadXtra[] = '<script>
515 515
 $(document).ready(function(){
516 516
     '.$jquery_ready_content.'
517 517
 });
@@ -667,7 +667,7 @@  discard block
 block discarded – undo
667 667
 
668 668
             if (!check_user_email($user_data['email']) &&
669 669
                 empty($user_data['password0'])
670
-            ){
670
+            ) {
671 671
                 Display::addFlash(
672 672
                     Display:: return_message(
673 673
                         get_lang('ToChangeYourEmailMustTypeYourPassword'),
@@ -776,7 +776,7 @@  discard block
 block discarded – undo
776 776
     $available_values_to_modify = array();
777 777
     foreach ($profile_list as $key => $status) {
778 778
         if ($status == 'true') {
779
-            switch($key) {
779
+            switch ($key) {
780 780
                 case 'login':
781 781
                     $available_values_to_modify[] = 'username';
782 782
                     break;
@@ -909,10 +909,10 @@  discard block
 block discarded – undo
909 909
 
910 910
         if (isset($_GET['type']) && $_GET['type'] == 'extended') {
911 911
             $actions .= '<a href="profile.php?type=reduced'.$show.'">'.
912
-                Display::return_icon('edit.png', get_lang('EditNormalProfile'),'',16).'</a>';
912
+                Display::return_icon('edit.png', get_lang('EditNormalProfile'), '', 16).'</a>';
913 913
         } else {
914 914
             $actions .= '<a href="profile.php?type=extended'.$show.'">'.
915
-                Display::return_icon('edit.png', get_lang('EditExtendProfile'),'',16).'</a>';
915
+                Display::return_icon('edit.png', get_lang('EditExtendProfile'), '', 16).'</a>';
916 916
         }
917 917
         $actions .= '</div>';
918 918
     }
Please login to merge, or discard this patch.
main/auth/inscription.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             };
78 78
 
79 79
             var geoError = function(error) {
80
-                alert("Geocode ' . get_lang('Error') . ': " + error);
80
+                alert("Geocode ' . get_lang('Error').': " + error);
81 81
             };
82 82
 
83 83
             var geoOptions = {
@@ -128,11 +128,11 @@  discard block
 block discarded – undo
128 128
                             infowindow.open(map, marker);
129 129
                         });
130 130
                     } else {
131
-                        alert("' . get_lang("NotFound") . '");
131
+                        alert("' . get_lang("NotFound").'");
132 132
                     }
133 133
 
134 134
                 } else {
135
-                    alert("Geocode ' . get_lang('Error') . ': " + status);
135
+                    alert("Geocode ' . get_lang('Error').': " + status);
136 136
                 }
137 137
             });
138 138
         }
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         if (api_get_setting('registration', 'email') != 'true') {
183 183
             $form->addRule('email', get_lang('ThisFieldIsRequired'), 'required');
184 184
         }
185
-        $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH);
185
+        $form->addRule('email', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH);
186 186
         $form->addRule('email', get_lang('UserTaken'), 'username_available');
187 187
     }
188 188
 
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
         $form->addElement('text', 'username', get_lang('UserName'), array('id' => 'username', 'size' => USERNAME_MAX_LENGTH));
216 216
         $form->applyFilter('username', 'trim');
217 217
         $form->addRule('username', get_lang('ThisFieldIsRequired'), 'required');
218
-        $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string)USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH);
218
+        $form->addRule('username', sprintf(get_lang('UsernameMaxXCharacters'), (string) USERNAME_MAX_LENGTH), 'maxlength', USERNAME_MAX_LENGTH);
219 219
         $form->addRule('username', get_lang('UsernameWrong'), 'username');
220 220
         $form->addRule('username', get_lang('UserTaken'), 'username_available');
221 221
     }
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     if (CHECK_PASS_EASY_TO_FIND) {
247 247
         $form->addRule(
248 248
             'password1',
249
-            get_lang('PassTooEasy') . ': ' . api_generate_password(),
249
+            get_lang('PassTooEasy').': '.api_generate_password(),
250 250
             'callback',
251 251
             'api_check_password'
252 252
         );
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
                 <div class="form-group">
277 277
                     <label for="geolocalization" class="col-sm-2 control-label"></label>
278 278
                     <div class="col-sm-8">
279
-                        <button class="null btn btn-default " id="geolocalization" name="geolocalization" type="submit"><em class="fa fa-map-marker"></em> ' . get_lang('Geolocalization') . '</button>
280
-                        <button class="null btn btn-default " id="myLocation" name="myLocation" type="submit"><em class="fa fa-crosshairs"></em> ' . get_lang('MyLocation') . '</button>
279
+                        <button class="null btn btn-default " id="geolocalization" name="geolocalization" type="submit"><em class="fa fa-map-marker"></em> ' . get_lang('Geolocalization').'</button>
280
+                        <button class="null btn btn-default " id="myLocation" name="myLocation" type="submit"><em class="fa fa-crosshairs"></em> ' . get_lang('MyLocation').'</button>
281 281
                     </div>
282 282
                 </div>
283 283
             ');
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             $form->addHtml('
286 286
                 <div class="form-group">
287 287
                     <label for="map" class="col-sm-2 control-label">
288
-                        ' . get_lang('Map') . '
288
+                        ' . get_lang('Map').'
289 289
                     </label>
290 290
                     <div class="col-sm-8">
291 291
                         <div name="map" id="map" style="width:100%; height:300px;">
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
             )
346 346
         );
347 347
 
348
-        $captcha_question =  $form->addElement('CAPTCHA_Image', 'captcha_question', '', $options);
348
+        $captcha_question = $form->addElement('CAPTCHA_Image', 'captcha_question', '', $options);
349 349
         $form->addElement('static', null, null, get_lang('ClickOnTheImageForANewOne'));
350 350
 
351 351
         $form->addElement('text', 'captcha', get_lang('EnterTheLettersYouSee'), array('size' => 40));
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
         }
487 487
     }
488 488
 
489
-    $tool_name = get_lang('Registration', null, (!empty($_POST['language'])?$_POST['language']: $_user['language']));
489
+    $tool_name = get_lang('Registration', null, (!empty($_POST['language']) ? $_POST['language'] : $_user['language']));
490 490
 
491 491
     if (api_get_setting('allow_terms_conditions') === 'true' && $user_already_registered_show_terms) {
492 492
         $tool_name = get_lang('TermsAndConditions');
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
     }
508 508
 
509 509
     if (file_exists($home.'register_top_'.$user_selected_language.'.html')) {
510
-        $home_top_temp = @(string)file_get_contents($home.'register_top_'.$user_selected_language.'.html');
510
+        $home_top_temp = @(string) file_get_contents($home.'register_top_'.$user_selected_language.'.html');
511 511
         $open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp);
512 512
         $open = api_to_system_encoding($open, api_detect_encoding(strip_tags($open)));
513 513
         if (!empty($open)) {
@@ -537,7 +537,7 @@  discard block
 block discarded – undo
537 537
         if (api_get_setting('show_terms_if_profile_completed') === 'true') {
538 538
             $userInfo = api_get_user_info();
539 539
             if ($userInfo) {
540
-                if ((int)$userInfo['profile_completed'] !== 1) {
540
+                if ((int) $userInfo['profile_completed'] !== 1) {
541 541
                     api_not_allowed(true);
542 542
                 }
543 543
             }
@@ -747,7 +747,7 @@  discard block
 block discarded – undo
747 747
                 Database::query($sql);
748 748
 
749 749
                 // 2. Send mail to all platform admin
750
-                $emailsubject  = get_lang('ApprovalForNewAccount', null, $values['language']).': '.$values['username'];
750
+                $emailsubject = get_lang('ApprovalForNewAccount', null, $values['language']).': '.$values['username'];
751 751
                 $emailbody = get_lang('ApprovalForNewAccount', null, $values['language'])."\n";
752 752
                 $emailbody .= get_lang('UserName', null, $values['language']).': '.$values['username']."\n";
753 753
 
@@ -850,7 +850,7 @@  discard block
 block discarded – undo
850 850
         '<p>'.
851 851
         get_lang('Dear', null, $_user['language']).' '.
852 852
         stripslashes(Security::remove_XSS($recipient_name)).',<br /><br />'.
853
-        get_lang('PersonalSettings',null,$_user['language']).".</p>";
853
+        get_lang('PersonalSettings', null, $_user['language']).".</p>";
854 854
 
855 855
     $form_data = array(
856 856
         'button' => Display::button('next', get_lang('Next', null, $_user['language']), array('class' => 'btn btn-primary btn-large')),
@@ -874,14 +874,14 @@  discard block
 block discarded – undo
874 874
         }
875 875
     } else {
876 876
         if (!empty($values['email'])) {
877
-            $text_after_registration.= '<p>'.get_lang('MailHasBeenSent', null, $_user['language']).'.</p>';
877
+            $text_after_registration .= '<p>'.get_lang('MailHasBeenSent', null, $_user['language']).'.</p>';
878 878
         }
879 879
 
880 880
         if ($is_allowedCreateCourse) {
881 881
             if ($usersCanCreateCourse) {
882
-                $form_data['message'] = '<p>'. get_lang('NowGoCreateYourCourse', null, $_user['language']). "</p>";
882
+                $form_data['message'] = '<p>'.get_lang('NowGoCreateYourCourse', null, $_user['language'])."</p>";
883 883
             }
884
-            $form_data['action']  = api_get_path(WEB_CODE_PATH).'create_course/add_course.php';
884
+            $form_data['action'] = api_get_path(WEB_CODE_PATH).'create_course/add_course.php';
885 885
 
886 886
             if (api_get_setting('course_validation') === 'true') {
887 887
                 $form_data['button'] = Display::button(
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
         } else {
905 905
             if (api_get_setting('allow_students_to_browse_courses') == 'true') {
906 906
                 $form_data['action'] = 'courses.php?action=subscribe';
907
-                $form_data['message'] = '<p>'. get_lang('NowGoChooseYourCourses', null, $_user['language']). ".</p>";
907
+                $form_data['message'] = '<p>'.get_lang('NowGoChooseYourCourses', null, $_user['language']).".</p>";
908 908
             } else {
909 909
                 $form_data['action'] = api_get_path(WEB_PATH).'user_portal.php';
910 910
             }
Please login to merge, or discard this patch.