Page MenuHomeIn-Portal Phabricator

D530.diff
No OneTemporary

File Metadata

Created
Thu, Sep 25, 1:45 AM

D530.diff

Index: branches/5.2.x/units/downloads/download_helper.php
===================================================================
--- branches/5.2.x/units/downloads/download_helper.php
+++ branches/5.2.x/units/downloads/download_helper.php
@@ -51,7 +51,7 @@
readfile($file_info['real_path']);
flush();
$file_info['download_end'] = adodb_mktime(); // this is incorrect
- define('SKIP_OUT_COMPRESSION', 1);
+
return $file_info;
}
@@ -74,4 +74,4 @@
$down_object->Create();
}
- }
\ No newline at end of file
+ }
Index: branches/5.2.x/units/products/products_tag_processor.php
===================================================================
--- branches/5.2.x/units/products/products_tag_processor.php
+++ branches/5.2.x/units/products/products_tag_processor.php
@@ -582,15 +582,21 @@
if (!$download_helper_class) {
$download_helper_class = 'DownloadHelper';
}
+
+ /** @var DownloadHelper $download_helper */
$download_helper = $this->Application->recallObject($download_helper_class);
- if (!$download_helper->CheckAccess($file_id, $product_id)) {
+
+ if ( !$download_helper->CheckAccess($file_id, $product_id) ) {
$this->Application->ApplicationDie('File Access permission check failed!');
}
+
$file_info = $download_helper->SendFile($file_id, $product_id);
$download_helper->LogDownload($product_id, $file_info);
define('DBG_SKIP_REPORTING', 1);
- $this->Application->ApplicationDie();
+ $this->Application->HandleEvent(new kEvent('adm:OnBeforeShutdown'));
+ $this->Application->Session->SaveData();
+ exit;
}
function PictureLink($params)

Event Timeline