aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2003-05-11 19:56:28 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2003-05-11 19:56:28 +0000
commit7aa9eaeeb90196b79ec23c9f1f7f2885e1f0580d (patch)
tree322ae54f4e87e273247985a01fceb1fc5b8c550d /phpBB/includes/functions_posting.php
parent6b7f90de270c53f6dbea7e3de47901ba2ade79a7 (diff)
downloadforums-7aa9eaeeb90196b79ec23c9f1f7f2885e1f0580d.tar
forums-7aa9eaeeb90196b79ec23c9f1f7f2885e1f0580d.tar.gz
forums-7aa9eaeeb90196b79ec23c9f1f7f2885e1f0580d.tar.bz2
forums-7aa9eaeeb90196b79ec23c9f1f7f2885e1f0580d.tar.xz
forums-7aa9eaeeb90196b79ec23c9f1f7f2885e1f0580d.zip
fixed a small annoying bug.
git-svn-id: file:///svn/phpbb/trunk@4007 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 34cf8a48f9..4c45cc2aa1 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -911,9 +911,7 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
'topic_type' => $topic_type,
'topic_approved' => ($auth->acl_get('f_moderate', $post_data['forum_id']) && !$auth->acl_get('f_ignorequeue', $post_data['forum_id'])) ? 0 : 1,
'icon_id' => $post_data['icon_id'],
- 'topic_attachment' => (sizeof($filename_data['physical_filename'])) ? 1 : 0,
- 'topic_poster' => intval($user->data['user_id']),
- 'topic_first_poster_name' => ($username != '') ? stripslashes($username) : (($user->data['user_id'] == ANONYMOUS) ? '' : stripslashes($user->data['username']))
+ 'topic_attachment' => (sizeof($filename_data['physical_filename'])) ? 1 : 0
);
if (!empty($poll['poll_options']))
@@ -926,6 +924,14 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
);
}
+ if ($mode == 'post')
+ {
+ $topic_sql = array_merge($topic_sql, array(
+ 'topic_poster' => intval($user->data['user_id']),
+ 'topic_first_poster_name' => ($username != '') ? stripslashes($username) : (($user->data['user_id'] == ANONYMOUS) ? '' : stripslashes($user->data['username'])))
+ );
+ }
+
$sql = ($mode == 'post') ? 'INSERT INTO ' . TOPICS_TABLE . ' ' . $db->sql_build_array('INSERT', $topic_sql) : 'UPDATE ' . TOPICS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $topic_sql) . ' WHERE topic_id = ' . $post_data['topic_id'];
$db->sql_query($sql);
@@ -943,7 +949,6 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
'poster_ip' => $user->ip,
'post_approved' => ($auth->acl_get('f_moderate', $post_data['forum_id']) && !$auth->acl_get('f_ignorequeue', $post_data['forum_id'])) ? 0 : 1,
'post_edit_time' => ($mode == 'edit' && $post_data['poster_id'] == $user->data['user_id']) ? $current_time : 0,
- 'post_edit_count' => ($mode == 'edit' && $post_data['poster_id'] == $user->data['user_id']) ? 'post_edit_count + 1' : 0,
'enable_sig' => $post_data['enable_sig'],
'enable_bbcode' => $post_data['enable_bbcode'],
'enable_html' => $post_data['enable_html'],
@@ -970,7 +975,6 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_
if ($mode == 'edit')
{
-
$sql = 'UPDATE ' . POSTS_TABLE . '
SET ' . $db->sql_build_array('UPDATE', $post_sql) .
(($post_data['poster_id'] == $user->data['user_id']) ? ' , post_edit_count = post_edit_count + 1' : '') . '