mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Unused Code inside function update_forum_data [Bug #6606]
Copy permissions protection for groups [Bug #6594] HTML issues in ACP [Bug #6580, #6578] Always send the correct encoding [related to bug #6576] Mass email fixes for first loop iteration [Bug #6570] Extension groups to be allowed in PM's and/or Posts [Bug #6558] Extension allowance checking clarified (no longer using forum id 0 for private messaging) Using request_var() array method for some variables [Bug #6556] Added confirmation for deletion of ranks/smilies/icons/word censores [Bug #6548, #6530, #6512, #6466] Only show postable forums in dropdown list for moving posts on forum deletion as well as correct re-indexing [Bug #6510, #6476, #6384] Jabber password being password field in jabber settings screen [Bug #6478] user activity language variable if viewing not own profile [Bug #6432] Show moderator group/user-name colour [Bug #6402] Log rank creation/updating/removing [Bug #6398] Update check permission changed from a_ to a_board [Bug #6392] git-svn-id: file:///svn/phpbb/trunk@6816 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -2446,7 +2446,7 @@ function smiley_text($text, $force_option = false)
|
||||
/**
|
||||
* General attachment parsing
|
||||
*
|
||||
* @param int $forum_id The forum id the attachments are displayed in (0 for private messages)
|
||||
* @param mixed $forum_id The forum id the attachments are displayed in (false if in private message)
|
||||
* @param string &$message The post/private message
|
||||
* @param array &$attachments The attachments to parse for (inline) display. The attachments array will hold templated data after parsing.
|
||||
* @param array &$update_count The attachment counts to be updated - will be filled
|
||||
@@ -2475,7 +2475,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
|
||||
|
||||
if (empty($extensions) || !is_array($extensions))
|
||||
{
|
||||
$extensions = $cache->obtain_attach_extensions();
|
||||
$extensions = $cache->obtain_attach_extensions($forum_id);
|
||||
}
|
||||
|
||||
// Look for missing attachment information...
|
||||
@@ -2620,7 +2620,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
|
||||
}
|
||||
}
|
||||
|
||||
$download_link = (!$force_physical && $attachment['attach_id']) ? append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&f=' . $forum_id) : $filename;
|
||||
$download_link = (!$force_physical && $attachment['attach_id']) ? append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&f=' . (int) $forum_id) : $filename;
|
||||
|
||||
switch ($display_cat)
|
||||
{
|
||||
@@ -2638,7 +2638,7 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
|
||||
// Images, but display Thumbnail
|
||||
case ATTACHMENT_CATEGORY_THUMB:
|
||||
$l_downloaded_viewed = $user->lang['VIEWED'];
|
||||
$thumbnail_link = (!$force_physical && $attachment['attach_id']) ? append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&t=1&f=' . $forum_id) : $thumbnail_filename;
|
||||
$thumbnail_link = (!$force_physical && $attachment['attach_id']) ? append_sid("{$phpbb_root_path}download.$phpEx", 'id=' . $attachment['attach_id'] . '&t=1&f=' . (int) $forum_id) : $thumbnail_filename;
|
||||
|
||||
$block_array += array(
|
||||
'S_THUMBNAIL' => true,
|
||||
@@ -2754,35 +2754,23 @@ function parse_attachments($forum_id, &$message, &$attachments, &$update_count,
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if extension is allowed to be posted within forum X (forum_id 0 == private messaging)
|
||||
* Check if extension is allowed to be posted.
|
||||
*
|
||||
* @param mixed $forum_id The forum id to check or false if private message
|
||||
* @param string $extension The extension to check, for example zip.
|
||||
* @param array &$extensions The extension array holding the information from the cache (will be obtained if empty)
|
||||
*
|
||||
* @return bool False if the extension is not allowed to be posted, else true.
|
||||
*/
|
||||
function extension_allowed($forum_id, $extension, &$extensions)
|
||||
{
|
||||
if (!sizeof($extensions))
|
||||
if (empty($extensions))
|
||||
{
|
||||
global $cache;
|
||||
$extensions = $cache->obtain_attach_extensions();
|
||||
$extensions = $cache->obtain_attach_extensions($forum_id);
|
||||
}
|
||||
|
||||
if (!isset($extensions['_allowed_'][$extension]))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
$check = $extensions['_allowed_'][$extension];
|
||||
|
||||
if (is_array($check))
|
||||
{
|
||||
// Check for private messaging AND all forums allowed
|
||||
if (sizeof($check) == 1 && $check[0] == 0)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return (!in_array($forum_id, $check)) ? false : true;
|
||||
}
|
||||
|
||||
return ($forum_id == 0) ? false : true;
|
||||
return (!isset($extensions['_allowed_'][$extension])) ? false : true;
|
||||
}
|
||||
|
||||
// Little helpers
|
||||
@@ -3700,10 +3688,9 @@ function page_header($page_title = '', $display_online_list = true)
|
||||
'SITE_LOGO_IMG' => $user->img('site_logo'))
|
||||
);
|
||||
|
||||
if ($config['send_encoding'])
|
||||
{
|
||||
header('Content-type: text/html; charset=UTF-8');
|
||||
}
|
||||
// application/xhtml+xml not used because of IE
|
||||
header('Content-type: text/html; charset=UTF-8');
|
||||
|
||||
header('Cache-Control: private, no-cache="set-cookie"');
|
||||
header('Expires: 0');
|
||||
header('Pragma: no-cache');
|
||||
|
Reference in New Issue
Block a user