Просмотр исходного кода

Upgrade script from 15.0.0-RC1 to 15.0.0-RC2

Aleksandr Trofimov 1 месяц назад
Родитель
Сommit
632ba64b0e

+ 9 - 0
upgrade/files/15.0.0.RC1-15.0.0.RC2/check.php

@@ -0,0 +1,9 @@
+<?php
+
+$mixCheckResult = 'Update can not be applied';
+
+$sVer = $this->oDb->getOne("SELECT `version` FROM `sys_modules` WHERE `name` = 'system'");
+if ('15.0.0.RC1' == $sVer || '15.0.0-RC1' == $sVer)
+    $mixCheckResult = true;
+
+return $mixCheckResult;

+ 6 - 0
upgrade/files/15.0.0.RC1-15.0.0.RC2/files_delete.php

@@ -0,0 +1,6 @@
+<?php
+
+$aFilesDelete = [
+
+];
+

+ 46 - 0
upgrade/files/15.0.0.RC1-15.0.0.RC2/script.php

@@ -0,0 +1,46 @@
+<?php
+
+    if (!$this->oDb->isFieldExists('sys_form_inputs', 'area_label'))
+        $this->oDb->query("ALTER TABLE `sys_form_inputs` ADD COLUMN `area_label` varchar(255) NOT NULL DEFAULT '' AFTER `help`");
+ 
+    if (!$this->oDb->isFieldExists('sys_agents_agents', 'acl_levels'))
+        $this->oDb->query("ALTER TABLE `sys_agents_agents` ADD COLUMN `acl_levels` int(10) unsigned NOT NULL DEFAULT 0 AFTER `profile_id`");
+
+    if (!$this->oDb->isFieldExists('sys_agents_agents', 'max_turns'))
+        $this->oDb->query("ALTER TABLE `sys_agents_agents` ADD COLUMN `max_turns` int(11) NOT NULL DEFAULT 0 AFTER `tools_max_run`");
+
+    if (!$this->oDb->isFieldExists('sys_agents_agents', 'chat_ttl_min'))
+        $this->oDb->query("ALTER TABLE `sys_agents_agents` ADD COLUMN `chat_ttl_min` int(11) NOT NULL DEFAULT 0 AFTER `max_turns`");
+
+    if (!$this->oDb->isFieldExists('sys_agents_agents', 'limit_message'))
+        $this->oDb->query("ALTER TABLE `sys_agents_agents` ADD COLUMN `limit_message` text NOT NULL AFTER `chat_ttl_min`");
+
+    if (!$this->oDb->isFieldExists('sys_agents_agents', 'max_input_chars'))
+        $this->oDb->query("ALTER TABLE `sys_agents_agents` ADD COLUMN `max_input_chars` int(11) NOT NULL DEFAULT 0 AFTER `limit_message`");
+
+    if (!$this->oDb->isFieldExists('sys_agents_agents', 'max_tokens'))
+        $this->oDb->query("ALTER TABLE `sys_agents_agents` ADD COLUMN `max_tokens` int(11) NOT NULL DEFAULT 0 AFTER `max_input_chars`");
+
+    if (!$this->oDb->isFieldExists('sys_agents_agents', 'max_sessions_per_hour'))
+        $this->oDb->query("ALTER TABLE `sys_agents_agents` ADD COLUMN `max_sessions_per_hour` int(11) NOT NULL DEFAULT 0 AFTER `max_tokens`");
+
+    if (!$this->oDb->isFieldExists('sys_agents_agents', 'max_sessions_per_day'))
+        $this->oDb->query("ALTER TABLE `sys_agents_agents` ADD COLUMN `max_sessions_per_day` int(11) NOT NULL DEFAULT 0 AFTER `max_sessions_per_hour`");
+
+    if (!$this->oDb->isFieldExists('sys_agents_agents', 'hidden_first_message'))
+        $this->oDb->query("ALTER TABLE `sys_agents_agents` ADD COLUMN `hidden_first_message` varchar(64) NOT NULL DEFAULT '' AFTER `max_sessions_per_day`");
+
+
+    if (!$this->oDb->isFieldExists('sys_agents_chat_history', 'ip'))
+        $this->oDb->query("ALTER TABLE `sys_agents_chat_history` ADD COLUMN `ip` bigint(20) unsigned NOT NULL DEFAULT 0 AFTER `thread_id`");
+
+    if (!$this->oDb->isFieldExists('sys_agents_chat_history', 'closed_reason'))
+        $this->oDb->query("ALTER TABLE `sys_agents_chat_history` ADD COLUMN `closed_reason` varchar(16) NOT NULL DEFAULT '' AFTER `updated_at`");
+
+    if (!$this->oDb->isIndexExists('sys_agents_chat_history', 'ip_created'))
+        $this->oDb->query("ALTER TABLE `sys_agents_chat_history` ADD KEY `ip_created` (`ip`, `created_at`)");
+  
+    $aPathInfo = pathinfo(__FILE__);
+    $this->oDb->executeSQL($aPathInfo['dirname'] . '/sys-alerts-desc.sql');
+
+    return true;

+ 237 - 0
upgrade/files/15.0.0.RC1-15.0.0.RC2/sql.sql

