Skip to content

Commit

Permalink
Fix so staticpage likes are disabled when likes are disabled sitewide
Browse files Browse the repository at this point in the history
Fix for #1029
  • Loading branch information
eSilverStrike committed May 26, 2022
1 parent 0886cc7 commit fd6caf3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plugins/polls/functions.inc
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ function POLLS_pollVote($pid, $showall = true, $displaytype = 0, $order = '', $m
$poll->set_var('lang_polltopics', $LANG_POLLS['polltopics']);
$poll->set_var('poll_notification', $notification);

if ($_CONF['likes_enabled'] != 0 && $_PO_CONF['likes_polls'] != 0) {
if ($_CONF['likes_enabled'] && $_PO_CONF['likes_polls']) {
$poll->set_var('likes_control',LIKES_control(POLLS_PLUGIN_NAME, '', $pid, $_PO_CONF['likes_polls']));
} else {
$poll->set_var('likes_control', '');
Expand Down Expand Up @@ -990,7 +990,7 @@ function POLLS_pollResults($pid, $scale = 100, $order = '', $mode = '', $page =
}
}

if ($_CONF['likes_enabled'] != 0 && $_PO_CONF['likes_polls'] != 0) {
if ($_CONF['likes_enabled'] && $_PO_CONF['likes_polls']) {
$poll->set_var('likes_control',LIKES_control(POLLS_PLUGIN_NAME, '', $pid, $_PO_CONF['likes_polls']));
} else {
$poll->set_var('likes_control', '');
Expand Down
2 changes: 1 addition & 1 deletion plugins/staticpages/functions.inc
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ function SP_displayPage($page, $A, $comment_order = 'ASC', $comment_mode = 'nest
$spage->set_var('edit_icon', $icon);
}

if ($A['likes']) {
if ($_CONF['likes_enabled'] && $A['likes']) {
if ($A['likes'] == -1) {
// Set to use Plugin Likes default setting
$sp_likes = $_SP_CONF['likes_pages'];
Expand Down

0 comments on commit fd6caf3

Please sign in to comment.