diff --git a/admin/admin_extensions.php b/admin/admin_extensions.php index 87229cbcd..96a40c220 100644 --- a/admin/admin_extensions.php +++ b/admin/admin_extensions.php @@ -569,7 +569,7 @@ if ($e_mode == 'perm' && $group) { $forum_p = []; $act_id = 0; $forum_p = auth_unpack($allowed_forums); - $sql = 'SELECT forum_id, forum_name FROM ' . BB_FORUMS . ' WHERE forum_id IN (' . implode(', ', $forum_p) . ')'; + $sql = 'SELECT forum_id, forum_name, forum_parent FROM ' . BB_FORUMS . ' WHERE forum_id IN (' . implode(', ', $forum_p) . ') ORDER BY forum_order'; if (!($result = DB()->sql_query($sql))) { bb_die('Could not get forum names'); } @@ -577,15 +577,16 @@ if ($e_mode == 'perm' && $group) { while ($row = DB()->sql_fetchrow($result)) { $forum_perm[$act_id]['forum_id'] = $row['forum_id']; $forum_perm[$act_id]['forum_name'] = $row['forum_name']; + $forum_perm[$act_id]['forum_parent'] = $row['forum_parent']; $act_id++; } } for ($i = 0, $iMax = count($forum_perm); $i < $iMax; $i++) { - $template->assign_block_vars('allow_option_values', array( - 'VALUE' => $forum_perm[$i]['forum_id'], - 'OPTION' => htmlCHR($forum_perm[$i]['forum_name'])) - ); + $template->assign_block_vars('allow_option_values', [ + 'VALUE' => $forum_perm[$i]['forum_id'], + 'OPTION' => (($forum_perm[$i]['forum_parent']) ? HTML_SF_SPACER : '') . htmlCHR($forum_perm[$i]['forum_name']) + ]); } $template->assign_vars(array( @@ -594,24 +595,24 @@ if ($e_mode == 'perm' && $group) { 'A_PERM_ACTION' => "admin_extensions.php?mode=groups&e_mode=perm&e_group=$group", )); - $forum_option_values = array(0 => $lang['PERM_ALL_FORUMS']); + $forum_option_values = array(0 => array('parent' => 0, 'name' => $lang['PERM_ALL_FORUMS'])); - $sql = 'SELECT forum_id, forum_name FROM ' . BB_FORUMS; + $sql = 'SELECT forum_id, forum_name, forum_parent FROM ' . BB_FORUMS . ' ORDER BY forum_order'; if (!($result = DB()->sql_query($sql))) { bb_die('Could not get forums #1'); } while ($row = DB()->sql_fetchrow($result)) { - $forum_option_values[(int)$row['forum_id']] = $row['forum_name']; + $forum_option_values[(int)$row['forum_id']] = array('parent' => $row['forum_parent'], 'name' => $row['forum_name']); } DB()->sql_freeresult($result); foreach ($forum_option_values as $value => $option) { - $template->assign_block_vars('forum_option_values', array( - 'VALUE' => $value, - 'OPTION' => htmlCHR($option)) - ); + $template->assign_block_vars('forum_option_values', [ + 'VALUE' => $value, + 'OPTION' => (($option['parent']) ? HTML_SF_SPACER : '') . htmlCHR($option['name']) + ]); } $empty_perm_forums = []; diff --git a/admin/admin_ranks.php b/admin/admin_ranks.php index 897762501..d5e31a485 100644 --- a/admin/admin_ranks.php +++ b/admin/admin_ranks.php @@ -83,7 +83,7 @@ if ($mode != '') { // The rank image has to be a jpg, gif or png // if ($rank_image != '') { - if (!preg_match('/(\.gif|\.png|\.jpg)$/is', $rank_image)) { + if (!preg_match('/(\.gif|\.png|\.jpg|\.jpeg|\.bmp|\.webp)$/is', $rank_image)) { $rank_image = ''; } } diff --git a/library/config.php b/library/config.php index 94e330a1e..39e806fa8 100644 --- a/library/config.php +++ b/library/config.php @@ -411,16 +411,16 @@ $bb_cfg['board_email_form'] = false; // can users send email to each other via b $bb_cfg['board_email_sig'] = ''; // this text will be attached to all emails the board sends $bb_cfg['board_email_sitename'] = $domain_name; // sitename used in all emails header -$bb_cfg['topic_notify_enabled'] = true; -$bb_cfg['pm_notify_enabled'] = true; -$bb_cfg['group_send_email'] = true; -$bb_cfg['email_change_disabled'] = false; // TODO: disable changing email by user +$bb_cfg['topic_notify_enabled'] = true; // отправлять ли уведомление на почту, если в теме которую отслеживает пользователь есть новые ответы +$bb_cfg['pm_notify_enabled'] = true; // отправлять ли уведомление на почту, если пришло личное письмо на сайте +$bb_cfg['group_send_email'] = true; // отправлять ли уведомление на почту, если пользователя приняли в группу, пригласили в группу +$bb_cfg['email_change_disabled'] = false; // отключить возможность изменять почту самим пользователям $bb_cfg['show_email_visibility_settings'] = true; // разрешать ли пользователям изменять свои настройки отображения почты (Скрыто или нет) $bb_cfg['bounce_email'] = "bounce@$domain_name"; // bounce email address $bb_cfg['tech_admin_email'] = "admin@$domain_name"; // email for sending error reports -$bb_cfg['abuse_email'] = "abuse@$domain_name"; -$bb_cfg['adv_email'] = "adv@$domain_name"; +$bb_cfg['abuse_email'] = "abuse@$domain_name"; // почта для жалоб (абуз, правообладатели) +$bb_cfg['adv_email'] = "adv@$domain_name"; // почта для рекламных предложений // Bugsnag error reporting $bb_cfg['bugsnag'] = [ diff --git a/library/includes/ucp/register.php b/library/includes/ucp/register.php index a4b3ba131..40776fda8 100644 --- a/library/includes/ucp/register.php +++ b/library/includes/ucp/register.php @@ -237,6 +237,9 @@ foreach ($profile_fields as $field => $can_edit) { $db_data['user_email'] = $email; } elseif ($email != $pr_data['user_email']) { // если смена мейла юзером + if ($bb_cfg['email_change_disabled'] && !$adm_edit && !IS_ADMIN) { + $errors[] = $lang['EMAIL_CHANGING_DISABLED']; + } if (!$cur_pass_valid) { $errors[] = $lang['CONFIRM_PASSWORD_EXPLAIN']; } diff --git a/library/language/source/main.php b/library/language/source/main.php index 10ffe3b36..037d234ad 100644 --- a/library/language/source/main.php +++ b/library/language/source/main.php @@ -2790,7 +2790,7 @@ $lang['UPLOAD_ERROR_COMMON_DISABLED'] = 'File upload disabled'; $lang['UPLOAD_ERROR_COMMON'] = 'File upload error'; $lang['UPLOAD_ERROR_SIZE'] = 'The uploaded file exceeds the maximum size of %s'; $lang['UPLOAD_ERROR_FORMAT'] = 'Invalid file type of image'; -$lang['UPLOAD_ERROR_DIMENSIONS'] = 'Image dimensions exceed the maximum allowable %sx%s px'; +$lang['UPLOAD_ERROR_DIMENSIONS'] = 'Image dimensions exceed the maximum allowable %sx%s pixels'; $lang['UPLOAD_ERROR_NOT_IMAGE'] = 'The uploaded file is not an image'; $lang['UPLOAD_ERROR_NOT_ALLOWED'] = 'Extension %s for downloads is not allowed'; $lang['UPLOAD_ERRORS'] = [ diff --git a/src/Ajax.php b/src/Ajax.php index dde736338..72532b776 100644 --- a/src/Ajax.php +++ b/src/Ajax.php @@ -210,7 +210,7 @@ class Ajax */ public function check_admin_session() { - global $user; + global $user, $lang; if (!$user->data['session_admin']) { if (empty($this->request['user_password'])) { @@ -221,7 +221,7 @@ class Ajax 'login_password' => $_POST['user_password'], ]; if (!$user->login($login_args, true)) { - $this->ajax_die('Wrong password'); + $this->ajax_die($lang['ERROR_LOGIN']); } } } diff --git a/styles/templates/admin/index.tpl b/styles/templates/admin/index.tpl index 7f17fd20c..445348d45 100644 --- a/styles/templates/admin/index.tpl +++ b/styles/templates/admin/index.tpl @@ -204,7 +204,7 @@ {reg_user_row.USER} - {reg_user_row.STARTED}-{reg_user_row.LASTUPDATE} + {L_LOGIN}: {reg_user_row.STARTED} | {L_LAST_UPDATED}: {reg_user_row.LASTUPDATE} {reg_user_row.IP_ADDRESS} diff --git a/styles/templates/default/usercp_register.tpl b/styles/templates/default/usercp_register.tpl index 2cf570913..13aa5ee54 100644 --- a/styles/templates/default/usercp_register.tpl +++ b/styles/templates/default/usercp_register.tpl @@ -83,7 +83,7 @@ {L_EMAIL}: *
{L_EMAIL_EXPLAIN}
- readonly style="color: gray;" /> + readonly style="color: gray;" />