punbb/admin_maintenance.php
author Dan
Thu, 12 Jul 2007 01:04:01 -0400
changeset 2 a8a21e1c7afa
parent 0 f9ffdbd96607
permissions -rw-r--r--
Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     1
<?php
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     2
/***********************************************************************
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     3
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     4
  Copyright (C) 2002-2005  Rickard Andersson (rickard@punbb.org)
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     5
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     6
  This file is part of PunBB.
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     7
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     8
  PunBB is free software; you can redistribute it and/or modify it
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
     9
  under the terms of the GNU General Public License as published
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    10
  by the Free Software Foundation; either version 2 of the License,
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    11
  or (at your option) any later version.
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    12
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    13
  PunBB is distributed in the hope that it will be useful, but
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    14
  WITHOUT ANY WARRANTY; without even the implied warranty of
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    15
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    16
  GNU General Public License for more details.
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    17
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    18
  You should have received a copy of the GNU General Public License
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    19
  along with this program; if not, write to the Free Software
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    20
  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    21
  MA  02111-1307  USA
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    22
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    23
************************************************************************/
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    24
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    25
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    26
// Tell header.php to use the admin template
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    27
define('PUN_ADMIN_CONSOLE', 1);
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    28
// Tell common.php that we don't want output buffering
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    29
define('PUN_DISABLE_BUFFERING', 1);
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    30
2
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    31
//define('PUN_ROOT', './');
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    32
//require PUN_ROOT.'include/common.php';
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    33
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    34
global $pun_db, $pun_user, $pun_config, $lang_common;
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    35
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    36
require PUN_ROOT.'include/common_admin.php';
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    37
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    38
2
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    39
if ($pun_user['g_id'] < PUN_ADMIN)
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    40
	message($lang_common['No permission']);
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    41
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    42
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    43
if (isset($_GET['i_per_page']) && isset($_GET['i_start_at']))
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    44
{
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    45
	$per_page = intval($_GET['i_per_page']);
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    46
	$start_at = intval($_GET['i_start_at']);
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    47
	if ($per_page < 1 || $start_at < 1)
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    48
		message($lang_common['Bad request']);
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    49
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    50
	@set_time_limit(0);
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    51
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    52
	// If this is the first cycle of posts we empty the search index before we proceed
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    53
	if (isset($_GET['i_empty_index']))
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    54
	{
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    55
		// This is the only potentially "dangerous" thing we can do here, so we check the referer
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    56
		confirm_referrer('admin_maintenance.php');
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    57
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    58
		$truncate_sql = ($db_type != 'sqlite' && $db_type != 'pgsql') ? 'TRUNCATE TABLE ' : 'DELETE FROM ';
2
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    59
		$pun_db->query($truncate_sql.$pun_db->prefix.'search_matches') or error('Unable to empty search index match table', __FILE__, __LINE__, $pun_db->error());
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    60
		$pun_db->query($truncate_sql.$pun_db->prefix.'search_words') or error('Unable to empty search index words table', __FILE__, __LINE__, $pun_db->error());
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    61
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    62
		// Reset the sequence for the search words (not needed for SQLite)
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    63
		switch ($db_type)
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    64
		{
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    65
			case 'mysql':
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    66
			case 'mysqli':
2
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    67
				$result = $pun_db->query('ALTER TABLE '.$pun_db->prefix.'search_words auto_increment=1') or error('Unable to update table auto_increment', __FILE__, __LINE__, $pun_db->error());
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    68
				break;
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    69
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    70
			case 'pgsql';
2
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
    71
				$result = $pun_db->query('SELECT setval(\''.$pun_db->prefix.'search_words_id_seq\', 1, false)') or error('Unable to update sequence', __FILE__, __LINE__, $pun_db->error());
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    72
		}
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    73
	}
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    74
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    75
	$end_at = $start_at + $per_page;
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    76
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    77
?>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    78
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    79
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    80
<html>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    81
<head>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    82
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    83
<title><?php echo pun_htmlspecialchars($pun_config['o_board_title']) ?> / Rebuilding search index &hellip;</title>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    84
<style type="text/css">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    85
body {
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    86
	font: 10px Verdana, Arial, Helvetica, sans-serif;
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    87
	color: #333333;
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    88
	background-color: #FFFFFF
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    89
}
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    90
</style>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    91
</head>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    92
<body>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    93
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    94
Rebuilding index &hellip; This might be a good time to put on some coffee :-)<br /><br />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    95
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    96
<?php
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    97
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    98
	require PUN_ROOT.'include/search_idx.php';
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
    99
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   100
	// Fetch posts to process
2
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
   101
	$result = $pun_db->query('SELECT DISTINCT t.id, p.id, p.message FROM '.$pun_db->prefix.'topics AS t INNER JOIN '.$pun_db->prefix.'posts AS p ON t.id=p.topic_id WHERE t.id>='.$start_at.' AND t.id<'.$end_at.' ORDER BY t.id') or error('Unable to fetch topic/post info', __FILE__, __LINE__, $pun_db->error());
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   102
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   103
	$cur_topic = 0;
