Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed paranoia inconsistency with users_mod #92

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion classes/paranoia.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function check_paranoia($Property, $Paranoia, $UserClass, $UserID = false) {
case 'ratio':
case 'uploaded':
case 'lastseen':
if (check_perms('users_mod', $UserClass))
if (check_perms('users_mod'))
return PARANOIA_OVERRIDDEN;
break;
case 'snatched': case 'snatched+':
Expand Down
3 changes: 1 addition & 2 deletions classes/permissions.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ public static function check_perms($PermissionName, $MinClass = 0) {
return (
isset(G::$LoggedUser['Permissions'][$PermissionName])
&& G::$LoggedUser['Permissions'][$PermissionName]
&& (G::$LoggedUser['Class'] >= $MinClass
|| G::$LoggedUser['EffectiveClass'] >= $MinClass
&& (G::$LoggedUser['EffectiveClass'] >= $MinClass
|| $Override)
) ? true : false;
}
Expand Down
3 changes: 2 additions & 1 deletion sections/friends/friends.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@
m.Username,
m.Uploaded,
m.Downloaded,
m.PermissionID,
p.Level,
m.Paranoia,
m.LastAccess,
i.Avatar
FROM friends AS f
JOIN users_main AS m ON f.FriendID = m.ID
JOIN users_info AS i ON f.FriendID = i.UserID
LEFT JOIN permissions AS p ON p.ID = m.PermissionID
WHERE f.UserID = '$UserID'
ORDER BY Username
LIMIT $Limit");
Expand Down