diff options
| author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-10-20 22:11:41 -0500 |
|---|---|---|
| committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-10-20 22:11:41 -0500 |
| commit | 4874226b6e41df64959761ff53a61cfa190cabf1 (patch) | |
| tree | 8c2443899f6475c0a30988d06e22fbbde55b68c4 /phpBB/includes/ucp/ucp_prefs.php | |
| parent | bc18e368c36af90b2e998913e827dc7be71f3bd0 (diff) | |
| download | forums-4874226b6e41df64959761ff53a61cfa190cabf1.tar forums-4874226b6e41df64959761ff53a61cfa190cabf1.tar.gz forums-4874226b6e41df64959761ff53a61cfa190cabf1.tar.bz2 forums-4874226b6e41df64959761ff53a61cfa190cabf1.tar.xz forums-4874226b6e41df64959761ff53a61cfa190cabf1.zip | |
[ticket/11103] Re-add notify method to the UCP preferences
I've noticed that this is used in other areas still in phpBB, so it should
not be removed.
PHPBB3-11103
Diffstat (limited to 'phpBB/includes/ucp/ucp_prefs.php')
| -rw-r--r-- | phpBB/includes/ucp/ucp_prefs.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index 709d2a90b0..4b49d2092d 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -37,6 +37,7 @@ class ucp_prefs case 'personal': add_form_key('ucp_prefs_personal'); $data = array( + 'notifymethod' => request_var('notifymethod', $user->data['user_notify_type']), 'dateformat' => request_var('dateformat', $user->data['user_dateformat'], true), 'lang' => basename(request_var('lang', $user->data['user_lang'])), 'style' => request_var('style', (int) $user->data['user_style']), @@ -48,6 +49,12 @@ class ucp_prefs 'allowpm' => request_var('allowpm', (bool) $user->data['user_allow_pm']), ); + if ($data['notifymethod'] == NOTIFY_IM && (!$config['jab_enable'] || !$user->data['user_jabber'] || !@extension_loaded('xml'))) + { + // Jabber isnt enabled, or no jabber field filled in. Update the users table to be sure its correct. + $data['notifymethod'] = NOTIFY_BOTH; + } + if ($submit) { if ($config['override_user_style']) @@ -77,6 +84,7 @@ class ucp_prefs 'user_allow_viewemail' => $data['viewemail'], 'user_allow_massemail' => $data['massemail'], 'user_allow_viewonline' => ($auth->acl_get('u_hideonline')) ? !$data['hideonline'] : $user->data['user_allow_viewonline'], + 'user_notify_type' => $data['notifymethod'], 'user_options' => $user->data['user_options'], 'user_dateformat' => $data['dateformat'], @@ -122,6 +130,9 @@ class ucp_prefs $template->assign_vars(array( 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '', + 'S_NOTIFY_EMAIL' => ($data['notifymethod'] == NOTIFY_EMAIL) ? true : false, + 'S_NOTIFY_IM' => ($data['notifymethod'] == NOTIFY_IM) ? true : false, + 'S_NOTIFY_BOTH' => ($data['notifymethod'] == NOTIFY_BOTH) ? true : false, 'S_VIEW_EMAIL' => $data['viewemail'], 'S_MASS_EMAIL' => $data['massemail'], 'S_ALLOW_PM' => $data['allowpm'], |
