Skip to content

Commit

Permalink
Merge pull request phpbb#6617 from battye/ticket/17109
Browse files Browse the repository at this point in the history
[ticket/17109] Don't show the attach signature option if the user doesn't have permission
  • Loading branch information
marc1706 committed May 23, 2024
2 parents d14f98f + 611faaf commit 477f5d9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions phpBB/includes/ucp/ucp_prefs.php
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,8 @@ function main($id, $mode)
}

$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'],
Expand Down
2 changes: 1 addition & 1 deletion phpBB/posting.php
Original file line number Diff line number Diff line change
Expand Up @@ -1966,7 +1966,7 @@
'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"' : '',
Expand Down
2 changes: 2 additions & 0 deletions phpBB/styles/prosilver/template/ucp_prefs_post.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ <h2>{L_TITLE}</h2>
<label for="smilies0"><input type="radio" name="smilies" id="smilies0" value="0"<!-- IF not S_SMILIES --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
{% if S_SIG_ALLOWED %}
<dl>
<dt><label for="sig1">{L_DEFAULT_ADD_SIG}{L_COLON}</label></dt>
<dd>
<label for="sig1"><input type="radio" name="sig" id="sig1" value="1"<!-- IF S_SIG --> checked="checked"<!-- ENDIF --> /> {L_YES}</label>
<label for="sig0"><input type="radio" name="sig" id="sig0" value="0"<!-- IF not S_SIG --> checked="checked"<!-- ENDIF --> /> {L_NO}</label>
</dd>
</dl>
{% endif %}
<dl>
<dt><label for="notify1">{L_DEFAULT_NOTIFY}{L_COLON}</label></dt>
<dd>
Expand Down

0 comments on commit 477f5d9

Please sign in to comment.