add configuration: torrent.approval_status_none_visible

This commit is contained in:
xiaomlove
2022-06-24 14:55:10 +08:00
parent e786b8b461
commit aae45835ee
21 changed files with 145 additions and 56 deletions

View File

@@ -1,6 +1,6 @@
<?php
defined('VERSION_NUMBER') || define('VERSION_NUMBER', '1.7.17');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-06-23');
defined('RELEASE_DATE') || define('RELEASE_DATE', '2022-06-24');
defined('IN_TRACKER') || define('IN_TRACKER', true);
defined('PROJECTNAME') || define("PROJECTNAME","NexusPHP");
defined('NEXUSPHPURL') || define("NEXUSPHPURL","https://nexusphp.org");

View File

@@ -3247,10 +3247,11 @@ function torrenttable($rows, $variant = "torrent") {
global $lang_functions;
global $CURUSER, $waitsystem;
global $showextinfo;
global $torrentmanage_class, $smalldescription_main, $enabletooltip_tweak;
global $torrentmanage_class, $smalldescription_main, $enabletooltip_tweak, $staffmem_class;
global $CURLANGDIR;
$torrent = new Nexus\Torrent\Torrent();
$torrentRep = new \App\Repositories\TorrentRepository();
$torrentIdArr = array_column($rows, 'id');
$torrentSeedingLeechingStatus = $torrent->listLeechingSeedingStatus($CURUSER['id'], $torrentIdArr);
$tagRep = new \App\Repositories\TagRepository();
@@ -3259,7 +3260,6 @@ function torrenttable($rows, $variant = "torrent") {
$torrentTagCollection = \App\Models\TorrentTag::query()->whereIn('torrent_id', $torrentIdArr)->orderByRaw("field(tag_id,$tagIdStr)")->get();
$tagKeyById = $tagCollection->keyBy('id');
$torrentTagResult = $torrentTagCollection->groupBy('torrent_id');
$approvalStatusIconEnabled = \App\Models\Setting::get('torrent.approval_status_icon_enabled') == 'yes';
$last_browse = $CURUSER['last_browse'];
// if ($variant == "torrent"){
@@ -3453,10 +3453,7 @@ foreach ($rows as $row)
$banned_torrent = ($row["banned"] == 'yes' ? " <b>(<font class=\"striking\">".$lang_functions['text_banned']."</font>)</b>" : "");
$sp_torrent_sub = get_torrent_promotion_append_sub($row['sp_state'],"",true,$row['added'], $row['promotion_time_type'], $row['promotion_until'], $row['__ignore_global_sp_state'] ?? false);
$approvalStatusIcon = '';
if ($approvalStatusIconEnabled) {
$approvalStatusIcon = $torrent->renderApprovalStatus($row['approval_status']);
}
$approvalStatusIcon = $torrentRep->renderApprovalStatus($row['approval_status']);
$titleSuffix = $banned_torrent.$picked_torrent.$sp_torrent.$sp_torrent_sub. $hrImg . $approvalStatusIcon;
$titleSuffix = apply_filter('torrent_title_suffix', $titleSuffix, $row);
print($titleSuffix);