From cc9d0969ccc8464be8f825a6ecd0d73932b57891 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Mon, 12 May 2025 16:46:01 +0700 Subject: [PATCH] fix issues + tag sort --- app/Repositories/TagRepository.php | 2 +- nexus/Field/Field.php | 2 +- nexus/Imdb/Imdb.php | 2 +- public/getusertorrentlistajax.php | 2 +- public/messages.php | 2 +- public/mybonus.php | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/Repositories/TagRepository.php b/app/Repositories/TagRepository.php index 1c3a55a0..218536c4 100644 --- a/app/Repositories/TagRepository.php +++ b/app/Repositories/TagRepository.php @@ -47,7 +47,7 @@ class TagRepository extends BaseRepository public static function createBasicQuery() { - return Tag::query()->orderBy('priority', 'asc')->orderBy('id', 'asc'); + return Tag::query()->orderBy('priority', 'desc')->orderBy('id', 'desc'); } public function renderCheckbox(int $searchBoxId, array $checked = [], $ignorePermission = false): string diff --git a/nexus/Field/Field.php b/nexus/Field/Field.php index fa5db5f9..0f2e3ac3 100644 --- a/nexus/Field/Field.php +++ b/nexus/Field/Field.php @@ -265,7 +265,7 @@ HEAD; } - public function renderOnUploadPage($torrentId = 0, $searchBoxId) + public function renderOnUploadPage($torrentId, $searchBoxId) { $searchBox = NexusDB::getOne('searchbox', "id = $searchBoxId"); if (empty($searchBox)) { diff --git a/nexus/Imdb/Imdb.php b/nexus/Imdb/Imdb.php index 47272879..d8730ae5 100644 --- a/nexus/Imdb/Imdb.php +++ b/nexus/Imdb/Imdb.php @@ -177,7 +177,7 @@ class Imdb $temp .= $ak["title"].$ak["year"]. ($ak["country"] != "" ? " (".$ak["country"].")" : "") . ($ak["comment"] != "" ? " (" . $ak["comment"] . ")" : "") . ", "; } $autodata .= rtrim(trim($temp), ","); - $runtimes = str_replace(" min",$lang_details['text_mins'], $movie->runtime()); + $runtimes = str_replace(" min",$lang_details['text_mins'], $movie->runtime() ?? ''); $autodata .= "
\n".$lang_details['text_year']."" . "".$movie->year ()."
\n"; $autodata .= "".$lang_details['text_runtime']."".$runtimes."
\n"; $autodata .= "".$lang_details['text_votes']."" . "".$movie->votes ()."
\n"; diff --git a/public/getusertorrentlistajax.php b/public/getusertorrentlistajax.php index 1d723ad4..564000c3 100644 --- a/public/getusertorrentlistajax.php +++ b/public/getusertorrentlistajax.php @@ -14,7 +14,7 @@ $claimRep = new \App\Repositories\ClaimRepository(); $seedBoxRep = new \App\Repositories\SeedBoxRepository(); $claimTorrentTTL = \App\Models\Claim::getConfigTorrentTTL(); $id = intval($_GET['userid'] ?? 0); -$type = $_GET['type']; +$type = $_GET['type'] ?? ''; if (!in_array($type,array('uploaded','seeding','leeching','completed','incomplete'))) die; if(!user_can('torrenthistory') && $id != $CURUSER["id"]) diff --git a/public/messages.php b/public/messages.php index 485e1330..5adc6fa7 100644 --- a/public/messages.php +++ b/public/messages.php @@ -289,7 +289,7 @@ stdfoot(); } if ($action == "moveordel") { -$pm_id = (int) $_POST['id']; +$pm_id = (int) $_POST['id'] ?? 0; $pm_box = (int) $_POST['box']; $pm_messages = $_POST['messages']; if ($_POST['markread']) diff --git a/public/mybonus.php b/public/mybonus.php index 4fb4a58d..08f67e17 100644 --- a/public/mybonus.php +++ b/public/mybonus.php @@ -581,7 +581,7 @@ if ($action == "exchange") { $userid = $CURUSER['id']; $art = $bonusarray['art']; - $bonuscomment = $CURUSER['bonuscomment']; +// $bonuscomment = $CURUSER['bonuscomment']; $seedbonus=$CURUSER['seedbonus']-$points; if($CURUSER['seedbonus'] >= $points) {