HomeHelpTrac

Changeset 15755 for trunk/modules


Ignore:
Timestamp:
12/13/11 03:41:28 (6 months ago)
Author:
Anton Lesnikov
Message:
  1. Updated SQL parser
  2. New Popups related changes.
Location:
trunk/modules/boonex/articles/install/sql
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/boonex/articles/install/sql/disable.sql

    r15751 r15755  
     1SET @sName = 'bx_articles'; 
     2 
    13-- 
    24-- Studio page and widget. 
    35-- 
    4 SET @iPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name`='[name]' LIMIT 1); 
     6SET @iPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name`=@sName LIMIT 1); 
    57UPDATE `sys_std_widgets` SET `status`='2' WHERE `page_id`=@iPageId LIMIT 1; 
    68 
    79 
    810SET @iTMParentId = (SELECT `ID` FROM `sys_menu_top` WHERE `Name`='Articles' LIMIT 1); 
    9 DELETE FROM `sys_menu_top` WHERE `Name` IN ('Articles', '[db_prefix]_view') OR `Parent`=@iTMParentId; 
     11DELETE FROM `sys_menu_top` WHERE `Name` IN ('Articles', 'bx_arl_view') OR `Parent`=@iTMParentId; 
    1012DELETE FROM `sys_menu_member` WHERE `Name`='Articles'; 
    1113 
     
    1618 
    1719DELETE FROM `sys_options` WHERE `Name` IN ('permalinks_module_articles', 'category_auto_app_bx_articles'); 
    18 DELETE FROM `sys_options_types`, `sys_options_categories`, `sys_options` USING `sys_options_types`, `sys_options_categories`, `sys_options` WHERE `sys_options_types`.`id`=`sys_options_categories`.`type_id` AND `sys_options_categories`.`id`=`sys_options`.`category_id` AND `sys_options_types`.`name`='[name]'; 
     20DELETE FROM `sys_options_types`, `sys_options_categories`, `sys_options` USING `sys_options_types`, `sys_options_categories`, `sys_options` WHERE `sys_options_types`.`id`=`sys_options_categories`.`type_id` AND `sys_options_categories`.`id`=`sys_options`.`category_id` AND `sys_options_types`.`name`=@sName; 
    1921 
    2022 
     
    2224 
    2325 
    24 DELETE FROM `sys_objects_cmts` WHERE `ObjectName`='[name]' LIMIT 1; 
    25 DELETE FROM `sys_objects_vote` WHERE `ObjectName`='[name]' LIMIT 1; 
    26 DELETE FROM `sys_objects_tag` WHERE `ObjectName`='[name]' LIMIT 1; 
    27 DELETE FROM `sys_objects_categories` WHERE `ObjectName`='[name]' LIMIT 1; 
    28 DELETE FROM `sys_objects_search` WHERE `ObjectName`='[name]' LIMIT 1; 
    29 DELETE FROM `sys_objects_views` WHERE `name`='[name]' LIMIT 1; 
    30 DELETE FROM `sys_objects_actions` WHERE `Type`='[name]'; 
     26DELETE FROM `sys_objects_cmts` WHERE `ObjectName`=@sName LIMIT 1; 
     27DELETE FROM `sys_objects_vote` WHERE `ObjectName`=@sName LIMIT 1; 
     28DELETE FROM `sys_objects_tag` WHERE `ObjectName`=@sName LIMIT 1; 
     29DELETE FROM `sys_objects_categories` WHERE `ObjectName`=@sName LIMIT 1; 
     30DELETE FROM `sys_objects_search` WHERE `ObjectName`=@sName LIMIT 1; 
     31DELETE FROM `sys_objects_views` WHERE `name`=@sName LIMIT 1; 
     32DELETE FROM `sys_objects_actions` WHERE `Type`=@sName; 
    3133 
    3234 
     
    3739 
    3840 
    39 DELETE FROM `sys_cron_jobs` WHERE `name`='[name]'; 
     41DELETE FROM `sys_cron_jobs` WHERE `name`=@sName; 
  • trunk/modules/boonex/articles/install/sql/enable.sql

    r15751 r15755  
     1SET @sName = 'bx_articles'; 
     2 
    13-- 
    24-- Studio page and widget. 
    35-- 
    4 SET @iPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name`='[name]' LIMIT 1); 
     6SET @iPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name`=@sName LIMIT 1); 
    57UPDATE `sys_std_widgets` SET `status`='1' WHERE `page_id`=@iPageId LIMIT 1; 
    68 
    79SET @iTMOrder = (SELECT MAX(`Order`) FROM `sys_menu_top` WHERE `Parent`='0'); 
    810INSERT INTO `sys_menu_top` (`Parent`, `Name`, `Caption`, `Link`, `Order`, `Visible`, `Target`, `Onclick`, `Check`, `Editable`, `Deletable`, `Active`, `Type`, `Picture`, `BQuickLink`, `Statistics`) VALUES 
    9 (0, 'Articles', '_articles_top_menu_item', 'modules/?r=[uri]/index/|modules/?r=articles/', @iTMOrder+1, 'non,memb', '', '', '', 1, 1, 1, 'top', 'modules/[path]|top_menu_icon.png', 0, ''); 
     11(0, 'Articles', '_articles_top_menu_item', 'modules/?r=articles/index/|modules/?r=articles/', @iTMOrder+1, 'non,memb', '', '', '', 1, 1, 1, 'top', 'modules/boonex/articles/|top_menu_icon.png', 0, ''); 
    1012 
    1113SET @iTMParentId = LAST_INSERT_ID( ); 
    1214INSERT INTO `sys_menu_top` (`Parent`, `Name`, `Caption`, `Link`, `Order`, `Visible`, `Target`, `Onclick`, `Check`, `Editable`, `Deletable`, `Active`, `Type`, `Picture`, `BQuickLink`, `Statistics`) VALUES 
    13 (@iTMParentId, 'ArticlesHome', '_articles_home_top_menu_sitem', 'modules/?r=[uri]/index/', 0, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
    14 (@iTMParentId, 'ArticlesArchive', '_articles_archive_top_menu_sitem', 'modules/?r=[uri]/archive/', 1, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
    15 (@iTMParentId, 'ArticlesTop', '_articles_top_top_menu_sitem', 'modules/?r=[uri]/top/', 2, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
    16 (@iTMParentId, 'ArticlesPopular', '_articles_popular_top_menu_sitem', 'modules/?r=[uri]/popular/', 3, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
    17 (@iTMParentId, 'ArticlesFeatured', '_articles_featured_top_menu_sitem', 'modules/?r=[uri]/featured/', 4, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
    18 (@iTMParentId, 'ArticlesTags', '_articles_tags_top_menu_sitem', 'modules/?r=[uri]/tags/', 5, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
    19 (@iTMParentId, 'ArticlesCategories', '_articles_categories_top_menu_sitem', 'modules/?r=[uri]/categories/', 6, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
    20 (@iTMParentId, 'ArticlesCalendar', '_articles_calendar_top_menu_sitem', 'modules/?r=[uri]/calendar/', 7, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
    21 (@iTMParentId, 'ArticlesSearch', '_articles_search_top_menu_sitem', 'searchKeyword.php?type=[name]', 8, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
    22 (0, '[db_prefix]_view', '_articles_view_top_menu_sitem', 'modules/?r=[uri]/view/', 0, 'non,memb', '', '', '', 1, 1, 1, 'system', 'modules/[path]|top_menu_icon.png', 0, ''); 
     15(@iTMParentId, 'ArticlesHome', '_articles_home_top_menu_sitem', 'modules/?r=articles/index/', 0, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
     16(@iTMParentId, 'ArticlesArchive', '_articles_archive_top_menu_sitem', 'modules/?r=articles/archive/', 1, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
     17(@iTMParentId, 'ArticlesTop', '_articles_top_top_menu_sitem', 'modules/?r=articles/top/', 2, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
     18(@iTMParentId, 'ArticlesPopular', '_articles_popular_top_menu_sitem', 'modules/?r=articles/popular/', 3, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
     19(@iTMParentId, 'ArticlesFeatured', '_articles_featured_top_menu_sitem', 'modules/?r=articles/featured/', 4, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
     20(@iTMParentId, 'ArticlesTags', '_articles_tags_top_menu_sitem', 'modules/?r=articles/tags/', 5, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
     21(@iTMParentId, 'ArticlesCategories', '_articles_categories_top_menu_sitem', 'modules/?r=articles/categories/', 6, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
     22(@iTMParentId, 'ArticlesCalendar', '_articles_calendar_top_menu_sitem', 'modules/?r=articles/calendar/', 7, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
     23(@iTMParentId, 'ArticlesSearch', '_articles_search_top_menu_sitem', CONCAT('searchKeyword.php?type=', @sName), 8, 'non,memb', '', '', '', 1, 1, 1, 'custom', '', 0, ''), 
     24(0, '[db_prefix]view', '_articles_view_top_menu_sitem', 'modules/?r=articles/view/', 0, 'non,memb', '', '', '', 1, 1, 1, 'system', 'modules/boonex/articles/|top_menu_icon.png', 0, ''); 
    2325 
    2426INSERT INTO `sys_menu_member`(`Caption`, `Name`, `Icon`, `Link`, `Script`, `Eval`, `Order`, `Active`, `Editable`, `Deletable`, `Target`, `Position`, `Type`) VALUES 
    25 ('_articles_ext_menu_item', 'Articles', '', 'modules/?r=[uri]/', '', '', 6, '1', 0, 0, '', 'bottom', 'link'); 
     27('_articles_ext_menu_item', 'Articles', '', 'modules/?r=articles/', '', '', 6, '1', 0, 0, '', 'bottom', 'link'); 
    2628 
    2729 
     
    3436SET @iPCOrder = (SELECT MAX(`Order`) FROM `sys_page_compose` WHERE `Page`='index' AND `Column`='1'); 
    3537INSERT INTO `sys_page_compose` (`Page`, `PageWidth`, `Desc`, `Caption`, `Column`, `Order`, `Func`, `Content`, `DesignBox`, `ColWidth`, `Visible`, `MinWidth`) VALUES 
    36 ('index', '998px', 'Show list of featured articles', '_articles_bcaption_featured', 1, @iPCOrder+1, 'PHP', 'return BxDolService::call(\'[uri]\', \'featured_block_index\', array(0, 0, false));', 1, 66, 'non,memb', 0), 
    37 ('index', '998px', 'Show list of latest articles', '_articles_bcaption_latest', 1, @iPCOrder+2, 'PHP', 'return BxDolService::call(\'[uri]\', \'archive_block_index\', array(0, 0, false));', 1, 66, 'non,memb', 0), 
    38 ('member', '998px', 'Show list of featured articles', '_articles_bcaption_featured', 2, 3, 'PHP', 'return BxDolService::call(\'[uri]\', \'featured_block_member\', array(0, 0, false));', 1, 66, 'memb', 0), 
    39 ('member', '998px', 'Show list of latest articles', '_articles_bcaption_latest', 2, 4, 'PHP', 'return BxDolService::call(\'[uri]\', \'archive_block_member\', array(0, 0, false));', 1, 66, 'memb', 0), 
     38('index', '998px', 'Show list of featured articles', '_articles_bcaption_featured', 1, @iPCOrder+1, 'PHP', 'return BxDolService::call(\'articles\', \'featured_block_index\', array(0, 0, false));', 1, 66, 'non,memb', 0), 
     39('index', '998px', 'Show list of latest articles', '_articles_bcaption_latest', 1, @iPCOrder+2, 'PHP', 'return BxDolService::call(\'articles\', \'archive_block_index\', array(0, 0, false));', 1, 66, 'non,memb', 0), 
     40('member', '998px', 'Show list of featured articles', '_articles_bcaption_featured', 2, 3, 'PHP', 'return BxDolService::call(\'articles\', \'featured_block_member\', array(0, 0, false));', 1, 66, 'memb', 0), 
     41('member', '998px', 'Show list of latest articles', '_articles_bcaption_latest', 2, 4, 'PHP', 'return BxDolService::call(\'articles\', \'archive_block_member\', array(0, 0, false));', 1, 66, 'memb', 0), 
    4042('articles_single', '998px', 'Articles main content', '_articles_bcaption_view_main', 1, 0, 'Content', '', 1, 66, 'non,memb', 0), 
    4143('articles_single', '998px', 'Articles comments', '_articles_bcaption_view_comment', 1, 1, 'Comment', '', 1, 66, 'non,memb', 0), 
     
    4850SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group`='modules'); 
    4951INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES  
    50 ('modules', '[name]', '_articles_adm_stg_cpt_type', 'modules/[path]|std-mi.png', IF(NOT ISNULL(@iTypeOrder), @iTypeOrder + 1, 1)); 
     52('modules', @sName, '_articles_adm_stg_cpt_type', 'modules/boonex/articles/|std-mi.png', IF(NOT ISNULL(@iTypeOrder), @iTypeOrder + 1, 1)); 
    5153SET @iTypeId = LAST_INSERT_ID(); 
    5254 
    5355INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order` )   
    54 VALUES (@iTypeId, '[name]_general', '_articles_adm_stg_cpt_category_general', 1); 
     56VALUES (@iTypeId, CONCAT(@sName, '_general'), '_articles_adm_stg_cpt_category_general', 1); 
    5557SET @iCategoryId = LAST_INSERT_ID(); 
    5658 
     
    8284 
    8385 
    84 INSERT INTO `sys_permalinks`(`standard`, `permalink`, `check`) VALUES('modules/?r=[uri]/', 'm/[uri]/', 'permalinks_module_articles'); 
     86INSERT INTO `sys_permalinks`(`standard`, `permalink`, `check`) VALUES('modules/?r=articles/', 'm/articles/', 'permalinks_module_articles'); 
    8587 
    8688 
    8789INSERT INTO `sys_objects_cmts` (`ObjectName`, `TableCmts`, `TableTrack`, `AllowTags`, `Nl2br`, `SecToEdit`, `PerView`, `IsRatable`, `ViewingThreshold`, `AnimationEffect`, `AnimationSpeed`, `IsOn`, `IsMood`, `RootStylePrefix`, `TriggerTable`, `TriggerFieldId`, `TriggerFieldComments`, `ClassName`, `ClassFile`) VALUES 
    88 ('[name]', '[db_prefix]comments', '[db_prefix]comments_track', 0, 1, 90, 10, 1, -3, 'slide', 2000, 1, 0, 'cmt', '[db_prefix]entries', 'id', 'cmts_count', 'BxArlCmts', 'modules/[path]classes/[class_prefix]Cmts.php'); 
     90(@sName, 'bx_arl_comments', 'bx_arl_comments_track', 0, 1, 90, 10, 1, -3, 'slide', 2000, 1, 0, 'cmt', 'bx_arl_entries', 'id', 'cmts_count', 'BxArlCmts', 'modules/boonex/articles/classes/BxArlCmts.php'); 
    8991 
    9092INSERT INTO `sys_objects_vote` (`ObjectName`, `TableRating`, `TableTrack`, `RowPrefix`, `MaxVotes`, `PostName`, `IsDuplicate`, `IsOn`, `className`, `classFile`, `TriggerTable`, `TriggerFieldRate`, `TriggerFieldRateCount`, `TriggerFieldId`, `OverrideClassName`, `OverrideClassFile`) VALUES 
    91 ('[name]', '[db_prefix]voting', '[db_prefix]voting_track', 'arl_', 5, 'vote_send_result', 'BX_PERIOD_PER_VOTE', 1, '', '', '[db_prefix]entries', 'rate', 'rate_count', 'id', '[class_prefix]Voting', 'modules/[path]classes/[class_prefix]Voting.php'); 
     93(@sName, 'bx_arl_voting', 'bx_arl_voting_track', 'arl_', 5, 'vote_send_result', 'BX_PERIOD_PER_VOTE', 1, '', '', 'bx_arl_entries', 'rate', 'rate_count', 'id', 'BxArlVoting', 'modules/boonex/articles/classes/BxArlVoting.php'); 
    9294 
    9395INSERT INTO `sys_objects_tag` (`ObjectName`, `Query`, `PermalinkParam`, `EnabledPermalink`, `DisabledPermalink`, `LangKey`) VALUES 
    94 ('[name]', 'SELECT `tags` FROM `[db_prefix]entries` WHERE `id`={iID} AND `status`=0', 'permalinks_module_articles', 'm/[uri]/tag/{tag}', 'modules/?r=[uri]/tag/{tag}', '_articles_lcaption_tags'); 
     96(@sName, 'SELECT `tags` FROM `bx_arl_entries` WHERE `id`={iID} AND `status`=0', 'permalinks_module_articles', 'm/articles/tag/{tag}', 'modules/?r=articles/tag/{tag}', '_articles_lcaption_tags'); 
    9597 
    9698INSERT INTO `sys_objects_categories` (`ObjectName`, `Query`, `PermalinkParam`, `EnabledPermalink`, `DisabledPermalink`, `LangKey`) VALUES  
    97 ('[name]', 'SELECT `categories` FROM `[db_prefix]entries` WHERE `id`=''{iID}'' AND `status`=''0''', 'permalinks_module_articles', 'm/[uri]/category/{tag}', 'modules/?r=[uri]/category/{tag}', '_articles_lcaption_categories'); 
     99(@sName, 'SELECT `categories` FROM `bx_arl_entries` WHERE `id`=''{iID}'' AND `status`=''0''', 'permalinks_module_articles', 'm/articles/category/{tag}', 'modules/?r=articles/category/{tag}', '_articles_lcaption_categories'); 
    98100 
    99101INSERT INTO `sys_objects_search` (`ObjectName`, `Title`, `ClassName`, `ClassPath`) VALUES 
    100 ('[name]', '_articles_lcaption_search_object', '[class_prefix]SearchResult', 'modules/[path]classes/[class_prefix]SearchResult.php'); 
     102(@sName, '_articles_lcaption_search_object', 'BxArlSearchResult', 'modules/boonex/articles/classes/BxArlSearchResult.php'); 
    101103 
    102104INSERT INTO `sys_objects_views`(`name`, `table_track`, `period`, `trigger_table`, `trigger_field_id`, `trigger_field_views`, `is_on`) VALUES 
    103 ('[name]', '[db_prefix]views_track', 86400, '[db_prefix]entries', 'id', 'view_count', 1); 
     105(@sName, 'bx_arl_views_track', 86400, 'bx_arl_entries', 'id', 'view_count', 1); 
    104106 
    105107INSERT INTO `sys_objects_actions`(`Caption`, `Icon`, `Url`, `Script`, `Eval`, `Order`, `Type`, `bDisplayInSubMenuHeader`) VALUES 
    106 ('{sbs_articles_title}', 'action_subscribe.png', '', '{sbs_articles_script}', '', 1, '[name]', 0), 
    107 ('{del_articles_title}', 'action_block.png', '', '{del_articles_script}', '', 2, '[name]', 0); 
     108('{sbs_articles_title}', 'action_subscribe.png', '', '{sbs_articles_script}', '', 1, @sName, 0), 
     109('{del_articles_title}', 'action_block.png', '', '{del_articles_script}', '', 2, @sName, 0); 
    108110 
    109111 
     
    122124 
    123125INSERT INTO `sys_cron_jobs` (`name`, `time`, `class`, `file`, `eval`) VALUES 
    124 ('[name]', '*/5 * * * *', '[class_prefix]Cron', 'modules/[path]classes/[class_prefix]Cron.php', ''); 
     126(@sName, '*/5 * * * *', 'BxArlCron', 'modules/boonex/articles/classes/BxArlCron.php', ''); 
  • trunk/modules/boonex/articles/install/sql/install.sql

    r15751 r15755  
     1SET @sName = 'bx_articles'; 
     2 
     3 
    14-- 
    25-- Studio page and widget. 
    36-- 
    47INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES 
    5 (3, '[name]', '_articles_adm_page_cpt', '_articles_adm_page_cpt', 'modules/[path]|std-pi.png'); 
     8(3, @sName, '_articles_adm_page_cpt', '_articles_adm_page_cpt', 'modules/boonex/articles/|std-pi.png'); 
    69SET @iPageId = LAST_INSERT_ID(); 
    710 
     
    912SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id`=@iParentPageId); 
    1013INSERT INTO `sys_std_widgets`(`page_id`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`, `status`) VALUES 
    11 (@iPageId, CONCAT('{url_studio}module.php?name=', '[name]'), '', 'modules/[path]|std-wi.png', '_articles_adm_wgt_cpt', '', '', 2); 
     14(@iPageId, CONCAT('{url_studio}module.php?name=', @sName), '', 'modules/boonex/articles/|std-wi.png', '_articles_adm_wgt_cpt', '', '', 2); 
    1215INSERT INTO `sys_std_pages_widgets`(`page_id`, `widget_id`, `order`) VALUES 
    1316(@iParentPageId, LAST_INSERT_ID(), IF(NOT ISNULL(@iParentPageOrder), @iParentPageOrder + 1, 1)); 
     
    1518 
    1619-- 
    17 -- Table structure for table `[db_prefix]entries` 
     20-- Table structure for table `bx_arl_entries` 
    1821-- 
    19 CREATE TABLE IF NOT EXISTS `[db_prefix]entries` ( 
     22CREATE TABLE IF NOT EXISTS `bx_arl_entries` ( 
    2023  `id` int(11) unsigned NOT NULL auto_increment, 
    2124  `author_id` int(11) unsigned NOT NULL default '0',   
     
    4649 
    4750-- 
    48 -- Table structure for table `[db_prefix]comments` 
     51-- Table structure for table `bx_arl_comments` 
    4952-- 
    5053 
    51 CREATE TABLE IF NOT EXISTS `[db_prefix]comments` ( 
     54CREATE TABLE IF NOT EXISTS `bx_arl_comments` ( 
    5255  `cmt_id` int(11) NOT NULL auto_increment, 
    5356  `cmt_parent_id` int(11) NOT NULL default '0', 
     
    6568 
    6669-- 
    67 -- Table structure for table `[db_prefix]comments_track` 
     70-- Table structure for table `bx_arl_comments_track` 
    6871-- 
    6972 
    70 CREATE TABLE IF NOT EXISTS `[db_prefix]comments_track` ( 
     73CREATE TABLE IF NOT EXISTS `bx_arl_comments_track` ( 
    7174  `cmt_system_id` int(11) NOT NULL default '0', 
    7275  `cmt_id` int(11) NOT NULL default '0', 
     
    7982 
    8083-- 
    81 -- Table structure for table `[db_prefix]voting` 
     84-- Table structure for table `bx_arl_voting` 
    8285-- 
    83 CREATE TABLE `[db_prefix]voting` ( 
     86CREATE TABLE `bx_arl_voting` ( 
    8487  `arl_id` bigint(8) NOT NULL default '0', 
    8588  `arl_rating_count` int(11) NOT NULL default '0', 
     
    8992 
    9093-- 
    91 -- Table structure for table `[db_prefix]voting_track` 
     94-- Table structure for table `bx_arl_voting_track` 
    9295-- 
    93 CREATE TABLE `[db_prefix]voting_track` ( 
     96CREATE TABLE `bx_arl_voting_track` ( 
    9497  `arl_id` bigint(8) NOT NULL default '0', 
    9598  `arl_ip` varchar(20) default NULL, 
     
    99102 
    100103-- 
    101 -- Table structure for table `[db_prefix]views_track` 
     104-- Table structure for table `bx_arl_views_track` 
    102105-- 
    103 CREATE TABLE IF NOT EXISTS `[db_prefix]views_track` ( 
     106CREATE TABLE IF NOT EXISTS `bx_arl_views_track` ( 
    104107  `id` int(10) unsigned NOT NULL, 
    105108  `viewer` int(10) unsigned NOT NULL, 
     
    111114 
    112115INSERT INTO `sys_categories` (`Category`, `ID`, `Type`, `Owner`, `Status`) VALUES  
    113 ('Default', '0', '[name]', '0', 'active'), 
    114 ('BoonEx Products', '0', '[name]', '0', 'active'), 
    115 ('Some Useful Info', '0', '[name]', '0', 'active'); 
     116('Default', '0', @sName, '0', 'active'), 
     117('BoonEx Products', '0', @sName, '0', 'active'), 
     118('Some Useful Info', '0', @sName, '0', 'active'); 
    116119 
    117120 
    118121INSERT INTO `sys_sbs_types`(`unit`, `action`, `template`, `params`) VALUES 
    119 ('[name]', '', '', 'return BxDolService::call(\'articles\', \'get_subscription_params\', array($arg1, $arg2, $arg3));'), 
    120 ('[name]', 'commentPost', 't_sbsArticlesComments', 'return BxDolService::call(\'articles\', \'get_subscription_params\', array($arg1, $arg2, $arg3));'), 
    121 ('[name]', 'rate', 't_sbsArticlesRates', 'return BxDolService::call(\'articles\', \'get_subscription_params\', array($arg1, $arg2, $arg3));'); 
     122(@sName, '', '', 'return BxDolService::call(\'articles\', \'get_subscription_params\', array($arg1, $arg2, $arg3));'), 
     123(@sName, 'commentPost', 't_sbsArticlesComments', 'return BxDolService::call(\'articles\', \'get_subscription_params\', array($arg1, $arg2, $arg3));'), 
     124(@sName, 'rate', 't_sbsArticlesRates', 'return BxDolService::call(\'articles\', \'get_subscription_params\', array($arg1, $arg2, $arg3));'); 
  • trunk/modules/boonex/articles/install/sql/uninstall.sql

    r15751 r15755  
     1SET @sName = 'bx_articles'; 
     2 
    13-- 
    24-- Studio page and widget. 
     
    46DELETE FROM `tp`, `tw`, `tpw` 
    57USING `sys_std_pages` AS `tp`, `sys_std_widgets` AS `tw`, `sys_std_pages_widgets` AS `tpw` 
    6 WHERE `tp`.`id`=`tw`.`page_id` AND `tw`.`id`=`tpw`.`widget_id` AND `tp`.`name`='[name]'; 
     8WHERE `tp`.`id`=`tw`.`page_id` AND `tw`.`id`=`tpw`.`widget_id` AND `tp`.`name`=@sName; 
    79 
    8 DROP TABLE IF EXISTS `[db_prefix]entries`; 
    9 DROP TABLE IF EXISTS `[db_prefix]comments`; 
    10 DROP TABLE IF EXISTS `[db_prefix]comments_track`; 
    11 DROP TABLE IF EXISTS `[db_prefix]voting`; 
    12 DROP TABLE IF EXISTS `[db_prefix]voting_track`; 
    13 DROP TABLE IF EXISTS `[db_prefix]views_track`; 
     10DROP TABLE IF EXISTS `bx_arl_entries`; 
     11DROP TABLE IF EXISTS `bx_arl_comments`; 
     12DROP TABLE IF EXISTS `bx_arl_comments_track`; 
     13DROP TABLE IF EXISTS `bx_arl_voting`; 
     14DROP TABLE IF EXISTS `bx_arl_voting_track`; 
     15DROP TABLE IF EXISTS `bx_arl_views_track`; 
    1416 
    1517 
    16 DELETE FROM `sys_categories` WHERE `Type` = '[name]'; 
     18DELETE FROM `sys_categories` WHERE `Type`=@sName; 
    1719 
    1820 
    19 DELETE FROM `sys_sbs_entries` USING `sys_sbs_types`, `sys_sbs_entries` WHERE `sys_sbs_types`.`id`=`sys_sbs_entries`.`subscription_id` AND `sys_sbs_types`.`unit`='[name]'; 
    20 DELETE FROM `sys_sbs_types` WHERE `unit`='[name]'; 
     21DELETE FROM `sys_sbs_entries` USING `sys_sbs_types`, `sys_sbs_entries` WHERE `sys_sbs_types`.`id`=`sys_sbs_entries`.`subscription_id` AND `sys_sbs_types`.`unit`=@sName; 
     22DELETE FROM `sys_sbs_types` WHERE `unit`=@sName; 
Note: See TracChangeset for help on using the changeset viewer.