@@ -0,0 +1,237 @@
+
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+-- Schema changes: sys_options
+ALTER TABLE `sys_options` MODIFY `type` enum('value','digit','secret','secret_text','text','code','checkbox','select','combobox','file','image','list','rlist','rgb','rgba','datetime') NOT NULL default 'digit';
+
+-- Data changes: sys_objects_cmts
+DELETE FROM `sys_objects_cmts` WHERE `Name` = 'sys_agents_automators' AND `Module` = 'system' AND `TABLE` = 'sys_agents_automators_messages';
+DELETE FROM `sys_objects_cmts` WHERE `Name` = 'sys_agents_assistants_chats' AND `Module` = 'system' AND `TABLE` = 'sys_agents_assistants_chats_messages';
+
+-- Data changes: sys_options and sys_options_categories
+INSERT IGNORE INTO `sys_options` (`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_params`, `check_error`, `ORDER`) SELECT `id`, 'sys_audit_report', '_adm_stg_cpt_option_sys_audit_report', '', 'text', '', '', '', '', 8 FROM `sys_options_categories` WHERE `name` = 'hidden';
+
+UPDATE `sys_options` SET `value` = 'width=device-width, initial-scale=1.0, minimum-scale=1.0' WHERE `name` = 'sys_viewport_meta_tag' AND `value` = 'width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0';
+UPDATE `sys_options` SET `value` = 'on' WHERE `name` = 'sys_std_show_header_left_search';
+UPDATE `sys_options` SET `value` = '' WHERE `name` = 'sys_std_show_header_right_search';
+
+-- sys_options: secret option types
+UPDATE `sys_options` SET `type` = 'secret' WHERE `name` = 'sys_ftp_password' AND `type` = 'digit';
+UPDATE `sys_options` SET `type` = 'secret' WHERE `name` = 'sys_oauth_secret' AND `type` = 'digit';
+UPDATE `sys_options` SET `type` = 'secret' WHERE `name` = 'sys_embedly_api_key' AND `type` = 'digit';
+UPDATE `sys_options` SET `type` = 'secret' WHERE `name` = 'sys_iframely_api_key' AND `type` = 'digit';
+UPDATE `sys_options` SET `type` = 'secret' WHERE `name` = 'sys_embed_microlink_key' AND `type` = 'digit';
+UPDATE `sys_options` SET `type` = 'secret' WHERE `name` = 'sys_embed_peekalink_api_key' AND `type` = 'digit';
+UPDATE `sys_options` SET `type` = 'secret' WHERE `name` = 'sys_recaptcha_key_private' AND `type` = 'digit';
+UPDATE `sys_options` SET `type` = 'secret' WHERE `name` = 'sys_storage_s3_secret_key' AND `type` = 'digit';
+UPDATE `sys_options` SET `type` = 'secret' WHERE `name` = 'sys_push_onesignal_rest_api' AND `type` = 'digit';
+UPDATE `sys_options` SET `type` = 'secret' WHERE `name` = 'sys_push_wonderpush_access_token' AND `type` = 'digit';
+UPDATE `sys_options` SET `type` = 'secret' WHERE `name` = 'sys_sms_twilio_token' AND `type` = 'digit';
+UPDATE `sys_options` SET `type` = 'secret' WHERE `name` = 'sys_sms_smsru_api_id' AND `type` = 'digit';
+UPDATE `sys_options` SET `type` = 'secret' WHERE `name` = 'sys_maps_api_key' AND `type` = 'digit';
+UPDATE `sys_options` SET `type` = 'secret' WHERE `name` = 'sys_sockets_secret' AND `type` = 'digit';
+
+-- sys_options: removed Agents usage options
+DELETE FROM `sys_options` WHERE `name` = 'sys_agents_studio_assistant';
+DELETE FROM `sys_options` WHERE `name` = 'sys_agents_live_search_assistant';
+DELETE FROM `sys_options` WHERE `name` = 'sys_agents_ask_block_assistant';
+
+
+-- sys_acl_levels
+UPDATE `sys_acl_levels` SET `Icon` = 'user-round-arrow-left' WHERE `Name` = '_adm_prm_txt_level_unauthenticated';
+UPDATE `sys_acl_levels` SET `Icon` = 'at-sign' WHERE `Name` = '_adm_prm_txt_level_account';
+UPDATE `sys_acl_levels` SET `Icon` = 'user-round' WHERE `Name` = '_adm_prm_txt_level_standard';
+UPDATE `sys_acl_levels` SET `Icon` = 'user' WHERE `Name` = '_adm_prm_txt_level_unconfirmed';
+UPDATE `sys_acl_levels` SET `Icon` = 'user-round-pen' WHERE `Name` = '_adm_prm_txt_level_pending';
+UPDATE `sys_acl_levels` SET `Icon` = 'user-round-x' WHERE `Name` = '_adm_prm_txt_level_suspended';
+UPDATE `sys_acl_levels` SET `Icon` = 'user-shield' WHERE `Name` = '_adm_prm_txt_level_moderator';
+UPDATE `sys_acl_levels` SET `Icon` = 'shield-user' WHERE `Name` = '_adm_prm_txt_level_administrator';
+
+-- sys_modules
+UPDATE `sys_modules` SET `vendor` = 'UNA INC', `version` = '', `path` = 'system/' WHERE `name` = 'system';
+
+-- sys_alerts_handlers
+UPDATE `sys_alerts_handlers` SET `class` = 'BxDolAiTriggerMessage', `file` = 'inc/classes/BxDolAiTriggerMessage.php' WHERE `name` = 'sys_agents';
+
+-- sys_objects_storage
+-- TODO: delete actual files from the storage engine, then later delete storage
+-- DELETE FROM `sys_objects_storage` WHERE `object` = 'sys_agents_assistants_chats_files';
+
+/* Removed sys_agents_comment form inputs */
+DELETE FROM `sys_form_inputs` WHERE `object` = 'sys_agents_comment';
+
+/* Removed sys_agents_comment form display */
+DELETE FROM `sys_form_displays` WHERE `object` = 'sys_agents_comment' AND `display_name` = 'sys_agents_comment_post';
+DELETE FROM `sys_form_display_inputs` WHERE `display_name` = 'sys_agents_comment_post';
+
+/* Removed sys_agents_comment form object */
+DELETE FROM `sys_objects_form` WHERE `object` = 'sys_agents_comment';
+
+-- 
+
+-- sys_menu_items
+UPDATE `sys_menu_items` SET `onclick`='', `ORDER`=7 WHERE `set_name`='sys_studio_account_popup' AND `module`='system' AND `name`='scheme';
+UPDATE `sys_menu_items` SET `icon`='ami-theme.svg' WHERE `set_name`='sys_studio_account_popup' AND `module`='system' AND `name`='scheme' AND `icon`='tmi-scheme-auto.svg';
+DELETE FROM `sys_menu_items` WHERE `set_name`='sys_studio_account_popup' AND `module`='system' AND `name`='tour';
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `editable`, `ORDER`) VALUES ('sys_studio_account_popup', 'system', 'tour', '_sys_menu_item_title_system_sa_tour', '_sys_menu_item_title_sa_tour', '{url_studio}launcher.php?tour=1', 'if(typeof glTour !== ''undefined'') { glTour.start(); return false; }', '', 'ami-tour.svg', '', 2147483647, 1, 0, 0, 4);
+
+-- sys_grid_fields
+UPDATE `sys_grid_fields` SET `ORDER`=8 WHERE `object`='sys_studio_acl' AND `name`='switcher' AND `ORDER`=2;
+UPDATE `sys_grid_fields` SET `ORDER`=2 WHERE `object`='sys_studio_acl' AND `name`='Icon' AND `ORDER`=3;
+UPDATE `sys_grid_fields` SET `ORDER`=3 WHERE `object`='sys_studio_acl' AND `name`='Name' AND `ORDER`=4;
+UPDATE `sys_grid_fields` SET `ORDER`=4 WHERE `object`='sys_studio_acl' AND `name`='ActionsList' AND `ORDER`=5;
+UPDATE `sys_grid_fields` SET `ORDER`=5 WHERE `object`='sys_studio_acl' AND `name`='QuotaSize' AND `ORDER`=6;
+UPDATE `sys_grid_fields` SET `ORDER`=6 WHERE `object`='sys_studio_acl' AND `name`='QuotaMaxFileSize' AND `ORDER`=7;
+UPDATE `sys_grid_fields` SET `ORDER`=7 WHERE `object`='sys_studio_acl' AND `name`='QuotaNumber' AND `ORDER`=8;
+
+
+--
+
+-- sys_menu_items
+UPDATE `sys_menu_items` SET `onclick`='', `ORDER`=7 WHERE `set_name`='sys_studio_account_popup' AND `module`='system' AND `name`='scheme';
+UPDATE `sys_menu_items` SET `icon`='ami-theme.svg' WHERE `set_name`='sys_studio_account_popup' AND `module`='system' AND `name`='scheme' AND `icon`='tmi-scheme-auto.svg';
+DELETE FROM `sys_menu_items` WHERE `set_name`='sys_studio_account_popup' AND `module`='system' AND `name`='tour';
+INSERT INTO `sys_menu_items` (`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `editable`, `ORDER`) VALUES ('sys_studio_account_popup', 'system', 'tour', '_sys_menu_item_title_system_sa_tour', '_sys_menu_item_title_sa_tour', '{url_studio}launcher.php?tour=1', 'if(typeof glTour !== ''undefined'') { glTour.start(); return false; }', '', 'ami-tour.svg', '', 2147483647, 1, 0, 0, 4);
+
+-- sys_grid_fields
+UPDATE `sys_grid_fields` SET `ORDER`=8 WHERE `object`='sys_studio_acl' AND `name`='switcher' AND `ORDER`=2;
+UPDATE `sys_grid_fields` SET `ORDER`=2 WHERE `object`='sys_studio_acl' AND `name`='Icon' AND `ORDER`=3;
+UPDATE `sys_grid_fields` SET `ORDER`=3 WHERE `object`='sys_studio_acl' AND `name`='Name' AND `ORDER`=4;
+UPDATE `sys_grid_fields` SET `ORDER`=4 WHERE `object`='sys_studio_acl' AND `name`='ActionsList' AND `ORDER`=5;
+UPDATE `sys_grid_fields` SET `ORDER`=5 WHERE `object`='sys_studio_acl' AND `name`='QuotaSize' AND `ORDER`=6;
+UPDATE `sys_grid_fields` SET `ORDER`=6 WHERE `object`='sys_studio_acl' AND `name`='QuotaMaxFileSize' AND `ORDER`=7;
+UPDATE `sys_grid_fields` SET `ORDER`=7 WHERE `object`='sys_studio_acl' AND `name`='QuotaNumber' AND `ORDER`=8;
+
+--
+
+-- sys_grid_actions
+DELETE FROM `sys_grid_actions` WHERE `object` IN ('sys_queues','sys_studio_agents_assistants','sys_studio_agents_assistants_chats','sys_studio_agents_assistants_files','sys_studio_agents_automators','sys_studio_agents_helpers', 'sys_studio_agents_providers');
+
+-- sys_grid_fields
+DELETE FROM `sys_grid_fields` WHERE `object` IN ('sys_queues','sys_studio_agents_assistants','sys_studio_agents_assistants_chats','sys_studio_agents_assistants_files','sys_studio_agents_automators','sys_studio_agents_helpers', 'sys_studio_agents_providers');
+
+-- sys_objects_grid
+DELETE FROM `sys_objects_grid` WHERE `object` IN ('sys_queues','sys_studio_agents_assistants','sys_studio_agents_assistants_chats','sys_studio_agents_assistants_files','sys_studio_agents_automators','sys_studio_agents_helpers', 'sys_studio_agents_providers');
+
+-- sys_objects_transcoder
+DELETE FROM `sys_objects_transcoder` WHERE `object` = 'sys_agents_assistants_chats_files_preview';
+DELETE FROM `sys_transcoder_filters` WHERE `transcoder_object` = 'sys_agents_assistants_chats_files_preview';
+
+-- sys_objects_grid: API Configs
+INSERT IGNORE INTO `sys_objects_grid` (`object`,`source_type`,`source`,`TABLE`,`field_id`,`field_order`,`field_active`,`paginate_url`,`paginate_per_page`,`paginate_simple`,`paginate_get_start`,`paginate_get_per_page`,`filter_fields`,`filter_fields_translatable`,`filter_mode`,`sorting_fields`,`sorting_fields_translatable`,`override_class_name`,`override_class_file`) VALUES ('sys_studio_api_configs','Sql','SELECT * FROM `sys_modules` WHERE 1 ','sys_modules','id','name','','',100,NULL,'start','','name,title,vendor','','like','','','BxTemplStudioApiConfigs','');
+
+-- sys_grid_fields: API Configs
+INSERT IGNORE INTO `sys_grid_fields` (`object`,`name`,`title`,`width`,`translatable`,`chars_limit`,`params`,`hidden_on`,`ORDER`) VALUES ('sys_studio_api_configs','title','_adm_api_ttl_module','20%',0,0,'','',1);
+INSERT IGNORE INTO `sys_grid_fields` (`object`,`name`,`title`,`width`,`translatable`,`chars_limit`,`params`,`hidden_on`,`ORDER`) VALUES ('sys_studio_api_configs','actions','','80%',0,0,'','',2);
+
+UPDATE `sys_grid_fields` SET `title` = '_sys_agents_models_txt_type' WHERE `object` = 'sys_studio_agents_models' AND `name` = 'type' AND `title` = '_sys_agents_automators_txt_type';
+
+-- sys_grid_actions: API Configs
+INSERT IGNORE INTO `sys_grid_actions` (`object`,`type`,`name`,`title`,`icon`,`icon_only`,`confirm`,`ORDER`) VALUES ('sys_studio_api_configs','single','apply','_adm_api_btn_apply','recycle',1,1,1);
+INSERT IGNORE INTO `sys_grid_actions` (`object`,`type`,`name`,`title`,`icon`,`icon_only`,`confirm`,`ORDER`) VALUES ('sys_studio_api_configs','single','remove','_adm_api_btn_remove','eraser',1,1,2);
+INSERT IGNORE INTO `sys_grid_actions` (`object`,`type`,`name`,`title`,`icon`,`icon_only`,`confirm`,`ORDER`) VALUES ('sys_studio_api_configs','single','export','_adm_api_btn_export','file-export',1,0,3);
+INSERT IGNORE INTO `sys_grid_actions` (`object`,`type`,`name`,`title`,`icon`,`icon_only`,`confirm`,`ORDER`) VALUES ('sys_studio_api_configs','independent','apply_all','_adm_api_btn_apply_all','',0,1,1);
+INSERT IGNORE INTO `sys_grid_actions` (`object`,`type`,`name`,`title`,`icon`,`icon_only`,`confirm`,`ORDER`) VALUES ('sys_studio_api_configs','independent','remove_all','_adm_api_btn_remove_all','eraser',1,1,2);
+INSERT IGNORE INTO `sys_grid_actions` (`object`,`type`,`name`,`title`,`icon`,`icon_only`,`confirm`,`ORDER`) VALUES ('sys_studio_api_configs','independent','export_all','_adm_api_btn_export_all','',0,0,3);
+INSERT IGNORE INTO `sys_grid_actions` (`object`,`type`,`name`,`title`,`icon`,`icon_only`,`confirm`,`ORDER`) VALUES ('sys_studio_api_configs','independent','import_all','_adm_api_btn_import_all','',0,0,4);
+
+-- sys_grid_fields: Agents
+INSERT IGNORE INTO `sys_grid_fields` (`object`,`name`,`title`,`width`,`translatable`,`chars_limit`,`params`,`hidden_on`,`ORDER`) VALUES ('sys_studio_agents_agents','icon','_adm_form_txt_field_icon','5%',0,0,'','',30);
+UPDATE `sys_grid_fields` SET `ORDER` = 50 WHERE `object` = 'sys_studio_agents_agents' AND `name` = 'model_id' AND `ORDER` = 30;
+UPDATE `sys_grid_fields` SET `ORDER` = 60 WHERE `object` = 'sys_studio_agents_agents' AND `name` = 'trigger' AND `ORDER` = 50;
+UPDATE `sys_grid_fields` SET `ORDER` = 70 WHERE `object` = 'sys_studio_agents_agents' AND `name` = 'profile_id' AND `ORDER` = 60;
+UPDATE `sys_grid_fields` SET `width` = '40%', `ORDER` = 80 WHERE `object` = 'sys_studio_agents_agents' AND `name` = 'actions' AND `width` = '45%' AND `ORDER` = 70;
+
+-- sys_grid_actions: Agents
+INSERT IGNORE INTO `sys_grid_actions` (`object`,`type`,`name`,`title`,`icon`,`icon_only`,`confirm`,`ORDER`) VALUES ('sys_studio_agents_agents','single','message','_sys_agents_agents_act_message','comment',1,0,2);
+UPDATE `sys_grid_actions` SET `ORDER` = 3 WHERE `object` = 'sys_studio_agents_agents' AND `type` = 'single' AND `name` = 'logs' AND `ORDER` = 2;
+UPDATE `sys_grid_actions` SET `ORDER` = 4 WHERE `object` = 'sys_studio_agents_agents' AND `type` = 'single' AND `name` = 'edit' AND `ORDER` = 3;
+UPDATE `sys_grid_actions` SET `ORDER` = 5 WHERE `object` = 'sys_studio_agents_agents' AND `type` = 'single' AND `name` = 'wipe_chat_history' AND `ORDER` = 4;
+UPDATE `sys_grid_actions` SET `ORDER` = 6 WHERE `object` = 'sys_studio_agents_agents' AND `type` = 'single' AND `name` = 'delete' AND `ORDER` = 5;
+
+-- sys_grid_fields: Agents Logs
+UPDATE `sys_grid_fields` SET `title` = '_sys_agents_agents_act_message' WHERE `object` = 'sys_studio_agents_logs' AND `name` = 'message' AND `title` = '_sys_agents_helpers_field_message';
+
+
+--
+
+-- sys_objects_page
+UPDATE `sys_objects_page` SET `layout_id` = 5 WHERE `object` = 'sys_std_dashboard' AND `layout_id` = 4;
+UPDATE `sys_objects_page` SET `title_system` = '_sys_page_title_sys_wiki_pages_list' WHERE `object` = 'sys_sub_wiki_pages_list' AND `title_system` = '';
+UPDATE `sys_objects_page` SET `title_system` = '_sys_page_title_sys_wiki_page_contents' WHERE `object` = 'sys_sub_wiki_page_contents' AND `title_system` = '';
+INSERT IGNORE INTO `sys_objects_page` (`object`, `uri`, `title_system`, `title`, `module`, `cover`, `layout_id`, `submenu`, `visible_for_levels`, `visible_for_levels_editable`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`, `sticky_columns`) VALUES ('sys_wiki_add_page', 'wiki-add-page', '_sys_page_title_sys_wiki_add_page', '_sys_page_title_wiki_add_page', 'system', 1, 5, '', 2147483647, 1, 'page.php?i=wiki-add-page', '', '', '', 0, 1, 0, '', '', 0);
+
+-- sys_pages_blocks: service blocks
+UPDATE `sys_pages_blocks` SET `title_system` = '_sys_page_block_title_sys_ai_agent', `title` = '_sys_page_block_title_ai_agent', `content` = 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:18:"get_block_ai_agent";s:6:"params";a:1:{i:0;i:1;}s:5:"class";s:13:"TemplServices";}' WHERE `object` = '' AND `cell_id` = 0 AND `module` = 'system' AND `title_system` = '_sys_page_block_title_sys_ask_aqssistant' AND `title` = '_sys_page_block_title_ask_aqssistant' AND `content` = 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:23:"get_block_ask_assistant";s:6:"params";a:1:{i:0;a:0:{}}s:5:"class";s:13:"TemplServices";}';
+
+-- sys_pages_blocks: dashboard blocks
+UPDATE `sys_pages_blocks` SET `cell_id` = 2 WHERE `object` = 'sys_dashboard' AND `cell_id` = 1 AND `module` = 'system' AND `title_system` = '_sys_page_block_title_dash_stats' AND `content` = 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:14:"get_stat_block";s:6:"params";a:0:{}s:5:"class";s:22:"TemplDashboardServices";}';
+
+-- sys_pages_blocks: wiki blocks
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `tabs`, `async`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `ORDER`) SELECT 'sys_wiki_add_page', 1, 'system', '', '_sys_page_block_title_wiki_add_page', 0, 0, 0, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:13:"wiki_add_page";s:6:"params";a:2:{i:0;s:8:"{object}";i:1;s:5:"{uri}";}s:5:"class";s:16:"TemplServiceWiki";}', 0, 1, 1, 1 WHERE NOT EXISTS (SELECT 1 FROM `sys_pages_blocks` WHERE `object` = 'sys_wiki_add_page' AND `cell_id` = 1 AND `module` = 'system' AND `title` = '_sys_page_block_title_wiki_add_page' AND `content` = 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:13:"wiki_add_page";s:6:"params";a:2:{i:0;s:8:"{object}";i:1;s:5:"{uri}";}s:5:"class";s:16:"TemplServiceWiki";}');
+
+-- sys_pages_blocks: studio dashboard blocks
+UPDATE `sys_pages_blocks` SET `icon` = 'package', `class` = 'bx-dbd-block-medium' WHERE `object` = 'sys_std_dashboard' AND `cell_id` = 1 AND `module` = 'system' AND `title` = '_sys_page_block_title_std_dash_version' AND `content` = 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:17:"get_block_version";s:6:"params";a:0:{}s:5:"class";s:20:"TemplStudioDashboard";}';
+UPDATE `sys_pages_blocks` SET `icon` = 'layers', `class` = 'bx-dbd-block-medium', `ORDER` = 3 WHERE `object` = 'sys_std_dashboard' AND `cell_id` = 1 AND `module` = 'system' AND `title` = '_sys_page_block_title_std_dash_space' AND `content` = 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:15:"get_block_space";s:6:"params";a:0:{}s:5:"class";s:20:"TemplStudioDashboard";}';
+UPDATE `sys_pages_blocks` SET `cell_id` = 1, `icon` = 'server', `class` = 'bx-dbd-block-medium', `ORDER` = 4 WHERE `object` = 'sys_std_dashboard' AND `cell_id` = 2 AND `module` = 'system' AND `title` = '_sys_page_block_title_std_dash_host_tools' AND `content` = 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:20:"get_block_host_tools";s:6:"params";a:0:{}s:5:"class";s:20:"TemplStudioDashboard";}';
+UPDATE `sys_pages_blocks` SET `cell_id` = 1, `icon` = 'archive', `class` = 'bx-dbd-block-medium', `ORDER` = 5 WHERE `object` = 'sys_std_dashboard' AND `cell_id` = 2 AND `module` = 'system' AND `title` = '_sys_page_block_title_std_dash_cache' AND `content` = 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:15:"get_block_cache";s:6:"params";a:0:{}s:5:"class";s:20:"TemplStudioDashboard";}';
+UPDATE `sys_pages_blocks` SET `cell_id` = 1, `icon` = 'list-todo', `class` = 'bx-dbd-block-medium', `ORDER` = 6 WHERE `object` = 'sys_std_dashboard' AND `cell_id` = 2 AND `module` = 'system' AND `title` = '_sys_page_block_title_std_dash_queues' AND `content` = 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:16:"get_block_queues";s:6:"params";a:0:{}s:5:"class";s:20:"TemplStudioDashboard";}';
+INSERT INTO `sys_pages_blocks` (`object`, `cell_id`, `module`, `title_system`, `title`, `icon`, `designbox_id`, `class`, `tabs`, `async`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `active`, `ORDER`) SELECT 'sys_std_dashboard', 1, 'system', '', '_sys_page_block_title_std_dash_users', 'users', 11, 'bx-dbd-block-medium', 0, 0, 2147483647, 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:15:"get_block_users";s:6:"params";a:0:{}s:5:"class";s:20:"TemplStudioDashboard";}', 0, 0, 1, 2 WHERE NOT EXISTS (SELECT 1 FROM `sys_pages_blocks` WHERE `object` = 'sys_std_dashboard' AND `cell_id` = 1 AND `module` = 'system' AND `title` = '_sys_page_block_title_std_dash_users' AND `content` = 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:15:"get_block_users";s:6:"params";a:0:{}s:5:"class";s:20:"TemplStudioDashboard";}');
+
+--
+
+DELETE FROM `sys_rewrite_rules` WHERE `preg` = '^sys-ai-chat/(.*)$';
+INSERT INTO `sys_rewrite_rules` (`preg`, `service`, `active`) VALUES
+('^sys-ai-chat/(.*)$', 'a:4:{s:6:\"module\";s:6:\"system\";s:6:\"method\";s:7:\"ai_chat\";s:6:\"params\";a:1:{i:0;s:3:\"{1}\";}s:5:\"class\";s:13:\"TemplServices\";}', 1);
+
+--
+
+CREATE TABLE IF NOT EXISTS `sys_agents_chat_artifacts` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `history_id` int(11) NOT NULL,
+  `field_name` varchar(64) NOT NULL,
+  `field_value` text NOT NULL,
+  `updated_at` int(11) NOT NULL DEFAULT 0,
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `history_field` (`history_id`, `field_name`),
+  KEY `history_id` (`history_id`)
+);
+
+-- Data: sys_agents_tools
+DELETE FROM `sys_agents_tools` WHERE `type` = 'chat_artifact_save';
+DELETE FROM `sys_agents_tools` WHERE `type` = 'chat_goal_reached';
+INSERT INTO `sys_agents_tools` (`type`, `title`, `docs`, `params`, `params_user`, `duplicate`, `changed`, `active`, `class_name`, `class_file`) VALUES 
+('chat_artifact_save', 'Chat artifact save', 'Save one field from the conversation into sys_agents_chat_artifacts.', '{}', NULL, 0, 0, 0, 'BxDolAIToolChatArtifactSave', ''), 
+('chat_goal_reached', 'Chat goal reached', 'Call once when the conversation goal is done. Fires agent_conversation_closed with reason=goal.', '{}', NULL, 0, 0, 0, 'BxDolAIToolChatGoalReached', '');
+
+-- Data: sys_preloader
+DELETE FROM `sys_preloader` WHERE `module` = 'system' AND `type` = 'js_system' AND `content` = 'bundle.js';
+INSERT INTO `sys_preloader` (`module`, `type`, `content`, `active`, `ORDER`) VALUES ('system', 'js_system', 'bundle.js', 1, 46);
+
+-- Data: sys_std_pages
+UPDATE `sys_std_pages` SET `icon` = 'tmi-launcher.svg' WHERE `name` = 'home' AND `icon` = 'bc-home.svg';
+
+DROP TABLE IF EXISTS `sys_agents_automators`;
+DROP TABLE IF EXISTS `sys_agents_automators_providers`;
+DROP TABLE IF EXISTS `sys_agents_automators_helpers`;
+DROP TABLE IF EXISTS `sys_agents_automators_assistants`;
+DROP TABLE IF EXISTS `sys_agents_automators_messages`;
+DROP TABLE IF EXISTS `sys_agents_provider_types`;
+DROP TABLE IF EXISTS `sys_agents_provider_options`;
+DROP TABLE IF EXISTS `sys_agents_providers`;
+DROP TABLE IF EXISTS `sys_agents_providers_values`;
+DROP TABLE IF EXISTS `sys_agents_helpers`;
+DROP TABLE IF EXISTS `sys_agents_assistants`;
+DROP TABLE IF EXISTS `sys_agents_assistants_files`;
+DROP TABLE IF EXISTS `sys_agents_assistants_chats`;
+DROP TABLE IF EXISTS `sys_agents_assistants_chats_messages`;
+DROP TABLE IF EXISTS `sys_agents_assistants_chats_files`;
+
+-- APP: pages
+
+UPDATE `sys_pages_blocks` SET `active_api`=1 WHERE `object`='sys_wiki_add_page' AND `module`='system' AND `title_system`='' AND `title`='_sys_page_block_title_wiki_add_page';
+
+-- Last step is to update current version
+
+UPDATE `sys_modules` SET `version` = '15.0.0-RC2' WHERE (`version` = '15.0.0.RC1' OR `version` = '15.0.0-RC1') AND `name` = 'system';
+

