Changeset 1620 for trunk/profile.php
- Timestamp:
- Nov 29, 2006, 5:18:11 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/profile.php
r1614 r1620 64 64 array_push($errors, $lang['nb_line_page_error']); 65 65 } 66 66 67 67 if ($_POST['maxwidth'] != '' 68 68 and (!preg_match($int_pattern, $_POST['maxwidth']) … … 89 89 array_push($errors, $mail_error); 90 90 } 91 91 92 92 if (!empty($_POST['use_new_pwd'])) 93 93 { … … 98 98 l10n('New password confirmation does not correspond')); 99 99 } 100 100 101 101 // changing password requires old password 102 102 $query = ' … … 106 106 ;'; 107 107 list($current_password) = mysql_fetch_row(pwg_query($query)); 108 108 109 109 if ($conf['pass_convert']($_POST['password']) != $current_password) 110 110 { … … 112 112 } 113 113 } 114 114 115 115 if (count($errors) == 0) 116 116 { 117 117 // mass_updates function 118 118 include_once(PHPWG_ROOT_PATH.'admin/include/functions.php'); 119 119 120 120 // update common user informations 121 121 $fields = array($conf['user_fields']['email']); … … 137 137 'update' => $fields), 138 138 array($data)); 139 139 140 140 // update user "additional" informations (specific to PhpWebGallery) 141 141 $fields = array( … … 143 143 'expand', 'show_nb_comments', 'recent_period', 'template' 144 144 ); 145 145 146 146 $data = array(); 147 147 $data['user_id'] = $_POST['userid']; 148 148 149 149 foreach ($fields as $field) 150 150 { … … 157 157 array('primary' => array('user_id'), 'update' => $fields), 158 158 array($data)); 159 159 160 160 // redirection 161 161 redirect(make_index_url()); … … 176 176 177 177 $expand = ($userdata['expand'] == 'true') ? 'EXPAND_TREE_YES':'EXPAND_TREE_NO'; 178 178 179 179 $nb_comments = 180 180 ($userdata['show_nb_comments'] == 'true') ? 'NB_COMMENTS_YES':'NB_COMMENTS_NO'; 181 181 182 182 $template->assign_vars( 183 183 array( … … 190 190 'MAXWIDTH'=>@$userdata['maxwidth'], 191 191 'MAXHEIGHT'=>@$userdata['maxheight'], 192 192 193 193 $expand=>'checked="checked"', 194 194 $nb_comments=>'checked="checked"', 195 196 'L_TITLE' => $lang['customize_title'],197 'L_REGISTRATION_INFO' => $lang['register_title'],198 'L_PREFERENCES' => $lang['preferences'],199 'L_USERNAME' => $lang['Username'],200 'L_EMAIL' => $lang['mail_address'],201 'L_CURRENT_PASSWORD' => $lang['password'],202 'L_CURRENT_PASSWORD_HINT' => $lang['password_hint'],203 'L_NEW_PASSWORD' => $lang['new_password'],204 'L_NEW_PASSWORD_HINT' => $lang['new_password_hint'],205 'L_CONFIRM_PASSWORD' => $lang['reg_confirm'],206 'L_CONFIRM_PASSWORD_HINT' => $lang['confirm_password_hint'],207 'L_LANG_SELECT'=>$lang['language'],208 'L_NB_IMAGE_LINE'=>$lang['nb_image_per_row'],209 'L_NB_ROW_PAGE'=>$lang['nb_row_per_page'],210 'L_STYLE_SELECT'=>$lang['theme'],211 'L_RECENT_PERIOD'=>$lang['recent_period'],212 'L_EXPAND_TREE'=>$lang['auto_expand'],213 'L_NB_COMMENTS'=>$lang['show_nb_comments'],214 'L_MAXWIDTH'=>$lang['maxwidth'],215 'L_MAXHEIGHT'=>$lang['maxheight'],216 'L_YES'=>$lang['yes'],217 'L_NO'=>$lang['no'],218 'L_SUBMIT'=>$lang['submit'],219 'L_RESET'=>$lang['reset'],220 'L_RETURN' => $lang['home'],221 'L_RETURN_HINT' => $lang['home_hint'],222 195 223 196 'U_RETURN' => make_index_url(), 224 197 225 198 'F_ACTION'=>$url_action, 226 199 )); … … 242 215 $selected = ''; 243 216 } 244 217 245 218 $template->assign_block_vars( 246 219 $blockname, … … 268 241 $selected = ''; 269 242 } 270 243 271 244 $template->assign_block_vars( 272 245 $blockname,
Note: See TracChangeset
for help on using the changeset viewer.