Skip to content

Commit

Permalink
Fixed Likes displaying for pages when actually disabled
Browse files Browse the repository at this point in the history
For issue #1131
  • Loading branch information
eSilverStrike committed Jun 24, 2022
1 parent 7bef3de commit 0bdb16c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion plugins/staticpages/functions.inc
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,11 @@ function SP_displayPage($page, $A, $comment_order = 'ASC', $comment_mode = 'nest
} else {
$sp_likes = $A['likes'];
}
$spage->set_var('likes_control',LIKES_control(STATICPAGES_PLUGIN_NAME, '', $page, $sp_likes));
if ($sp_likes > 0) {
$spage->set_var('likes_control',LIKES_control(STATICPAGES_PLUGIN_NAME, '', $page, $sp_likes));
} else {
$spage->set_var('likes_control', '');
}
} else {
$spage->set_var('likes_control', '');
}
Expand Down

0 comments on commit 0bdb16c

Please sign in to comment.