Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
UPDATE `#__menu`
SET `params` = JSON_SET(`params`,
JSON_UNQUOTE(JSON_SEARCH(`params`, 'one', ' ', NULL, '$.featured_categories[*]')),
''
)
WHERE JSON_VALID(`params`) = 1
AND JSON_SEARCH(`params`, 'one', ' ', NULL, '$.featured_categories[*]') IS NOT NULL
AND `type` = 'component'
AND `link` = 'index.php?option=com_content&view=featured';

UPDATE `#__menu`
SET `link` = REPLACE(`link`, '&catid[0]= ', '&catid[0]=')
WHERE `type` = 'component'
AND `link` LIKE 'index.php?option=com_content&view=archive&catid[0]= %';
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
UPDATE "#__menu"
SET "params" = jsonb_set(
"params"::jsonb,
'{featured_categories}',
COALESCE(
(
SELECT jsonb_agg(to_jsonb(CASE WHEN elem = ' ' THEN '' ELSE elem END))
FROM jsonb_array_elements_text("params"::jsonb->'featured_categories') AS t(elem)
),
'[]'::jsonb
),
false
)
WHERE ("params"::jsonb->'featured_categories') @> '[" "]'::jsonb
AND "type" = 'component'
AND "link" = 'index.php?option=com_content&view=featured';

UPDATE "#__menu"
SET "link" = REPLACE("link", '&catid[0]= ', '&catid[0]=')
WHERE "type" = 'component'
AND "link" LIKE 'index.php?option=com_content&view=archive&catid[0]= %';
4 changes: 2 additions & 2 deletions components/com_content/tmpl/archive/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
extension="com_content"
multiple="true"
layout="joomla.form.field.list-fancy-select"
default=" "
default=""
>
<option value=" ">JOPTION_ALL_CATEGORIES</option>
<option value="">JOPTION_ALL_CATEGORIES</option>
</field>
</fieldset>
</fields>
Expand Down
4 changes: 2 additions & 2 deletions components/com_content/tmpl/featured/default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
extension="com_content"
multiple="true"
layout="joomla.form.field.list-fancy-select"
default=" "
default=""
parentclass="stack span-3"
>
<option value=" ">JOPTION_ALL_CATEGORIES</option>
<option value="">JOPTION_ALL_CATEGORIES</option>
</field>

<field
Expand Down