Browse Source

Minor - format code, fixing PHP warnings.

Julio Montoya 10 years ago
parent
commit
4602eddb21
1 changed files with 5 additions and 10 deletions
  1. 5 10
      main/auth/profile.php

+ 5 - 10
main/auth/profile.php

@@ -8,9 +8,6 @@
 *
 * @package chamilo.auth
 */
-/**
- * Code
- */
 
 // Language files that should be included.
 $language_file = array('registration', 'messages', 'userInfo');
@@ -25,7 +22,6 @@ if (api_get_setting('allow_social_tool') == 'true') {
     $this_section = SECTION_MYPROFILE;
 }
 
-
 $htmlHeadXtra[] = api_get_password_checker_js('#username', '#password1');
 
 $_SESSION['this_section'] = $this_section;
@@ -477,8 +473,10 @@ if ($form->validate()) {
         $user_data['picture_uri'] = '';
     }
 
-    //Remove production
-    if (is_array($user_data['remove_production'])) {
+    // Remove production.
+    if (isset($user_data['remove_production']) &&
+        is_array($user_data['remove_production'])
+    ) {
         foreach (array_keys($user_data['remove_production']) as $production) {
             UserManager::remove_user_production(api_get_user_id(), urldecode($production));
         }
@@ -658,8 +656,6 @@ if ($form->validate()) {
     exit;
 }
 
-
-/*          MAIN DISPLAY SECTION  */
 // the header
 Display::display_header(get_lang('ModifyProfile'));
 
@@ -700,7 +696,6 @@ if (!empty($file_deleted)) {
     Display :: display_confirmation_message($message, false);
 }
 
-
 if (!empty($msg_fail_changue_email)){
     $errormail=get_lang('ToChangeYourEmailMustTypeYourPassword');
     Display :: display_error_message($errormail, false);
@@ -711,7 +706,7 @@ if (!empty($msg_is_not_password)){
     Display :: display_warning_message($warning_msg, false);
 }
 
-//User picture size is calculated from SYSTEM path
+// User picture size is calculated from SYSTEM path
 $image_syspath = UserManager::get_user_picture_path_by_id(api_get_user_id(), 'system', false, true);
 $image_syspath['dir'].$image_syspath['file'];