Skip to content

Commit 552ee57

Browse files
authored
[5.4] Fix unlocked and possibly uninstalled core plugins for new installs and updates (joomla#45821)
* Fix to lock core extensions for new installs and updates
1 parent dc84efb commit 552ee57

File tree

12 files changed

+208
-46
lines changed

12 files changed

+208
-46
lines changed

administrator/components/com_admin/sql/updates/mysql/5.0.0-2023-07-25.sql

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ CREATE TABLE IF NOT EXISTS `#__schemaorg` (
1212
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
1313

1414
-- Add plugins to `#__extensions`
15+
-- --------------------------------------------------------
16+
-- The following INSERT statement has been modified to insert
17+
-- core plugins with locked=1.
18+
-- See https://github.com/joomla/joomla-cms/pull/45821 for details.
19+
--
1520
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES
16-
(0, 'plg_schemaorg_blogposting', 'plugin', 'blogposting', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 1, 0),
17-
(0, 'plg_schemaorg_book', 'plugin', 'book', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 2, 0),
18-
(0, 'plg_schemaorg_event', 'plugin', 'event', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 3, 0),
19-
(0, 'plg_schemaorg_organization', 'plugin', 'organization', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 4, 0),
20-
(0, 'plg_schemaorg_person', 'plugin', 'person', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 5, 0),
21-
(0, 'plg_schemaorg_recipe', 'plugin', 'recipe', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 6, 0),
22-
(0, 'plg_schemaorg_jobposting', 'plugin', 'jobposting', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 7, 0),
23-
(0, 'plg_system_schemaorg', 'plugin', 'schemaorg', 'system', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
21+
(0, 'plg_schemaorg_blogposting', 'plugin', 'blogposting', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 1, 0),
22+
(0, 'plg_schemaorg_book', 'plugin', 'book', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 2, 0),
23+
(0, 'plg_schemaorg_event', 'plugin', 'event', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 3, 0),
24+
(0, 'plg_schemaorg_organization', 'plugin', 'organization', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 4, 0),
25+
(0, 'plg_schemaorg_person', 'plugin', 'person', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 5, 0),
26+
(0, 'plg_schemaorg_recipe', 'plugin', 'recipe', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 6, 0),
27+
(0, 'plg_schemaorg_jobposting', 'plugin', 'jobposting', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 7, 0),
28+
(0, 'plg_system_schemaorg', 'plugin', 'schemaorg', 'system', 0, 1, 1, 0, 1, '', '{}', '', 0, 0);
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
-- --------------------------------------------------------
2+
-- The following INSERT statement has been modified to insert
3+
-- this core plugin with locked=1.
4+
-- See https://github.com/joomla/joomla-cms/pull/45821 for details.
5+
--
16
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES
2-
(0, 'plg_task_globalcheckin', 'plugin', 'globalcheckin', 'task', 0, 1, 1, 0, 0, '', '{}', '', 5, 0);
3-
7+
(0, 'plg_task_globalcheckin', 'plugin', 'globalcheckin', 'task', 0, 1, 1, 0, 1, '', '{}', '', 5, 0);
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
-- --------------------------------------------------------
2+
-- The following INSERT statement has been modified to insert
3+
-- this core plugin with locked=1.
4+
-- See https://github.com/joomla/joomla-cms/pull/45821 for details.
5+
--
16
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES
2-
(0, 'plg_schemaorg_article', 'plugin', 'article', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
7+
(0, 'plg_schemaorg_article', 'plugin', 'article', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 0, 0);
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
-- --------------------------------------------------------
2+
-- The following INSERT statement has been modified to insert
3+
-- this core plugin with locked=1.
4+
-- See https://github.com/joomla/joomla-cms/pull/45821 for details.
5+
--
16
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`) VALUES
2-
(0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
7+
(0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 0, 0);
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
--
2+
-- Insert back previously unlocked schemaorg and task core plugins if they have been uninstalled
3+
--
4+
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`)
5+
SELECT 0, 'plg_schemaorg_article', 'plugin', 'article', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
6+
WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'article' AND e.`folder` = 'schemaorg' AND e.`client_id` = 0);
7+
8+
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`)
9+
SELECT 0, 'plg_schemaorg_blogposting', 'plugin', 'blogposting', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
10+
WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'blogposting' AND e.`folder` = 'schemaorg' AND e.`client_id` = 0);
11+
12+
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`)
13+
SELECT 0, 'plg_schemaorg_book', 'plugin', 'book', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
14+
WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'book' AND e.`folder` = 'schemaorg' AND e.`client_id` = 0);
15+
16+
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`)
17+
SELECT 0, 'plg_schemaorg_event', 'plugin', 'event', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
18+
WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'event' AND e.`folder` = 'schemaorg' AND e.`client_id` = 0);
19+
20+
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`)
21+
SELECT 0, 'plg_schemaorg_jobposting', 'plugin', 'jobposting', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
22+
WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'jobposting' AND e.`folder` = 'schemaorg' AND e.`client_id` = 0);
23+
24+
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`)
25+
SELECT 0, 'plg_schemaorg_organization', 'plugin', 'organization', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
26+
WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'organization' AND e.`folder` = 'schemaorg' AND e.`client_id` = 0);
27+
28+
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`)
29+
SELECT 0, 'plg_schemaorg_person', 'plugin', 'person', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
30+
WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'person' AND e.`folder` = 'schemaorg' AND e.`client_id` = 0);
31+
32+
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`)
33+
SELECT 0, 'plg_schemaorg_recipe', 'plugin', 'recipe', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
34+
WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'recipe' AND e.`folder` = 'schemaorg' AND e.`client_id` = 0);
35+
36+
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`)
37+
SELECT 0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
38+
WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'custom' AND e.`folder` = 'schemaorg' AND e.`client_id` = 0);
39+
40+
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`)
41+
SELECT 0, 'plg_system_schemaorg', 'plugin', 'schemaorg', 'system', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
42+
WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'schemaorg' AND e.`folder` = 'system' AND e.`client_id` = 0);
43+
44+
INSERT INTO `#__extensions` (`package_id`, `name`, `type`, `element`, `folder`, `client_id`, `enabled`, `access`, `protected`, `locked`, `manifest_cache`, `params`, `custom_data`, `ordering`, `state`)
45+
SELECT 0, 'plg_task_globalcheckin', 'plugin', 'globalcheckin', 'task', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
46+
WHERE NOT EXISTS (SELECT * FROM `#__extensions` e WHERE e.`type` = 'plugin' AND e.`element` = 'globalcheckin' AND e.`folder` = 'task' AND e.`client_id` = 0);
47+
48+
--
49+
-- Update present unlocked schemaorg and task core plugins
50+
--
51+
UPDATE `#__extensions` SET `locked` = 1
52+
WHERE `type` = 'plugin' AND `folder` = 'schemaorg'
53+
AND `element` IN ('article', 'blogposting', 'book', 'event', 'jobposting', 'organization', 'person', 'recipe', 'custom')
54+
AND `locked` <> 1;
55+
56+
UPDATE `#__extensions` SET `locked` = 1
57+
WHERE `type` = 'plugin' AND `element` = 'schemaorg' AND `folder` = 'system'
58+
AND `locked` <> 1;
59+
60+
UPDATE `#__extensions` SET `locked` = 1
61+
WHERE `type` = 'plugin' AND `element` = 'globalcheckin' AND `folder` = 'task'
62+
AND `locked` <> 1;

