Skip to content

Commit

Permalink
Fix undefined can_moderate_forum
Browse files Browse the repository at this point in the history
the only reason we haven't gotten an error before is because the only 
place where it's used it is wrapped in the empty() function, but once a 
designer tries to use it, the error appears

Signed-off-by: SychO <[email protected]>
  • Loading branch information
SychO9 authored and MissAllSunday committed Feb 6, 2021
1 parent cc69d6c commit dc441c4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Sources/PersonalMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ function MessageMain()
// This is convenient. Do you know how annoying it is to do this every time?!
$context['current_label_redirect'] = 'action=pm;f=' . $context['folder'] . (isset($_GET['start']) ? ';start=' . $_GET['start'] : '') . (isset($_REQUEST['l']) ? ';l=' . $_REQUEST['l'] : '');
$context['can_issue_warning'] = allowedTo('issue_warning') && $modSettings['warning_settings'][0] == 1;
$context['can_moderate_forum'] = allowedTo('moderate_forum');

// Are PM drafts enabled?
$context['drafts_pm_save'] = !empty($modSettings['drafts_pm_enabled']) && allowedTo('pm_draft');
Expand Down

0 comments on commit dc441c4

Please sign in to comment.