public function delete_index($acp_module, $u_action)
{
// Make sure we can actually use MySQL with fulltext indexes
if ($error = $this->init()) {
return $error;
}
if (empty($this->stats)) {
$this->get_stats();
}
$alter = array();
if (isset($this->stats['post_subject'])) {
$alter[] = 'DROP INDEX post_subject';
}
if (isset($this->stats['post_content'])) {
$alter[] = 'DROP INDEX post_content';
}
if (sizeof($alter)) {
$this->db->sql_query('ALTER TABLE ' . POSTS_TABLE . ' ' . implode(', ', $alter));
}
$this->db->sql_query('TRUNCATE TABLE ' . SEARCH_RESULTS_TABLE);
return false;
}