Forráskód Böngészése

Ticket #323 - Application in Timeline and Notifications modules.

AntonLV 10 éve
szülő
commit
2718bfd2f6

+ 11 - 0
modules/boonex/notifications/install/config.php

@@ -54,10 +54,12 @@ $aConfig = array(
     ),
     'enable' => array(
         'execute_sql' => 1,
+    	'update_relations_for_all' => 1,
         'clear_db_cache' => 1,
     ),
     'disable' => array (
         'execute_sql' => 1,
+    	'update_relations_for_all' => 1,
         'clear_db_cache' => 1,
     ),
 
@@ -66,6 +68,15 @@ $aConfig = array(
      */
     'dependencies' => array(),
 
+    /**
+     * Relations Section
+     */
+    'relation_handlers' => array(
+    	'on_install' => '',
+    	'on_uninstall' => 'delete_module_events',
+	    'on_enable' => 'add_handlers',
+	    'on_disable' => 'delete_handlers',
+    ),
 );
 
 /** @} */

+ 0 - 4
modules/boonex/notifications/install/sql/disable.sql

@@ -28,7 +28,3 @@ DELETE FROM `sys_objects_privacy` WHERE `module` = @sName;
 SET @iHandlerId = (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = @sName LIMIT 1);
 DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandlerId;
 DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandlerId LIMIT 1;
-
-
--- MODULES' CONNECTIONS
-DELETE FROM `sys_modules_relations` WHERE `module`=@sName LIMIT 1;

+ 0 - 5
modules/boonex/notifications/install/sql/enable.sql

@@ -54,8 +54,3 @@ INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
 ('profile', 'delete', @iHandler),
 ('sys_profiles_subscriptions', 'connection_added', @iHandler),
 ('sys_profiles_subscriptions', 'connection_removed', @iHandler);
-
-
--- MODULES' CONNECTIONS
-INSERT INTO `sys_modules_relations` (`module`, `on_install`, `on_uninstall`, `on_enable`, `on_disable`) VALUES
-(@sName, '', 'delete_module_events', 'add_handlers', 'delete_handlers');

+ 1 - 1
modules/boonex/posts/install/config.php

@@ -112,7 +112,7 @@ $aConfig = array(
     'dependencies' => array(),
 
     /**
-     * Connections Section
+     * Relations Section
      */
     'relations' => array(
     	'bx_timeline',

+ 9 - 1
modules/boonex/timeline/install/config.php

@@ -90,6 +90,7 @@ $aConfig = array(
     ),
     'enable' => array(
         'execute_sql' => 1,
+    	'update_relations_for_all' => 1,
     	'update_relations' => 1,
         'clear_db_cache' => 1,
     ),
@@ -101,6 +102,7 @@ $aConfig = array(
     ),
     'disable' => array (
         'execute_sql' => 1,
+    	'update_relations_for_all' => 1,
     	'update_relations' => 1,
     	'unregister_transcoders' => 1,
         'clear_db_cache' => 1,
@@ -116,8 +118,14 @@ $aConfig = array(
     'dependencies' => array(),
 
     /**
-     * Connections Section
+     * Relations Section
      */
+    'relation_handlers' => array(
+    	'on_install' => '',
+    	'on_uninstall' => 'delete_module_events',
+	    'on_enable' => 'add_handlers',
+	    'on_disable' => 'delete_handlers',
+    ),
     'relations' => array(
     	'bx_notifications'
     )

+ 0 - 4
modules/boonex/timeline/install/sql/disable.sql

@@ -50,7 +50,3 @@ DELETE FROM `sys_objects_search` WHERE `ObjectName` IN ('bx_timeline', 'bx_timel
 
 -- METATAGS
 DELETE FROM `sys_objects_metatags` WHERE `object` = 'bx_timeline';
-
-
--- MODULES' CONNECTIONS
-DELETE FROM `sys_modules_relations` WHERE `module`='bx_timeline' LIMIT 1;

+ 0 - 5
modules/boonex/timeline/install/sql/enable.sql

@@ -200,8 +200,3 @@ INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `Order`, `ClassName`, `
 -- METATAGS
 INSERT INTO `sys_objects_metatags` (`object`, `table_keywords`, `table_locations`, `table_mentions`, `override_class_name`, `override_class_file`) VALUES
 ('bx_timeline', 'bx_timeline_meta_keywords', 'bx_timeline_meta_locations', '', '', '');
-
-
--- MODULES' CONNECTIONS
-INSERT INTO `sys_modules_relations` (`module`, `on_install`, `on_uninstall`, `on_enable`, `on_disable`) VALUES
-('bx_timeline', '', 'delete_module_events', 'add_handlers', 'delete_handlers');