From aa5d1a700092faf4aac95454a031f2ea815584a5 Mon Sep 17 00:00:00 2001 From: xiaomlove <353856593@qq.com> Date: Fri, 11 Jun 2021 13:16:18 +0800 Subject: [PATCH] fix viewrequest.php undefined const error --- public/viewrequests.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/viewrequests.php b/public/viewrequests.php index 1ffa48f7..d4c36e55 100644 --- a/public/viewrequests.php +++ b/public/viewrequests.php @@ -175,7 +175,7 @@ else { print (" - + {$lang_functions['title_add_comments']}"); stdfoot(); @@ -328,7 +328,7 @@ else {
- {$lang_viewrequests['type_in_torrent_id']}:http://$BASEURL/details.php?id= + {$lang_viewrequests['type_in_torrent_id']}:" . getSchemeAndHttpHost() . "/details.php?id=
{$lang_functions['std_click_here_to_goback']}", 0); stdfoot(); die; @@ -346,7 +346,7 @@ else { $res = sql_query("SELECT * FROM torrents WHERE id ='" . $_POST["torrentid"] . "'") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($res) == 0) stderr($lang_functions['std_error'], "{$lang_functions['std_target_not_exists']}{$lang_functions['std_click_here_to_goback']}", 0); $tor = mysql_fetch_assoc($res); - if ($tor[last_seed] == "0000-00-00 00:00:00") stderr($lang_functions['std_error'], "{$lang_viewrequests['torrent_not_release_yet']}{$lang_functions['std_click_here_to_goback']}", 0); + if ($tor['last_seed'] == "0000-00-00 00:00:00" || is_null(($tor['last_seed']))) stderr($lang_functions['std_error'], "{$lang_viewrequests['torrent_not_release_yet']}{$lang_functions['std_click_here_to_goback']}", 0); if (get_row_count('resreq', "where reqid ='" . $_POST["reqid"] . "' and torrentid='" . $_POST["torrentid"] . "'")) stderr($lang_functions['std_error'], "{$lang_viewrequests['supply_already_exists']}{$lang_functions['std_click_here_to_goback']}", 0); sql_query("INSERT resreq (reqid , torrentid) VALUES ( '" . $_POST["reqid"] . "' , '" . $_POST["torrentid"] . "')"); @@ -462,4 +462,4 @@ else { die; -?> \ No newline at end of file +?>