mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 20:17:24 +08:00
announce think about paid torrent enabled
This commit is contained in:
+9
-2
@@ -151,9 +151,16 @@ if ($torrent['approval_status'] != \App\Models\Torrent::APPROVAL_STATUS_ALLOW &&
|
|||||||
err("torrent review not approved");
|
err("torrent review not approved");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($seeder == 'no' && isset($torrent['price']) && $torrent['price'] > 0 && $torrent['owner'] != $userid) {
|
if (
|
||||||
|
$seeder == 'no'
|
||||||
|
&& isset($az['seedbonus'])
|
||||||
|
&& isset($torrent['price'])
|
||||||
|
&& $torrent['price'] > 0
|
||||||
|
&& $torrent['owner'] != $userid
|
||||||
|
&& get_setting("torrent.paid_torrent_enabled") == "yes")
|
||||||
|
{
|
||||||
$hasBuy = \App\Models\TorrentBuyLog::query()->where('uid', $userid)->where('torrent_id', $torrent['id'])->exists();
|
$hasBuy = \App\Models\TorrentBuyLog::query()->where('uid', $userid)->where('torrent_id', $torrent['id'])->exists();
|
||||||
if (!$hasBuy && isset($az['seedbonus'])) {
|
if (!$hasBuy) {
|
||||||
if ($az['seedbonus'] < $torrent['price']) {
|
if ($az['seedbonus'] < $torrent['price']) {
|
||||||
err("Not enough bonus to buy this paid torrent");
|
err("Not enough bonus to buy this paid torrent");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user