action=user_recents did not respect paranoia settings

This commit is contained in:
MordredKLB 2016-03-25 16:36:23 -05:00
parent a302576db8
commit 203ac5476f

View File

@ -8,6 +8,26 @@
if (empty($Limit)) {
$Limit = 15;
}
if ($UserID != $LoggedUser['ID']) {
// We can always view our own torrents
$DB->query("
SELECT m.Paranoia
FROM users_main AS m
WHERE m.ID = $UserID");
if (!$DB->has_results()) { // If user doesn't exist
json_die("failure", "no such user");
}
list($Paranoia) = $DB->next_record(MYSQLI_NUM, false);
$Paranoia = unserialize($Paranoia);
if (!is_array($Paranoia)) {
$Paranoia = array();
}
}
$Results = array();
if (check_paranoia_here('snatched')) {
$DB->query("