support pg

This commit is contained in:
xiaomlove
2026-04-15 03:27:30 +07:00
parent 4d54e08918
commit 00fdc2d08f
18 changed files with 129 additions and 59 deletions
+1 -1
View File
@@ -139,7 +139,7 @@ if ($piecesCount > $maxPieceCount && $idealPiecesCount < $maxPieceCount) {
bark('Too many pieces');
}
$infohash = $dict->getInfoHashV1ForAnnounce();
$exists = \App\Models\Torrent::query()->where('info_hash', $infohash)->first(['id']);
$exists = \App\Models\Torrent::query()->whereInfoHash($infohash)->first(['id']);
if ($exists) {
// bark($lang_takeupload['std_torrent_existed']);
nexus_redirect(sprintf("details.php?id=%d&existed=1", $exists['id']));