From 888f50e0bddca46b6d0e710abf59cac9a2224b16 Mon Sep 17 00:00:00 2001 From: SPC Date: Thu, 2 Jan 2025 11:20:49 +0800 Subject: [PATCH 1/2] fix: viewrequests.php: Totalreq style fix Signed-off-by: SPC --- public/viewrequests.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/public/viewrequests.php b/public/viewrequests.php index e08a134f..705b7550 100644 --- a/public/viewrequests.php +++ b/public/viewrequests.php @@ -81,13 +81,15 @@ else { print("{$lang_viewrequests['thead_name']}{$lang_viewrequests['thead_price_newest']}{$lang_viewrequests['thead_price_original']}{$lang_viewrequests['thead_comment_count']}{$lang_viewrequests['thead_on_request_count']}{$lang_viewrequests['thead_request_user']}{$lang_viewrequests['thead_created_at']}{$lang_viewrequests['thead_status']}\n"); while ($row = mysql_fetch_array($rows)) { print(" - " . $row["request"] . " - " . $row['amount'] . " - " . $row['ori_amount'] . " - " . ($row['comments']) . "" . ($row['Totalreq']) . " - " . get_username($row['userid']) . " - " . gettime($row['added'], true, false) . " - " . ($row['finish'] == "yes" ? $lang_viewrequests['request_status_resolved'] : ($row['userid'] == $CURUSER['id'] ? $lang_viewrequests['request_status_resolving'] : "{$lang_viewrequests['request_status_resolving']}")) . "\n"); + " . $row["request"] . " + " . $row['amount'] . " + " . $row['ori_amount'] . " + " . ($row['comments']) . " + " . ($row['Totalreq']) . " + " . get_username($row['userid']) . " + " . gettime($row['added'], true, false) . " + " . ($row['finish'] == "yes" ? $lang_viewrequests['request_status_resolved'] : ($row['userid'] == $CURUSER['id'] ? $lang_viewrequests['request_status_resolving'] : "{$lang_viewrequests['request_status_resolving']}")) . " + \n"); } } print("\n"); From 22277c375029f38ac0f479b40a7635f4859f50e4 Mon Sep 17 00:00:00 2001 From: tdh <821028463@qq.com> Date: Thu, 2 Jan 2025 12:06:08 +0800 Subject: [PATCH 2/2] Already have peers6 parameters, which should NOT disable compact announce with IPv6. Thanks to Properformer for reporting this issue. --- public/announce.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/public/announce.php b/public/announce.php index 12d99a42..d3cac181 100644 --- a/public/announce.php +++ b/public/announce.php @@ -115,8 +115,6 @@ $ip = getip(); // avoid to get the spoof ip from some agent $_GET['ip'] = $ip; if (!$port || $port > 0xffff) warn("invalid port"); -if (!ip2long($ip)) //Disable compact announce with IPv6 - $compact = 0; $ipv4 = $ipv6 = ''; if (isIPV4($ip)) {