Skip to content

Commit 91b67ee

Browse files
committed
Merge branch '6.0-dev' into 6.1/maint/upmerge-251014
2 parents c776f83 + 56a0940 commit 91b67ee

File tree

39 files changed

+329
-106
lines changed

39 files changed

+329
-106
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
UPDATE `#__update_sites`
2+
SET `location` = 'https://update.joomla.org/language/translationlist_6.xml'
3+
WHERE `location` = 'https://update.joomla.org/language/translationlist_5.xml';
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
-- Update content types for lookup tags
2+
3+
UPDATE `#__content_types`
4+
SET `content_history_options` = JSON_ARRAY_APPEND(
5+
`content_history_options`,
6+
'$.displayLookup',
7+
JSON_OBJECT(
8+
'sourceColumn', 'tags',
9+
'targetTable', '#__tags',
10+
'targetColumn', 'id',
11+
'displayColumn', 'title'
12+
)
13+
)
14+
WHERE `type_alias` IN (
15+
'com_content.article',
16+
'com_contact.contact',
17+
'com_newsfeeds.newsfeed',
18+
'com_content.category',
19+
'com_contact.category',
20+
'com_newsfeeds.category',
21+
'com_banners.category',
22+
'com_users.category'
23+
)
24+
AND NOT JSON_CONTAINS(
25+
JSON_EXTRACT(`content_history_options`, '$.displayLookup'),
26+
JSON_OBJECT(
27+
'sourceColumn', 'tags',
28+
'targetTable', '#__tags',
29+
'targetColumn', 'id',
30+
'displayColumn', 'title'
31+
)
32+
);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ALTER TABLE `#__history`
2+
ADD COLUMN `is_current` TINYINT NOT NULL DEFAULT 0 /** CAN FAIL **/;
3+
ALTER TABLE `#__history`
4+
ADD COLUMN `is_legacy` TINYINT NOT NULL DEFAULT 0 /** CAN FAIL **/;
5+
UPDATE `#__history` SET `is_legacy` = 1;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
UPDATE "#__update_sites"
2+
SET "location" = 'https://update.joomla.org/language/translationlist_6.xml'
3+
WHERE "location" = 'https://update.joomla.org/language/translationlist_5.xml';
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
-- Update content types for lookup tags
2+
3+
UPDATE "#__content_types"
4+
SET "content_history_options" = jsonb_set(
5+
"content_history_options"::jsonb,
6+
'{displayLookup}',
7+
"content_history_options"::jsonb->'displayLookup' ||
8+
jsonb_build_object(
9+
'sourceColumn', 'tags',
10+
'targetTable', '#__tags',
11+
'targetColumn', 'id',
12+
'displayColumn', 'title'
13+
)
14+
)
15+
WHERE "type_alias" IN (
16+
'com_content.article',
17+
'com_contact.contact',
18+
'com_newsfeeds.newsfeed',
19+
'com_content.category',
20+
'com_contact.category',
21+
'com_newsfeeds.category',
22+
'com_banners.category',
23+
'com_users.category'
24+
)
25+
AND NOT EXISTS (
26+
SELECT * FROM jsonb_array_elements("content_history_options"::jsonb->'displayLookup')
27+
WHERE value = jsonb_build_object(
28+
'sourceColumn', 'tags',
29+
'targetTable', '#__tags',
30+
'targetColumn', 'id',
31+
'displayColumn', 'title'
32+
)
33+
);
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
-- Remove wrong unique constraint from "#__ucm_content" table
2+
ALTER TABLE "#__ucm_content" DROP CONSTRAINT "#__ucm_content_idx_type_alias_item_id" /** CAN FAIL **/;
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
ALTER TABLE "#__history"
2+
ADD COLUMN "is_current" SMALLINT NOT NULL DEFAULT 0 /** CAN FAIL **/;
3+
ALTER TABLE "#__history"
4+
ADD COLUMN "is_legacy" SMALLINT NOT NULL DEFAULT 0 /** CAN FAIL **/;
5+
UPDATE "#__history" SET "is_legacy" = 1;

administrator/components/com_banners/src/Table/BannerTable.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
use Joomla\CMS\Factory;
1616
use Joomla\CMS\Language\Text;
1717
use Joomla\CMS\Table\Table;
18-
use Joomla\CMS\Versioning\VersionableTableInterface;
1918
use Joomla\Database\DatabaseInterface;
2019
use Joomla\Database\ParameterType;
2120
use Joomla\Event\DispatcherInterface;
@@ -31,7 +30,7 @@
3130
*
3231
* @since 1.5
3332
*/
34-
class BannerTable extends Table implements VersionableTableInterface
33+
class BannerTable extends Table
3534
{
3635
/**
3736
* Indicates that columns fully support the NULL value in the database

administrator/components/com_categories/src/Model/CategoryModel.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,12 @@ public function save($data)
710710

711711
$this->setState($this->getName() . '.id', $table->id);
712712

713+
/**
714+
* Save the version history. We need to call saveHistory method manually because category model does not
715+
* call parent::save()
716+
*/
717+
$this->saveHistory($data, $this->typeAlias);
718+
713719
if (Factory::getApplication()->getInput()->get('task') == 'editAssociations') {
714720
return $this->redirectToAssociations($data);
715721
}

administrator/components/com_contact/src/Table/ContactTable.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
use Joomla\CMS\Tag\TaggableTableTrait;
2121
use Joomla\CMS\User\CurrentUserInterface;
2222
use Joomla\CMS\User\CurrentUserTrait;
23-
use Joomla\CMS\Versioning\VersionableTableInterface;
2423
use Joomla\Database\DatabaseInterface;
2524
use Joomla\Event\DispatcherInterface;
2625
use Joomla\String\StringHelper;
@@ -34,7 +33,7 @@
3433
*
3534
* @since 1.0
3635
*/
37-
class ContactTable extends Table implements VersionableTableInterface, TaggableTableInterface, CurrentUserInterface
36+
class ContactTable extends Table implements TaggableTableInterface, CurrentUserInterface
3837
{
3938
use TaggableTableTrait;
4039
use CurrentUserTrait;

0 commit comments

Comments
 (0)