mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
auto-append TRACKER_LINKS to download link, make attribute values unique
This commit is contained in:
parent
a20ae75307
commit
cf250cd7ee
1 changed files with 6 additions and 1 deletions
|
|
@ -414,6 +414,11 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
|
||||||
$uri->value)));
|
$uri->value)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
foreach (TRACKER_LINKS as $tracker => $value)
|
||||||
|
{
|
||||||
|
$link[] = sprintf('tr=%s', urlencode($value->announce));
|
||||||
|
}
|
||||||
|
|
||||||
/// Acceptable Source
|
/// Acceptable Source
|
||||||
foreach ($db->findAcceptableSourceByMagnetId($magnet->magnetId) as $result)
|
foreach ($db->findAcceptableSourceByMagnetId($magnet->magnetId) as $result)
|
||||||
{
|
{
|
||||||
|
|
@ -452,7 +457,7 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false)
|
||||||
|
|
||||||
// Return download link
|
// Return download link
|
||||||
header(
|
header(
|
||||||
sprintf('Location: %s', implode('&', $link))
|
sprintf('Location: %s', implode('&', array_unique($link)))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue