aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_post.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2002-03-17 14:07:43 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2002-03-17 14:07:43 +0000
commitb1a4782f9329f4028e1ee9a4aef81d88843d87b4 (patch)
treef43ea03231020aa11ed89555094cb5a127450ff1 /phpBB/includes/functions_post.php
parent34b0719c027ded778f57dbbfe28ba58805fe53d6 (diff)
downloadforums-b1a4782f9329f4028e1ee9a4aef81d88843d87b4.tar
forums-b1a4782f9329f4028e1ee9a4aef81d88843d87b4.tar.gz
forums-b1a4782f9329f4028e1ee9a4aef81d88843d87b4.tar.bz2
forums-b1a4782f9329f4028e1ee9a4aef81d88843d87b4.tar.xz
forums-b1a4782f9329f4028e1ee9a4aef81d88843d87b4.zip
Various updates
git-svn-id: file:///svn/phpbb/trunk@2301 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_post.php')
-rw-r--r--phpBB/includes/functions_post.php23
1 files changed, 6 insertions, 17 deletions
diff --git a/phpBB/includes/functions_post.php b/phpBB/includes/functions_post.php
index 6476aec15d..e679401795 100644
--- a/phpBB/includes/functions_post.php
+++ b/phpBB/includes/functions_post.php
@@ -252,6 +252,10 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
}
}
}
+ else if ( $mode == 'editpost' )
+ {
+ $result = remove_search_post($post_id);
+ }
if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
{
@@ -286,16 +290,6 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql);
}
- if ( $mode == 'editpost' )
- {
- $sql = "DELETE FROM " . SEARCH_MATCH_TABLE . "
- WHERE post_id = $post_id";
- if ( !($db->sql_query($sql)) )
- {
- message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql);
- }
- }
-
add_search_words($post_id, stripslashes($post_message), stripslashes($post_subject));
//
@@ -367,11 +361,6 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
}
}
- if ( $mode == 'editpost' )
- {
- remove_unmatched_words();
- }
-
$meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">';
$message = $lang['Stored'] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
@@ -381,7 +370,7 @@ function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_
//
// Update post stats and details
//
-function update_post_stats($mode, &$post_data, &$forum_id, &$topic_id, &$post_id)
+function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_id)
{
global $db, $userdata;
@@ -447,7 +436,7 @@ function update_post_stats($mode, &$post_data, &$forum_id, &$topic_id, &$post_id
}
else if ( $mode != 'poll_delete' )
{
- $forum_update_sql .= ", forum_last_post_id = $post_id" . ( ( $mode = 'newtopic' ) ? ", forum_topics = forum_topics $sign" : "" );
+ $forum_update_sql .= ", forum_last_post_id = $post_id" . ( ( $mode == 'newtopic' ) ? ", forum_topics = forum_topics $sign" : "" );
$topic_update_sql = "topic_last_post_id = $post_id" . ( ( $mode == 'reply' ) ? ", topic_replies = topic_replies $sign" : ", topic_first_post_id = $post_id" );
}
else