aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2004-11-14 17:12:07 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2004-11-14 17:12:07 +0000
commitd4d1307e1546393b40eeda8d762a6663d831a882 (patch)
treec6053d736e983598fdfe1f5de42e24efce1a313d /phpBB/viewtopic.php
parentd62c5a6fcd06605087b5084beb897798fbf11ec9 (diff)
downloadforums-d4d1307e1546393b40eeda8d762a6663d831a882.tar
forums-d4d1307e1546393b40eeda8d762a6663d831a882.tar.gz
forums-d4d1307e1546393b40eeda8d762a6663d831a882.tar.bz2
forums-d4d1307e1546393b40eeda8d762a6663d831a882.tar.xz
forums-d4d1307e1546393b40eeda8d762a6663d831a882.zip
- letting urls work again, fixing [code] breakage on urls, corrected magic_url to be able to parse urls at the beginning/end of bbcode blocks
- fixed "edited by" message. git-svn-id: file:///svn/phpbb/trunk@5027 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php18
1 files changed, 13 insertions, 5 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 87d34c192e..4698e9df40 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -194,7 +194,7 @@ if (!($topic_data = $db->sql_fetchrow($result)))
// Extract the data
extract($topic_data);
-// We make this check here because the correct forum_id is determined
+//
$topic_replies = ($auth->acl_get('m_approve', $forum_id)) ? $topic_replies_real : $topic_replies;
unset($topic_replies_real);
@@ -232,12 +232,13 @@ else
}
// Check sticky/announcement time limit
-if (($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) && $topic_time_limit && $topic_time + $topic_time_limit < time())
+if (($topic_type == POST_STICKY || $topic_type == POST_ANNOUNCE) && $topic_time_limit && ($topic_time + $topic_time_limit) < time())
{
$sql = 'UPDATE ' . TOPICS_TABLE . '
SET topic_type = ' . POST_NORMAL . ', topic_time_limit = 0
WHERE topic_id = ' . $topic_id;
$db->sql_query($sql);
+
$topic_type = POST_NORMAL;
$topic_time_limit = 0;
}
@@ -1188,11 +1189,18 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
unset($post_storage_list);
}
+
$l_edit_time_total = ($row['post_edit_count'] == 1) ? $user->lang['EDITED_TIME_TOTAL'] : $user->lang['EDITED_TIMES_TOTAL'];
- $user_edit_row = ($row['post_edit_reason']) ? $post_edit_list[$row['post_edit_user']] : array();
-
- $l_edited_by = sprintf($l_edit_time_total, (!$row['post_edit_user']) ? $row['poster'] : (($user_edit_row['user_colour']) ? '<span style="color:#' . $user_edit_row['user_colour'] . '">' . $user_edit_row['username'] . '</span>' : $user_edit_row['username']), $user->format_date($row['post_edit_time']), $row['post_edit_count']);
+ if ($row['post_edit_reason'])
+ {
+ $user_edit_row = $post_edit_list[$row['post_edit_user']];
+ $l_edited_by = sprintf($l_edit_time_total, (!$row['post_edit_user']) ? $row['poster'] : (($user_edit_row['user_colour']) ? '<span style="color:#' . $user_edit_row['user_colour'] . '">' . $user_edit_row['username'] . '</span>' : $user_edit_row['username']), $user->format_date($row['post_edit_time']), $row['post_edit_count']);
+ }
+ else
+ {
+ $l_edited_by = sprintf($l_edit_time_total, (!$row['post_edit_user']) ? $row['poster'] : $user_cache[$row['post_edit_user']]['username'], $user->format_date($row['post_edit_time']), $row['post_edit_count']);
+ }
}
else
{