mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-14 18:48:21 -07:00
Transfer from array to ArrayObject data type (#1019)
This commit is contained in:
parent
3ba3b5a8db
commit
79116b2c27
4 changed files with 8 additions and 6 deletions
|
@ -48,11 +48,14 @@ preg_match_all('/info_hash=([^&]*)/i', $_SERVER["QUERY_STRING"], $info_hash_arra
|
|||
$info_hashes = [];
|
||||
|
||||
foreach ($info_hash_array[1] as $hash) {
|
||||
if ($scrape_cache = CACHE('tr_cache')->get(SCRAPE_LIST_PREFIX . bin2hex(urldecode($hash)))) {
|
||||
|
||||
$decoded_hash = urldecode($hash);
|
||||
|
||||
if ($scrape_cache = CACHE('tr_cache')->get(SCRAPE_LIST_PREFIX . bin2hex($decoded_hash))) {
|
||||
$torrents['files'][$info_key = array_key_first($scrape_cache)] = $scrape_cache[$info_key];
|
||||
}
|
||||
else{
|
||||
$info_hashes[] = '\''. DB()->escape((urldecode($hash))) . '\'';
|
||||
$info_hashes[] = '\''. DB()->escape(($decoded_hash)) . '\'';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue