diff options
author | Aleksey Lim <alsroot@activitycentral.org> | 2011-03-11 20:05:45 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@activitycentral.org> | 2011-03-11 20:05:45 (GMT) |
commit | 604f38a42c7a247c44ac67a4e808dbbdf4daaad9 (patch) | |
tree | 29163840dc8828b7caf4f3584f83cada040b6e39 | |
parent | bd9adc002f72f32813a6faef3ab60616e90e8dc9 (diff) |
Return mirrorred file url for all not disabled files
-rw-r--r-- | site/app/controllers/downloads_controller.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/site/app/controllers/downloads_controller.php b/site/app/controllers/downloads_controller.php index 48eeb0f..ad54878 100644 --- a/site/app/controllers/downloads_controller.php +++ b/site/app/controllers/downloads_controller.php @@ -108,8 +108,8 @@ class DownloadsController extends AppController $this->set('fileName', $file_data['File']['filename']); - if (!DEV && !$forceLocal && $addon_data['Addon']['status'] == STATUS_PUBLIC - && $file_data['File']['status'] == STATUS_PUBLIC + if (!DEV && !$forceLocal && $addon_data['Addon']['status'] != STATUS_DISABLED + && $file_data['File']['status'] != STATUS_DISABLED && (strtotime($file_data['File']['datestatuschanged']) <= strtotime('-'.MIRROR_DELAY.' minutes'))) { // serve file from releases mirror only if we are not in dev mode // and if the file is public and sufficient time has passed to allow |