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

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

$id = sed_sql_result(sed_sql_query("SELECT LAST_INSERT_ID()"), 0, 0);

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

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

$sql = sed_sql_query("UPDATE $db_forum_posts
			SET fp_index='".sed_sql_prep($words)."' WHERE fp_id='$id'");

?>