mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
upload when exists redirect to details page
This commit is contained in:
@@ -68,7 +68,11 @@ if (!$row) {
|
||||
print("<h1 align=\"center\">".$lang_details['text_successfully_edited']."</h1>");
|
||||
if (isset($_GET["returnto"]))
|
||||
print("<p><b>".$lang_details['text_go_back'] . "<a href=\"".htmlspecialchars($_GET["returnto"])."\">" . $lang_details['text_whence_you_came']."</a></b></p>");
|
||||
}
|
||||
} elseif (!empty($_GET['existed'])) {
|
||||
print("<h1 align=\"center\" style='color: red'>".$lang_details['torrent_existed']."</h1>");
|
||||
if (isset($_GET["returnto"]))
|
||||
print("<p><b>".$lang_details['text_go_back'] . "<a href=\"".htmlspecialchars($_GET["returnto"])."\">" . $lang_details['text_whence_you_came']."</a></b></p>");
|
||||
}
|
||||
$banned_torrent = ($row["banned"] == 'yes' ? " <b>(<font class=\"striking\">".$lang_functions['text_banned']."</font>)</b>" : "");
|
||||
$sp_torrent = get_torrent_promotion_append($row['sp_state'],'word', false, '', 0, '', $row['__ignore_global_sp_state'] ?? false);
|
||||
$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);
|
||||
|
||||
@@ -179,9 +179,10 @@ unset ($dict['announce-list']); // remove multi-tracker capability
|
||||
unset ($dict['nodes']); // remove cached peers (Bitcomet & Azareus)
|
||||
|
||||
$infohash = pack("H*", sha1(\Rhilip\Bencode\Bencode::encode($dict['info']))); // double up on the becoding solves the occassional misgenerated infohash
|
||||
|
||||
if (\App\Models\Torrent::query()->where('info_hash', $infohash)->exists()) {
|
||||
bark($lang_takeupload['std_torrent_existed']);
|
||||
$exists = \App\Models\Torrent::query()->where('info_hash', $infohash)->first(['id']);
|
||||
if ($exists) {
|
||||
// bark($lang_takeupload['std_torrent_existed']);
|
||||
nexus_redirect(sprintf("details.php?id=%d&existed=1", $exists['id']));
|
||||
}
|
||||
|
||||
// ------------- start: check upload authority ------------------//
|
||||
|
||||
Reference in New Issue
Block a user