Skip to content

Commit

Permalink
Upgrade script
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Trofimov committed Feb 8, 2019
1 parent a23d6c1 commit 4f2ffca
Show file tree
Hide file tree
Showing 59 changed files with 587 additions and 0 deletions.
23 changes: 23 additions & 0 deletions upgrade/files/7.3.5-7.4.0/lang_ru.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

$aLangContent = array(

// ================ ADDED KEYS ================

'_adm_txt_mlevels_icon_info_edit' => 'Оставьте пустым, если Вы хотите использовать ранее загруженное изображение.',
'_mma_send_friend_request' => 'посылать предложения дружбы',
'_sys_btn_thumbnail_change' => 'Изменить миниатюру',
'_sys_export_success' => 'Ссылка на скачивание данных была отправлена на емейл: {0}',
'_sys_wrn_disabled_scripts' => 'Ваш браузер не поддерживает скрипты!',

// ================ CHANGED KEYS ================

'_ATT_ACTIVE' => '<a href="pedit.php?ID={0}">Изменить</a>
<span class="sys-bullet"></span>
<a href="javascript:void(0);" onclick="javascript:loadHtmlInPopup(\'explanation_popup\', \'explanation.php?explain=Active\');">Пояснение</a>
<span class="sys-bullet"></span>
<a href="change_status.php">Спрятать</a>
<span class="sys-bullet"></span>
<a href="javascript:void(0);" onclick="bx_export_user_data_popup()">Экспортировать персональные данные</a>',

);
7 changes: 7 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/ads/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@

DELETE FROM `sys_objects_exports` WHERE `object` = 'bx_ads';

SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`);
INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES
('bx_ads', '_bx_ads_Ads', 'BxAdsExport', 'modules/boonex/ads/classes/BxAdsExport.php', @iMaxOrderExports, 1);


-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'ads' AND `version` = '1.3.5';
Expand Down
9 changes: 9 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/articles/lang_en.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$aLangContent = array(

// ================ ADDED KEYS ==================

'_articles' => 'Articles',

);
9 changes: 9 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/articles/lang_ru.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$aLangContent = array(

// ================ ADDED KEYS ==================

'_articles' => 'Статьи',

);
7 changes: 7 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/articles/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@

DELETE FROM `sys_objects_exports` WHERE `object` = 'bx_articles';

SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`);
INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES
('bx_articles', '_articles', 'BxArlExport', 'modules/boonex/articles/classes/BxArlExport.php', @iMaxOrderExports, 1);


-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'articles' AND `version` = '1.3.5';
Expand Down
6 changes: 6 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/avatar/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@

DELETE FROM `sys_objects_exports` WHERE `object` = 'bx_avatar';

SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`);
INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES
('bx_avatar', '_bx_ava_avatar', 'BxAvaExport', 'modules/boonex/avatar/classes/BxAvaExport.php', @iMaxOrderExports, 1);

-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'avatar' AND `version` = '1.3.5';
Expand Down
8 changes: 8 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/blogs/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@


DELETE FROM `sys_objects_exports` WHERE `object` = 'bx_blogs';

SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`);
INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES
('bx_blogs', '_bx_blog_Blogs', 'BxBlogsExport', 'modules/boonex/blogs/classes/BxBlogsExport.php', @iMaxOrderExports, 1);


-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'blogs' AND `version` = '1.3.5';
Expand Down
8 changes: 8 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/custom_rss/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@


DELETE FROM `sys_objects_exports` WHERE `object` = 'bx_crss';

SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`);
INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES
('bx_crss', '_sys_module_custom_rss', 'BxCRSSExport', 'modules/boonex/custom_rss/classes/BxCRSSExport.php', @iMaxOrderExports, 1);


-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'custom_rss' AND `version` = '1.3.5';
Expand Down
8 changes: 8 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/dolphcon/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@


DELETE FROM `sys_objects_exports` WHERE `object` = 'bx_dolphcon';

SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`);
INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES
('bx_dolphcon', '_sys_module_dolphcon', 'BxDolphConExport', 'modules/boonex/dolphin_connect/classes/BxDolphConExport.php', @iMaxOrderExports, 1);


-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'dolphcon' AND `version` = '1.3.5';
Expand Down
25 changes: 25 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/events/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@


SET @iCategId = (SELECT `ID` FROM `sys_options_cats` WHERE `name` = 'Events' LIMIT 1);

DELETE FROM `sys_options` WHERE `Name` = 'bx_events_only_upcoming_events_on_map';

