From 367588528bece8fc8e422ae4a423ca6a263981fe Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Fri, 11 Mar 2022 23:33:34 +0800 Subject: [PATCH] fix topic user deleted display --- public/forums.php | 4 ++-- public/torrents.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/forums.php b/public/forums.php index 5f751c84..e2adba26 100644 --- a/public/forums.php +++ b/public/forums.php @@ -633,7 +633,6 @@ if ($action == "viewtopic") unset($arr); $neededColumns = array('id', 'noad', 'class', 'enabled', 'privacy', 'avatar', 'signature', 'uploaded', 'downloaded', 'last_access', 'username', 'donor', 'leechwarn', 'warned', 'title'); $userInfoArr = \App\Models\User::query()->with(['valid_medals'])->find($uidArr, $neededColumns)->keyBy('id'); - $pn = 0; $lpr = get_last_read_post_id($topicid); @@ -658,7 +657,8 @@ if ($action == "viewtopic") //---- Get poster details // $arr2 = get_user_row($posterid); - $userInfo = $userInfoArr->get($posterid); + $userInfo = $userInfoArr->get($posterid) ?: \App\Models\User::defaultUser(); + $arr2 = $userInfo->toArray(); $uploaded = mksize($arr2["uploaded"]); diff --git a/public/torrents.php b/public/torrents.php index b577ee55..e9a61067 100644 --- a/public/torrents.php +++ b/public/torrents.php @@ -157,7 +157,7 @@ elseif ($inclbookmarked == 2) //not bookmarked // ----------------- end bookmarked ---------------------// if (!isset($CURUSER) || get_user_class() < $seebanned_class) - $wherea[] = "banned != 'yes'"; + $wherea[] = "banned = 'no'"; // ----------------- start include dead ---------------------// if (isset($_GET["incldead"])) $include_dead = intval($_GET["incldead"] ?? 0);