mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-23 19:37:23 +08:00
fix rss download link + migrate bencode to rhilip/bencode
This commit is contained in:
@@ -105,7 +105,6 @@ get_where("audiocodecs", "audiocodec", "aud");
|
||||
if ($where)
|
||||
$where = "WHERE ".$where;
|
||||
$query = "SELECT torrents.id, torrents.category, torrents.name, torrents.small_descr, torrents.descr, torrents.info_hash, torrents.size, torrents.added, torrents.anonymous, users.username AS username, categories.id AS cat_id, categories.name AS cat_name FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id $where ORDER BY torrents.added DESC LIMIT $limit";
|
||||
|
||||
$res = sql_query($query) or die(mysql_error());
|
||||
$torrentRep = new \App\Repositories\TorrentRepository();
|
||||
$url = get_protocol_prefix().$BASEURL;
|
||||
@@ -152,7 +151,7 @@ while ($row = mysql_fetch_array($res))
|
||||
else $author = $row['username'];
|
||||
$itemurl = $url."/details.php?id=".$row['id'];
|
||||
if ($dllink)
|
||||
$itemdlurl = $url."/download.php?id=".$row['id']."&downhash=".rawurlencode($torrentRep->encryptDownHash($row['id'], $user));
|
||||
$itemdlurl = $url."/download.php?id=".$row['id']."&downhash=" . rawurlencode( $user['id'] . '|'. $torrentRep->encryptDownHash($row['id'], $user));
|
||||
else $itemdlurl = $url."/download.php?id=".$row['id'];
|
||||
if (!empty($_GET['icat'])) $title .= "[".$row['cat_name']."]";
|
||||
$title .= $row['name'];
|
||||
|
||||
Reference in New Issue
Block a user