mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
fix media info pre width
This commit is contained in:
@@ -22,11 +22,10 @@ class BaseRepository
|
||||
|
||||
protected function handleAnonymous($username, User $user, User $authenticator, Torrent $torrent = null)
|
||||
{
|
||||
$canViewAnonymousClass = Setting::get('authority.viewanonymous');
|
||||
if($user->privacy == "strong" || ($torrent && $torrent->anonymous == 'yes' && $user->id == $torrent->owner)) {
|
||||
//用户强私密,或者种子作者匿名而当前项作者刚好为种子作者
|
||||
$anonymousText = nexus_trans('label.anonymous');
|
||||
if($authenticator->class >= $canViewAnonymousClass || $user->id == $authenticator->id) {
|
||||
if(user_can('viewanonymous', false, $authenticator->id) || $user->id == $authenticator->id) {
|
||||
//但当前用户权限可以查看匿名者,或当前用户查看自己的数据,显示个匿名,后边加真实用户名
|
||||
return sprintf('%s(%s)', $anonymousText, $username);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user