aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-03-23 22:18:04 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-03-23 22:18:04 +0000
commit44ab877fba81892abff9aeffa82ae19c68f32132 (patch)
tree821bf1856ea0809a7acb6e4391e6344d24bd34b6
parent1b8dbdb73e786803ecfeead81712a14c91f16376 (diff)
downloadforums-44ab877fba81892abff9aeffa82ae19c68f32132.tar
forums-44ab877fba81892abff9aeffa82ae19c68f32132.tar.gz
forums-44ab877fba81892abff9aeffa82ae19c68f32132.tar.bz2
forums-44ab877fba81892abff9aeffa82ae19c68f32132.tar.xz
forums-44ab877fba81892abff9aeffa82ae19c68f32132.zip
Various bug fixes, polls, Guest vs. Anonymous, quoting guests
git-svn-id: file:///svn/phpbb/trunk@2415 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/posting.php3
-rw-r--r--phpBB/viewtopic.php9
2 files changed, 8 insertions, 4 deletions
diff --git a/phpBB/posting.php b/phpBB/posting.php
index c6d82a71f6..61dbc349c1 100644
--- a/phpBB/posting.php
+++ b/phpBB/posting.php
@@ -763,7 +763,8 @@ else
$msg_date = create_date($board_config['default_dateformat'], $postrow['post_time'], $board_config['board_timezone']);
- $message = '[quote="' . $post_info['username'] . '"]' . $message . '[/quote]';
+ $quote_username = ( !empty($post_info['post_username']) ) ? $post_info['post_username'] : $post_info['username'];
+ $message = '[quote="' . $quote_username . '"]' . $message . '[/quote]';
if ( !empty($orig_word) )
{
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 3934984526..db1e751a3d 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -691,6 +691,9 @@ if ( !empty($forum_row['topic_vote']) )
if ( $vote_info = $db->sql_fetchrowset($result) )
{
+ $db->sql_freeresult($result);
+ $vote_options = count($vote_info);
+
$vote_id = $vote_info[0]['vote_id'];
$vote_title = $vote_info[0]['vote_text'];
@@ -703,7 +706,8 @@ if ( !empty($forum_row['topic_vote']) )
message_die(GENERAL_ERROR, "Could not obtain user vote data for this topic", '', __LINE__, __FILE__, $sql);
}
- $user_voted = ( $db->sql_numrows($result) ) ? TRUE : 0;
+ $user_voted = ( $row = $db->sql_fetchrow($result) ) ? TRUE : 0;
+ $db->sql_freeresult($result);
if ( isset($HTTP_GET_VARS['vote']) || isset($HTTP_POST_VARS['vote']) )
{
@@ -718,7 +722,6 @@ if ( !empty($forum_row['topic_vote']) )
if ( $user_voted || $view_result || $poll_expired || !$is_auth['auth_vote'] || $forum_row['topic_status'] == TOPIC_LOCKED )
{
-
$template->set_filenames(array(
'pollbox' => 'viewtopic_poll_result.tpl')
);
@@ -826,7 +829,7 @@ if ( !$db->sql_query($sql) )
for($i = 0; $i < $total_posts; $i++)
{
$poster_id = $postrow[$i]['user_id'];
- $poster = $postrow[$i]['username'];
+ $poster = ( $poster_id == ANONYMOUS ) ? $lang['Guest'] : $postrow[$i]['username'];
$post_date = create_date($board_config['default_dateformat'], $postrow[$i]['post_time'], $board_config['board_timezone']);