improve job log

This commit is contained in:
xiaomlove
2023-02-21 01:04:28 +08:00
parent 64defea3e3
commit eb04b9d2d0
7 changed files with 45 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
<?php
require '../include/bittorrent_announce.php';
require ROOT_PATH . 'include/core.php';
do_log(nexus_json_encode($_SERVER));
//do_log(nexus_json_encode($_SERVER));
//1. BLOCK ACCESS WITH WEB BROWSERS AND CHEATS!
$agent = $_SERVER["HTTP_USER_AGENT"] ?? '';
block_browser();
@@ -155,7 +155,7 @@ if ($torrent['approval_status'] != \App\Models\Torrent::APPROVAL_STATUS_ALLOW &&
if ($seeder == 'no' && isset($torrent['price']) && $torrent['price'] > 0 && $torrent['owner'] != $userid) {
$hasBuy = \App\Models\TorrentBuyLog::query()->where('uid', $userid)->where('torrent_id', $torrent['id'])->exists();
if (!$hasBuy) {
err("You have not buy the torrent yet");
err("You have not purchased this torrent yet");
}
}