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

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

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

$words1 = textToBaseFormWords($rpagetext);
$words1 = implode(" ", $words1);

$words2 = textToBaseFormWords($rpagetitle);
$words2 = implode(" ", $words2);

$sql = sed_sql_query("UPDATE $db_pages SET
		page_index = '".sed_sql_prep($words1)."',
		title_index = '".sed_sql_prep($words2)."'
		WHERE page_id='".$id."'");

?>