Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Themes/default/css/install.css
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ ul.steps_list .stepcurrent ~ li {
color: #d05800;
}
.panel form div {
max-height: 560px;
height: auto;
}
.panel p, .panel h3, .panel ul {
margin: 0 0 1em 0;
Expand Down
1 change: 0 additions & 1 deletion Themes/default/languages/Install.english.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@

$txt['upgrade_completed_table'] = 'Completed Table:';
$txt['upgrade_current_table'] = 'Current Table:';
$txt['upgrade_fulltext'] = 'Please note that your fulltext index was dropped to facilitate the conversion and will need to be recreated in the admin area after the upgrade is complete.';
$txt['upgrade_conversion_proceed'] = 'Conversion Complete! Click Continue to Proceed.';
$txt['upgrade_convert_datajson'] = 'Converting data from serialize to JSON...';
$txt['upgrade_json_completed'] = 'Convert to JSON Complete! Click Continue to Proceed.';
Expand Down
62 changes: 7 additions & 55 deletions other/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3052,51 +3052,6 @@ function ConvertUtf8()
list($upcontext['database_charset']) = explode('_', $column_info['Collation']);
$upcontext['database_charset'] = in_array($upcontext['database_charset'], $charsets) ? array_search($upcontext['database_charset'], $charsets) : $upcontext['database_charset'];

// Detect whether a fulltext index is set.
$request = $smcFunc['db_query']('', '
SHOW INDEX
FROM {db_prefix}messages',
array(
)
);

$upcontext['dropping_index'] = false;

// If there's a fulltext index, we need to drop it first...
if ($request !== false || $smcFunc['db_num_rows']($request) != 0)
{
while ($row = $smcFunc['db_fetch_assoc']($request))
if ($row['Column_name'] == 'body' && (isset($row['Index_type']) && $row['Index_type'] == 'FULLTEXT' || isset($row['Comment']) && $row['Comment'] == 'FULLTEXT'))
$upcontext['fulltext_index'][] = $row['Key_name'];
$smcFunc['db_free_result']($request);

if (isset($upcontext['fulltext_index']))
$upcontext['fulltext_index'] = array_unique($upcontext['fulltext_index']);
}

// Drop it and make a note...
if (!empty($upcontext['fulltext_index']))
{
$upcontext['dropping_index'] = true;

$smcFunc['db_query']('', '
ALTER TABLE {db_prefix}messages
DROP INDEX ' . implode(',
DROP INDEX ', $upcontext['fulltext_index']),
array(
'db_error_skip' => true,
)
);

// Update the settings table
$smcFunc['db_insert']('replace',
'{db_prefix}settings',
array('variable' => 'string', 'value' => 'string'),
array('db_search_index', ''),
array('variable')
);
}

// Figure out what charset we should be converting from...
$lang_charsets = array(
'arabic' => 'windows-1256',
Expand Down Expand Up @@ -3470,7 +3425,7 @@ function ConvertUtf8()
}
$smcFunc['db_free_result']($request);

if ($upcontext['dropping_index'] && $command_line)
if (!empty($_SESSION['dropping_index']) && $command_line)
{
echo "\n" . '', $txt['upgrade_fulltext_error'], '';
flush();
Expand Down Expand Up @@ -4905,11 +4860,6 @@ function template_convert_utf8()
', $txt['upgrade_current_table'], ' &quot;<span id="current_table">', $upcontext['cur_table_name'], '</span>&quot;
</h3>';

// If we dropped their index, let's let them know
if ($upcontext['dropping_index'])
echo '
<p id="indexmsg" class="', $upcontext['cur_table_num'] == $upcontext['table_count'] ? 'inline_block' : 'hidden', '>', $txt['upgrade_fulltext'], '</p>';

// Completion notification
echo '
<p id="commess" class="', $upcontext['cur_table_num'] == $upcontext['table_count'] ? 'inline_block' : 'hidden', '">', $txt['upgrade_conversion_proceed'], '</p>';
Expand Down Expand Up @@ -4957,9 +4907,6 @@ function onConversionUpdate(oXMLDoc)
if (iTableNum == ', $upcontext['table_count'], ')
{
document.getElementById(\'commess\').classList.remove(\'hidden\');
if (document.getElementById(\'indexmsg\') != null) {
document.getElementById(\'indexmsg\').classList.remove(\'hidden\');
}
document.getElementById(\'current_tab\').classList.add(\'hidden\');
document.getElementById(\'contbutt\').disabled = 0;
document.getElementById(\'utf8_done\').value = 1;
Expand Down Expand Up @@ -5123,6 +5070,11 @@ function doTheDelete(theCheck)
', $txt['upgrade_luck'], '<br>
Simple Machines
</p>';

// If we dropped their index, let's let them know
if (!empty($_SESSION['dropping_index']))
echo '
<p id="indexmsg">', $txt['upgrade_fulltext_error'], '</p>';
}

/**
Expand All @@ -5137,7 +5089,7 @@ function doTheDelete(theCheck)
* @param int $setSize The amount of entries after which to update the database.
* @return bool
*/
function MySQLConvertOldIp($targetTable, $oldCol, $newCol, $limit = 50000, $setSize = 100)
function MySQLConvertOldIp($targetTable, $oldCol, $newCol, $limit = 10000, $setSize = 100)
{
global $smcFunc, $step_progress;

Expand Down
Loading
Loading