Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
my.php
r276 r316 41 41 if ( isset($_POST['submit']) ) { 42 42 $updateset = array(); 43 $notifs = ''; 43 44 $full_cats = $cache->obtain_cats(); 44 45 … … 63 64 $updateset['savepms'] = ( isset($_POST['savepms']) ? 1 : 0 ); 64 65 65 $ pmnotif = ( isset($_POST['pmnotif']) ? 1 : 0);66 $notifs = ( $pmnotif ? '[pm]' : '' );67 68 $updateset['notify_forum'] = ( isset($_POST['notif_forum']) ? 1 : 0 );66 $user_notify = request_var('user_notify', array(''=>0)); 67 foreach ( $user_notify AS $key => $val ) { 68 $notifs .= '[' . $key . ']'; 69 } 69 70 70 71 $comment_pm = request_var('commentpm', 0); … … 380 381 } 381 382 383 $notifs = array('pm', 'forum', 'comments'); 384 385 $notifs_options = ''; 386 foreach ( $notifs AS $_null => $val ) { 387 $name = 'user_notify[' . $val . ']'; 388 $notifs_options .= '<input type="checkbox" id="' . $name . '" name="' . $name . '"' . ( strpos($userdata['notifs'], '[' . $val . ']') !== false ? ' checked="checked"' : '' ) . ' value="1" /> ' . $lang['email_notifis_' . $val] . '<br />'; 389 } 390 382 391 $template->assign_vars(array( 383 392 'LANG_INPUT' => $lang_select, … … 390 399 'BIRTHDAY_OPTIONS' => $birthday_select, 391 400 'PRIVACY_INPUT' => $privacy_input, 392 'EMAIL_NOTIFIS_INPUT' => '<input type="checkbox" id="pmnotif" name="pmnotif"' . (strpos($userdata['notifs'], "[pm]") !== false ? ' checked="checked"' : "") . ' value="yes" /> ' . $lang['email_notifis_pm'] . '<br /><input type="checkbox" id="notif_forum" name="notif_forum"' . (($userdata['notify_forum'] == 1)? ' checked="checked"' : '') . ' value="yes" /> ' . $lang['email_notifis_forum'] . "<br />\n")393 ) ;401 'EMAIL_NOTIFIS_INPUT' => $notifs_options 402 )); 394 403 } 395 404
