Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F1169552
D530.id.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
Fri, Sep 26, 6:17 AM
Size
1 KB
Mime Type
text/x-diff
Expires
Sat, Sep 27, 6:17 AM (13 h, 6 m)
Engine
blob
Format
Raw Data
Handle
757786
Attached To
D530: MINC-210 - Repair Downloadable products file downloads on the Front-End
D530.id.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