mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 12:07:23 +08:00
fix torrent_info.php 404
This commit is contained in:
@@ -9,7 +9,7 @@ function print_array($array, $offset_symbol = "|--", $offset = "", $parent = "")
|
|||||||
echo "[$array] is not an array!<br />";
|
echo "[$array] is not an array!<br />";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
reset($array);
|
reset($array);
|
||||||
|
|
||||||
switch($array['type'] ?? '')
|
switch($array['type'] ?? '')
|
||||||
@@ -48,12 +48,12 @@ function print_array($array, $offset_symbol = "|--", $offset = "", $parent = "")
|
|||||||
//echo $offset;
|
//echo $offset;
|
||||||
print_array($val, $offset_symbol, $offset, $key);
|
print_array($val, $offset_symbol, $offset, $key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dbconn();
|
dbconn();
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ if (!$id)
|
|||||||
$res = sql_query("SELECT name FROM torrents WHERE id = ".sqlesc($id)) or sqlerr(__FILE__, __LINE__);
|
$res = sql_query("SELECT name FROM torrents WHERE id = ".sqlesc($id)) or sqlerr(__FILE__, __LINE__);
|
||||||
$row = mysql_fetch_assoc($res);
|
$row = mysql_fetch_assoc($res);
|
||||||
|
|
||||||
$fn = "$torrent_dir/$id.torrent";
|
$fn = getFullDirectory("$torrent_dir/$id.torrent");
|
||||||
|
|
||||||
if (!$row || !is_file($fn) || !is_readable($fn))
|
if (!$row || !is_file($fn) || !is_readable($fn))
|
||||||
httperr();
|
httperr();
|
||||||
|
|||||||
Reference in New Issue
Block a user