diff --git a/src/public/action.php b/src/public/action.php index 9478d3d..89e828b 100644 --- a/src/public/action.php +++ b/src/public/action.php @@ -21,7 +21,8 @@ try { $response = (object) [ 'success' => true, - 'message' => _('Internal server error') + 'message' => _('Internal server error'), + 'title' => sprintf(_('Oops - %s'), WEBSITE_NAME) ]; // Begin action request @@ -553,10 +554,30 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false) $link[] = $url; } - // Return download link - header( - sprintf('Location: %s', implode('&', array_unique($link))) + // Return link @TODO implement .bittorrent and separated v1/v2 magnet links + $response->title = sprintf( + _('%s - Download - %s'), + htmlentities($magnet->metaTitle), + WEBSITE_NAME + ); + + $response->message = sprintf( // @TODO MVC page for downloads needed + '

%s

+ + + + + ', + htmlentities($magnet->metaTitle), + implode('&', array_unique($link)) ); + + // Direct link output could not be useful because not cover all downloads options available on page. + // Also opens default app, when Yggdrasil users may run separated client for that needs. + // Feedback https://github.com/YGGverse/YGGtracker/issues + # header( + # sprintf('Location: %s', implode('&', array_unique($link))) + # ); } break; @@ -769,7 +790,7 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false) - <?php echo sprintf(_('Oops - %s'), WEBSITE_NAME) ?> + <?php echo $response->title ?> @@ -796,6 +817,17 @@ switch (isset($_GET['target']) ? urldecode($_GET['target']) : false) + +
+
+ + + +
+
+