INSERT INTO `sys_options` (`Name`, `VALUE`, `kateg`, `desc`, `Type`, `check`, `err_text`, `order_in_kateg`, `AvailableValues`) VALUES
('bx_events_only_upcoming_events_on_map', '', @iCategId, 'Display only upcoming and current events on the map', 'checkbox', '', '', '0', '');


SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_events_set_param' LIMIT 1);
DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;

INSERT INTO `sys_alerts_handlers` VALUES (NULL, 'bx_events_set_param', '', '', 'if (''bx_events_only_upcoming_events_on_map'' == $this->aExtras[''name'']) BxDolService::call(''events'', ''set_upcoming_events_on_map'');');
SET @iHandler := LAST_INSERT_ID();
INSERT INTO `sys_alerts` VALUES (NULL , 'system', 'set_param', @iHandler);


DELETE FROM `sys_objects_exports` WHERE `object` = 'bx_events';

SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`);
INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES
('bx_events', '_bx_events', 'BxEventsExport', 'modules/boonex/events/classes/BxEventsExport.php', @iMaxOrderExports, 1);


-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'events' AND `version` = '1.3.5';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$aLangContent = array(

// ================ CHANGED KEYS ==================

'_bx_facebook_information_block' => 'To get your "App ID" and "App Secret", you need to <a href="https://developers.facebook.com/apps/" target="_blank">make Facebook app</a>. <br /><br />Please follow <a href="https://www.boonex.com/forums/topic/How-to-setup-Facebook-Connect-module.htm" target="_blank">these instructions</a> on how to create and setup the app. <br /><br />Your "Site URL" for the app: <b>{0}</b> <br />Your "OAuth Redirect URI" for the app: <b>{1}</b> <br /><br />After completing these steps, insert your "App ID" and "App Secret" below:',

);
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$aLangContent = array(

// ================ CHANGED KEYS ==================

'_bx_facebook_information_block' => 'Чтобы получить "App ID" и "App Secret", нужно <a href="https://developers.facebook.com/apps/" target="_blank">создать новое приложение</a>. <br /><br /><a href="https://www.boonex.com/forums/topic/How-to-setup-Facebook-Connect-module.htm" target="_blank">Инструкции по созданию Facebook приложения</a> <br /><br />Значение поля "Site URL" для приложения: <b>{0}</b> <br />Значение поля "URI перенаправления для OAuth" для приложения: <b>{1}</b> <br /><br />После выполнения этих шагов укажите "API Key" и "App Secret" в форме ниже:',

);
8 changes: 8 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/facebook_connect/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@


DELETE FROM `sys_objects_exports` WHERE `object` = 'bx_facebook';

SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`);
INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES
('bx_facebook', '_sys_module_facebook_connect', 'BxFaceBookConnectExport', 'modules/boonex/facebook_connect/classes/BxFaceBookConnectExport.php', @iMaxOrderExports, 1);


-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'facebook_connect' AND `version` = '1.3.5';
Expand Down
9 changes: 9 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/feedback/lang_en.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$aLangContent = array(

// ================ ADDED KEYS ==================

'_feedback' => 'Feedback',

);
9 changes: 9 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/feedback/lang_ru.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$aLangContent = array(

// ================ ADDED KEYS ==================

'_feedback' => 'Отзывы',

);
8 changes: 8 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/feedback/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@


DELETE FROM `sys_objects_exports` WHERE `object` = 'bx_feedback';

SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`);
INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES
('bx_feedback', '_feedback', 'BxFdbExport', 'modules/boonex/feedback/classes/BxFdbExport.php', @iMaxOrderExports, 1);


-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'feedback' AND `version` = '1.3.5';
Expand Down
9 changes: 9 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/files/lang_en.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$aLangContent = array(

// ================ DELETED KEYS ==================
/*
'_bx_files_i_have_the_right_to_distribute' => 'I have the right to distribute these files',
*/
);
9 changes: 9 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/files/lang_ru.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$aLangContent = array(

// ================ DELETED KEYS ==================
/*
'_bx_files_i_have_the_right_to_distribute' => 'У меня есть право распространять эти файлы',
*/
);
11 changes: 11 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/files/script.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

if ($this->oDb->getOne("SELECT COUNT(*) AS `count` FROM `bx_files_main` GROUP BY `Uri` ORDER BY `count` DESC LIMIT 1") <= 1) {

if ($this->oDb->isIndexExists('bx_files_main', 'Uri'))
$this->oDb->res("ALTER TABLE `bx_files_main` DROP INDEX `Uri`");

$this->oDb->res("ALTER TABLE `bx_files_main` ADD UNIQUE (`Uri`)");
}

return true;
12 changes: 12 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/files/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@


DELETE FROM `sys_objects_exports` WHERE `object` = '[db_prefix]';

SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`);
INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES
('[db_prefix]', '_bx_files', 'BxFilesExport', 'modules/boonex/files/classes/BxFilesExport.php', @iMaxOrderExports, 1);