+ 360 - 0
upgrade/files/15.0.0.RC1-15.0.0.RC2/sys-alerts-desc.sql

@@ -0,0 +1,360 @@
+
+TRUNCATE TABLE `sys_alerts_desc`;
+INSERT INTO `sys_alerts_desc` (`unit`, `action`, `description`) VALUES
+('system', 'check_send_mail', 'hook for disabling mail sending'),
+('system', 'before_send_mail', 'hook before mail sending'),
+('system', 'send_mail', 'hook when mail was sent'),
+('account', 'clear_xss', 'hook after string is checked for xss'),
+('system', 'permalink', 'hook to override permalink during link to permalink conversion'),
+('system', 'unpermalink', 'hook to override link during permalink to link conversion'),
+('system', 'set_cover', 'hook in set cover'),
+('system', 'set_cover_image', 'hook on cover image'),
+('feature', 'undo', 'hook on cancel feature'),
+('feature', 'do', 'hook on feature'),
+('{object_name}', 'connection_before_add', 'hook before connection was added. Connection params can be overridden'),
+('{object_name}', 'connection_added', 'hook after connection was added. Connection params can be overridden'),
+('{object_name}', 'connection_before_remove', 'hook before connection was removed. Connection params can be overridden'),
+('{object_name}', 'connection_removed', 'hook after a connection was removed.'),
+('{object_name}', 'connection_removed_all', 'hook after all connections with deleted \'initiator\' were removed.'),
+('system', 'transcode', 'hook before file is transcoded'),
+('system', 'transcoded', 'hook after file is transcoded'),
+('{object_name}', 'doVoteUp', 'hook after score vote'),
+('{object_name}', 'doVoteDown', 'hook after score vote'),
+('{object_name}', 'undoVoteUp', 'hook after undo score vote'),
+('{object_name}', 'undoVoteDown', 'hook after undo score vote'),
+('score', 'doUp', 'hook after score vote'),
+('score', 'doDown', 'hook after score vote'),
+('score', 'undoUp', 'hook after undo score vote'),
+('score', 'undoDown', 'hook after undo score vote'),
+('system', 'informer_permament_messages', 'hook on informer'),
+('{object_name}', 'keyword_added', 'hook after a keyword (hashtag) was recognized in provided text'),
+('meta_keyword', 'added', 'hook after a keyword (hashtag) was recognized in provided text'),
+('meta_keyword', 'url', 'hook to override meta keyword URL'),
+('meta_keyword', 'before_add_multiple', 'hook to override meta keywords before it will be processed'),
+('meta_keyword', 'before_added', 'hook to override meta keyword before it will be processed'),
+('meta_mention', 'before_added', 'hook to override meta keyword before it will be processed'),
+('grid', 'get_data', 'hook to override the data to be shown in the grid'),
+('grid', 'get_data_by_filter', 'hook to override the data to be shown in the grid'),
+('system', 'parse_email_template', 'hook on template with neccessary markers replaced'),
+('account', 'is_confirmed', 'hook in  $oAccount->isConfirmed check'),
+('account', 'is_confirmed_email', 'hook in  $oAccount->isConfirmedEmail check'),
+('account', 'is_confirmed_phone', 'hook in  $oAccount->isConfirmedPhone check'),
+('account', 'confirm', 'hook in email confirmation $oAccount->updateEmailConfirmed'),
+('account', 'edited', 'hook on account edited $oAccount->updatePassword'),
+('account', 'set_phone', 'hook after accout password changed'),
+('account', 'before_switch_context', 'hook before switch profile_id from current logged user'),
+('account', 'switch_context', 'hook before switch profile_id from current logged user'),
+('account', 'account_name', 'hook on get account display name'),
+('account', 'get_limit_profiles_number', 'hook on get account limit on the number of profiles'),
+('account', 'before_delete', 'hook on before delete account,'),
+('account', 'delete', 'hook on after delete account'),
+('account', 'is_need_to_change_password', 'hook on after delete account'),
+('profile', 'allow_create_another_profile', 'hook on check allow create profile'),
+('vote', 'undo', 'hook on cancel vote'),
+('vote', 'do', 'hook on new vote'),
+('search', 'get_mention', 'hook on get mention list'),
+('system', 'uri_generate', 'hook to override SEO URI generated for a page'),
+('profile', 'profile_name', 'hook on before profile deletion'),
+('profile', 'before_delete', 'hook on before profile deletion'),
+('profile', 'delete', 'hook on profile deleted'),
+('profile', 'add', 'hook on profile added'),
+('profile', 'approve', 'hook on switch profile'),
+('account', 'check_switch_context', 'hook on switch profile'),
+('meta_keyword', 'deleted', 'hook on delete meta keyword'),
+('system', 'get_color_palette', 'hook on get color palette'),
+('system', 'get_layout_images', 'hook on get layout images'),
+('system', 'add_files', 'hook on add file to page'),
+('system', 'design_before_output', 'hook on before page''s html generated'),
+('system', 'design_after_output', 'hook on after page''s html generated'),
+('system', 'form_check', 'hook to override form object after data checking was performed'),
+('system', 'form_submitted', 'hook to override form object after data was submitted and saved in database'),
+('system', 'check_spam', 'hook to override (perform) spam checking'),
+('module_template_method_call', '{method_name}', 'hook to override a method from template class in a module'),
+('favorite', 'favorite', 'hook on add new object to favorites lists or remove object from favorites lists'),
+('system', 'privacy_condition', 'hook on get necessary condition array to use privacy in search classes'),
+('system', 'check_privacy', 'check privacy for object'),
+('{object_name}', 'connection_confirmed', 'hook after relation was confirmed'),
+('{object_name}', 'get_relations', 'hook to override relation info'),
+('system', 'get_object', 'hook to override menu object'),
+('simple_search', 'before_get_data', 'hook on before after get data'),
+('simple_search', 'get_data', 'hook on after get data'),
+('simple_search', 'get_query', 'hook on get sql queries'),
+('membership', 'check_action', 'hook to override the result of checking whether an action is allowed or not'),
+('profile', 'unset_membership', 'hook after a default membership level was set'),
+('profile', 'set_membership', 'hook after a new membership level was set'),
+('profile', 'prolong_membership', 'hook after current membership level was prolonged'),
+('{object_name}', 'commentRemoved', 'hook after a comment was removed'),
+('comment', 'deleted', 'hook after a comment was removed'),
+('{object_name}', 'replyRemoved', 'hook after a reply was removed'),
+('reply', 'deleted', 'hook after a reply was removed'),
+('{object_name}', 'commentPost', 'hook after a comment was added'),
+('comment', 'added', 'hook after a comment was added'),
+('{object_name}', 'replyPost', 'hook after a reply was added'),
+('comment', 'replied', 'hook after a reply was added'),
+('{object_name}', 'commentUpdated', 'hook after a comment was updated (edited)'),
+('comment', 'edited', 'hook after a comment was updated (edited)'),
+('system', 'decode_comment_data_api', 'hook to override comment data prepared for sending in API response'),
+('{object_name}', 'decode_comment_data_api', 'hook to override comment data prepared for sending in API response'),
+('label', 'added', 'hook on new label added'),
+('label', 'edited', 'hook on new label edited'),
+('label', 'deleted', 'hook on new label deleted'),
+('comment', 'get_comments_count', 'hook to override number of comments for commented object'),
+('comment', 'get_comments', 'hook to override comments list. Is used during comments count retrieving.'),
+('system', 'push_tags', 'hook on get tags to send to PUSH server'),
+('account', 'login', 'hook after user performed login'),
+('account', 'logout', 'hook after user performed logout'),
+('account', 'logged', 'hook after user performed logged'),
+('account', 'encrypt_password_after', 'hook after user performed login'),
+('account', 'check_login', 'hook after user''s login/password check'),
+('bx_ads', 'doInterest', 'hook after ''interested'' action was performed'),
+('bx_ads', 'order_authorize', 'hook after the order was authorized with payment processing module'),
+('bx_ads', 'license_register', 'hook after the payment for an ad was processed with payment processing module'),
+('bx_ads', 'sold', 'hook after the payment was processed with payment processing module and there is no the ad (entry) for selling anymore'),
+('bx_ads', 'license_register_notif', 'hook before sending a notification about new license. Allows to override a notification message or cancel the notification'),
+('bx_ads', 'promotion_register', 'hook after the payment for promotion was processed with payment processing module'),
+('bx_ads', 'license_unregister', 'hook after the payment for ad was refunded with payment processing module'),
+('bx_ads', 'promotion_unregister', 'hook after the payment for promotion was refunded with payment processing module'),
+('bx_ads', 'is_entry_active', 'hook to override whether an ad (entry) active or not'),
+('bx_ads', 'offer_added', 'hook after an offer was added. Allows to override action results.'),
+('bx_ads', 'offer_accepted', 'hook after an offer was accepted.'),
+('bx_ads', 'offer_declined', 'hook after an offer was declined.'),
+('bx_ads', 'offer_canceled', 'hook after an offer was declined.'),
+('bx_ads', 'shipped', 'hook after the ad (entry) was marked as shipped'),
+('bx_ads', 'received', 'hook after the ad (entry) was marked as received'),
+('bx_convos', 'deleted', 'hook on delete conversation'),
+('profile', 'check_contact', 'hook on check some profile to allow contact him'),
+('bx_tasks', 'expired', 'hook on task unassigned to profile'),
+('bx_tasks', 'completed', 'hook on task unassigned to profile'),
+('bx_tasks', 'assigned', 'hook on task assigned to profile'),
+('bx_tasks', 'unassigned', 'hook on task unassigned to profile'),
+('bx_donations', 'donation_register', 'hook after the donation payment was processed with payment processing module'),
+('bx_donations', 'donation_unregister', 'hook after the donation payment was refunded with payment processing module'),
+('bx_donations', 'donate', 'hook to override the content of donate block'),
+('bx_payment', 'stripe_v3_create_tax', 'hook to override tax data redurned by payment provider'),
+('bx_payment', 'stripe_v3_retrieve_tax', 'hook to override tax data retrieved from payment provider'),
+('bx_payment', 'stripe_v3_get_code_session', 'hook to override session verification code'),
+('bx_payment', 'stripe_v3_verify_session', 'hook to override checking of session verification code'),
+('bx_payment', 'stripe_v3_retrieve_customer', 'hook to override customer data retrieved from payment provider'),
+('bx_payment', 'stripe_v3_create_session', 'hook to override session data redurned by payment provider'),
+('bx_payment', 'stripe_v3_retrieve_session', 'hook to override session data retrieved from payment provider'),
+('bx_payment', 'stripe_v3_retrieve_setup_intent', 'hook to override SetupIntent data retrieved from payment provider'),
+('bx_payment', 'stripe_v3_create_payment_intent', 'hook to override PaymentIntent data redurned by payment provider'),
+('bx_payment', 'stripe_v3_retrieve_payment_inten', 'hook to override PaymentIntent data retrieved from payment provider'),
+('bx_payment', 'stripe_v3_retrieve_subscription', 'hook to override subscription data retrieved from payment provider'),
+('bx_payment', 'stripe_v3_get_button', 'hook to override checkout/subscibe button'),
+('bx_payment', 'credits_cancel_subscription', 'hook after a subscription was canceled'),
+('bx_payment', 'chargebee_cancel_subscription', 'hook after a subscription was canceled'),
+('bx_payment', 'chargebee_v3_cancel_subscription', 'hook after a subscription was canceled'),
+('bx_payment', 'chargebee_v3_get_js_code', 'hook to override JavaScript code'),
+('bx_payment', 'chargebee_v3_get_button', 'hook to override checkout/subscibe button'),
+('bx_payment', 'stripe_retrieve_customer', 'hook to override customer data retrieved from payment provider'),
+('bx_payment', 'stripe_retrieve_charge', 'hook to override charge data retrieved from payment provider'),
+('bx_payment', 'stripe_v3_retrieve_charge', 'hook to override charge data retrieved from payment provider'),
+('bx_payment', 'stripe_cancel_subscription', 'hook after a subscription was canceled'),
+('bx_payment', 'stripe_v3_cancel_subscription', 'hook after a subscription was canceled'),
+('bx_payment', 'stripe_retrieve_product', 'hook to override product data retrieved from payment provider'),
+('bx_payment', 'stripe_v3_retrieve_product', 'hook to override product data retrieved from payment provider'),
+('bx_payment', 'stripe_get_code_charge', 'hook to override verification code for ''charge'' action'),
+('bx_payment', 'stripe_verify_charge', 'hook to override code verification for ''charge'' action'),
+('bx_payment', 'stripe_get_code_subscription', 'hook to override verification code for ''subscribe'' action'),
+('bx_payment', 'stripe_verify_subscription', 'hook to override code verification for ''subscribe'' action'),
+('bx_payment', 'stripe_create_customer', 'hook to override customer data redurned by payment provider'),
+('bx_payment', 'stripe_create_charge', 'hook to override charge data redurned by payment provider'),
+('bx_payment', 'stripe_create_subscription', 'hook to override subscription data redurned by payment provider'),
+('bx_payment', 'stripe_get_button', 'hook to override checkout/subscibe button'),
+('bx_reputation', 'before_register_alert', 'hook to override alert (hook) before processing'),
+('bx_stream', 'publish_succeeded', 'hook on stream published succeeded'),
+('bx_feedback', 'added_question', 'hook on new question added'),
+('bx_feedback', 'edited_question', 'hook on new question edited'),
+('bx_feedback', 'deleted_question', 'hook on question deleted'),
+('bx_feedback', 'added_answer', 'hook on new answer added'),
+('bx_feedback', 'added_answer_notif', 'hook on new answer added'),
+('bx_feedback', 'deleted_answer', 'hook on new answer deleted'),
+('bx_stories', 'media_added', 'hook on new media added in story'),
+('bx_messenger', 'send_jot', 'hook after a jot (message) was sent'),
+('bx_messenger', 'got_jot', 'hook after a lot (conversation) got a new jot (message)'),
+('profile', 'send_mail', 'hook in  $oAccount->isConfirmed check'),
+('bx_market', 'license_reset', 'hook on license reset'),
+('bx_market', 'license_expire', 'hook on found expired license'),
+('bx_events', 'check_in', 'hook in on somebody check-in some event'),
+('bx_events', 'calendar_data', 'hook in get data for calendar'),
+('bx_events', 'reminder', 'hook on enent''s reminder'),
+('bx_invites', 'add_friend', 'hook on add friend on new user registred by invitaion'),
+('bx_invites', 'request', 'hook on create new request on invite'),
+('bx_invites', 'request_notify', 'hook on notify all admins&moderators about new request'),
+('bx_invites', 'invite', 'hook on new invite'),
+('bx_timeline', 'cache_table_check_fields', 'hook to override cache table fields, which should be checked'),
+('bx_timeline', 'get_system_data', 'hook to override event''s data received from content modules before output'),
+('bx_timeline', 'get_events_before', 'hook to override params which are used to get events'),
+('bx_timeline', 'get_events', 'hook to override events list which will be received from database'),
+('bx_timeline', 'get_list_by_type', 'hook to override SQL query parts which are used to get events list'),
+('bx_timeline', 'add_live_update', 'hook to override params and/or code for live updates'),
+('bx_timeline', 'get_view', 'hook to override elements of view timeline block'),
+('bx_timeline', 'get_external_post', 'hook to override (add) external post(s) in timeline'),
+('bx_timeline', 'get_reposted_by', 'hook to override a list of users reposted a content'),
+('bx_timeline', 'get_post', 'hook to override a post (event) before output'),
+('bx_timeline', 'get_post_content', 'hook to override a post''s content before output'),
+('bx_timeline', 'promoted', 'hook after an event was promoted'),
+('bx_timeline', 'unpromoted', 'hook after an event was unpromoted'),
+('bx_timeline', 'muted', 'hook after an event author was muted'),
+('bx_timeline', 'on_get_post', 'hook to override just created direct post (update)'),
+('system', 'get_object_form', 'hook to override an object of create content form, @see BxDolForm'),
+('system', 'check_allowed_view', 'hook to override the result of checking whether \'view\' action is allowed or not to specified profile'),
+('{profile_module_name}', 'timeline_post', 'hook to override the result of checking whether \'post in profile\' action is allowed or not'),
+('{profile_module_name}', 'timeline_edit', 'hook to override the result of checking whether \'edit\' action is allowed or not'),
+('{profile_module_name}', 'timeline_delete', 'hook to override the result of checking whether \'delete\' action is allowed or not'),
+('{profile_module_name}', 'timeline_view_counter', 'hook to override the result of checking whether \'view counter\' action is allowed or not'),
+('{profile_module_name}', 'timeline_vote', 'hook to override the result of checking whether \'vote\' action is allowed or not'),
+('{profile_module_name}', 'timeline_vote_view', 'hook to override the result of checking whether \'vote\' action is allowed or not'),
+('{profile_module_name}', 'timeline_reaction', 'hook to override the result of checking whether \'give reaction vote\' action is allowed or not'),
+('{profile_module_name}', 'timeline_reaction_view', 'hook to override the result of checking whether \'view reactions\' action is allowed or not'),
+('{profile_module_name}', 'timeline_score', 'hook to override the result of checking whether \'give score vote\' action is allowed or not'),
+('{profile_module_name}', 'timeline_report', 'hook to override the result of checking whether \'give score vote\' action is allowed or not'),
+('bx_timeline', 'is_allowed_repost', 'hook to override the result of checking whether \'repost\' action is allowed or not'),
+('{profile_module_name}', 'timeline_send', 'hook to override the result of checking whether \'send\' action is allowed or not'),
+('bx_timeline', 'post_system', 'hook after system post was added and published'),
+('bx_timeline', 'post_common', 'hook after common post was added and published'),
+('bx_timeline', 'defer_system', 'hook after system post was added'),
+('bx_timeline', 'defer_common', 'hook after common post was added'),
+('bx_timeline', 'fail_system', 'hook after system post failed to publish'),
+('bx_timeline', 'fail_common', 'hook after common post failed to publish'),
+('bx_timeline', 'repost', 'hook after repost was added (published)'),
+('bx_timeline', 'hide_repost', 'hook after repost was hidden'),
+('bx_timeline', 'hide', 'hook after post (event) was hidden'),
+('bx_timeline', 'unhide_repost', 'hook after repost was unhidden'),
+('bx_timeline', 'unhide', 'hook after post (event) was unhidden'),
+('bx_timeline', 'delete_repost', 'hook after repost was deleted'),
+('bx_timeline', 'delete', 'hook after \'common\' post (event) was deleted'),
+('{profile_module_name}', 'timeline_view', 'hook to override view timeline block'),
+('{profile_module_name}', 'timeline_repost', 'hook to override the result of checking whether \'repost\' action is allowed or not'),
+('{profile_module_name}', 'timeline_pin', 'hook to override the result of checking whether \'pin\' action is allowed or not'),
+('{profile_module_name}', 'timeline_stick', 'hook to override the result of checking whether \'stick\' action is allowed or not'),
+('{profile_module_name}', 'timeline_promote', 'hook to override the result of checking whether \'promote\' action is allowed or not'),
+('bx_albums', 'media_added', 'hook on new media added in album'),
+('bx_credits', 'checkout', 'hook after checkout with creadits was performed'),
+('bx_credits', 'subscribe', 'hook after subscription was registered'),
+('bx_credits', 'update_balance', 'hook after profile''s credits balance was updated (credits were transferred from one profile to another)'),
+('bx_credits', 'granted', 'hook after some amount of credits was granted to a profile'),
+('bx_credits', 'sent', 'hook after some amount of credits was sent from one profile to another'),
+('bx_credits', 'withdraw_requested', 'hook after a profile requested to withdraw some amount of credits from his balance'),
+('bx_credits', 'withdraw_canceled', 'hook after a profile canceled his withdrawal request'),
+('bx_credits', 'withdraw_sent', 'hook after the amount of credits requested to withdraw was sent'),
+('bx_credits', 'order_register', 'hook after the payment for a bundle of credits was processed with payment processing module'),
+('bx_credits', 'order_prolong', 'hook isn''t currently used because \'single\' type payments for bundles are only supported'),
+('bx_credits', 'order_unregister', 'hook after the payment for a bundle of credits was refunded with payment processing module'),
+('bx_notifications', 'get_notification', 'hook to override notification or even cancel it'),
+('bx_notifications', 'get_content', 'hook to override notification content'),
+('bx_notifications', 'get_events_before', 'hook to override params which are used to get events'),
+('bx_notifications', 'get_events', 'hook to override events list which will be received from database'),
+('bx_notifications', 'get_list_by_type', 'hook to override SQL query parts which are used to get events list'),
+('bx_notifications', 'before_register_alert', 'hook to override alert (hook) before processing'),
+('bx_notifications', 'is_notification', 'hook to override checking if an event is available or not'),
+('bx_notifications', 'before_parse_email_template', 'hook to override email template'),
+('bx_notifications', 'before_send_notification_push', 'hook to override push message'),
+('bx_analytics', 'get_modules', 'hook on get modules list with avalaible analytics'),
+('bx_analytics', 'get_reports', 'hook on get avalaible reports for specified module'),
+('bx_analytics', 'get_chart_data_line', 'hook on get avalaible reports for specified module'),
+('bx_channels', 'hashtag_added', 'hook on found hashtag in content'),
+('system', 'prepare_alert_params', 'hook to override alert (hook) params'),
+('bx_channels', 'hashtag_added_notif', 'hook on after found hashtag in content'),
+('bx_channels', 'hashtag_deleted', 'hook on before delete content from channel'),
+('bx_channels', 'hashtag_deleted_notif', 'hook on before delete content from channel'),
+('{module_name}', 'get_cnf', 'hook to override module''s configuration array'),
+('{module_name}', 'redirect_after_add', 'hook to override redirect URL which is used after content creation'),
+('{module_name}', 'redirect_after_edit', 'hook to override redirect URL which is used after content changing'),
+('{module_name}', 'redirect_after_delete', 'hook to override redirect URL which is used after content deletion'),
+('{module_name}', 'deleted', 'hook after content was deleted'),
+('system', 'editor_query_params', 'hook to override http(s) request''s query params, which is used in HTML editor'),
+('{module_name}', 'publish_failed', 'hook to notify about failed content publishing'),
+('{module_name}', 'publish_succeeded', 'hook to notify about successfully published content'),
+('system', 'get_js_code', 'hook to override an instance of JavaScript class associate with the page'),
+('system', 'search_ids', 'hook to modify a list of found content ids'),
+('{module_name}', 'is_entry_active', 'hook to override whether an entry (content) active or not'),
+('{module_name}', 'is_entry_author', 'hook to check if a viewer is an author of viewed entry (content) or not'),
+('{module_name}', 'get_sortable_fields', 'hook to override a list of sortable fields'),
+('{module_name}', 'get_searchable_fields', 'hook to override a list of searchable fields'),
+('system', 'get_badges', 'hook to override bages assigned to an entry (content)'),
+('system', 'check_allowed_browse', 'hook to override the result of checking whether \'browse\' action is allowed or not to currently logged in profile'),
+('{module_name}', 'failed', 'hook after content creation when publishing was failed'),
+('{module_name}', 'approved', 'hook when module content has been approved'),
+('system', 'decode_data_api', 'hook to override content data prepared for sending in API response'),
+('{module_name}', 'decode_data_api', 'hook to override content data prepared for sending in API response'),
+('{module_name}', 'get_approve_form', 'hook to override approve content form'),
+('{module_name}', 'pending_approval', 'hook to notify admins/moderators about new pending approval content'),
+('system', '{payment_action}', 'hook after some payment related action happened'),
+('{payment_module_name}', '{payment_action}', 'hook after some payment related action happened'),
+('{module_name}', 'join_invitation', 'hook before adding (sending) new join to context invitation'),
+('{module_name}', 'join_invitation_notif', 'hook before adding new join to context invitation. Is needed for Notifications module.'),
+('{module_name}', 'join_request', 'hook before adding new join to context request'),
+('{module_name}', 'join_request_accepted', 'hook before accepting join to context request'),
+('{module_name}', 'fan_added', 'hook before adding (registering) new context member'),
+('system', 'check_allowed_fan_add', 'hook to override the result of checking whether \'fan add\' to context action is allowed or not to currently logged in user'),
+('system', 'check_allowed_action_by_role', 'hook to override the result of checking whether an action is allowed or not to context member by his role in the context'),
+('system', 'check_allowed_subscribe_add', 'hook to override the result of checking whether currently logged in user can subscribe (follow) the context or not'),
+('{module_name}', 'context_picture_changed', 'hook after context picture was changed'),
+('{module_name}', 'context_cover_changed', 'hook after context cover was changed'),
+('{module_name}', 'added', 'hook after context was added (published)'),
+('{module_name}', 'deferred', 'hook after context was added with pending approval status'),
+('{module_name}', 'set_role', 'hook after \'set role\' action was applied to context member'),
+('{module_name}', 'profile_picture_deleted', 'hook after profile picture was deleted'),
+('{module_name}', 'profile_cover_deleted', 'hook after profile cover was deleted'),
+('{module_name}', 'profile_badge_deleted', 'hook after profile badge was deleted'),
+('{module_name}', 'profile_name', 'hook to override profile display name'),
+('system', 'get_participating_profiles', 'hook to override context participants list'),
+('{module_name}', 'prepare_fields', 'hook to override prepared profile fields'),
+('system', 'check_allowed_post', 'hook to override the result of checking whether \'post\' action is allowed or not to specified profile'),
+('system', 'check_allowed_contact', 'hook to override the result of checking whether \'contact\' action is allowed or not to specified profile'),
+('{module_name}', 'profile_picture_changed', 'hook after profile picture was changed'),
+('{module_name}', 'profile_cover_changed', 'hook after profile cover was changed'),
+('{module_name}', 'edited', 'hook after profile was changed'),
+('profile', 'edit', 'hook after profile was changed'),
+('profile', 'unit', 'hook to override profile browsing unit'),
+('{module_name}', 'unit', 'hook to override profile browsing unit'),
+('system', 'image_editor', 'hook to override profile cover editor'),
+('profile', 'content_info_by_id', 'hook to modify profile info retrieved by content id'),
+('profile', 'content_info_by_profile_id', 'hook to modify profile info retrieved by profile id'),
+('profile', 'search_by_term', 'hook to modify a list of profiles found by term'),
+('{module_name}', 'comment_post_allowed', 'hook to override the result of checking whether comment posting action allowed or not'),
+('bx_base_text', 'media_deleted', 'hook on new media deleted from story'),
+('bx_base_text', 'medias_added', 'hook on new medias added in story (album)'),
+('{module_name}', 'profile_created', 'hook after a profile was created'),
+('{module_name}', 'fields_converted', 'hook before a profile is created, which allows to modify account and/or profile fields before creation'),
+('account', 'check_join', 'hook to check email address for spam'),
+('account', 'before_confirm_phone_send_sms', 'hook in confirm phone'),
+('account', 'after_email_confirmation', 'hook after email confirmed'),
+('account', 'before_forgot_password_send_sms', 'hook in  $oAccount->isConfirmed check'),
+('simple_search', 'show_data', 'hook in display block for search'),
+('system', 'view_comments', 'hook to override comments block'),
+('system', 'view_comment', 'hook on get comment'),
+('account', 'add_form_get', 'hook in get some account form'),
+('account', 'add_form_check', 'hook in  some account form after check'),
+('account', 'add_form', 'hook in  some account form after check'),
+('account', 'added', 'hook on new account created'),
+('comment', 'menu_custom_item', 'hook to override menu item'),
+('menu', 'get_code_before', 'hook before menu output'),
+('menu', 'get_code_after', 'hook after menu output'),
+('search', 'get_data', 'hook in get data for serach'),
+('system', 'get_page_api', 'hook to override page peremeters, is used in API calls'),
+('system', 'get_page_content_api', 'hook to override page content, is used in API calls'),
+('system', 'encrypt_password_after', 'hook to override password using another encrypt function'),
+('account', 'change_receive_news', 'hook after change receive_news parameter for account'),
+('system', 'page_output_block', 'hook with page block data to be output'),
+('system', 'page_output', 'hook with page data to be output'),
+('search', 'get_form', 'hook in create search form'),
+('{module_name}', 'menu_custom_item', 'hook to override menu item'),
+('menu', 'menu_custom_item', 'hook to override menu item'),
+('system', 'form_output', 'hook to override form object and/or code to be output'),
+('system', 'form_output_api', 'hook to override form object and/or code to be output. Is used in API calls.'),
+('system', 'check_spam_url', 'hook to override sClass for search'),
+('system', 'search_keyword', 'hook to override sClass for search'),
+('profile', 'show_login_form', 'hook before dhow login form'),
+('account', 'before_2fa_send_sms', 'hook after user performed login'),
+('account', 'login_after', 'hook on after login to rewrite url for redirect after login'),
+('system', 'display_cover', 'hook to override page cover code to be output'),
+('system', 'profiles_search_by_location', 'hook on serach profiles by location'),
+('system', 'account_profile_switcher', 'hook to get account profile switcher'),
+('system', 'page_output_block_acl_level', 'hook to override profile membership page block'),
+('report', 'undo', 'hook on cancel report'),
+('report', 'do', 'hook on create new report'),
+('{module_name}', 'reported_content', 'hook to notify admins/moderators about newly reported content');
+