Skip to content

Commit

Permalink
Fixed issue #417
Browse files Browse the repository at this point in the history
  • Loading branch information
Al Brookbanks committed Mar 24, 2015
1 parent 14c5424 commit 695aac1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions classes/filemanager.class.php
Expand Up @@ -358,14 +358,13 @@ public function deliverDownload($access_key = false, &$error = null) {
// Maximum download limit has been reached
if ($GLOBALS['config']->get('config', 'download_count') > 0 && (int)$download['downloads'] >= $GLOBALS['config']->get('config', 'download_count')) $error = self::FM_DL_ERROR_MAXDL;
if (!empty($error)) return false;
if ($data = $this->getFileInfo($download['product_id']) !== false) {


$data = $this->getFileInfo($download['product_id']);
if ($data !== false) {
// Deliver file contents
if (isset($data['file']) && ($data['is_url'] || file_exists($data['file']))) {
if ($is_url) {
if ($data['is_url']) {
$GLOBALS['db']->update('CubeCart_downloads', array('downloads' => $download['downloads']+1), array('digital_id' => $download['digital_id']));
httpredir($file);
httpredir($data['file']);
return true;
} else {
ob_end_clean();
Expand Down

0 comments on commit 695aac1

Please sign in to comment.