2
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
   104
	while ($cur_post = $pun_db->fetch_row($result))
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   105
	{
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   106
		if ($cur_post[0] <> $cur_topic)
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   107
		{
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   108
			// Fetch subject and ID of first post in topic
2
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
   109
			$result2 = $pun_db->query('SELECT p.id, t.subject, MIN(p.posted) AS first FROM '.$pun_db->prefix.'posts AS p INNER JOIN '.$pun_db->prefix.'topics AS t ON t.id=p.topic_id WHERE t.id='.$cur_post[0].' GROUP BY p.id, t.subject ORDER BY first LIMIT 1') or error('Unable to fetch topic info', __FILE__, __LINE__, $pun_db->error());
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
   110
			list($first_post, $subject) = $pun_db->fetch_row($result2);
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   111
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   112
			$cur_topic = $cur_post[0];
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   113
		}
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   114
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   115
		echo 'Processing post <strong>'.$cur_post[1].'</strong> in topic <strong>'.$cur_post[0].'</strong><br />'."\n";
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   116
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   117
		if ($cur_post[1] == $first_post)	// This is the "topic post" so we have to index the subject as well
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   118
			update_search_index('post', $cur_post[1], $cur_post[2], $subject);
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   119
		else
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   120
			update_search_index('post', $cur_post[1], $cur_post[2]);
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   121
	}
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   122
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   123
	// Check if there is more work to do
2
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
   124
	$result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'topics WHERE id>'.$end_at) or error('Unable to fetch topic info', __FILE__, __LINE__, $pun_db->error());
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   125
2
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
   126
	$query_str = ($pun_db->num_rows($result)) ? '?i_per_page='.$per_page.'&i_start_at='.$end_at : '';
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   127
2
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
   128
	$pun_db->end_transaction();
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
   129
	$pun_db->close();
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   130
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   131
	exit('<script type="text/javascript">window.location="admin_maintenance.php'.$query_str.'"</script><br />JavaScript redirect unsuccessful. Click <a href="admin_maintenance.php'.$query_str.'">here</a> to continue.');
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   132
}
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   133
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   134
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   135
// Get the first post ID from the db
2
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
   136
$result = $pun_db->query('SELECT id FROM '.$pun_db->prefix.'topics ORDER BY id LIMIT 1') or error('Unable to fetch topic info', __FILE__, __LINE__, $pun_db->error());
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
   137
if ($pun_db->num_rows($result))
a8a21e1c7afa Let's just say that the API loads. While a decent part of PunBB works, we've still got a LONG way to go, mainly with form validation and security. At this point, Punano is NOT secure as far as privileges and user levels go.
Dan
parents: 0
diff changeset
   138
	$first_id = $pun_db->result($result);
0
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   139
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   140
$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Maintenance';
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   141
require PUN_ROOT.'header.php';
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   142
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   143
generate_admin_menu('maintenance');
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   144
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   145
?>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   146
	<div class="blockform">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   147
		<h2><span>Forum Maintenance</span></h2>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   148
		<div class="box">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   149
			<form method="get" action="admin_maintenance.php">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   150
				<div class="inform">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   151
					<fieldset>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   152
						<legend>Rebuild search index</legend>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   153
						<div class="infldset">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   154
							<p>If you've added, edited or removed posts manually in the database or if you're having problems searching, you should rebuild the search index. For best performance you should put the forum in maintenance mode during rebuilding. <strong>Rebuilding the search index can take a long time and will increase server load during the rebuild process!</strong></p>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   155
							<table class="aligntop" cellspacing="0">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   156
								<tr>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   157
									<th scope="row">Topics per cycle</th>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   158
									<td>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   159
										<input type="text" name="i_per_page" size="7" maxlength="7" value="100" tabindex="1" />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   160
										<span>The number of topics to process per pageview. E.g. if you were to enter 100, one hundred topics would be processed and then the page would refresh. This is to prevent the script from timing out during the rebuild process.</span>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   161
									</td>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   162
								</tr>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   163
								<tr>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   164
									<th scope="row">Starting Topic ID</th>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   165
									<td>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   166
										<input type="text" name="i_start_at" size="7" maxlength="7" value="<?php echo (isset($first_id)) ? $first_id : 0 ?>" tabindex="2" />
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   167
										<span>The topic ID to start rebuilding at. It's default value is the first available ID in the database. Normally you wouldn't want to change this.</span>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   168
									</td>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   169
								</tr>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   170
								<tr>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   171
									<th scope="row">Empty index</th>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   172
									<td class="inputadmin">
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   173
										<span><input type="checkbox" name="i_empty_index" value="1" tabindex="3" checked="checked" />&nbsp;&nbsp;Select this if you want the search index to be emptied before rebuilding (see below).</span>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   174
									</td>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   175
								</tr>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   176
							</table>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   177
							<p class="topspace">Once the process has completed you will be redirected back to this page. It is highly recommended that you have JavaScript enabled in your browser during rebuilding (for automatic redirect when a cycle has completed). If you are forced to abort the rebuild process, make a note of the last processed topic ID and enter that ID+1 in "Topic ID to start at" when/if you want to continue ("Empty index" must not be selected).</p>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   178
							<div class="fsetsubmit"><input type="submit" name="rebuild_index" value="Rebuild index" tabindex="4" /></div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   179
						</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   180
					</fieldset>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   181
				</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   182
			</form>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   183
		</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   184
	</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   185
	<div class="clearer"></div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   186
</div>
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   187
<?php
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   188
f9ffdbd96607 Initial population
Dan
parents:
diff changeset
   189
require PUN_ROOT.'footer.php';