mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-07 17:27:16 +02:00
Merge branch 'develop' of github.com:EXreaction/phpbb3 into ticket/11103
Conflicts: phpBB/install/database_update.php phpBB/styles/prosilver/template/ucp_prefs_personal.html phpBB/styles/subsilver2/template/ucp_prefs_personal.html
This commit is contained in:
@@ -19,7 +19,7 @@ class ucp_profile_info
|
||||
'title' => 'UCP_PROFILE',
|
||||
'version' => '1.0.0',
|
||||
'modes' => array(
|
||||
'profile_info' => array('title' => 'UCP_PROFILE_PROFILE_INFO', 'auth' => '', 'cat' => array('UCP_PROFILE')),
|
||||
'profile_info' => array('title' => 'UCP_PROFILE_PROFILE_INFO', 'auth' => 'acl_u_chgprofileinfo', 'cat' => array('UCP_PROFILE')),
|
||||
'signature' => array('title' => 'UCP_PROFILE_SIGNATURE', 'auth' => 'acl_u_sig', 'cat' => array('UCP_PROFILE')),
|
||||
'avatar' => array('title' => 'UCP_PROFILE_AVATAR', 'auth' => 'cfg_allow_avatar && (cfg_allow_avatar_local || cfg_allow_avatar_remote || cfg_allow_avatar_upload || cfg_allow_avatar_remote_upload)', 'cat' => array('UCP_PROFILE')),
|
||||
'reg_details' => array('title' => 'UCP_PROFILE_REG_DETAILS', 'auth' => '', 'cat' => array('UCP_PROFILE')),
|
||||
|
@@ -127,6 +127,36 @@ class ucp_prefs
|
||||
$dateformat_options .= '>' . $user->lang['CUSTOM_DATEFORMAT'] . '</option>';
|
||||
|
||||
$timezone_selects = phpbb_timezone_select($user, $data['tz'], true);
|
||||
|
||||
// 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) : '',
|
||||
|
||||
@@ -145,6 +175,9 @@ class ucp_prefs
|
||||
'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_TZ_OPTIONS' => $timezone_selects['tz_select'],
|
||||
|
@@ -251,6 +251,11 @@ class ucp_profile
|
||||
break;
|
||||
|
||||
case 'profile_info':
|
||||
// Do not display profile information panel if not authed to do so
|
||||
if (!$auth->acl_get('u_chgprofileinfo'))
|
||||
{
|
||||
trigger_error('NO_AUTH_PROFILEINFO');
|
||||
}
|
||||
|
||||
include($phpbb_root_path . 'includes/functions_profile_fields.' . $phpEx);
|
||||
|
||||
|
Reference in New Issue
Block a user