Skip to content

Commit

Permalink
Adapt utf8mb4 conversion to upmerged PR #29117
Browse files Browse the repository at this point in the history
  • Loading branch information
richard67 committed May 28, 2020
1 parent bd63b3c commit aef7a30
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions administrator/components/com_admin/script.php
Expand Up @@ -6278,7 +6278,7 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
}

// Set required conversion status
$converted = 4;
$converted = 5;

// Check conversion status in database
$db->setQuery('SELECT ' . $db->quoteName('converted')
Expand Down Expand Up @@ -6342,7 +6342,7 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
}

// If no error before, perform the optional conversions of tables which might or might not exist
if ($converted === 4)
if ($converted === 5)
{
$fileName2 = JPATH_ROOT . '/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion_optional.sql';

Expand Down Expand Up @@ -6386,14 +6386,14 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
}
}

if ($doDbFixMsg && $converted !== 4)
if ($doDbFixMsg && $converted !== 5)
{
// Show an error message telling to check database problems
Factory::getApplication()->enqueueMessage(Text::_('JLIB_DATABASE_ERROR_DATABASE_UPGRADE_FAILED'), 'error');
}

// If the conversion was successful try to drop the #__utf8_conversion table
if ($converted === 4 && $this->dropUtf8ConversionTable())
if ($converted === 5 && $this->dropUtf8ConversionTable())
{
// Table successfully dropped
return;
Expand Down

0 comments on commit aef7a30

Please sign in to comment.