administrator/components/com_admin/sql/updates/postgresql/5.0.0-2023-07-25.sql

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ CREATE TABLE IF NOT EXISTS "#__schemaorg" (
1212
);
1313

1414
-- Add plugins to "#__extensions"
15+
-- --------------------------------------------------------
16+
-- The following INSERT statement has been modified to insert
17+
-- core plugins with locked=1.
18+
-- See https://github.com/joomla/joomla-cms/pull/45821 for details.
19+
--
1520
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
16-
(0, 'plg_schemaorg_blogposting', 'plugin', 'blogposting', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 1, 0),
17-
(0, 'plg_schemaorg_book', 'plugin', 'book', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 2, 0),
18-
(0, 'plg_schemaorg_event', 'plugin', 'event', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 3, 0),
19-
(0, 'plg_schemaorg_organization', 'plugin', 'organization', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 4, 0),
20-
(0, 'plg_schemaorg_person', 'plugin', 'person', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 5, 0),
21-
(0, 'plg_schemaorg_recipe', 'plugin', 'recipe', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 6, 0),
22-
(0, 'plg_schemaorg_jobposting', 'plugin', 'jobposting', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 7, 0),
23-
(0, 'plg_system_schemaorg', 'plugin', 'schemaorg', 'system', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
21+
(0, 'plg_schemaorg_blogposting', 'plugin', 'blogposting', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 1, 0),
22+
(0, 'plg_schemaorg_book', 'plugin', 'book', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 2, 0),
23+
(0, 'plg_schemaorg_event', 'plugin', 'event', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 3, 0),
24+
(0, 'plg_schemaorg_organization', 'plugin', 'organization', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 4, 0),
25+
(0, 'plg_schemaorg_person', 'plugin', 'person', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 5, 0),
26+
(0, 'plg_schemaorg_recipe', 'plugin', 'recipe', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 6, 0),
27+
(0, 'plg_schemaorg_jobposting', 'plugin', 'jobposting', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 7, 0),
28+
(0, 'plg_system_schemaorg', 'plugin', 'schemaorg', 'system', 0, 1, 1, 0, 1, '', '{}', '', 0, 0);
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
-- --------------------------------------------------------
2+
-- The following INSERT statement has been modified to insert
3+
-- this core plugin with locked=1.
4+
-- See https://github.com/joomla/joomla-cms/pull/45821 for details.
5+
--
16
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
2-
(0, 'plg_task_globalcheckin', 'plugin', 'globalcheckin', 'task', 0, 1, 1, 0, 0, '', '{}', '', 5, 0);
3-
7+
(0, 'plg_task_globalcheckin', 'plugin', 'globalcheckin', 'task', 0, 1, 1, 0, 1, '', '{}', '', 5, 0);
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
-- --------------------------------------------------------
2+
-- The following INSERT statement has been modified to insert
3+
-- this core plugin with locked=1.
4+
-- See https://github.com/joomla/joomla-cms/pull/45821 for details.
5+
--
16
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
2-
(0, 'plg_schemaorg_article', 'plugin', 'article', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
7+
(0, 'plg_schemaorg_article', 'plugin', 'article', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 0, 0);
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1+
-- --------------------------------------------------------
2+
-- The following INSERT statement has been modified to insert
3+
-- this core plugin with locked=1.
4+
-- See https://github.com/joomla/joomla-cms/pull/45821 for details.
5+
--
16
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state") VALUES
2-
(0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 1, 1, 0, 0, '', '{}', '', 0, 0);
7+
(0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 1, 1, 0, 1, '', '{}', '', 0, 0);
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
--
2+
-- Insert back previously unlocked schemaorg and task core plugins if they have been uninstalled
3+
--
4+
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
5+
SELECT 0, 'plg_schemaorg_article', 'plugin', 'article', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
6+
WHERE NOT EXISTS (SELECT * FROM "#__extensions" e WHERE e."type" = 'plugin' AND e."element" = 'article' AND e."folder" = 'schemaorg' AND e."client_id" = 0);
7+
8+
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
9+
SELECT 0, 'plg_schemaorg_blogposting', 'plugin', 'blogposting', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
10+
WHERE NOT EXISTS (SELECT * FROM "#__extensions" e WHERE e."type" = 'plugin' AND e."element" = 'blogposting' AND e."folder" = 'schemaorg' AND e."client_id" = 0);
11+
12+
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
13+
SELECT 0, 'plg_schemaorg_book', 'plugin', 'book', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
14+
WHERE NOT EXISTS (SELECT * FROM "#__extensions" e WHERE e."type" = 'plugin' AND e."element" = 'book' AND e."folder" = 'schemaorg' AND e."client_id" = 0);
15+
16+
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
17+
SELECT 0, 'plg_schemaorg_event', 'plugin', 'event', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
18+
WHERE NOT EXISTS (SELECT * FROM "#__extensions" e WHERE e."type" = 'plugin' AND e."element" = 'event' AND e."folder" = 'schemaorg' AND e."client_id" = 0);
19+
20+
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
21+
SELECT 0, 'plg_schemaorg_jobposting', 'plugin', 'jobposting', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
22+
WHERE NOT EXISTS (SELECT * FROM "#__extensions" e WHERE e."type" = 'plugin' AND e."element" = 'jobposting' AND e."folder" = 'schemaorg' AND e."client_id" = 0);
23+
24+
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
25+
SELECT 0, 'plg_schemaorg_organization', 'plugin', 'organization', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
26+
WHERE NOT EXISTS (SELECT * FROM "#__extensions" e WHERE e."type" = 'plugin' AND e."element" = 'organization' AND e."folder" = 'schemaorg' AND e."client_id" = 0);
27+
28+
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
29+
SELECT 0, 'plg_schemaorg_person', 'plugin', 'person', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
30+
WHERE NOT EXISTS (SELECT * FROM "#__extensions" e WHERE e."type" = 'plugin' AND e."element" = 'person' AND e."folder" = 'schemaorg' AND e."client_id" = 0);
31+
32+
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
33+
SELECT 0, 'plg_schemaorg_recipe', 'plugin', 'recipe', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
34+
WHERE NOT EXISTS (SELECT * FROM "#__extensions" e WHERE e."type" = 'plugin' AND e."element" = 'recipe' AND e."folder" = 'schemaorg' AND e."client_id" = 0);
35+
36+
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
37+
SELECT 0, 'plg_schemaorg_custom', 'plugin', 'custom', 'schemaorg', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
38+
WHERE NOT EXISTS (SELECT * FROM "#__extensions" e WHERE e."type" = 'plugin' AND e."element" = 'custom' AND e."folder" = 'schemaorg' AND e."client_id" = 0);
39+
40+
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
41+
SELECT 0, 'plg_system_schemaorg', 'plugin', 'schemaorg', 'system', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
42+
WHERE NOT EXISTS (SELECT * FROM "#__extensions" e WHERE e."type" = 'plugin' AND e."element" = 'schemaorg' AND e."folder" = 'system' AND e."client_id" = 0);
43+
44+
INSERT INTO "#__extensions" ("package_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "locked", "manifest_cache", "params", "custom_data", "ordering", "state")
45+
SELECT 0, 'plg_task_globalcheckin', 'plugin', 'globalcheckin', 'task', 0, 0, 1, 0, 1, '', '{}', '', -1, 0
46+
WHERE NOT EXISTS (SELECT * FROM "#__extensions" e WHERE e."type" = 'plugin' AND e."element" = 'globalcheckin' AND e."folder" = 'task' AND e."client_id" = 0);
47+
48+
--
49+
-- Update present unlocked schemaorg and task core plugins
50+
--
51+
UPDATE "#__extensions" SET "locked" = 1
52+
WHERE "type" = 'plugin' AND "folder" = 'schemaorg'
53+
AND "element" IN ('article', 'blogposting', 'book', 'event', 'jobposting', 'organization', 'person', 'recipe', 'custom')
54+
AND "locked" <> 1;
55+
56+
UPDATE "#__extensions" SET "locked" = 1
57+
WHERE "type" = 'plugin' AND "element" = 'schemaorg' AND "folder" = 'system'
58+
AND "locked" <> 1;
59+
60+
UPDATE "#__extensions" SET "locked" = 1
61+
WHERE "type" = 'plugin' AND "element" = 'globalcheckin' AND "folder" = 'task'
62+
AND "locked" <> 1;

0 commit comments

Comments
 (0)