Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1168608
D530.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Sep 25, 1:45 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Fri, Sep 26, 1:45 AM (7 h, 45 m)
Engine
blob
Format
Raw Data
Handle
757045
Attached To
D530: MINC-210 - Repair Downloadable products file downloads on the Front-End
D530.diff
View Options
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
Log In to Comment