aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-01-19 17:50:11 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-01-19 17:50:11 +0000
commit9d06365ec77303bca134b3ccc17a0c7c381fb827 (patch)
treec4e498c7760233d32b1b7c211cda02dfad61d901
parent8d5dc5ed1b3632e70ac7aa8a0c378dc2331f3730 (diff)
downloadforums-9d06365ec77303bca134b3ccc17a0c7c381fb827.tar
forums-9d06365ec77303bca134b3ccc17a0c7c381fb827.tar.gz
forums-9d06365ec77303bca134b3ccc17a0c7c381fb827.tar.bz2
forums-9d06365ec77303bca134b3ccc17a0c7c381fb827.tar.xz
forums-9d06365ec77303bca134b3ccc17a0c7c381fb827.zip
'post encoding'-fix
git-svn-id: file:///svn/phpbb/trunk@4762 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/includes/mcp/mcp_main.php1
-rw-r--r--phpBB/viewtopic.php13
2 files changed, 9 insertions, 5 deletions
diff --git a/phpBB/includes/mcp/mcp_main.php b/phpBB/includes/mcp/mcp_main.php
index f4c0910a50..3f7b752c26 100644
--- a/phpBB/includes/mcp/mcp_main.php
+++ b/phpBB/includes/mcp/mcp_main.php
@@ -452,6 +452,7 @@ class mcp_main extends mcp
'U_MCP_QUEUE' => $this->url . '&amp;mode=approve&amp;t=' . $row['topic_id'],
'U_MCP_REPORT' => $this->url . '&amp;mode=reports&amp;t=' . $row['topic_id'],
+ 'ATTACH_ICON_IMG' => ($auth->acl_gets('f_download', 'u_download', $row['forum_id']) && $row['topic_attachment']) ? $user->img('icon_attach', sprintf($user->lang['TOTAL_ATTACHMENTS'], $row['topic_attachment'])) : '',
'TOPIC_FOLDER_IMG' => $folder_img,
'TOPIC_TYPE' => $topic_type,
'TOPIC_TITLE' => $topic_title,
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index ae22b5e432..96a8e6977c 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -619,8 +619,9 @@ if (!empty($poll_start))
setcookie($config['cookie_name'] . '_poll_' . $topic_id, implode(',', $voted_id), time() + 31536000, $config['cookie_path'], $config['cookie_domain'], $config['cookie_secure']);
}
+//, topic_last_post_time = ' . time() . "
$sql = 'UPDATE ' . TOPICS_TABLE . '
- SET poll_last_vote = ' . time() . ', topic_last_post_time = ' . time() . "
+ SET poll_last_vote = ' . time() . "
WHERE topic_id = $topic_id";
$db->sql_query($sql);
@@ -744,7 +745,7 @@ while ($row = $db->sql_fetchrow($result))
{
if ($row['user_karma'] < $user->data['user_min_karma'])
{
- $rowset[] = array(
+ $rowset[$row['post_id']] = array(
'below_karma' => TRUE,
'post_id' => $row['post_id'],
'poster' => $poster,
@@ -755,7 +756,7 @@ while ($row = $db->sql_fetchrow($result))
}
else if ($row['foe'])
{
- $rowset[] = array(
+ $rowset[$row['post_id']] = array(
'foe' => TRUE,
'post_id' => $row['post_id'],
'poster' => $poster,
@@ -1004,13 +1005,15 @@ if (count($attach_list))
$db->sql_query($sql);
}
}
- elseif ($has_attachments && !$topic_data['topic_attachment'])
+ else if ($has_attachments && !$topic_data['topic_attachment'])
{
// Topic has approved attachments but its flag is wrong
$sql = 'UPDATE ' . TOPICS_TABLE . "
SET topic_attachment = 1
WHERE topic_id = $topic_id";
$db->sql_query($sql);
+
+ $topic_data['topic_attachment'] = 1;
}
}
else
@@ -1084,7 +1087,7 @@ for ($i = 0; $i < count($post_list); ++$i)
// End signature parsing, only if needed
if ($user_cache[$poster_id]['sig'] && empty($user_cache[$poster_id]['sig_parsed']))
{
- $user_cache[$poster_id]['sig'] = ($config['enable_smilies']) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $user_cache[$poster_id]['sig']) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $config['smilies_path'], $user_cache[$poster_id]['sig']);
+ $user_cache[$poster_id]['sig'] = (!$config['enable_smilies'] || !$user->optionget('viewsmilies')) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $user_cache[$poster_id]['sig']) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $config['smilies_path'], $user_cache[$poster_id]['sig']);
if ($user_cache[$poster_id]['sig_bbcode_bitfield'])
{