diff --git a/classes/donationsview.class.php b/classes/donationsview.class.php index 3a6a0615..f4c37d85 100644 --- a/classes/donationsview.class.php +++ b/classes/donationsview.class.php @@ -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; - 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) { ?>