mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-01-31 10:31:37 +00:00
Fixed bug where preview paranoia would ignore donor statistics; showing it anyway.
This commit is contained in:
parent
e5b57d8c27
commit
9e1fb5bb6a
@ -58,9 +58,17 @@ public static function render_mod_donations($UserID) {
|
|||||||
<?
|
<?
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function render_donor_stats($UserID) {
|
public static function render_donor_stats($UserID, $Preview, $Paranoia) {
|
||||||
$OwnProfile = G::$LoggedUser['ID'] == $UserID;
|
$OwnProfile = G::$LoggedUser['ID'] == $UserID;
|
||||||
if (check_perms("users_mod") || $OwnProfile || Donations::is_visible($UserID)) {
|
$DonationsVisible = Donations::is_visible($UserID);
|
||||||
|
if ($Preview == 1) {
|
||||||
|
$OwnProfile = false;
|
||||||
|
}
|
||||||
|
//if previewing paranoia with donor_stats hidden, make sure (below) reflects that
|
||||||
|
if (in_array('donor_stats', $Paranoia)) {
|
||||||
|
$DonationsVisible = false;
|
||||||
|
}
|
||||||
|
if (check_perms("users_mod") || $OwnProfile || $DonationsVisible) {
|
||||||
?>
|
?>
|
||||||
<div class="box box_info box_userinfo_donor_stats">
|
<div class="box box_info box_userinfo_donor_stats">
|
||||||
<div class="head colhead_dark">Donor Statistics</div>
|
<div class="head colhead_dark">Donor Statistics</div>
|
||||||
|
@ -561,7 +561,7 @@ function check_paranoia_here($Setting) {
|
|||||||
</div>
|
</div>
|
||||||
<?
|
<?
|
||||||
include(SERVER_ROOT.'/sections/user/community_stats.php');
|
include(SERVER_ROOT.'/sections/user/community_stats.php');
|
||||||
DonationsView::render_donor_stats($UserID);
|
DonationsView::render_donor_stats($UserID, $Preview, $Paranoia);
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_column">
|
<div class="main_column">
|
||||||
|
Loading…
Reference in New Issue
Block a user