diff options
Diffstat (limited to 'site/app/controllers/downloads_controller.php')
-rw-r--r-- | site/app/controllers/downloads_controller.php | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/site/app/controllers/downloads_controller.php b/site/app/controllers/downloads_controller.php index 0057a4d..fc182db 100644 --- a/site/app/controllers/downloads_controller.php +++ b/site/app/controllers/downloads_controller.php @@ -76,11 +76,10 @@ class DownloadsController extends AppController $file_loc = REPO_PATH . '/' . $file_data['Version']['addon_id'] . '/' . $file_data['File']['filename']; // If add-on is in sandbox, make sure sandbox is enabled. If disabled, make sure admin or author. - // If _GET['confirmed'] exists, then a user confirmed a sandbox download via JS, bug 441739 if (($addon_data['Addon']['status'] == STATUS_SANDBOX || $addon_data['Addon']['status'] == STATUS_NOMINATED || $file_data['File']['status'] == STATUS_PENDING) - && !$this->Session->check('User') && !isset($_GET['confirmed'])) { + && !$this->Session->check('User')) { $target_url = str_replace(LANG . '/' . APP_SHORTNAME . '/','',$this->params['url']['url']); $this->redirect('/users/login?to=' . urlencode($target_url) . "&m=1"); @@ -147,17 +146,7 @@ class DownloadsController extends AppController if (!empty($file_id)) { // Use normal download method if file is found - $target = "/downloads/file/{$file_id}/{$type}/{$file_data['File']['filename']}"; - if (count($this->params['url']) > 1) { // re-append query string - $getvars = array(); - foreach ($this->params['url'] as $k => $v) { - if ($k == 'url') continue; - $getvars[] = "$k=$v"; - } - $qs = implode(',', $getvars); - $target .= "?$qs"; - } - $this->redirect($target); + $this->redirect("/downloads/file/{$file_id}/{$type}/{$file_data['File']['filename']}"); } else { // File wasn't found |