mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
ups, seems i really forgot to change this. :)
git-svn-id: file:///svn/phpbb/trunk@8136 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
7d84cac202
commit
27fc215914
1 changed files with 11 additions and 11 deletions
|
@ -1,10 +1,10 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @package phpBB3
|
* @package phpBB3
|
||||||
* @version $Id$
|
* @version $Id$
|
||||||
* @copyright (c) 2005 phpBB Group
|
* @copyright (c) 2005 phpBB Group
|
||||||
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
define('IN_PHPBB', true);
|
define('IN_PHPBB', true);
|
||||||
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
|
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './../';
|
||||||
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
$phpEx = substr(strrchr(__FILE__, '.'), 1);
|
||||||
|
|
||||||
if (isset($_GET['avatar']))
|
if (isset($_GET['avatar']))
|
||||||
|
@ -80,9 +80,9 @@ if (isset($_GET['avatar']))
|
||||||
$db->sql_close();
|
$db->sql_close();
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
send_avatar_to_browser(($avatar_group ? 'g' : '') . $filename . '.' . $ext);
|
send_avatar_to_browser(($avatar_group ? 'g' : '') . $filename . '.' . $ext);
|
||||||
|
|
||||||
if (!empty($cache))
|
if (!empty($cache))
|
||||||
{
|
{
|
||||||
$cache->unload();
|
$cache->unload();
|
||||||
|
@ -149,7 +149,7 @@ else
|
||||||
{
|
{
|
||||||
if (!$attachment['in_message'])
|
if (!$attachment['in_message'])
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
$sql = 'SELECT p.forum_id, f.forum_password, f.parent_id
|
$sql = 'SELECT p.forum_id, f.forum_password, f.parent_id
|
||||||
FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
|
FROM ' . POSTS_TABLE . ' p, ' . FORUMS_TABLE . ' f
|
||||||
WHERE p.post_id = ' . $attachment['post_msg_id'] . '
|
WHERE p.post_id = ' . $attachment['post_msg_id'] . '
|
||||||
|
@ -231,8 +231,8 @@ if ($thumbnail)
|
||||||
else if (($display_cat == ATTACHMENT_CATEGORY_NONE || $display_cat == ATTACHMENT_CATEGORY_IMAGE) && !$attachment['is_orphan'])
|
else if (($display_cat == ATTACHMENT_CATEGORY_NONE || $display_cat == ATTACHMENT_CATEGORY_IMAGE) && !$attachment['is_orphan'])
|
||||||
{
|
{
|
||||||
// Update download count
|
// Update download count
|
||||||
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
|
$sql = 'UPDATE ' . ATTACHMENTS_TABLE . '
|
||||||
SET download_count = download_count + 1
|
SET download_count = download_count + 1
|
||||||
WHERE attach_id = ' . $attachment['attach_id'];
|
WHERE attach_id = ' . $attachment['attach_id'];
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);
|
||||||
}
|
}
|
||||||
|
@ -271,7 +271,7 @@ function send_avatar_to_browser($file)
|
||||||
{
|
{
|
||||||
global $config, $phpbb_root_path;
|
global $config, $phpbb_root_path;
|
||||||
|
|
||||||
$prefix = $config['avatar_salt'] . '_';
|
$prefix = $config['avatar_salt'] . '_';
|
||||||
$image_dir = $config['avatar_path'];
|
$image_dir = $config['avatar_path'];
|
||||||
|
|
||||||
// worst-case default
|
// worst-case default
|
||||||
|
@ -428,7 +428,7 @@ function send_file_to_browser($attachment, $upload_dir, $category)
|
||||||
|
|
||||||
// Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
|
// Send out the Headers. Do not set Content-Disposition to inline please, it is a security measure for users using the Internet Explorer.
|
||||||
header('Content-Type: ' . $attachment['mimetype']);
|
header('Content-Type: ' . $attachment['mimetype']);
|
||||||
|
|
||||||
if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie') !== false))
|
if (empty($user->browser) || (strpos(strtolower($user->browser), 'msie') !== false))
|
||||||
{
|
{
|
||||||
header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
|
header('Content-Disposition: attachment; ' . header_filename(htmlspecialchars_decode($attachment['real_filename'])));
|
||||||
|
|
Loading…
Add table
Reference in a new issue