From 611faafaf3802a661814d9a7c1765017eed94630 Mon Sep 17 00:00:00 2001 From: battye Date: Fri, 17 May 2024 14:02:12 +0000 Subject: [PATCH] [ticket/17109] Check attach signature permissions Don't show the attach signature option if the user doesn't have permission or if the signature feature is disabled for the board. PHPBB3-17109 --- phpBB/includes/ucp/ucp_prefs.php | 2 ++ phpBB/posting.php | 2 +- phpBB/styles/prosilver/template/ucp_prefs_post.html | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/phpBB/includes/ucp/ucp_prefs.php b/phpBB/includes/ucp/ucp_prefs.php index 0d6a178c67..3bb575106a 100644 --- a/phpBB/includes/ucp/ucp_prefs.php +++ b/phpBB/includes/ucp/ucp_prefs.php @@ -488,6 +488,8 @@ class ucp_prefs } $template->assign_vars(array( + 'S_SIG_ALLOWED' => $config['allow_sig'] && $auth->acl_get('u_sig'), + 'S_BBCODE' => $data['bbcode'], 'S_SMILIES' => $data['smilies'], 'S_SIG' => $data['sig'], diff --git a/phpBB/posting.php b/phpBB/posting.php index f99b0db006..b3562b48f0 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1966,7 +1966,7 @@ $page_data = array( 'S_BBCODE_CHECKED' => ($bbcode_checked) ? ' checked="checked"' : '', 'S_SMILIES_ALLOWED' => $smilies_status, 'S_SMILIES_CHECKED' => ($smilies_checked) ? ' checked="checked"' : '', - 'S_SIG_ALLOWED' => ($auth->acl_get('f_sigs', $forum_id) && $config['allow_sig'] && $user->data['is_registered']) ? true : false, + 'S_SIG_ALLOWED' => ($user->data['is_registered'] && $config['allow_sig'] && $auth->acl_get('f_sigs', $forum_id) && $auth->acl_get('u_sig')) ? true : false, 'S_SIGNATURE_CHECKED' => ($sig_checked) ? ' checked="checked"' : '', 'S_NOTIFY_ALLOWED' => (!$user->data['is_registered'] || ($mode == 'edit' && $user->data['user_id'] != $post_data['poster_id']) || !$config['allow_topic_notify'] || !$config['email_enable']) ? false : true, 'S_NOTIFY_CHECKED' => ($notify_checked) ? ' checked="checked"' : '', diff --git a/phpBB/styles/prosilver/template/ucp_prefs_post.html b/phpBB/styles/prosilver/template/ucp_prefs_post.html index 39197c5062..4a7e789667 100644 --- a/phpBB/styles/prosilver/template/ucp_prefs_post.html +++ b/phpBB/styles/prosilver/template/ucp_prefs_post.html @@ -23,6 +23,7 @@ + {% if S_SIG_ALLOWED %}
@@ -30,6 +31,7 @@
+ {% endif %}