+ | - | + | - | + | - | + | showIpColumn) : ?> - | + | - | + | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+ | id); ?> |
diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php
index 77c7d2074b0a8..265a76cfc24b9 100644
--- a/administrator/components/com_admin/script.php
+++ b/administrator/components/com_admin/script.php
@@ -19,7 +19,6 @@
use Joomla\CMS\Table\Table;
use Joomla\Database\ParameterType;
use Joomla\Component\Fields\Administrator\Model\FieldModel;
-use Joomla\Database\UTF8MB4SupportInterface;
/**
* Script file of Joomla CMS
@@ -507,6 +506,9 @@ public function deleteUnexistingFiles()
'/administrator/components/com_admin/models/sysinfo.php',
'/administrator/components/com_admin/postinstall/eaccelerator.php',
'/administrator/components/com_admin/postinstall/joomla40checks.php',
+ '/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql',
+ '/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql',
+ '/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-03.sql',
'/administrator/components/com_admin/sql/updates/mysql/2.5.0-2011-12-06.sql',
'/administrator/components/com_admin/sql/updates/mysql/2.5.0-2011-12-16.sql',
'/administrator/components/com_admin/sql/updates/mysql/2.5.0-2011-12-19.sql',
@@ -633,6 +635,7 @@ public function deleteUnexistingFiles()
'/administrator/components/com_admin/sql/updates/mysql/3.9.10-2019-07-09.sql',
'/administrator/components/com_admin/sql/updates/mysql/3.9.16-2020-02-15.sql',
'/administrator/components/com_admin/sql/updates/mysql/3.9.16-2020-03-04.sql',
+ '/administrator/components/com_admin/sql/updates/mysql/3.9.19-2020-05-16.sql',
'/administrator/components/com_admin/sql/updates/mysql/3.9.3-2019-01-12.sql',
'/administrator/components/com_admin/sql/updates/mysql/3.9.3-2019-02-07.sql',
'/administrator/components/com_admin/sql/updates/mysql/3.9.7-2019-04-23.sql',
@@ -1273,6 +1276,7 @@ public function deleteUnexistingFiles()
'/administrator/components/com_joomlaupdate/views/default/tmpl/default.xml',
'/administrator/components/com_joomlaupdate/views/default/tmpl/default_nodownload.php',
'/administrator/components/com_joomlaupdate/views/default/tmpl/default_noupdate.php',
+ '/administrator/components/com_joomlaupdate/views/default/tmpl/default_preupdatecheck.php',
'/administrator/components/com_joomlaupdate/views/default/tmpl/default_reinstall.php',
'/administrator/components/com_joomlaupdate/views/default/tmpl/default_update.php',
'/administrator/components/com_joomlaupdate/views/default/tmpl/default_updatemefirst.php',
@@ -3071,11 +3075,41 @@ public function deleteUnexistingFiles()
'/layouts/libraries/cms/html/bootstrap/addtabscript.php',
'/layouts/libraries/cms/html/bootstrap/starttabsetscript.php',
'/libraries/cms/class/loader.php',
+ '/libraries/cms/html/access.php',
+ '/libraries/cms/html/actionsdropdown.php',
+ '/libraries/cms/html/adminlanguage.php',
'/libraries/cms/html/batch.php',
+ '/libraries/cms/html/behavior.php',
+ '/libraries/cms/html/bootstrap.php',
+ '/libraries/cms/html/category.php',
+ '/libraries/cms/html/content.php',
+ '/libraries/cms/html/contentlanguage.php',
+ '/libraries/cms/html/date.php',
+ '/libraries/cms/html/debug.php',
+ '/libraries/cms/html/dropdown.php',
+ '/libraries/cms/html/email.php',
+ '/libraries/cms/html/form.php',
+ '/libraries/cms/html/formbehavior.php',
+ '/libraries/cms/html/grid.php',
+ '/libraries/cms/html/icons.php',
+ '/libraries/cms/html/jgrid.php',
+ '/libraries/cms/html/jquery.php',
'/libraries/cms/html/language/en-GB/en-GB.jhtmldate.ini',
+ '/libraries/cms/html/links.php',
+ '/libraries/cms/html/list.php',
+ '/libraries/cms/html/menu.php',
+ '/libraries/cms/html/number.php',
'/libraries/cms/html/rules.php',
+ '/libraries/cms/html/searchtools.php',
+ '/libraries/cms/html/select.php',
+ '/libraries/cms/html/sidebar.php',
'/libraries/cms/html/sliders.php',
+ '/libraries/cms/html/sortablelist.php',
+ '/libraries/cms/html/string.php',
'/libraries/cms/html/tabs.php',
+ '/libraries/cms/html/tag.php',
+ '/libraries/cms/html/tel.php',
+ '/libraries/cms/html/user.php',
'/libraries/cms/less/formatter/joomla.php',
'/libraries/cms/less/less.php',
'/libraries/fof/LICENSE.txt',
@@ -3298,8 +3332,6 @@ public function deleteUnexistingFiles()
'/libraries/joomla/archive/tar.php',
'/libraries/joomla/archive/wrapper/archive.php',
'/libraries/joomla/archive/zip.php',
- '/libraries/joomla/base/adapter.php',
- '/libraries/joomla/base/adapterinstance.php',
'/libraries/joomla/controller/base.php',
'/libraries/joomla/controller/controller.php',
'/libraries/joomla/database/database.php',
@@ -3632,6 +3664,7 @@ public function deleteUnexistingFiles()
'/libraries/src/Filter/Wrapper/OutputFilterWrapper.php',
'/libraries/src/Form/Field/HelpsiteField.php',
'/libraries/src/Form/FormWrapper.php',
+ '/libraries/src/Helper/ContentHistoryHelper.php',
'/libraries/src/Helper/SearchHelper.php',
'/libraries/src/Http/Wrapper/FactoryWrapper.php',
'/libraries/src/Language/LanguageStemmer.php',
@@ -3685,6 +3718,7 @@ public function deleteUnexistingFiles()
'/libraries/vendor/joomla/image/src/Filter/Smooth.php',
'/libraries/vendor/joomla/image/src/Image.php',
'/libraries/vendor/joomla/image/src/ImageFilter.php',
+ '/libraries/vendor/joomla/input/src/Cli.php',
'/libraries/vendor/joomla/registry/src/AbstractRegistryFormat.php',
'/libraries/vendor/joomla/session/Joomla/Session/LICENSE',
'/libraries/vendor/joomla/session/Joomla/Session/Session.php',
@@ -5354,7 +5388,6 @@ public function deleteUnexistingFiles()
'/libraries/joomla/database/driver',
'/libraries/joomla/database',
'/libraries/joomla/controller',
- '/libraries/joomla/base',
'/libraries/joomla/archive/wrapper',
'/libraries/joomla/archive',
'/libraries/joomla/application/web/router',
@@ -5423,7 +5456,9 @@ public function deleteUnexistingFiles()
'/libraries/cms/less',
'/libraries/cms/html/language/en-GB',
'/libraries/cms/html/language',
+ '/libraries/cms/html',
'/libraries/cms/class',
+ '/libraries/cms',
'/layouts/joomla/tinymce/buttons',
'/layouts/joomla/html/formbehavior',
'/components/com_wrapper/views/wrapper/tmpl',
@@ -6246,21 +6281,41 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
{
$db = Factory::getDbo();
- if (!($db instanceof UTF8MB4SupportInterface))
+ if ($db->getServerType() !== 'mysql')
{
return;
}
- // Set required conversion status
- if ($db->hasUTF8mb4Support())
+ // Check if the #__utf8_conversion table exists
+ $db->setQuery('SHOW TABLES LIKE ' . $db->quote($db->getPrefix() . 'utf8_conversion'));
+
+ try
{
- $converted = 2;
+ $rows = $db->loadRowList(0);
+ }
+ catch (Exception $e)
+ {
+ // Render the error message from the Exception object
+ Factory::getApplication()->enqueueMessage($e->getMessage(), 'error');
+
+ if ($doDbFixMsg)
+ {
+ // Show an error message telling to check database problems
+ Factory::getApplication()->enqueueMessage(Text::_('JLIB_DATABASE_ERROR_DATABASE_UPGRADE_FAILED'), 'error');
+ }
+
+ return;
}
- else
+
+ // Nothing to do if the table doesn't exist because the CMS has never been updated from a pre-4.0 version
+ if (\count($rows) === 0)
{
- $converted = 1;
+ return;
}
+ // Set required conversion status
+ $converted = 5;
+
// Check conversion status in database
$db->setQuery('SELECT ' . $db->quoteName('converted')
. ' FROM ' . $db->quoteName('#__utf8_conversion')
@@ -6284,73 +6339,109 @@ public function convertTablesToUtf8mb4($doDbFixMsg = false)
return;
}
- // Nothing to do, saved conversion status from DB is equal to required
- if ($convertedDB == $converted)
+ // If conversion status from DB is equal to required final status, try to drop the #__utf8_conversion table
+ if ($convertedDB === $converted)
{
+ $this->dropUtf8ConversionTable();
+
return;
}
- // Step 1: Drop indexes later to be added again with column lengths limitations at step 2
- $fileName1 = JPATH_ROOT . '/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql';
-
- if (is_file($fileName1))
+ // Perform the required conversions of core tables if not done already in a previous step
+ if ($convertedDB !== 99)
{
- $fileContents1 = @file_get_contents($fileName1);
- $queries1 = $db->splitSql($fileContents1);
+ $fileName1 = JPATH_ROOT . '/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion.sql';
- if (!empty($queries1))
+ if (is_file($fileName1))
{
- foreach ($queries1 as $query1)
+ $fileContents1 = @file_get_contents($fileName1);
+ $queries1 = $db->splitSql($fileContents1);
+
+ if (!empty($queries1))
{
- try
+ foreach ($queries1 as $query1)
{
- $db->setQuery($query1)->execute();
- }
- catch (Exception $e)
- {
- // If the query fails we will go on. It just means the index to be dropped does not exist.
+ try
+ {
+ $db->setQuery($query1)->execute();
+ }
+ catch (Exception $e)
+ {
+ $converted = $convertedDB;
+
+ // Still render the error message from the Exception object
+ Factory::getApplication()->enqueueMessage($e->getMessage(), 'error');
+ }
}
}
}
}
- // Step 2: Perform the index modifications and conversions
- $fileName2 = JPATH_ROOT . '/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql';
-
- if (is_file($fileName2))
+ // If no error before, perform the optional conversions of tables which might or might not exist
+ if ($converted === 5)
{
- $fileContents2 = @file_get_contents($fileName2);
- $queries2 = $db->splitSql($fileContents2);
+ $fileName2 = JPATH_ROOT . '/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion_optional.sql';
- if (!empty($queries2))
+ if (is_file($fileName2))
{
- foreach ($queries2 as $query2)
+ $fileContents2 = @file_get_contents($fileName2);
+ $queries2 = $db->splitSql($fileContents2);
+
+ if (!empty($queries2))
{
- try
+ foreach ($queries2 as $query2)
{
- $db->setQuery($db->convertUtf8mb4QueryToUtf8($query2))->execute();
- }
- catch (Exception $e)
- {
- $converted = 0;
+ // Get table name from query
+ if (preg_match('/^ALTER\s+TABLE\s+([^\s]+)\s+/i', $query2, $matches) === 1)
+ {
+ $tableName = str_replace('`', '', $matches[1]);
+ $tableName = str_replace('#__', $db->getPrefix(), $tableName);
+
+ // Check if the table exists and if yes, run the query
+ try
+ {
+ $db->setQuery('SHOW TABLES LIKE ' . $db->quote($tableName));
+
+ $rows = $db->loadRowList(0);
- // Still render the error message from the Exception object
- Factory::getApplication()->enqueueMessage($e->getMessage(), 'error');
+ if (\count($rows) > 0)
+ {
+ $db->setQuery($query2)->execute();
+ }
+ }
+ catch (Exception $e)
+ {
+ $converted = 99;
+
+ // Still render the error message from the Exception object
+ Factory::getApplication()->enqueueMessage($e->getMessage(), 'error');
+ }
+ }
}
}
}
}
- if ($doDbFixMsg && $converted == 0)
+ if ($doDbFixMsg && $converted !== 5)
{
// Show an error message telling to check database problems
Factory::getApplication()->enqueueMessage(Text::_('JLIB_DATABASE_ERROR_DATABASE_UPGRADE_FAILED'), 'error');
}
- // Set flag in database if the update is done.
- $db->setQuery('UPDATE ' . $db->quoteName('#__utf8_conversion')
- . ' SET ' . $db->quoteName('converted') . ' = ' . $converted . ';'
- )->execute();
+ // If the conversion was successful try to drop the #__utf8_conversion table
+ if ($converted === 5 && $this->dropUtf8ConversionTable())
+ {
+ // Table successfully dropped
+ return;
+ }
+
+ // Set flag in database if the conversion status has changed.
+ if ($converted !== $convertedDB)
+ {
+ $db->setQuery('UPDATE ' . $db->quoteName('#__utf8_conversion')
+ . ' SET ' . $db->quoteName('converted') . ' = ' . $converted . ';'
+ )->execute();
+ }
}
/**
@@ -6372,6 +6463,30 @@ private function cleanJoomlaCache()
$model->clean();
}
+ /**
+ * This method drops the #__utf8_conversion table
+ *
+ * @return boolean True on success
+ *
+ * @since 4.0.0
+ */
+ private function dropUtf8ConversionTable()
+ {
+ $db = Factory::getDbo();
+
+ try
+ {
+ $db->setQuery('DROP TABLE ' . $db->quoteName('#__utf8_conversion') . ';'
+ )->execute();
+ }
+ catch (Exception $e)
+ {
+ return false;
+ }
+
+ return true;
+ }
+
/**
* Called after any type of action
*
@@ -6481,7 +6596,7 @@ private function contactItems(Table $tableItem): array
}
$parentId = $tableItem->id;
- $componentId = ExtensionHelper::getExtensionRecord('com_fields')->extension_id;
+ $componentId = ExtensionHelper::getExtensionRecord('com_fields', 'component')->extension_id;
// Add Contact Fields Menu Items.
$menuItems = [
@@ -6497,7 +6612,7 @@ private function contactItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
- 'checked_out' => 0,
+ 'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
@@ -6522,7 +6637,7 @@ private function contactItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
- 'checked_out' => 0,
+ 'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
@@ -6547,7 +6662,7 @@ private function contactItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
- 'checked_out' => 0,
+ 'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
@@ -6591,7 +6706,7 @@ private function finderItems(Table $tableItem): array
}
$parentId = $tableItem->id;
- $componentId = ExtensionHelper::getExtensionRecord('com_finder')->extension_id;
+ $componentId = ExtensionHelper::getExtensionRecord('com_finder', 'component')->extension_id;
// Add Finder Fields Menu Items.
$menuItems = [
@@ -6607,7 +6722,7 @@ private function finderItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
- 'checked_out' => 0,
+ 'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
@@ -6632,7 +6747,7 @@ private function finderItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
- 'checked_out' => 0,
+ 'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
@@ -6657,7 +6772,7 @@ private function finderItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
- 'checked_out' => 0,
+ 'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
@@ -6682,7 +6797,7 @@ private function finderItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
- 'checked_out' => 0,
+ 'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
@@ -6707,7 +6822,7 @@ private function finderItems(Table $tableItem): array
'parent_id' => $parentId,
'level' => 2,
'component_id' => $componentId,
- 'checked_out' => 0,
+ 'checked_out' => null,
'checked_out_time' => null,
'browserNav' => 0,
'access' => 0,
diff --git a/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql b/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql
deleted file mode 100644
index 843ab1256a981..0000000000000
--- a/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-01.sql
+++ /dev/null
@@ -1,34 +0,0 @@
---
--- Step 1 of the UTF-8 Multibyte (utf8mb4) conversion for MySQL
---
--- Drop indexes which will be added again in step 2, utf8mb4-conversion-02.sql.
---
--- Do not rename this file or any other of the utf8mb4-conversion-*.sql
--- files unless you want to change PHP code, too.
---
--- This file here will be processed ignoring any exceptions caused by indexes
--- to be dropped do not exist.
---
--- The file for step 2 will the be processed with reporting exceptions.
---
-
-ALTER TABLE `#__banners` DROP KEY `idx_metakey_prefix`;
-ALTER TABLE `#__banner_clients` DROP KEY `idx_metakey_prefix`;
-ALTER TABLE `#__categories` DROP KEY `idx_path`;
-ALTER TABLE `#__categories` DROP KEY `idx_alias`;
-ALTER TABLE `#__content` DROP KEY `idx_alias`;
-ALTER TABLE `#__content_types` DROP KEY `idx_alias`;
-ALTER TABLE `#__fields` DROP KEY `idx_context`;
-ALTER TABLE `#__fields_groups` DROP KEY `idx_context`;
-ALTER TABLE `#__fields_values` DROP KEY `idx_item_id`;
-ALTER TABLE `#__finder_links` DROP KEY `idx_title`;
-ALTER TABLE `#__menu` DROP KEY `idx_alias`;
-ALTER TABLE `#__menu` DROP KEY `idx_client_id_parent_id_alias_language`;
-ALTER TABLE `#__menu` DROP KEY `idx_path`;
-ALTER TABLE `#__redirect_links` DROP KEY `idx_old_url`;
-ALTER TABLE `#__tags` DROP KEY `idx_path`;
-ALTER TABLE `#__tags` DROP KEY `idx_alias`;
-ALTER TABLE `#__ucm_content` DROP KEY `idx_alias`;
-ALTER TABLE `#__ucm_content` DROP KEY `idx_title`;
-ALTER TABLE `#__ucm_content` DROP KEY `idx_content_type`;
-ALTER TABLE `#__users` DROP KEY `idx_name`;
diff --git a/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql b/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion.sql
similarity index 50%
rename from administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql
rename to administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion.sql
index 3edcbd3e7978a..7f3873a547815 100644
--- a/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion-02.sql
+++ b/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion.sql
@@ -1,56 +1,12 @@
--
--- Step 2 of the UTF-8 Multibyte (utf8mb4) conversion for MySQL
---
--- Enlarge some database columns to avoid data losses, then convert all tables
--- to utf8mb4 or utf8, then set default character sets and collations for all
--- tables, then add back indexes previosly dropped with step 1,
--- utf8mb4-conversion-01.sql, but add them back with limited lenghts of
--- columns.
---
--- Do not rename this file or any other of the utf8mb4-conversion-*.sql
--- files unless you want to change PHP code, too.
---
--- IMPORTANT: When adding an index modification to this file for limiting the
--- length by which one or more columns go into that index,
---
--- 1. remember to add the statement to drop the index to the file for step 1,
--- utf8mb4-conversion-01.sql, and
---
--- 2. check if the index is created created or modified in some old schema
--- update sql in an "ALTER TABLE" statement and limit the column length
--- there, too ("CREATE TABLE" is ok, no need to modify those).
---
--- This file here will the be processed with reporting exceptions, in opposite
--- to the file for step 1.
---
-
---
--- Step 2.1: Enlarge columns to avoid data loss on later conversion to utf8mb4
---
-
-ALTER TABLE `#__banners` MODIFY `alias` varchar(400) NOT NULL DEFAULT '';
-ALTER TABLE `#__banners` MODIFY `metakey_prefix` varchar(400) NOT NULL DEFAULT '';
-ALTER TABLE `#__categories` MODIFY `path` varchar(400) NOT NULL DEFAULT '';
-ALTER TABLE `#__categories` MODIFY `alias` varchar(400) NOT NULL DEFAULT '';
-ALTER TABLE `#__content_types` MODIFY `type_alias` varchar(400) NOT NULL DEFAULT '';
-ALTER TABLE `#__finder_links` MODIFY `title` varchar(400) DEFAULT NULL;
-ALTER TABLE `#__contact_details` MODIFY `alias` varchar(400) NOT NULL DEFAULT '';
-ALTER TABLE `#__content` MODIFY `alias` varchar(400) NOT NULL DEFAULT '';
-ALTER TABLE `#__menu` MODIFY `alias` varchar(400) NOT NULL COMMENT 'The SEF alias of the menu item.';
-ALTER TABLE `#__newsfeeds` MODIFY `alias` varchar(400) NOT NULL DEFAULT '';
-ALTER TABLE `#__tags` MODIFY `path` varchar(400) NOT NULL DEFAULT '';
-ALTER TABLE `#__tags` MODIFY `alias` varchar(400) NOT NULL DEFAULT '';
-ALTER TABLE `#__ucm_content` MODIFY `core_type_alias` varchar(400) NOT NULL DEFAULT '' COMMENT 'FK to the content types table';
-ALTER TABLE `#__ucm_content` MODIFY `core_title` varchar(400) NOT NULL;
-ALTER TABLE `#__ucm_content` MODIFY `core_alias` varchar(400) NOT NULL DEFAULT '';
-ALTER TABLE `#__users` MODIFY `name` varchar(400) NOT NULL DEFAULT '';
-
---
--- Step 2.2: Convert all tables to utf8mb4 chracter set with utf8mb4_unicode_ci collation
--- except #__finder_xxx tables, those will have utf8mb4_general_ci collation.
--- Note: The database driver for mysql will change utf8mb4 to utf8 if utf8mb4 is not supported
+-- Step 1: Convert all tables to utf8mb4 chracter set with utf8mb4_unicode_ci collation
+-- except of #__finder_xxx tables, those are handled with 4.0.0-2018-07-29.sql at update.
--
+ALTER TABLE `#__action_logs` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `#__action_logs_extensions` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `#__action_logs_users` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `#__action_log_config` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__assets` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__associations` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__banners` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -63,37 +19,11 @@ ALTER TABLE `#__content_frontpage` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8
ALTER TABLE `#__content_rating` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__content_types` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__contentitem_tag_map` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-ALTER TABLE `#__core_log_searches` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__extensions` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__fields` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__fields_categories` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__fields_groups` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__fields_values` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-ALTER TABLE `#__finder_filters` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms0` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms1` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms2` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms3` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms4` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms5` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms6` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms7` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms8` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms9` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_termsa` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_termsb` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_termsc` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_termsd` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_termse` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_termsf` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_taxonomy` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_taxonomy_map` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_terms` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_terms_common` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_tokens` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_tokens_aggregate` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_types` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE `#__languages` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__menu` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__menu_types` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -104,6 +34,8 @@ ALTER TABLE `#__modules_menu` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_u
ALTER TABLE `#__newsfeeds` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__overrider` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__postinstall_messages` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `#__privacy_consents` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `#__privacy_requests` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__redirect_links` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__schemas` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__session` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -126,7 +58,7 @@ ALTER TABLE `#__utf8_conversion` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb
ALTER TABLE `#__viewlevels` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
--
--- Step 2.3: Set collation to utf8mb4_bin for formerly utf8_bin collated columns
+-- Step 2: Set collation to utf8mb4_bin for formerly utf8_bin collated columns
-- and for the lang_code column of the languages table
--
@@ -141,9 +73,13 @@ ALTER TABLE `#__tags` MODIFY `alias` varchar(400) CHARACTER SET utf8mb4 COLLATE
ALTER TABLE `#__ucm_content` MODIFY `core_alias` varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '';
--
--- Step 2.4: Set default character set and collation for all tables
+-- Step 3: Set default character set and collation for all tables
--
+ALTER TABLE `#__action_logs` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `#__action_logs_extensions` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `#__action_logs_users` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `#__action_log_config` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__assets` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__associations` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__banners` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -156,37 +92,11 @@ ALTER TABLE `#__content_frontpage` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4
ALTER TABLE `#__content_rating` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__content_types` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__contentitem_tag_map` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-ALTER TABLE `#__core_log_searches` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__extensions` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__fields` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__fields_categories` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__fields_groups` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__fields_values` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-ALTER TABLE `#__finder_filters` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms0` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms1` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms2` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms3` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms4` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms5` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms6` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms7` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms8` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_terms9` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_termsa` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_termsb` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_termsc` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_termsd` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_termse` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_links_termsf` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_taxonomy` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_taxonomy_map` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_terms` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_terms_common` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_tokens` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_tokens_aggregate` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-ALTER TABLE `#__finder_types` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
ALTER TABLE `#__languages` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__menu` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__menu_types` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -197,6 +107,8 @@ ALTER TABLE `#__modules_menu` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unic
ALTER TABLE `#__newsfeeds` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__overrider` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__postinstall_messages` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `#__privacy_consents` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+ALTER TABLE `#__privacy_requests` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__redirect_links` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__schemas` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__session` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
@@ -217,28 +129,3 @@ ALTER TABLE `#__user_profiles` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_uni
ALTER TABLE `#__user_usergroup_map` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__utf8_conversion` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__viewlevels` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-
---
--- Step 2.5: Limit indexes to first 100 so their max allowed lengths would not get exceeded with utf8mb4
---
-
-ALTER TABLE `#__banners` ADD KEY `idx_metakey_prefix` (`metakey_prefix`(100));
-ALTER TABLE `#__banner_clients` ADD KEY `idx_metakey_prefix` (`metakey_prefix`(100));
-ALTER TABLE `#__categories` ADD KEY `idx_path` (`path`(100));
-ALTER TABLE `#__categories` ADD KEY `idx_alias` (`alias`(100));
-ALTER TABLE `#__content` ADD KEY `idx_alias` (`alias`(191));
-ALTER TABLE `#__content_types` ADD KEY `idx_alias` (`type_alias`(100));
-ALTER TABLE `#__fields` ADD KEY `idx_context` (`context`(191));
-ALTER TABLE `#__fields_groups` ADD KEY `idx_context` (`context`(191));
-ALTER TABLE `#__fields_values` ADD KEY `idx_item_id` (`item_id`(191));
-ALTER TABLE `#__finder_links` ADD KEY `idx_title` (`title`(100));
-ALTER TABLE `#__menu` ADD KEY `idx_alias` (`alias`(100));
-ALTER TABLE `#__menu` ADD UNIQUE `idx_client_id_parent_id_alias_language` (`client_id`,`parent_id`,`alias`(100),`language`);
-ALTER TABLE `#__menu` ADD KEY `idx_path` (`path`(100));
-ALTER TABLE `#__redirect_links` ADD KEY `idx_old_url` (`old_url`(100));
-ALTER TABLE `#__tags` ADD KEY `idx_path` (`path`(100));
-ALTER TABLE `#__tags` ADD KEY `idx_alias` (`alias`(100));
-ALTER TABLE `#__ucm_content` ADD KEY `idx_alias` (`core_alias`(100));
-ALTER TABLE `#__ucm_content` ADD KEY `idx_title` (`core_title`(100));
-ALTER TABLE `#__ucm_content` ADD KEY `idx_content_type` (`core_type_alias`(100));
-ALTER TABLE `#__users` ADD KEY `idx_name` (`name`(100));
diff --git a/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion_optional.sql b/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion_optional.sql
new file mode 100644
index 0000000000000..794d604bae152
--- /dev/null
+++ b/administrator/components/com_admin/sql/others/mysql/utf8mb4-conversion_optional.sql
@@ -0,0 +1,23 @@
+--
+-- This file contains the part of the UTF-8 Multibyte (utf8mb4) conversion for MySQL
+-- for optional extensions which might be still installed or not on an updated installation.
+--
+-- In opposite to file utf8mb4-conversion.sql, any table handled by this file here doesn't
+-- need to exist.
+--
+
+--
+-- Step 1: Convert all tables to utf8mb4 chracter set with utf8mb4_unicode_ci collation.
+--
+
+ALTER TABLE `#__core_log_searches` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+
+--
+-- Step 2: Set collation to utf8mb4_bin for formerly utf8_bin collated columns.
+--
+
+--
+-- Step 3: Set default character set and collation for all tables
+--
+
+ALTER TABLE `#__core_log_searches` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-05-15.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-05-15.sql
index 7bbedc437e6d4..b0c2b3115e08c 100644
--- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-05-15.sql
+++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-05-15.sql
@@ -10,7 +10,6 @@ CREATE TABLE IF NOT EXISTS `#__workflows` (
`description` text NOT NULL,
`extension` varchar(50) NOT NULL,
`default` tinyint(1) NOT NULL DEFAULT 0,
- `core` tinyint(1) NOT NULL DEFAULT 0,
`ordering` int(11) NOT NULL DEFAULT 0,
`created` datetime NOT NULL,
`created_by` int(10) NOT NULL DEFAULT 0,
@@ -34,8 +33,8 @@ CREATE TABLE IF NOT EXISTS `#__workflows` (
-- Dumping data for table `#__workflows`
--
-INSERT INTO `#__workflows` (`id`, `asset_id`, `published`, `title`, `description`, `extension`, `default`, `core`,`ordering`, `created`, `created_by`, `modified`, `modified_by`, `checked_out_time`, `checked_out`) VALUES
-(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, 1, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, NULL, 0);
+INSERT INTO `#__workflows` (`id`, `asset_id`, `published`, `title`, `description`, `extension`, `default`, `ordering`, `created`, `created_by`, `modified`, `modified_by`, `checked_out_time`, `checked_out`) VALUES
+(1, 0, 1, 'COM_WORKFLOW_BASIC_WORKFLOW', '', 'com_content.article', 1, 1, CURRENT_TIMESTAMP(), 0, CURRENT_TIMESTAMP(), 0, NULL, 0);
--
-- Table structure for table `#__workflow_associations`
@@ -64,7 +63,6 @@ CREATE TABLE IF NOT EXISTS `#__workflow_stages` (
`published` tinyint(1) NOT NULL DEFAULT 0,
`title` varchar(255) NOT NULL,
`description` text NOT NULL,
- `condition` int(10) DEFAULT 0,
`default` tinyint(1) NOT NULL DEFAULT 0,
`checked_out_time` datetime,
`checked_out` int(10) NOT NULL DEFAULT 0,
@@ -80,11 +78,8 @@ CREATE TABLE IF NOT EXISTS `#__workflow_stages` (
-- Dumping data for table `#__workflow_stages`
--
-INSERT INTO `#__workflow_stages` (`id`, `asset_id`, `ordering`, `workflow_id`, `published`, `title`, `description`, `condition`, `default`, `checked_out_time`, `checked_out`) VALUES
-(1, 0, 1, 1, 1, 'JUNPUBLISHED', '', 0, 1, NULL, 0),
-(2, 0, 2, 1, 1, 'JPUBLISHED', '', 1, 0, NULL, 0),
-(3, 0, 3, 1, 1, 'JTRASHED', '', -2, 0, NULL, 0),
-(4, 0, 4, 1, 1, 'JARCHIVED', '', 2, 0, NULL, 0);
+INSERT INTO `#__workflow_stages` (`id`, `asset_id`, `ordering`, `workflow_id`, `published`, `title`, `description`, `default`, `checked_out_time`, `checked_out`) VALUES
+(1, 0, 1, 1, 1, 'COM_WORKFLOW_BASIC_STAGE', '', 1, NULL, 0);
--
-- Table structure for table `#__workflow_transitions`
@@ -100,6 +95,7 @@ CREATE TABLE IF NOT EXISTS `#__workflow_transitions` (
`description` text NOT NULL,
`from_stage_id` int(10) NOT NULL,
`to_stage_id` int(10) NOT NULL,
+ `options` text NOT NULL,
`checked_out_time` datetime,
`checked_out` int(10) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
@@ -115,21 +111,31 @@ CREATE TABLE IF NOT EXISTS `#__workflow_transitions` (
-- Dumping data for table `#__workflow_transitions`
--
-INSERT INTO `#__workflow_transitions` (`id`, `asset_id`, `published`, `ordering`, `workflow_id`, `title`, `description`, `from_stage_id`, `to_stage_id`, `checked_out_time`, `checked_out`) VALUES
-(1, 0, 1, 1, 1, 'Unpublish', '', -1, 1, NULL, 0),
-(2, 0, 1, 2, 1, 'Publish', '', -1, 2, NULL, 0),
-(3, 0, 1, 3, 1, 'Trash', '', -1, 3, NULL, 0),
-(4, 0, 1, 4, 1, 'Archive', '', -1, 4, NULL, 0);
+INSERT INTO `#__workflow_transitions` (`id`, `asset_id`, `published`, `ordering`, `workflow_id`, `title`, `description`, `from_stage_id`, `to_stage_id`, `options`, `checked_out_time`, `checked_out`) VALUES
+(1, 0, 1, 1, 1, 'Unpublish', '', -1, 1, '{"publishing":"0"}', NULL, 0),
+(2, 0, 1, 2, 1, 'Publish', '', -1, 1, '{"publishing":"1"}', NULL, 0),
+(3, 0, 1, 3, 1, 'Trash', '', -1, 1, '{"publishing":"-2"}', NULL, 0),
+(4, 0, 1, 4, 1, 'Archive', '', -1, 1, '{"publishing":"2"}', NULL, 0),
+(5, 0, 1, 5, 1, 'Feature', '', -1, 1, '{"featuring":"1"}', NULL, 0),
+(6, 0, 1, 6, 1, 'Unfeature', '', -1, 1, '{"featuring":"0"}', NULL, 0),
+(7, 0, 1, 7, 1, 'Publish & Feature', '', -1, 1, '{"publishing":"1","featuring":"1"}', NULL, 0);
--
-- Creating extension entry
--
+-- Note that the old pseudo null dates have to be used for the `checked_out_time`
+-- column because the conversion to real null dates will be done with a later
+-- update SQL script.
+--
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `manifest_cache`, `params`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
-(0, 'com_workflow', 'component', 'com_workflow', '', 1, 1, 0, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0);
+(0, 'com_workflow', 'component', 'com_workflow', '', 1, 1, 0, 1, '', '{}', 0, '0000-00-00 00:00:00', 0, 0),
+(0, 'plg_workflow_publishing', 'plugin', 'publishing', 'workflow', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0),
+(0, 'plg_workflow_featuring', 'plugin', 'featuring', 'workflow', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0),
+(0, 'plg_workflow_notification', 'plugin', 'notification', 'workflow', 0, 1, 1, 0, '', '{}', 0, '0000-00-00 00:00:00', 0, 0);
--
-- Creating Associations for existing content
--
INSERT INTO `#__workflow_associations` (`item_id`, `stage_id`, `extension`)
-SELECT `id`, CASE WHEN `state` = -2 THEN 3 WHEN `state` = 0 THEN 1 WHEN `state` = 2 THEN 4 ELSE 2 END, 'com_content' FROM `#__content`;
+SELECT `id`, 1, 'com_content.article' FROM `#__content`;
diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-29.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-29.sql
index 339259a4a65d0..8d27c44c73a23 100644
--- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-29.sql
+++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2018-07-29.sql
@@ -11,6 +11,7 @@ ALTER TABLE `#__finder_filters` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4
ALTER TABLE `#__finder_filters` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
TRUNCATE TABLE `#__finder_links`;
+ALTER TABLE `#__finder_links` CHANGE `route` `route` varchar(400);
ALTER TABLE `#__finder_links` CHANGE `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `access`;
ALTER TABLE `#__finder_links` MODIFY `state` int(5) NOT NULL DEFAULT 1;
ALTER TABLE `#__finder_links` MODIFY `access` int(5) NOT NULL DEFAULT 0;
@@ -91,24 +92,25 @@ ALTER TABLE `#__finder_taxonomy_map` CONVERT TO CHARACTER SET utf8mb4 COLLATE ut
ALTER TABLE `#__finder_taxonomy_map` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
TRUNCATE TABLE `#__finder_terms`;
+ALTER TABLE `#__finder_terms` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__finder_terms` CHANGE `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `links`;
-ALTER TABLE `#__finder_terms` MODIFY `stem` varchar(75) NOT NULL DEFAULT '';
-ALTER TABLE `#__finder_terms` MODIFY `soundex` varchar(75) NOT NULL DEFAULT '';
+ALTER TABLE `#__finder_terms` MODIFY `term` varchar(75) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL;
+ALTER TABLE `#__finder_terms` MODIFY `stem` varchar(75) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '';
+ALTER TABLE `#__finder_terms` MODIFY `soundex` varchar(75) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '';
ALTER TABLE `#__finder_terms` DROP INDEX `idx_term`;
ALTER TABLE `#__finder_terms` ADD INDEX `idx_stem` (`stem`);
ALTER TABLE `#__finder_terms` ADD INDEX `idx_language` (`language`);
ALTER TABLE `#__finder_terms` ADD UNIQUE INDEX `idx_term_language` (`term`, `language`);
-ALTER TABLE `#__finder_terms` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__finder_terms` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
DROP TABLE IF EXISTS `#__finder_terms_common`;
CREATE TABLE `#__finder_terms_common` (
- `term` varchar(75) NOT NULL DEFAULT '',
+ `term` varchar(75) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '',
`language` char(7) NOT NULL DEFAULT '',
`custom` int(11) NOT NULL DEFAULT '0',
UNIQUE KEY `idx_term_language` (`term`,`language`),
KEY `idx_lang` (`language`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_bin;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
INSERT INTO `#__finder_terms_common` (`term`, `language`, `custom`) VALUES
('i', 'en', 0),
('me', 'en', 0),
@@ -286,21 +288,23 @@ INSERT INTO `#__finder_terms_common` (`term`, `language`, `custom`) VALUES
('very', 'en', 0);
TRUNCATE TABLE `#__finder_tokens`;
+ALTER TABLE `#__finder_tokens` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__finder_tokens` CHANGE `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `context`;
-ALTER TABLE `#__finder_tokens` MODIFY `stem` varchar(75) NOT NULL DEFAULT '';
+ALTER TABLE `#__finder_tokens` MODIFY `term` varchar(75) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL;
+ALTER TABLE `#__finder_tokens` MODIFY `stem` varchar(75) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '';
ALTER TABLE `#__finder_tokens` ADD INDEX `idx_stem` (`stem`);
ALTER TABLE `#__finder_tokens` ADD INDEX `idx_language` (`language`);
-ALTER TABLE `#__finder_tokens` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__finder_tokens` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
TRUNCATE TABLE `#__finder_tokens_aggregate`;
+ALTER TABLE `#__finder_tokens_aggregate` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__finder_tokens_aggregate` DROP COLUMN `map_suffix`;
ALTER TABLE `#__finder_tokens_aggregate` CHANGE `language` `language` CHAR(7) NOT NULL DEFAULT '' AFTER `total_weight`;
-ALTER TABLE `#__finder_tokens_aggregate` MODIFY `stem` varchar(75) NOT NULL DEFAULT '';
+ALTER TABLE `#__finder_tokens_aggregate` MODIFY `term` varchar(75) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL;
+ALTER TABLE `#__finder_tokens_aggregate` MODIFY `stem` varchar(75) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT '';
ALTER TABLE `#__finder_tokens_aggregate` MODIFY `term_weight` float unsigned NOT NULL DEFAULT 0;
ALTER TABLE `#__finder_tokens_aggregate` MODIFY `context_weight` float unsigned NOT NULL DEFAULT 0;
ALTER TABLE `#__finder_tokens_aggregate` MODIFY `total_weight` float unsigned NOT NULL DEFAULT 0;
-ALTER TABLE `#__finder_tokens_aggregate` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__finder_tokens_aggregate` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE `#__finder_types` MODIFY `mime` varchar(100) NOT NULL DEFAULT '';
diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-03-25.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-03-25.sql
index 4ba6886362946..90b83b3da3c67 100644
--- a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-03-25.sql
+++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-03-25.sql
@@ -64,7 +64,9 @@ OR (`type` = 'module' AND `client_id` = 0 AND `element` IN (
'mod_articles_category',
'mod_articles_categories',
'mod_languages',
- 'mod_finder'
+ 'mod_finder',
+ 'mod_tags_popular',
+ 'mod_tags_similar'
))
OR (`type` = 'module' AND `client_id` = 1 AND `element` IN (
'mod_custom',
@@ -85,8 +87,6 @@ OR (`type` = 'module' AND `client_id` = 1 AND `element` IN (
'mod_multilangstatus',
'mod_version',
'mod_stats_admin',
- 'mod_tags_popular',
- 'mod_tags_similar',
'mod_sampledata',
'mod_latestactions',
'mod_privacy_dashboard',
@@ -128,7 +128,6 @@ OR (`type` = 'package' AND `element` IN ('pkg_en-GB'));
UPDATE `#__extensions`
SET `protected` = 1, `enabled` = 1
WHERE (`type` = 'component' AND `element` IN (
- 'com_actionlogs',
'com_admin',
'com_ajax',
'com_cache',
@@ -148,41 +147,25 @@ WHERE (`type` = 'component' AND `element` IN (
'com_modules',
'com_plugins',
'com_postinstall',
- 'com_privacy',
- 'com_redirect',
- 'com_tags',
'com_templates',
'com_users',
- 'com_workflow',
- 'com_wrapper'
-))
-OR (`type` = 'module' AND `client_id` = 0 AND `element` IN (
- 'mod_breadcrumbs',
- 'mod_custom',
- 'mod_languages',
- 'mod_login',
- 'mod_menu',
- 'mod_syndicate'
-))
-OR (`type` = 'module' AND `client_id` = 1 AND `element` IN (
- 'mod_custom',
- 'mod_login',
- 'mod_loginsupport',
- 'mod_quickicon',
- 'mod_toolbar'
+ 'com_workflow'
))
OR (`type` = 'plugin' AND
(
(`folder` = 'authentication' AND `element` IN ('joomla'))
- OR (`folder` = 'editors' AND `element` IN ('codemirror', 'none'))
- OR (`folder` = 'extension' AND `element` IN ('joomla', 'namespacemap'))
- OR (`folder` = 'installer' AND `element` IN ('folderinstaller', 'override', 'packageinstaller', 'urlinstaller'))
- OR (`folder` = 'quickicon' AND `element` IN ('downloadkey', 'extensionupdate', 'joomlaupdate', 'overridecheck', 'phpversioncheck'))
- OR (`folder` = 'sampledata' AND `element` IN ('blog', 'multilang', 'testing'))
- OR (`folder` = 'system' AND `element` IN ('log', 'logout', 'remember'))
+ OR (`folder` = 'editors' AND `element` IN ('none'))
+ OR (`folder` = 'extension' AND `element` IN ('namespacemap'))
)
)
OR (`type` = 'library' AND `element` IN ('joomla', 'phpass'))
OR (`type` = 'language' AND `element` IN ('en-GB'))
OR (`type` = 'file' AND `element` IN ('joomla'))
-OR (`type` = 'package' AND `element` IN ('pkg_en-GB'));
\ No newline at end of file
+OR (`type` = 'package' AND `element` IN ('pkg_en-GB'));
+
+-- Set core extensions (from J3) as unlocked extensions and unprotect them.
+UPDATE `#__extensions`
+SET `protected` = 0, `locked` = 0
+WHERE (`type` = 'library' AND `element` IN (
+ 'fof'
+));
diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-04-11.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-04-11.sql
new file mode 100644
index 0000000000000..58cbafd13b803
--- /dev/null
+++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-04-11.sql
@@ -0,0 +1,2 @@
+INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `checked_out`, `checked_out_time`, `ordering`, `state`) VALUES
+(0, 'plg_quickicon_downloadkey', 'plugin', 'downloadkey', 'quickicon', 0, 1, 1, 0, 1, '', '', 0, NULL, 0, 0);
diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-04-16.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-04-16.sql
new file mode 100644
index 0000000000000..6507312fcfdd4
--- /dev/null
+++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-04-16.sql
@@ -0,0 +1,8 @@
+INSERT INTO `#__mail_templates` (`template_id`, `language`, `subject`, `body`, `htmlbody`, `attachments`, `params`) VALUES
+('com_contact.mail', '', 'COM_CONTACT_ENQUIRY_SUBJECT', 'COM_CONTACT_ENQUIRY_TEXT', '', '', '{"tags":["sitename","name","email","subject","body","url","customfields"]}'),
+('com_contact.mail.copy', '', 'COM_CONTACT_COPYSUBJECT_OF', 'COM_CONTACT_COPYTEXT_OF', '', '', '{"tags":["sitename","name","email","subject","body","url","customfields"]}'),
+('com_users.massmail.mail', '', 'COM_USERS_MASSMAIL_MAIL_SUBJECT', 'COM_USERS_MASSMAIL_MAIL_BODY', '', '', '{"tags":["subject","body","subjectprefix","bodysuffix"]}'),
+('com_users.password_reset', '', 'COM_USERS_EMAIL_PASSWORD_RESET_SUBJECT', 'COM_USERS_EMAIL_PASSWORD_RESET_BODY', '', '', '{"tags":["name","email","sitename","link_text","link_html","token"]}'),
+('com_users.reminder', '', 'COM_USERS_EMAIL_USERNAME_REMINDER_SUBJECT', 'COM_USERS_EMAIL_USERNAME_REMINDER_BODY', '', '', '{"tags":["name","username","sitename","email","link_text","link_html"]}'),
+('plg_system_updatenotification.mail', '', 'PLG_SYSTEM_UPDATENOTIFICATION_EMAIL_SUBJECT', 'PLG_SYSTEM_UPDATENOTIFICATION_EMAIL_BODY', '', '', '{"tags":["newversion","curversion","sitename","url","link","releasenews"]}'),
+('plg_user_joomla.mail', '', 'PLG_USER_JOOMLA_NEW_USER_EMAIL_SUBJECT', 'PLG_USER_JOOMLA_NEW_USER_EMAIL_BODY', '', '', '{"tags":["name","sitename","url","username","password","email"]}');
diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-05-21.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-05-21.sql
new file mode 100644
index 0000000000000..1c4b5799ebe77
--- /dev/null
+++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-05-21.sql
@@ -0,0 +1,10 @@
+-- Renaming table
+RENAME TABLE `#__ucm_history` TO `#__history`;
+-- Rename ucm_item_id to item_id as the new primary identifier for the original content item
+ALTER TABLE `#__history` CHANGE COLUMN `ucm_item_id` `item_id` VARCHAR(50) NOT NULL DEFAULT '' AFTER `version_id`;
+-- Extend the original field content with the alias of the content type
+UPDATE #__history AS h INNER JOIN #__content_types AS c ON h.ucm_type_id = c.type_id SET h.item_id = CONCAT(c.type_alias, '.', h.item_id);
+-- Now we don't need the ucm_type_id anymore and drop it.
+ALTER TABLE `#__history` DROP COLUMN `ucm_type_id`;
+ALTER TABLE `#__history` ADD COLUMN `active_version` TINYINT(4) NOT NULL DEFAULT '0' AFTER `keep_forever`;
+ALTER TABLE `#__history` ADD INDEX `idx_active_version` (`active_version`);
diff --git a/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-05-29.sql b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-05-29.sql
new file mode 100644
index 0000000000000..51ab88b3a6ae4
--- /dev/null
+++ b/administrator/components/com_admin/sql/updates/mysql/4.0.0-2020-05-29.sql
@@ -0,0 +1,39 @@
+ALTER TABLE `#__extensions` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__menu` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__modules` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__tags` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__update_sites` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__user_notes` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__workflows` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__workflow_stages` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__workflow_transitions` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__banners` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__banner_clients` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__contact_details` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__content` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__finder_filters` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__newsfeeds` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__categories` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__fields` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__fields_groups` MODIFY `checked_out` INT(10) UNSIGNED;
+ALTER TABLE `#__ucm_content` MODIFY `core_checked_out_user_id` INT(10) UNSIGNED;
+
+UPDATE `#__extensions` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__menu` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__modules` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__tags` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__update_sites` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__user_notes` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__workflows` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__workflow_stages` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__workflow_transitions` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__banners` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__banner_clients` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__contact_details` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__content` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__finder_filters` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__newsfeeds` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__categories` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__fields` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__fields_groups` SET `checked_out` = null WHERE `checked_out` = 0;
+UPDATE `#__ucm_content` SET `core_checked_out_user_id` = null WHERE `checked_out` = 0;
diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-05-15.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-05-15.sql
index a41ff39e4f764..ec7f6c3508ae3 100644
--- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-05-15.sql
+++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-05-15.sql
@@ -10,7 +10,6 @@ CREATE TABLE IF NOT EXISTS "#__workflows" (
"description" text NOT NULL,
"extension" varchar(50) NOT NULL,
"default" smallint NOT NULL DEFAULT 0,
- "core" smallint NOT NULL DEFAULT 0,
"ordering" bigint NOT NULL DEFAULT 0,
"created" timestamp without time zone NOT NULL,
"created_by" bigint DEFAULT 0 NOT NULL,
@@ -31,8 +30,8 @@ CREATE INDEX "#__workflows_idx_modified" ON "#__workflows" ("modified");
CREATE INDEX "#__workflows_idx_modified_by" ON "#__workflows" ("modified_by");
CREATE INDEX "#__workflows_idx_checked_out" ON "#__workflows" ("checked_out");
-INSERT INTO "#__workflows" ("id", "asset_id", "published", "title", "description", "extension", "default", "core", "ordering", "created", "created_by", "modified", "modified_by", "checked_out_time", "checked_out") VALUES
-(1, 0, 1, 'COM_WORKFLOW_DEFAULT_WORKFLOW', '', 'com_content', 1, 1, 1, CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, NULL, 0);
+INSERT INTO "#__workflows" ("id", "asset_id", "published", "title", "description", "extension", "default", "ordering", "created", "created_by", "modified", "modified_by", "checked_out_time", "checked_out") VALUES
+(1, 0, 1, 'COM_WORKFLOW_BASIC_WORKFLOW', '', 'com_content.article', 1, 1, CURRENT_TIMESTAMP, 0, CURRENT_TIMESTAMP, 0, NULL, 0);
--
-- Table structure for table "#__workflow_associations"
@@ -64,7 +63,6 @@ CREATE TABLE IF NOT EXISTS "#__workflow_stages" (
"published" smallint NOT NULL DEFAULT 0,
"title" varchar(255) NOT NULL,
"description" text NOT NULL,
- "condition" bigint DEFAULT 0 NOT NULL,
"default" smallint NOT NULL DEFAULT 0,
"checked_out_time" timestamp without time zone,
"checked_out" bigint DEFAULT 0 NOT NULL,
@@ -80,11 +78,8 @@ CREATE INDEX "#__workflow_stages_idx_checked_out" ON "#__workflow_stages" ("chec
-- Dumping data for table "#__workflow_stages"
--
-INSERT INTO "#__workflow_stages" ("id", "asset_id", "ordering", "workflow_id", "published", "title", "description", "condition", "default", "checked_out_time", "checked_out") VALUES
-(1, 0, 1, 1, 1, 'JUNPUBLISHED', '', 0, 1, NULL, 0),
-(2, 0, 2, 1, 1, 'JPUBLISHED', '', 1, 0, NULL, 0),
-(3, 0, 3, 1, 1, 'JTRASHED', '', -2, 0, NULL, 0),
-(4, 0, 4, 1, 1, 'JARCHIVED', '', 2, 0, NULL, 0);
+INSERT INTO "#__workflow_stages" ("id", "asset_id", "ordering", "workflow_id", "published", "title", "description", "default", "checked_out_time", "checked_out") VALUES
+(1, 0, 1, 1, 1, 'COM_WORKFLOW_BASIC_STAGE', '', 1, NULL, 0);
--
-- Table structure for table "#__workflow_transitions"
@@ -100,6 +95,7 @@ CREATE TABLE IF NOT EXISTS "#__workflow_transitions" (
"description" text NOT NULL,
"from_stage_id" bigint DEFAULT 0 NOT NULL,
"to_stage_id" bigint DEFAULT 0 NOT NULL,
+ "options" text NOT NULL,
"checked_out_time" timestamp without time zone,
"checked_out" bigint DEFAULT 0 NOT NULL,
PRIMARY KEY ("id")
@@ -111,21 +107,31 @@ CREATE INDEX "#__workflow_transitions_idx_to_stage_id" ON "#__workflow_transitio
CREATE INDEX "#__workflow_transitions_idx_workflow_id" ON "#__workflow_transitions" ("workflow_id");
CREATE INDEX "#__workflow_transitions_idx_checked_out" ON "#__workflow_transitions" ("checked_out");
-INSERT INTO "#__workflow_transitions" ("id", "asset_id", "published", "ordering", "workflow_id", "title", "description", "from_stage_id", "to_stage_id", "checked_out_time", "checked_out") VALUES
-(1, 0, 1, 1, 1, 'Unpublish', '', -1, 1, NULL, 0),
-(2, 0, 1, 2, 1, 'Publish', '', -1, 2, NULL, 0),
-(3, 0, 1, 3, 1, 'Trash', '', -1, 3, NULL, 0),
-(4, 0, 1, 4, 1, 'Archive', '', -1, 4, NULL, 0);
+INSERT INTO "#__workflow_transitions" ("id", "asset_id", "published", "ordering", "workflow_id", "title", "description", "from_stage_id", "to_stage_id", "options", "checked_out_time", "checked_out") VALUES
+(1, 0, 1, 1, 1, 'Unpublish', '', -1, 1, '{"publishing":"0"}', NULL, 0),
+(2, 0, 1, 2, 1, 'Publish', '', -1, 1, '{"publishing":"1"}', NULL, 0),
+(3, 0, 1, 3, 1, 'Trash', '', -1, 1, '{"publishing":"-2"}', NULL, 0),
+(4, 0, 1, 4, 1, 'Archive', '', -1, 1, '{"publishing":"2"}', NULL, 0),
+(5, 0, 1, 5, 1, 'Feature', '', -1, 1, '{"featuring":"1"}', NULL, 0),
+(6, 0, 1, 6, 1, 'Unfeature', '', -1, 1, '{"featuring":"0"}', NULL, 0),
+(7, 0, 1, 7, 1, 'Publish & Feature', '', -1, 1, '{"publishing":"1","featuring":"1"}', NULL, 0);
--
-- Creating extension entry
--
+-- Note that the old pseudo null dates have to be used for the "checked_out_time"
+-- column because the conversion to real null dates will be done with a later
+-- update SQL script.
+--
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "checked_out", "checked_out_time", "ordering", "state") VALUES
-(0, 'com_workflow', 'component', 'com_workflow', '', 1, 1, 0, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0);
+(0, 'com_workflow', 'component', 'com_workflow', '', 1, 1, 0, 1, '', '{}', 0, '1970-01-01 00:00:00', 0, 0),
+(0, 'plg_workflow_publishing', 'plugin', 'publishing', 'workflow', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0),
+(0, 'plg_workflow_featuring', 'plugin', 'featuring', 'workflow', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0),
+(0, 'plg_workflow_notification', 'plugin', 'notification', 'workflow', 0, 1, 1, 0, '', '{}', 0, '1970-01-01 00:00:00', 0, 0);
--
-- Creating Associations for existing content
--
INSERT INTO "#__workflow_associations" ("item_id", "stage_id", "extension")
-SELECT "id", CASE WHEN "state" = -2 THEN 3 WHEN "state" = 0 THEN 1 WHEN "state" = 2 THEN 4 ELSE 2 END, 'com_content' FROM "#__content";
+SELECT "id", 1, 'com_content.article' FROM "#__content";
diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-29.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-29.sql
index 8b2a9a2c20271..5291d760009c4 100644
--- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-29.sql
+++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2018-07-29.sql
@@ -10,6 +10,7 @@ ALTER TABLE "#__finder_filters" ALTER COLUMN "checked_out_time" DROP NOT NULL;
ALTER TABLE "#__finder_filters" ALTER COLUMN "checked_out_time" DROP DEFAULT;
TRUNCATE TABLE "#__finder_links";
+ALTER TABLE "#__finder_links" ALTER COLUMN "route" TYPE character varying(400);
ALTER TABLE "#__finder_links" ALTER COLUMN "state" SET NOT NULL;
ALTER TABLE "#__finder_links" ALTER COLUMN "access" SET NOT NULL;
ALTER TABLE "#__finder_links" ALTER COLUMN "language" TYPE character varying(7);
diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-03-25.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-03-25.sql
index 3cf4bd78c6ba5..4c404ac9bf8c4 100644
--- a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-03-25.sql
+++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-03-25.sql
@@ -66,7 +66,9 @@ OR ("type" = 'module' AND "client_id" = 0 AND "element" IN (
'mod_articles_category',
'mod_articles_categories',
'mod_languages',
- 'mod_finder'
+ 'mod_finder',
+ 'mod_tags_popular',
+ 'mod_tags_similar'
))
OR ("type" = 'module' AND "client_id" = 1 AND "element" IN (
'mod_custom',
@@ -87,8 +89,6 @@ OR ("type" = 'module' AND "client_id" = 1 AND "element" IN (
'mod_multilangstatus',
'mod_version',
'mod_stats_admin',
- 'mod_tags_popular',
- 'mod_tags_similar',
'mod_sampledata',
'mod_latestactions',
'mod_privacy_dashboard',
@@ -130,7 +130,6 @@ OR ("type" = 'package' AND "element" IN ('pkg_en-GB'));
UPDATE "#__extensions"
SET "protected" = 1, "enabled" = 1
WHERE ("type" = 'component' AND "element" IN (
- 'com_actionlogs',
'com_admin',
'com_ajax',
'com_cache',
@@ -150,41 +149,25 @@ WHERE ("type" = 'component' AND "element" IN (
'com_modules',
'com_plugins',
'com_postinstall',
- 'com_privacy',
- 'com_redirect',
- 'com_tags',
'com_templates',
'com_users',
- 'com_workflow',
- 'com_wrapper'
-))
-OR ("type" = 'module' AND "client_id" = 0 AND "element" IN (
- 'mod_breadcrumbs',
- 'mod_custom',
- 'mod_languages',
- 'mod_login',
- 'mod_menu',
- 'mod_syndicate'
-))
-OR ("type" = 'module' AND "client_id" = 1 AND "element" IN (
- 'mod_custom',
- 'mod_login',
- 'mod_loginsupport',
- 'mod_quickicon',
- 'mod_toolbar'
+ 'com_workflow'
))
OR ("type" = 'plugin' AND
(
("folder" = 'authentication' AND "element" IN ('joomla'))
- OR ("folder" = 'editors' AND "element" IN ('codemirror', 'none'))
- OR ("folder" = 'extension' AND "element" IN ('joomla', 'namespacemap'))
- OR ("folder" = 'installer' AND "element" IN ('folderinstaller', 'override', 'packageinstaller', 'urlinstaller'))
- OR ("folder" = 'quickicon' AND "element" IN ('downloadkey', 'extensionupdate', 'joomlaupdate', 'overridecheck', 'phpversioncheck'))
- OR ("folder" = 'sampledata' AND "element" IN ('blog', 'multilang', 'testing'))
- OR ("folder" = 'system' AND "element" IN ('log', 'logout', 'remember'))
+ OR ("folder" = 'editors' AND "element" IN ('none'))
+ OR ("folder" = 'extension' AND "element" IN ('namespacemap'))
)
)
OR ("type" = 'library' AND "element" IN ('joomla', 'phpass'))
OR ("type" = 'language' AND "element" IN ('en-GB'))
OR ("type" = 'file' AND "element" IN ('joomla'))
-OR ("type" = 'package' AND "element" IN ('pkg_en-GB'));
\ No newline at end of file
+OR ("type" = 'package' AND "element" IN ('pkg_en-GB'));
+
+-- Set core extensions (from J3) as unlocked extensions and unprotect them.
+UPDATE "#__extensions"
+SET "protected" = 0, "locked" = 0
+WHERE ("type" = 'library' AND "element" IN (
+ 'fof'
+));
diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-04-11.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-04-11.sql
new file mode 100644
index 0000000000000..948ae173213ba
--- /dev/null
+++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-04-11.sql
@@ -0,0 +1,2 @@
+INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "checked_out", "checked_out_time", "ordering", "state") VALUES
+(0, 'plg_quickicon_downloadkey', 'plugin', 'downloadkey', 'quickicon', 0, 1, 1, 0, 1, '', '', 0, NULL, 0, 0);
diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-04-16.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-04-16.sql
new file mode 100644
index 0000000000000..339469fb36008
--- /dev/null
+++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-04-16.sql
@@ -0,0 +1,8 @@
+INSERT INTO "#__mail_templates" ("template_id", "language", "subject", "body", "htmlbody", "attachments", "params") VALUES
+('com_contact.mail', '', 'COM_CONTACT_ENQUIRY_SUBJECT', 'COM_CONTACT_ENQUIRY_TEXT', '', '', '{"tags":["sitename","name","email","subject","body","url","customfields"]}'),
+('com_contact.mail.copy', '', 'COM_CONTACT_COPYSUBJECT_OF', 'COM_CONTACT_COPYTEXT_OF', '', '', '{"tags":["sitename","name","email","subject","body","url","customfields"]}'),
+('com_users.massmail.mail', '', 'COM_USERS_MASSMAIL_MAIL_SUBJECT', 'COM_USERS_MASSMAIL_MAIL_BODY', '', '', '{"tags":["subject","body","subjectprefix","bodysuffix"]}'),
+('com_users.password_reset', '', 'COM_USERS_EMAIL_PASSWORD_RESET_SUBJECT', 'COM_USERS_EMAIL_PASSWORD_RESET_BODY', '', '', '{"tags":["name","email","sitename","link_text","link_html","token"]}'),
+('com_users.reminder', '', 'COM_USERS_EMAIL_USERNAME_REMINDER_SUBJECT', 'COM_USERS_EMAIL_USERNAME_REMINDER_BODY', '', '', '{"tags":["name","username","sitename","email","link_text","link_html"]}'),
+('plg_system_updatenotification.mail', '', 'PLG_SYSTEM_UPDATENOTIFICATION_EMAIL_SUBJECT', 'PLG_SYSTEM_UPDATENOTIFICATION_EMAIL_BODY', '', '', '{"tags":["newversion","curversion","sitename","url","link","releasenews"]}'),
+('plg_user_joomla.mail', '', 'PLG_USER_JOOMLA_NEW_USER_EMAIL_SUBJECT', 'PLG_USER_JOOMLA_NEW_USER_EMAIL_BODY', '', '', '{"tags":["name","sitename","url","username","password","email"]}');
diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-05-21.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-05-21.sql
new file mode 100644
index 0000000000000..511bc93fc2d76
--- /dev/null
+++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-05-21.sql
@@ -0,0 +1,9 @@
+-- Renaming table
+ALTER TABLE "#__ucm_history" RENAME TO "#__history";
+-- Rename ucm_item_id to item_id as the new primary identifier for the original content item
+ALTER TABLE "#__history" RENAME "ucm_item_id" TO "item_id";
+ALTER TABLE "#__history" ALTER COLUMN "item_id" VARCHAR(50) NOT NULL DEFAULT "";
+-- Extend the original field content with the alias of the content type
+UPDATE "#__history" AS h INNER JOIN "#__content_types" AS c ON h.ucm_type_id = c.type_id SET h.item_id = CONCAT(c.type_alias, ".", h.item_id);
+-- Now we don't need the ucm_type_id anymore and drop it.
+ALTER TABLE "#__history" DROP COLUMN "ucm_type_id";
diff --git a/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-05-29.sql b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-05-29.sql
new file mode 100644
index 0000000000000..de1f5e820246a
--- /dev/null
+++ b/administrator/components/com_admin/sql/updates/postgresql/4.0.0-2020-05-29.sql
@@ -0,0 +1,58 @@
+ALTER TABLE "#__extensions" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__extensions" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__menu" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__menu" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__modules" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__modules" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__tags" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__tags" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__update_sites" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__update_sites" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__user_notes" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__user_notes" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__workflows" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__workflows" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__workflow_stages" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__workflow_stages" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__workflow_transitions" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__workflow_transitions" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__banners" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__banners" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__banner_clients" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__banner_clients" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__contact_details" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__contact_details" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__content" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__content" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__finder_filters" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__finder_filters" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__newsfeeds" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__newsfeeds" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__categories" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__categories" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__fields" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__fields" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__fields_groups" ALTER COLUMN "checked_out" DROP DEFAULT;
+ALTER TABLE "#__fields_groups" ALTER COLUMN "checked_out" DROP NOT NULL;
+ALTER TABLE "#__ucm_content" ALTER COLUMN "core_checked_out_user_id" DROP DEFAULT;
+ALTER TABLE "#__ucm_content" ALTER COLUMN "core_checked_out_user_id" DROP NOT NULL;
+
+UPDATE "#__extensions" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__menu" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__modules" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__tags" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__update_sites" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__user_notes" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__workflows" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__workflow_stages" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__workflow_transitions" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__banners" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__banner_clients" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__contact_details" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__content" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__finder_filters" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__newsfeeds" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__categories" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__fields" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__fields_groups" SET "checked_out" = null WHERE "checked_out" = 0;
+UPDATE "#__ucm_content" SET "core_checked_out_user_id" = null WHERE "checked_out" = 0;
diff --git a/administrator/components/com_admin/tmpl/sysinfo/default_config.php b/administrator/components/com_admin/tmpl/sysinfo/default_config.php
index 527639a45b665..c23179a522395 100644
--- a/administrator/components/com_admin/tmpl/sysinfo/default_config.php
+++ b/administrator/components/com_admin/tmpl/sysinfo/default_config.php
@@ -20,7 +20,7 @@
+ |
|
diff --git a/administrator/components/com_admin/tmpl/sysinfo/default_directory.php b/administrator/components/com_admin/tmpl/sysinfo/default_directory.php
index 575f99b2521a4..14ee9ad0cd28f 100644
--- a/administrator/components/com_admin/tmpl/sysinfo/default_directory.php
+++ b/administrator/components/com_admin/tmpl/sysinfo/default_directory.php
@@ -22,7 +22,7 @@
|
+ |
|
diff --git a/administrator/components/com_admin/tmpl/sysinfo/default_phpsettings.php b/administrator/components/com_admin/tmpl/sysinfo/default_phpsettings.php
index 0b50391866b10..c637519ddf8f6 100644
--- a/administrator/components/com_admin/tmpl/sysinfo/default_phpsettings.php
+++ b/administrator/components/com_admin/tmpl/sysinfo/default_phpsettings.php
@@ -22,7 +22,7 @@
|
+ |
|
diff --git a/administrator/components/com_admin/tmpl/sysinfo/default_system.php b/administrator/components/com_admin/tmpl/sysinfo/default_system.php
index 91be5889302a6..880fce8d7aa3f 100644
--- a/administrator/components/com_admin/tmpl/sysinfo/default_system.php
+++ b/administrator/components/com_admin/tmpl/sysinfo/default_system.php
@@ -22,7 +22,7 @@
|
+ |
|
diff --git a/administrator/components/com_associations/forms/filter_associations.xml b/administrator/components/com_associations/forms/filter_associations.xml
index 99bd94918208d..f723b314f800f 100644
--- a/administrator/components/com_associations/forms/filter_associations.xml
+++ b/administrator/components/com_associations/forms/filter_associations.xml
@@ -33,7 +33,7 @@
|
+
input->get('forcedItemType', '', 'string') == '') : ?>
filterForm->getField('itemtype'); ?>
-
+ label; ?>
input; ?>
diff --git a/administrator/components/com_associations/src/Field/ItemlanguageField.php b/administrator/components/com_associations/src/Field/ItemlanguageField.php
index 49f0481736bf1..c984147b01d71 100644
--- a/administrator/components/com_associations/src/Field/ItemlanguageField.php
+++ b/administrator/components/com_associations/src/Field/ItemlanguageField.php
@@ -9,7 +9,7 @@
namespace Joomla\Component\Associations\Administrator\Field;
-defined('JPATH_BASE') or die;
+defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Field\ListField;
diff --git a/administrator/components/com_associations/src/Field/ItemtypeField.php b/administrator/components/com_associations/src/Field/ItemtypeField.php
index 36da82d7399a6..5e71ba8875923 100644
--- a/administrator/components/com_associations/src/Field/ItemtypeField.php
+++ b/administrator/components/com_associations/src/Field/ItemtypeField.php
@@ -9,7 +9,7 @@
namespace Joomla\Component\Associations\Administrator\Field;
-defined('JPATH_BASE') or die;
+defined('_JEXEC') or die;
use Joomla\CMS\Form\Field\GroupedlistField;
use Joomla\CMS\HTML\HTMLHelper;
diff --git a/administrator/components/com_associations/src/Field/Modal/AssociationField.php b/administrator/components/com_associations/src/Field/Modal/AssociationField.php
index 345e4cdc29cc1..a39b0924c1fac 100644
--- a/administrator/components/com_associations/src/Field/Modal/AssociationField.php
+++ b/administrator/components/com_associations/src/Field/Modal/AssociationField.php
@@ -9,7 +9,7 @@
namespace Joomla\Component\Associations\Administrator\Field\Modal;
-defined('JPATH_BASE') or die;
+defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\FormField;
@@ -43,7 +43,7 @@ protected function getInput()
{
// @TODO USE JLayouts here!!!
// The active item id field.
- $value = (int) $this->value > 0 ? (int) $this->value : '';
+ $value = (int) $this->value ?: '';
Factory::getDocument()->addScriptOptions('admin_associations_modal', ['itemId' => $value]);
HTMLHelper::_('script', 'com_associations/admin_associations_modal.min.js', ['version' => 'auto', 'relative' => true]);
diff --git a/administrator/components/com_associations/src/Helper/AssociationsHelper.php b/administrator/components/com_associations/src/Helper/AssociationsHelper.php
index c15edaea1ef0c..409c756bce56f 100644
--- a/administrator/components/com_associations/src/Helper/AssociationsHelper.php
+++ b/administrator/components/com_associations/src/Helper/AssociationsHelper.php
@@ -331,7 +331,7 @@ public static function getAssociationHtmlList($extensionName, $typeName, $itemId
$url = Route::_('index.php?' . http_build_query($options));
$url = $allow && $addLink ? $url : '';
- $text = strtoupper($language->sef);
+ $text = $language->lang_code;
$tooltip = '' . htmlspecialchars($language->title, ENT_QUOTES, 'UTF-8') . '' . htmlspecialchars($title, ENT_QUOTES, 'UTF-8') . ' ' . $additional; diff --git a/administrator/components/com_associations/src/View/Association/HtmlView.php b/administrator/components/com_associations/src/View/Association/HtmlView.php index ab14ba280196c..3237cd8316090 100644 --- a/administrator/components/com_associations/src/View/Association/HtmlView.php +++ b/administrator/components/com_associations/src/View/Association/HtmlView.php @@ -369,15 +369,15 @@ protected function addToolbar(): void $bar = Toolbar::getInstance(); $bar->appendButton( - 'Custom', '', 'reference' ); $bar->appendButton( - 'Custom', '
|