Version 4.1.19
This commit is contained in:
1 parent
28bd025b35
commit
2bd5025018
2674 files changed
+233518
-77766
No files matched your search
@@ -1,16 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* @brief Pages Download Handler
|
||||
* @brief Pages Download Handler for custom record upload fields
|
||||
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
|
||||
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
|
||||
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
|
||||
* @license http://www.invisionpower.com/legal/standards/
|
||||
* @package IPS Social Suite
|
||||
* @package IPS Community Suite
|
||||
* @subpackage Content
|
||||
* @since 27 May 2015
|
||||
* @version SVN_VERSION_NUMBER
|
||||
*/
|
||||
|
||||
require_once str_replace( 'applications/cms/interface/file/file.php', '', str_replace( '\\', '/', __FILE__ ) ) . 'init.php';
|
||||
\IPS\Dispatcher\Front::i();
|
||||
\IPS\Dispatcher\External::i();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -43,13 +44,13 @@ try
|
||||
/* Get file and data */
|
||||
try
|
||||
{
|
||||
$file = \IPS\File::get( 'core_Records', $fileName );
|
||||
$file = \IPS\File::get( 'cms_Records', $fileName );
|
||||
}
|
||||
catch( \Exception $ex )
|
||||
{
|
||||
\IPS\Output::i()->error( 'no_module_permission', '2T279/3', 404, '' );
|
||||
\IPS\Output::i()->error( 'no_module_permission', '2T279/3', 404, '' );
|
||||
}
|
||||
|
||||
|
||||
$headers = array_merge( \IPS\Output::getCacheHeaders( time(), 360 ), array( "Content-Disposition" => \IPS\Output::getContentDisposition( 'attachment', $file->originalFilename ), "X-Content-Type-Options" => "nosniff" ) );
|
||||
|
||||
/* Send headers and print file */
|
||||
|
||||
Reference in new issue
Block a user