', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
';
echo '
', $txt['maintain_optimize'], '
';
// Show an option to convert the body column of the post table to MEDIUMTEXT or TEXT
if (isset($context['convert_to']))
{
echo '
', $txt[$context['convert_to'] . '_title'], '
';
}
// Show an option to convert to UTF-8 if we're not on UTF-8 yet.
if ($context['convert_utf8'])
{
echo '
', $txt['utf8_title'], '
';
}
// We might want to convert entities if we're on UTF-8.
if ($context['convert_entities'])
{
echo '
', $txt['entity_convert_title'], '
';
}
echo '
';
}
// Template for the routine maintenance tasks.
function template_maintain_routine()
{
global $context, $options, $txt, $scripturl, $modSettings;
// Starts off with general maintenance procedures.
echo '
';
// If maintenance has finished tell the user.
if (!empty($context['maintenance_finished']))
echo '
', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
';
echo '
', $txt['maintain_version'], '
', $txt['maintain_errors'], '
', $txt['maintain_recount'], '
', $txt['maintain_logs'], '
', $txt['maintain_cache'], '
';
}
// Template for the member maintenance tasks.
function template_maintain_members()
{
global $context, $settings, $options, $txt, $scripturl;
echo '
';
// If maintenance has finished tell the user.
if (!empty($context['maintenance_finished']))
echo '
', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
';
echo '
', $txt['maintain_reattribute_posts'], '
', $txt['maintain_members'], '
', $txt['maintain_recountposts'], '
';
}
// Template for the topic maintenance tasks.
function template_maintain_topics()
{
global $scripturl, $txt, $context, $settings, $modSettings;
// If maintenance has finished tell the user.
if (!empty($context['maintenance_finished']))
echo '
', sprintf($txt['maintain_done'], $context['maintenance_finished']), '
';
// Bit of javascript for showing which boards to prune in an otherwise hidden list.
echo '
';
echo '
', $txt['maintain_old'], '
', $txt['maintain_old_drafts'], '
', $txt['move_topics_maintenance'], '
';
}
// Simple template for showing results of our optimization...
function template_optimize()
{
global $context, $options, $txt, $scripturl;
echo '
', $txt['maintain_optimize'], '
', $txt['database_numb_tables'], '
', $txt['database_optimize_attempt'], '
';
// List each table being optimized...
foreach ($context['optimized_tables'] as $table)
echo '
', sprintf($txt['database_optimizing'], $table['name'], $table['data_freed']), '
';
// How did we go?
echo '
', $context['num_tables_optimized'] == 0 ? $txt['database_already_optimized'] : $context['num_tables_optimized'] . ' ' . $txt['database_optimized'];
echo '
', $txt['maintain_return'], '
';
}
function template_convert_utf8()
{
global $context, $txt, $scripturl;
echo '
';
}
function template_convert_entities()
{
global $context, $txt, $scripturl;
echo '
', $txt['entity_convert_title'], '
', $txt['entity_convert_introduction'], '
';
}
function template_convert_msgbody()
{
global $context, $txt, $scripturl;
echo '
', $txt[$context['convert_to'] . '_title'], '
', $txt['body_checking_introduction'], '
';
if (!empty($context['exceeding_messages']))
{
echo '
', $txt['exceeding_messages'], '
-
', implode('
- ', $context['exceeding_messages']), '
';
if (!empty($context['exceeding_messages_morethan']))
echo '
', $context['exceeding_messages_morethan'], '
';
}
else
echo '
', $txt['convert_to_text'], '
';
echo '
';
}
?>