<?PHP
/* ====================
Seditio - Website engine
Copyright Neocrome
http://www.neocrome.net
[BEGIN_SED]
File=plugins/xsearch/xsearch.post.edit.php
Version=1.0
Updated=2009-jan-13
Type=Plugin
Author=Dmitry Lapin
Description=
[END_SED]
[BEGIN_SED_EXTPLUGIN]
Code=xsearch
Part=postedit
File=xsearch.post.edit
Hooks=forums.editpost.update.done
Tags=
Order=10
[END_SED_EXTPLUGIN]
==================== */

if (!defined('SED_CODE')) { die('Wrong URL.'); }

require_once("plugins/xsearch/inc/xsearch.common.php");

$words = textToBaseFormWords($rtext);
$words = implode(" ", $words);

$sql = sed_sql_query("UPDATE $db_forum_posts
			SET fp_index='$words' WHERE fp_id='$p'");
			
if (!empty($rtopictitle) && !empty($rtext))
{
	$words = textToBaseFormWords($rtopictitle);
	$words = implode(" ", $words);	
	$sql = sed_sql_query("UPDATE $db_forum_topics SET ft_index='$words' WHERE ft_id='$q'");
}			


?>