Skip to content

Commit 7694b4c

Browse files
authored
Support Action Log
Support basic action logs for weblinks
1 parent 880bc45 commit 7694b4c

File tree

7 files changed

+23
-0
lines changed

7 files changed

+23
-0
lines changed

src/administrator/components/com_weblinks/sql/install.mysql.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,8 @@ CREATE TABLE IF NOT EXISTS `#__weblinks` (
4949
KEY `idx_language` (`language`),
5050
KEY `idx_xreference` (`xreference`)
5151
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;
52+
53+
INSERT INTO `#__action_logs_extensions` (`extension`) VALUES ('com_weblinks');
54+
INSERT INTO `#__action_log_config` (`type_title`, `type_alias`, `id_holder`, `title_holder`, `table_name`, `text_prefix`) VALUES
55+
('weblink', 'com_weblinks.weblink', 'id', 'title', '#__weblinks', 'COM_WEBLINKS_ACTIONLOG'),
56+
('weblink', 'com_weblinks.form', 'id', 'title', '#__weblinks', 'COM_WEBLINKS_ACTIONLOG');

src/administrator/components/com_weblinks/sql/install.postgresql.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,8 @@ CREATE INDEX "#__weblinks_idx_xreference" ON "#__weblinks" ("xreference");
5050

5151
COMMENT ON COLUMN "#__weblinks"."featured" IS 'Set if link is featured.';
5252
COMMENT ON COLUMN "#__weblinks"."xreference" IS 'A reference to enable linkages to external data sets.';
53+
54+
INSERT INTO "#__action_logs_extensions" ("extension") VALUES ('com_weblinks');
55+
INSERT INTO "#__action_log_config" ("type_title", "type_alias", "id_holder", "title_holder", "table_name", "text_prefix") VALUES
56+
('weblink', 'com_weblinks.weblink', 'id', 'title', '#__weblinks', 'COM_WEBLINKS_ACTIONLOG'),
57+
('weblink', 'com_weblinks.form', 'id', 'title', '#__weblinks', 'COM_WEBLINKS_ACTIONLOG');
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
DELETE FROM `#__content_types` WHERE `type_alias` IN ('com_weblinks.weblink', 'com_weblinks.category');
2+
DELETE FROM `#__action_logs_extension` WHERE `extension` = 'com_weblinks';
3+
DELETE FROM `#__action_log_config` WHERE `type_title` = 'weblinks';
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
DELETE FROM "#__content_types" WHERE "type_alias" IN ('com_weblinks.weblink', 'com_weblinks.category');
2+
DELETE FROM "#__action_logs_extension" WHERE "extension" = 'com_weblinks';
3+
DELETE FROM "#__action_log_config" WHERE "type_title" = 'weblinks';
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
INSERT INTO `#__action_logs_extensions` (`extension`) VALUES ('com_weblinks');
2+
INSERT INTO `#__action_log_config` (`type_title`, `type_alias`, `id_holder`, `title_holder`, `table_name`, `text_prefix`) VALUES
3+
('weblink', 'com_weblinks.weblink', 'id', 'title', '#__weblinks', 'COM_WEBLINKS_ACTIONLOG'),
4+
('weblink', 'com_weblinks.form', 'id', 'title', '#__weblinks', 'COM_WEBLINKS_ACTIONLOG');
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
INSERT INTO "#__action_logs_extensions" ("extension") VALUES ('com_weblinks');
2+
INSERT INTO "#__action_log_config" ("type_title", "type_alias", "id_holder", "title_holder", "table_name", "text_prefix") VALUES
3+
('weblink', 'com_weblinks.weblink', 'id', 'title', '#__weblinks', 'COM_WEBLINKS_ACTIONLOG'),
4+
('weblink', 'com_weblinks.form', 'id', 'title', '#__weblinks', 'COM_WEBLINKS_ACTIONLOG');

src/administrator/language/en-GB/com_weblinks.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
; Note : All ini files need to be saved as UTF-8
55

66
COM_WEBLINKS="Web Links"
7+
COM_WEBLINKS_ACTIONLOG_TYPE_WEBLINK="Weblink"
78
COM_WEBLINKS_BATCH_OPTIONS="Batch process the selected links"
89
COM_WEBLINKS_BATCH_TIP="If a category is selected for move/copy, any actions selected will be applied to the copied or moved links. Otherwise, all actions are applied to the selected links."
910
COM_WEBLINKS_CATEGORIES_DESC="These settings apply for Web Links Categories Options unless they are changed for a specific menu item."

0 commit comments

Comments
 (0)