Line 52 | Line 52 |
---|
'popuppm' => request_var('popuppm', (bool) $user->optionget('popuppm')), 'allowpm' => request_var('allowpm', (bool) $user->data['user_allow_pm']), );
|
'popuppm' => request_var('popuppm', (bool) $user->optionget('popuppm')), '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 ($submit) {
|
$data['style'] = ($config['override_user_style']) ? $config['default_style'] : $data['style'];
| if ($config['override_user_style']) { $data['style'] = (int) $config['default_style']; } else if (!phpbb_style_is_active($data['style'])) { $data['style'] = (int) $user->data['user_style']; }
|
$error = validate_data($data, array( 'dateformat' => array('string', false, 1, 30),
|
$error = validate_data($data, array( 'dateformat' => array('string', false, 1, 30),
|
'lang' => array('match', false, '#^[a-z0-9_\-]{2,}$#i'),
| 'lang' => array('language_iso_name'),
|
'tz' => array('num', false, -14, 14), ));
| 'tz' => array('num', false, -14, 14), ));
|
Line 120 | Line 133 |
---|
$s_custom = true; } $dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
|
$s_custom = true; } $dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
|
| // check if there are any user-selectable languages $sql = 'SELECT COUNT(lang_id) as languages_count FROM ' . LANG_TABLE; $result = $db->sql_query($sql); if ($db->sql_fetchfield('languages_count') > 1) { $s_more_languages = true; } else { $s_more_languages = false; } $db->sql_freeresult($result);
// check if there are any user-selectable styles $sql = 'SELECT COUNT(style_id) as styles_count FROM ' . STYLES_TABLE . ' WHERE style_active = 1'; $result = $db->sql_query($sql); if ($db->sql_fetchfield('styles_count') > 1) { $s_more_styles = true; } else { $s_more_styles = false; } $db->sql_freeresult($result);
|
$template->assign_vars(array( 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
| $template->assign_vars(array( 'ERROR' => (sizeof($error)) ? implode('<br />', $error) : '',
|
Line 141 | Line 183 |
---|
'S_CUSTOM_DATEFORMAT' => $s_custom, 'DEFAULT_DATEFORMAT' => $config['default_dateformat'], 'A_DEFAULT_DATEFORMAT' => addslashes($config['default_dateformat']),
|
'S_CUSTOM_DATEFORMAT' => $s_custom, 'DEFAULT_DATEFORMAT' => $config['default_dateformat'], 'A_DEFAULT_DATEFORMAT' => addslashes($config['default_dateformat']),
|
| 'S_MORE_LANGUAGES' => $s_more_languages, 'S_MORE_STYLES' => $s_more_styles,
|
'S_LANG_OPTIONS' => language_select($data['lang']), 'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['style']),
| 'S_LANG_OPTIONS' => language_select($data['lang']), 'S_STYLE_OPTIONS' => ($config['override_user_style']) ? '' : style_select($data['style']),
|
Line 276 | Line 321 |
---|
'S_AVATARS' => $data['avatars'], 'S_DISABLE_CENSORS' => $data['wordcensor'],
|
'S_AVATARS' => $data['avatars'], 'S_DISABLE_CENSORS' => $data['wordcensor'],
|
'S_CHANGE_CENSORS' => ($auth->acl_get('u_chgcensors')) ? true : false,
| 'S_CHANGE_CENSORS' => ($auth->acl_get('u_chgcensors') && $config['allow_nocensors']) ? true : false,
|
'S_TOPIC_SORT_DAYS' => $s_limit_topic_days, 'S_TOPIC_SORT_KEY' => $s_sort_topic_key,
| 'S_TOPIC_SORT_DAYS' => $s_limit_topic_days, 'S_TOPIC_SORT_KEY' => $s_sort_topic_key,
|
Line 294 | Line 339 |
---|
'bbcode' => request_var('bbcode', $user->optionget('bbcode')), 'smilies' => request_var('smilies', $user->optionget('smilies')), 'sig' => request_var('sig', $user->optionget('attachsig')),
|
'bbcode' => request_var('bbcode', $user->optionget('bbcode')), 'smilies' => request_var('smilies', $user->optionget('smilies')), 'sig' => request_var('sig', $user->optionget('attachsig')),
|
'notify' => request_var('notify', $user->data['user_notify']),
| 'notify' => request_var('notify', (bool) $user->data['user_notify']),
|
); add_form_key('ucp_prefs_post');
| ); add_form_key('ucp_prefs_post');
|