mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-15 13:32:41 +08:00
fix_announce_warning
This commit is contained in:
@@ -73,9 +73,11 @@ foreach ($settings as $name => $value) {
|
||||
}
|
||||
|
||||
$SITENAME = $BASIC['SITENAME'];
|
||||
$BASEURL = $BASIC['BASEURL'];
|
||||
//$BASEURL = $BASIC['BASEURL'];
|
||||
$BASEURL = $_SERVER['HTTP_HOST'];
|
||||
$announce_urls = array();
|
||||
$announce_urls[] = $BASIC['announce_url'];
|
||||
//$announce_urls[] = $BASIC['announce_url'];
|
||||
$announce_urls[] = $BASEURL . '/announce.php';
|
||||
|
||||
$SITE_ONLINE = $MAIN['site_online'];
|
||||
$max_torrent_size = $MAIN['max_torrent_size'];
|
||||
|
||||
@@ -3,6 +3,7 @@ if(!defined('IN_TRACKER')) {
|
||||
die('Hacking attempt!');
|
||||
}
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 0);
|
||||
if (!empty($_SERVER['HTTP_X_REQUEST_ID'])) {
|
||||
define('REQUEST_ID', $_SERVER['HTTP_X_REQUEST_ID']);
|
||||
} else {
|
||||
@@ -23,9 +24,6 @@ require $rootpath . 'include/config.php';
|
||||
if (!IS_ANNOUNCE) {
|
||||
require $rootpath . get_langfile_path("functions.php");
|
||||
}
|
||||
|
||||
ini_set('display_errors', $TWEAK['display_errors']);
|
||||
|
||||
$Cache = new RedisCache(); //Load the caching class
|
||||
$Cache->setLanguageFolderArray(get_langfolder_list());
|
||||
define('TIMENOW', time());
|
||||
|
||||
@@ -55,7 +55,7 @@ function benc_resp($d)
|
||||
benc_resp_raw(benc(array('type' => 'dictionary', 'value' => $d)));
|
||||
}
|
||||
function benc_resp_raw($x) {
|
||||
|
||||
do_log($x);
|
||||
header("Content-Type: text/plain; charset=utf-8");
|
||||
header("Pragma: no-cache");
|
||||
|
||||
@@ -318,7 +318,7 @@ function check_client($peer_id, $agent, &$agent_familyid)
|
||||
$agent_familyid = $row_allowed_ua['id'];
|
||||
}
|
||||
|
||||
if($_SERVER["HTTPS"] == "on")
|
||||
if(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on")
|
||||
{
|
||||
if($allow_https == 'yes')
|
||||
return 0;
|
||||
|
||||
@@ -80,7 +80,7 @@ function sql_query($query)
|
||||
|
||||
function sqlesc($value) {
|
||||
if (is_null($value)) {
|
||||
return null;
|
||||
return 'null';
|
||||
}
|
||||
$value = "'" . mysql_real_escape_string($value) . "'";
|
||||
return $value;
|
||||
|
||||
Reference in New Issue
Block a user