2003-04-10 21:35:31 +00:00
|
|
|
<?php
|
2007-10-04 15:09:42 +00:00
|
|
|
/**
|
2005-04-09 12:26:45 +00:00
|
|
|
*
|
|
|
|
* @package phpBB3
|
2007-10-04 15:09:42 +00:00
|
|
|
* @copyright (c) 2005 phpBB Group
|
2011-12-31 13:32:52 +00:00
|
|
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
|
2005-04-09 12:26:45 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2006-05-05 17:56:33 +00:00
|
|
|
* @ignore
|
2005-04-09 12:26:45 +00:00
|
|
|
*/
|
2003-04-10 21:35:31 +00:00
|
|
|
define('IN_PHPBB', true);
|
2007-10-04 15:09:42 +00:00
|
|
|
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
2003-09-07 13:46:51 +00:00
|
|
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
2007-04-30 10:46:17 +00:00
|
|
|
|
2009-03-16 15:59:53 +00:00
|
|
|
// Thank you sun.
|
2008-08-13 12:30:40 +00:00
|
|
|
if (isset($_SERVER['CONTENT_TYPE']))
|
|
|
|
{
|
|
|
|
if ($_SERVER['CONTENT_TYPE'] === 'application/x-java-archive')
|
|
|
|
{
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (isset($_SERVER['HTTP_USER_AGENT']) && strpos($_SERVER['HTTP_USER_AGENT'], 'Java') !== false)
|
|
|
|
{
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2007-04-30 10:46:17 +00:00
|
|
|
if (isset($_GET['avatar']))
|
|
|
|
{
|
2011-06-14 06:11:35 -04:00
|
|
|
require($phpbb_root_path . 'includes/startup.' . $phpEx);
|
2007-04-30 10:46:17 +00:00
|
|
|
require($phpbb_root_path . 'config.' . $phpEx);
|
2008-04-21 10:54:41 +00:00
|
|
|
|
|
|
|
if (!defined('PHPBB_INSTALLED') || empty($dbms) || empty($acm_type))
|
|
|
|
{
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2010-11-03 18:35:31 +01:00
|
|
|
require($phpbb_root_path . 'includes/class_loader.' . $phpEx);
|
2007-04-30 10:46:17 +00:00
|
|
|
require($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
|
|
|
|
require($phpbb_root_path . 'includes/constants.' . $phpEx);
|
2010-08-27 00:13:15 +02:00
|
|
|
require($phpbb_root_path . 'includes/functions.' . $phpEx);
|
2010-08-26 22:31:08 +02:00
|
|
|
require($phpbb_root_path . 'includes/functions_download' . '.' . $phpEx);
|
2011-09-08 22:37:19 +02:00
|
|
|
require($phpbb_root_path . 'includes/utf/utf_tools.' . $phpEx);
|
2007-04-30 10:46:17 +00:00
|
|
|
|
2012-04-09 00:22:55 +02:00
|
|
|
$phpbb_container = new ContainerBuilder();
|
|
|
|
$loader = new YamlFileLoader($phpbb_container, new FileLocator(__DIR__.'/../config'));
|
2012-03-31 20:45:58 +02:00
|
|
|
$loader->load('parameters.yml');
|
|
|
|
$loader->load('services.yml');
|
|
|
|
|
2012-04-09 00:22:55 +02:00
|
|
|
$phpbb_container->setParameter('core.root_path', $phpbb_root_path);
|
|
|
|
$phpbb_container->setParameter('core.php_ext', $phpEx);
|
|
|
|
$phpbb_container->set('container', $phpbb_container);
|
2012-03-31 20:45:58 +02:00
|
|
|
|
2012-04-09 00:22:55 +02:00
|
|
|
$phpbb_class_loader = $phpbb_container->get('class_loader');
|
|
|
|
$phpbb_class_loader_ext = $phpbb_container->get('class_loader.ext');
|
2010-11-03 18:35:31 +01:00
|
|
|
|
|
|
|
// set up caching
|
2012-04-09 00:22:55 +02:00
|
|
|
$cache = $phpbb_container->get('cache');
|
2010-11-03 18:35:31 +01:00
|
|
|
|
2012-04-09 00:22:55 +02:00
|
|
|
$phpbb_dispatcher = $phpbb_container->get('dispatcher');
|
|
|
|
$request = $phpbb_container->get('request');
|
|
|
|
$db = $phpbb_container->get('dbal.conn');
|
2007-04-30 10:46:17 +00:00
|
|
|
|
|
|
|
// Connect to DB
|
|
|
|
if (!@$db->sql_connect($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false, false))
|
|
|
|
{
|
|
|
|
exit;
|
|
|
|
}
|
2007-04-30 11:42:19 +00:00
|
|
|
unset($dbpasswd);
|
2008-01-29 15:49:15 +00:00
|
|
|
|
2011-09-08 22:37:19 +02:00
|
|
|
request_var('', 0, false, false, $request);
|
|
|
|
|
2012-04-09 00:22:55 +02:00
|
|
|
$config = $phpbb_container->get('config');
|
2011-01-10 02:27:18 +01:00
|
|
|
set_config(null, null, null, $config);
|
|
|
|
set_config_count(null, null, null, $config);
|
|
|
|
|
2011-08-15 19:34:30 -04:00
|
|
|
// load extensions
|
2012-04-09 00:22:55 +02:00
|
|
|
$phpbb_extension_manager = $phpbb_container->get('ext.manager');
|
|
|
|
$phpbb_subscriber_loader = $phpbb_container->get('event.subscriber_loader');
|
2012-03-28 21:45:21 +02:00
|
|
|
|
2012-03-31 20:45:58 +02:00
|
|
|
// worst-case default
|
|
|
|
$browser = strtolower($request->header('User-Agent', 'msie 6.0'));
|
|
|
|
|
2011-02-12 19:12:51 +01:00
|
|
|
$filename = request_var('avatar', '');
|
2007-04-30 10:46:17 +00:00
|
|
|
$avatar_group = false;
|
2008-07-29 11:49:56 +00:00
|
|
|
$exit = false;
|
2009-03-16 15:59:53 +00:00
|
|
|
|
2010-07-01 23:29:25 +02:00
|
|
|
if (isset($filename[0]) && $filename[0] === 'g')
|
2007-04-30 10:46:17 +00:00
|
|
|
{
|
|
|
|
$avatar_group = true;
|
|
|
|
$filename = substr($filename, 1);
|
|
|
|
}
|
2008-01-29 15:49:15 +00:00
|
|
|
|
2007-04-30 10:46:17 +00:00
|
|
|
// '==' is not a bug - . as the first char is as bad as no dot at all
|
|
|
|
if (strpos($filename, '.') == false)
|
|
|
|
{
|
2010-09-11 21:55:11 +02:00
|
|
|
send_status_line(403, 'Forbidden');
|
2008-07-29 11:49:56 +00:00
|
|
|
$exit = true;
|
2007-04-30 10:46:17 +00:00
|
|
|
}
|
2008-01-29 15:49:15 +00:00
|
|
|
|
2008-07-29 11:49:56 +00:00
|
|
|
if (!$exit)
|
2007-11-16 14:21:05 +00:00
|
|
|
{
|
2008-07-29 11:49:56 +00:00
|
|
|
$ext = substr(strrchr($filename, '.'), 1);
|
|
|
|
$stamp = (int) substr(stristr($filename, '_'), 1);
|
|
|
|
$filename = (int) $filename;
|
|
|
|
$exit = set_modified_headers($stamp, $browser);
|
2007-11-16 14:21:05 +00:00
|
|
|
}
|
2008-07-29 11:49:56 +00:00
|
|
|
if (!$exit && !in_array($ext, array('png', 'gif', 'jpg', 'jpeg')))
|
2007-04-30 10:46:17 +00:00
|
|
|
{
|
|
|
|
// no way such an avatar could exist. They are not following the rules, stop the show.
|
2010-09-11 21:55:11 +02:00
|
|
|
send_status_line(403, 'Forbidden');
|
2008-07-29 11:49:56 +00:00
|
|
|
$exit = true;
|
2007-04-30 10:46:17 +00:00
|
|
|
}
|
2009-03-16 15:59:53 +00:00
|
|
|
|
|
|
|
|
2008-07-29 12:36:07 +00:00
|
|
|
if (!$exit)
|
2007-04-30 10:46:17 +00:00
|
|
|
{
|
2008-07-29 12:36:07 +00:00
|
|
|
if (!$filename)
|
|
|
|
{
|
|
|
|
// no way such an avatar could exist. They are not following the rules, stop the show.
|
2010-09-11 21:55:11 +02:00
|
|
|
send_status_line(403, 'Forbidden');
|
2008-07-29 12:36:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
send_avatar_to_browser(($avatar_group ? 'g' : '') . $filename . '.' . $ext, $browser);
|
|
|
|
}
|
2007-04-30 10:46:17 +00:00
|
|
|
}
|
2008-07-29 12:36:07 +00:00
|
|
|
file_gc();
|
2007-04-30 10:46:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// implicit else: we are not in avatar mode
|
2006-06-06 20:53:46 +00:00
|
|
|
include($phpbb_root_path . 'common.' . $phpEx);
|
2010-08-26 22:31:08 +02:00
|
|
|
require($phpbb_root_path . 'includes/functions_download' . '.' . $phpEx);
|
2003-04-10 21:35:31 +00:00
|
|
|
|
2003-10-19 15:17:35 +00:00
|
|
|
$download_id = request_var('id', 0);
|
2007-04-30 10:46:17 +00:00
|
|
|
$mode = request_var('mode', '');
|
2004-02-28 21:16:15 +00:00
|
|
|
$thumbnail = request_var('t', false);
|
2003-04-10 21:35:31 +00:00
|
|
|
|
2006-08-11 13:21:51 +00:00
|
|
|
// Start session management, do not update session page.
|
|
|
|
$user->session_begin(false);
|
2003-04-10 21:35:31 +00:00
|
|
|
$auth->acl($user->data);
|
2004-02-28 21:16:15 +00:00
|
|
|
$user->setup('viewtopic');
|
2003-04-10 21:35:31 +00:00
|
|
|
|
2003-05-25 13:07:19 +00:00
|
|
|
if (!$download_id)
|
2003-04-10 21:35:31 +00:00
|
|
|
{
|
2011-02-23 18:15:54 -05:00
|
|
|
send_status_line(404, 'Not Found');
|
2003-04-10 21:35:31 +00:00
|
|
|
trigger_error('NO_ATTACHMENT_SELECTED');
|
|
|
|
}
|
|
|
|
|
2004-05-02 13:06:57 +00:00
|
|
|
if (!$config['allow_attachments'] && !$config['allow_pm_attach'])
|
2003-04-10 21:35:31 +00:00
|
|
|
{
|
2011-02-23 18:15:54 -05:00
|
|
|
send_status_line(404, 'Not Found');
|
2003-04-10 21:35:31 +00:00
|
|
|
trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED');
|
|
|
|
}
|
2003-10-19 15:17:35 +00:00
|
|
|
|
2008-07-29 11:49:56 +00:00
|
|
|
$sql = 'SELECT attach_id, in_message, post_msg_id, extension, is_orphan, poster_id, filetime
|
2003-11-04 22:05:38 +00:00
|
|
|
FROM ' . ATTACHMENTS_TABLE . "
|
2003-06-18 17:57:44 +00:00
|
|
|
WHERE attach_id = $download_id";
|
2003-10-19 15:17:35 +00:00
|
|
|
$result = $db->sql_query_limit($sql, 1);
|
2006-05-26 15:04:27 +00:00
|
|
|
$attachment = $db->sql_fetchrow($result);
|
|
|
|
$db->sql_freeresult($result);
|
2003-04-10 21:35:31 +00:00
|
|
|
|
2006-05-26 15:04:27 +00:00
|
|
|
if (!$attachment)
|
2003-04-10 21:35:31 +00:00
|
|
|
{
|
2011-02-23 18:15:54 -05:00
|
|
|
send_status_line(404, 'Not Found');
|
2003-04-10 21:35:31 +00:00
|
|
|
trigger_error('ERROR_NO_ATTACHMENT');
|
|
|
|
}
|
|
|
|
|
2004-05-02 13:06:57 +00:00
|
|
|
if ((!$attachment['in_message'] && !$config['allow_attachments']) || ($attachment['in_message'] && !$config['allow_pm_attach']))
|
|
|
|
{
|
2011-02-23 18:15:54 -05:00
|
|
|
send_status_line(404, 'Not Found');
|
2004-05-02 13:06:57 +00:00
|
|
|
trigger_error('ATTACHMENT_FUNCTIONALITY_DISABLED');
|
|
|
|
}
|
2003-04-10 21:35:31 +00:00
|
|
|
|
2004-05-02 13:06:57 +00:00
|
|
|
$row = array();
|
2006-09-13 16:08:36 +00:00
|
|
|
|
|
|
|
if ($attachment['is_orphan'])
|
2003-04-10 21:35:31 +00:00
|
|
|
{
|
2006-09-13 16:08:36 +00:00
|
|
|
// We allow admins having attachment permissions to see orphan attachments...
|
|
|
|
$own_attachment = ($auth->acl_get('a_attach') || $attachment['poster_id'] == $user->data['user_id']) ? true : false;
|
|
|
|
|
|
|
|
if (!$own_attachment || ($attachment['in_message'] && !$auth->acl_get('u_pm_download')) || (!$attachment['in_message'] && !$auth->acl_get('u_download')))
|
2006-08-11 13:21:51 +00:00
|
|
|
{
|
2011-02-23 18:15:54 -05:00
|
|
|
send_status_line(404, 'Not Found');
|
2006-09-13 16:08:36 +00:00
|
|
|
trigger_error('ERROR_NO_ATTACHMENT');
|
|
|
|
}
|
2006-08-11 13:21:51 +00:00
|
|
|
|
2006-12-27 17:43:55 +00:00
|
|
|
// Obtain all extensions...
|
|
|
|
$extensions = $cache->obtain_attach_extensions(true);
|
2006-09-13 16:08:36 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (!$attachment['in_message'])
|
|
|
|
{
|
2007-10-04 15:09:42 +00:00
|
|
|
//
|
2006-09-13 16:08:36 +00:00
|
|
|
$sql = 'SELECT p.forum_id, f.forum_password, f.parent_id
|
|
|
|
FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
|
|
|
|
WHERE p.post_id = ' . $attachment['post_msg_id'] . '
|
|
|
|
AND p.forum_id = f.forum_id';
|
|
|
|
$result = $db->sql_query_limit($sql, 1);
|
2006-08-11 13:21:51 +00:00
|
|
|
$row = $db->sql_fetchrow($result);
|
|
|
|
$db->sql_freeresult($result);
|
|
|
|
|
2010-03-11 16:03:14 +01:00
|
|
|
$f_download = $auth->acl_get('f_download', $row['forum_id']);
|
2006-09-13 16:08:36 +00:00
|
|
|
|
2007-05-03 14:29:22 +00:00
|
|
|
if ($auth->acl_get('u_download') && $f_download)
|
2006-09-13 16:08:36 +00:00
|
|
|
{
|
2007-05-03 14:29:22 +00:00
|
|
|
if ($row && $row['forum_password'])
|
2006-09-13 16:08:36 +00:00
|
|
|
{
|
|
|
|
// Do something else ... ?
|
|
|
|
login_forum_box($row);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2004-05-02 13:06:57 +00:00
|
|
|
{
|
2011-02-23 18:15:54 -05:00
|
|
|
send_status_line(403, 'Forbidden');
|
2006-09-13 16:08:36 +00:00
|
|
|
trigger_error('SORRY_AUTH_VIEW_ATTACH');
|
2004-05-02 13:06:57 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2003-04-10 21:35:31 +00:00
|
|
|
{
|
2006-12-27 17:43:55 +00:00
|
|
|
$row['forum_id'] = false;
|
2006-09-13 16:08:36 +00:00
|
|
|
if (!$auth->acl_get('u_pm_download'))
|
|
|
|
{
|
2010-09-11 21:55:11 +02:00
|
|
|
send_status_line(403, 'Forbidden');
|
2006-09-13 16:08:36 +00:00
|
|
|
trigger_error('SORRY_AUTH_VIEW_ATTACH');
|
|
|
|
}
|
2008-03-21 10:47:48 +00:00
|
|
|
|
|
|
|
// Check if the attachment is within the users scope...
|
|
|
|
$sql = 'SELECT user_id, author_id
|
|
|
|
FROM ' . PRIVMSGS_TO_TABLE . '
|
|
|
|
WHERE msg_id = ' . $attachment['post_msg_id'];
|
|
|
|
$result = $db->sql_query($sql);
|
|
|
|
|
|
|
|
$allowed = false;
|
|
|
|
while ($user_row = $db->sql_fetchrow($result))
|
|
|
|
{
|
|
|
|
if ($user->data['user_id'] == $user_row['user_id'] || $user->data['user_id'] == $user_row['author_id'])
|
|
|
|
{
|
|
|
|
$allowed = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$db->sql_freeresult($result);
|
|
|
|
|
|
|
|
if (!$allowed)
|
|
|
|
{
|
2010-09-11 21:55:11 +02:00
|
|
|
send_status_line(403, 'Forbidden');
|
2008-03-21 10:47:48 +00:00
|
|
|
trigger_error('ERROR_NO_ATTACHMENT');
|
|
|
|
}
|
2003-04-10 21:35:31 +00:00
|
|
|
}
|
2006-09-13 16:08:36 +00:00
|
|
|
|
2006-12-27 17:43:55 +00:00
|
|
|
// disallowed?
|
2006-09-13 16:08:36 +00:00
|
|
|
$extensions = array();
|
|
|
|
if (!extension_allowed($row['forum_id'], $attachment['extension'], $extensions))
|
2004-05-02 13:06:57 +00:00
|
|
|
{
|
2011-02-23 18:15:54 -05:00
|
|
|
send_status_line(404, 'Forbidden');
|
2006-09-13 16:08:36 +00:00
|
|
|
trigger_error(sprintf($user->lang['EXTENSION_DISABLED_AFTER_POSTING'], $attachment['extension']));
|
2004-05-02 13:06:57 +00:00
|
|
|
}
|
2003-04-10 21:35:31 +00:00
|
|
|
}
|
|
|
|
|
2003-11-23 22:25:46 +00:00
|
|
|
if (!download_allowed())
|
|
|
|
{
|
2010-09-11 21:55:11 +02:00
|
|
|
send_status_line(403, 'Forbidden');
|
2003-11-23 22:25:46 +00:00
|
|
|
trigger_error($user->lang['LINKAGE_FORBIDDEN']);
|
|
|
|
}
|
|
|
|
|
2003-10-19 15:17:35 +00:00
|
|
|
$download_mode = (int) $extensions[$attachment['extension']]['download_mode'];
|
2003-04-10 21:35:31 +00:00
|
|
|
|
2004-12-12 14:07:02 +00:00
|
|
|
// Fetching filename here to prevent sniffing of filename
|
2010-06-23 15:29:33 +02:00
|
|
|
$sql = 'SELECT attach_id, is_orphan, in_message, post_msg_id, extension, physical_filename, real_filename, mimetype, filesize, filetime
|
2004-12-12 14:07:02 +00:00
|
|
|
FROM ' . ATTACHMENTS_TABLE . "
|
|
|
|
WHERE attach_id = $download_id";
|
|
|
|
$result = $db->sql_query_limit($sql, 1);
|
2006-05-26 15:04:27 +00:00
|
|
|
$attachment = $db->sql_fetchrow($result);
|
|
|
|
$db->sql_freeresult($result);
|
2004-12-12 14:07:02 +00:00
|
|
|
|
2006-05-26 15:04:27 +00:00
|
|
|
if (!$attachment)
|
2004-12-12 14:07:02 +00:00
|
|
|
{
|
2011-02-23 18:15:54 -05:00
|
|
|
send_status_line(404, 'Not Found');
|
2004-12-12 14:07:02 +00:00
|
|
|
trigger_error('ERROR_NO_ATTACHMENT');
|
|
|
|
}
|
2006-05-26 15:04:27 +00:00
|
|
|
|
2009-08-01 12:28:50 +00:00
|
|
|
$attachment['physical_filename'] = utf8_basename($attachment['physical_filename']);
|
2006-08-11 13:21:51 +00:00
|
|
|
$display_cat = $extensions[$attachment['extension']]['display_cat'];
|
2004-12-12 14:07:02 +00:00
|
|
|
|
2007-05-17 13:23:13 +00:00
|
|
|
if (($display_cat == ATTACHMENT_CATEGORY_IMAGE || $display_cat == ATTACHMENT_CATEGORY_THUMB) && !$user->optionget('viewimg'))
|
|
|
|
{
|
|
|
|
$display_cat = ATTACHMENT_CATEGORY_NONE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($display_cat == ATTACHMENT_CATEGORY_FLASH && !$user->optionget('viewflash'))
|
|
|
|
{
|
|
|
|
$display_cat = ATTACHMENT_CATEGORY_NONE;
|
|
|
|
}
|
|
|
|
|
2003-04-10 21:35:31 +00:00
|
|
|
if ($thumbnail)
|
|
|
|
{
|
2003-11-16 21:53:56 +00:00
|
|
|
$attachment['physical_filename'] = 'thumb_' . $attachment['physical_filename'];
|
2003-04-10 21:35:31 +00:00
|
|
|
}
|
2010-10-23 18:03:49 +02:00
|
|
|
else if (($display_cat == ATTACHMENT_CATEGORY_NONE/* || $display_cat == ATTACHMENT_CATEGORY_IMAGE*/) && !$attachment['is_orphan'] && !phpbb_http_byte_range($attachment['filesize']))
|
2003-04-10 21:35:31 +00:00
|
|
|
{
|
2003-10-19 15:17:35 +00:00
|
|
|
// Update download count
|
2007-10-04 15:09:42 +00:00
|
|
|
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
|
|
|
|
SET download_count = download_count + 1
|
2003-04-10 21:35:31 +00:00
|
|
|
WHERE attach_id = ' . $attachment['attach_id'];
|
|
|
|
$db->sql_query($sql);
|
|
|
|
}
|
|
|
|
|
2008-08-28 13:10:05 +00:00
|
|
|
if ($display_cat == ATTACHMENT_CATEGORY_IMAGE && $mode === 'view' && (strpos($attachment['mimetype'], 'image') === 0) && ((strpos(strtolower($user->browser), 'msie') !== false) && (strpos(strtolower($user->browser), 'msie 8.0') === false)))
|
2003-04-10 21:35:31 +00:00
|
|
|
{
|
2007-10-14 13:12:08 +00:00
|
|
|
wrap_img_in_html(append_sid($phpbb_root_path . 'download/file.' . $phpEx, 'id=' . $attachment['attach_id']), $attachment['real_filename']);
|
2008-12-17 13:43:08 +00:00
|
|
|
file_gc();
|
2007-04-30 10:46:17 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Determine the 'presenting'-method
|
|
|
|
if ($download_mode == PHYSICAL_LINK)
|
|
|
|
{
|
|
|
|
// This presenting method should no longer be used
|
|
|
|
if (!@is_dir($phpbb_root_path . $config['upload_path']))
|
|
|
|
{
|
2011-02-23 18:15:54 -05:00
|
|
|
send_status_line(500, 'Internal Server Error');
|
2007-04-30 10:46:17 +00:00
|
|
|
trigger_error($user->lang['PHYSICAL_DOWNLOAD_NOT_POSSIBLE']);
|
|
|
|
}
|
2008-01-29 15:49:15 +00:00
|
|
|
|
2007-05-09 16:12:37 +00:00
|
|
|
redirect($phpbb_root_path . $config['upload_path'] . '/' . $attachment['physical_filename']);
|
2008-07-29 11:49:56 +00:00
|
|
|
file_gc();
|
2007-04-30 10:46:17 +00:00
|
|
|
}
|
|
|
|
else
|
2003-04-10 21:35:31 +00:00
|
|
|
{
|
2007-05-17 13:23:13 +00:00
|
|
|
send_file_to_browser($attachment, $config['upload_path'], $display_cat);
|
2008-07-29 11:49:56 +00:00
|
|
|
file_gc();
|
2003-04-10 21:35:31 +00:00
|
|
|
}
|
|
|
|
}
|