DELETE `sys_localization_strings` FROM `sys_localization_strings`, `sys_localization_keys` WHERE `sys_localization_keys`.`ID` = `sys_localization_strings`.`IDKey` AND `sys_localization_keys`.`Key` IN('_bx_files_i_have_the_right_to_distribute');
DELETE FROM `sys_localization_keys` WHERE `Key` IN('_bx_files_i_have_the_right_to_distribute');


-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'files' AND `version` = '1.3.5';
Expand Down
9 changes: 9 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/forum/lang_en.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$aLangContent = array(

// ================ CHANGED KEYS ==================

'_mma_forum_del_topics' => 'forum delete topics',

);
8 changes: 8 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/forum/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@


DELETE FROM `sys_objects_exports` WHERE `object` = 'bx_forum';

SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`);
INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES
('bx_forum', '_sys_module_forum', 'BxForumExport', 'modules/boonex/forum/classes/BxForumExport.php', @iMaxOrderExports, 1);


-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'forum' AND `version` = '1.3.5';
Expand Down
8 changes: 8 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/groups/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@


DELETE FROM `sys_objects_exports` WHERE `object` = 'bx_groups';

SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`);
INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES
('bx_groups', '_sys_module_groups', 'BxGroupsExport', 'modules/boonex/groups/classes/BxGroupsExport.php', @iMaxOrderExports, 1);


-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'groups' AND `version` = '1.3.5';
Expand Down
19 changes: 19 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/h5av/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@


SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_h5av_video_embed' LIMIT 1);
DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;

INSERT INTO `sys_alerts_handlers` VALUES (NULL, 'bx_h5av_video_embed', '', '', 'BxDolService::call(''h5av'', ''response_video_embed'', array($this));');
SET @iHandler := LAST_INSERT_ID();
INSERT INTO `sys_alerts` VALUES (NULL , 'bx_videos', 'embed_code', @iHandler);


SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_h5av_audio_embed' LIMIT 1);
DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;

INSERT INTO `sys_alerts_handlers` VALUES (NULL, 'bx_h5av_audio_embed', '', '', 'BxDolService::call(''h5av'', ''response_audio_embed'', array($this));');
SET @iHandler := LAST_INSERT_ID();
INSERT INTO `sys_alerts` VALUES (NULL , 'bx_sounds', 'embed_code', @iHandler);


-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'h5av' AND `version` = '1.3.5';
Expand Down
9 changes: 9 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/news/lang_en.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$aLangContent = array(

// ================ ADDED KEYS ==================

'_news' => 'News',

);
9 changes: 9 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/news/lang_ru.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$aLangContent = array(

// ================ ADDED KEYS ==================

'_news' => 'Новости',

);
8 changes: 8 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/news/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@


DELETE FROM `sys_objects_exports` WHERE `object` = 'bx_news';

SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`);
INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES
('bx_news', '_news', 'BxNewsExport', 'modules/boonex/news/classes/BxNewsExport.php', @iMaxOrderExports, 1);


-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'news' AND `version` = '1.3.5';
Expand Down
9 changes: 9 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/payflow/lang_en.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$aLangContent = array(

// ================ ADDED KEYS ==================

'_bx_pfw' => 'PayPal PayFlow Pro',

);
9 changes: 9 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/payflow/lang_ru.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?php

$aLangContent = array(

// ================ ADDED KEYS ==================

'_bx_pfw' => 'PayPal PayFlow Pro',

);
10 changes: 10 additions & 0 deletions upgrade/files/7.3.5-7.4.0/modules/payflow/sql.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@

SET @sModuleName = 'bx_payflow';


DELETE FROM `sys_objects_exports` WHERE `object` = @sModuleName;

SET @iMaxOrderExports = (SELECT MAX(`order`)+1 FROM `sys_objects_exports`);
INSERT INTO `sys_objects_exports` (`object`, `title`, `class_name`, `class_file`, `order`, `active`) VALUES
(@sModuleName, '_bx_pfw', 'BxPfwExport', 'modules/boonex/paypal_payflow/classes/BxPfwExport.php', @iMaxOrderExports, 1);


-- update module version

UPDATE `sys_modules` SET `version` = '1.4.0' WHERE `uri` = 'payflow' AND `version` = '1.3.5';
Expand Down
Loading

0 comments on commit 4f2ffca

Please sign in to comment.