1
0
Эх сурвалжийг харах

Merge branch 'master' of https://github.com/unaio/una

AntonLV 3 жил өмнө
parent
commit
77e83c49a1

+ 17 - 17
composer.lock

@@ -22,12 +22,12 @@
             "source": {
                 "type": "git",
                 "url": "https://github.com/akeeba/s3.git",
-                "reference": "a5dbdc2cc7d5aaaf30a69bdd3648baa45faf6d85"
+                "reference": "7f5b3e929c93eb02ba24472560c0cbbef735aed9"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/akeeba/s3/zipball/a5dbdc2cc7d5aaaf30a69bdd3648baa45faf6d85",
-                "reference": "a5dbdc2cc7d5aaaf30a69bdd3648baa45faf6d85",
+                "url": "https://api.github.com/repos/akeeba/s3/zipball/7f5b3e929c93eb02ba24472560c0cbbef735aed9",
+                "reference": "7f5b3e929c93eb02ba24472560c0cbbef735aed9",
                 "shasum": ""
             },
             "require": {
@@ -64,9 +64,9 @@
             ],
             "support": {
                 "issues": "https://github.com/akeeba/s3/issues",
-                "source": "https://github.com/akeeba/s3/tree/development"
+                "source": "https://github.com/akeeba/s3/tree/2.3.1"
             },
-            "time": "2023-09-07T19:32:02+00:00"
+            "time": "2023-09-26T11:40:10+00:00"
         },
         {
             "name": "avto-dev/composer-cleanup-plugin",
@@ -215,16 +215,16 @@
         },
         {
             "name": "chargebee/chargebee-php",
-            "version": "v3.21.0",
+            "version": "v3.22.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/chargebee/chargebee-php.git",
-                "reference": "d2a8cae50b0e5799865bf4ca44cc592cb15b2f71"
+                "reference": "a64ddbdf51abc903efe881cf7a411f8ffd92193c"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/chargebee/chargebee-php/zipball/d2a8cae50b0e5799865bf4ca44cc592cb15b2f71",
-                "reference": "d2a8cae50b0e5799865bf4ca44cc592cb15b2f71",
+                "url": "https://api.github.com/repos/chargebee/chargebee-php/zipball/a64ddbdf51abc903efe881cf7a411f8ffd92193c",
+                "reference": "a64ddbdf51abc903efe881cf7a411f8ffd92193c",
                 "shasum": ""
             },
             "require": {
@@ -258,9 +258,9 @@
             ],
             "support": {
                 "issues": "https://github.com/chargebee/chargebee-php/issues",
-                "source": "https://github.com/chargebee/chargebee-php/tree/v3.21.0"
+                "source": "https://github.com/chargebee/chargebee-php/tree/v3.22.0"
             },
-            "time": "2023-09-05T11:15:45+00:00"
+            "time": "2023-09-26T07:58:55+00:00"
         },
         {
             "name": "curl/cacert",
@@ -1380,16 +1380,16 @@
         },
         {
             "name": "psr/http-client",
-            "version": "1.0.2",
+            "version": "1.0.3",
             "source": {
                 "type": "git",
                 "url": "https://github.com/php-fig/http-client.git",
-                "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31"
+                "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/php-fig/http-client/zipball/0955afe48220520692d2d09f7ab7e0f93ffd6a31",
-                "reference": "0955afe48220520692d2d09f7ab7e0f93ffd6a31",
+                "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90",
+                "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90",
                 "shasum": ""
             },
             "require": {
@@ -1426,9 +1426,9 @@
                 "psr-18"
             ],
             "support": {
-                "source": "https://github.com/php-fig/http-client/tree/1.0.2"
+                "source": "https://github.com/php-fig/http-client"
             },
-            "time": "2023-04-10T20:12:12+00:00"
+            "time": "2023-09-23T14:17:50+00:00"
         },
         {
             "name": "psr/http-factory",

+ 1 - 0
sw.js.php

@@ -70,6 +70,7 @@ let coreAssets = <?php echo json_encode($aAssets); ?>;
 
 // On install, cache core assets
 self.addEventListener('install', function (event) {
+    self.skipWaiting();
     // Cache core assets
     event.waitUntil((async () => { 
         caches.open('<?php echo $sCacheName; ?>').then(function (cache) {

+ 14 - 0
upgrade/files/13.1.0.B1-13.1.0.B2/check.php

@@ -0,0 +1,14 @@
+<?php
+
+$mixCheckResult = 'Update can not be applied';
+
+if (!(PHP_VERSION_ID >= 70400)) {
+    $mixCheckResult = 'This update requires a PHP version ">= 7.4.0". You are running ' . PHP_VERSION;
+}
+else {
+    $sVer = $this->oDb->getOne("SELECT `version` FROM `sys_modules` WHERE `name` = 'system'");
+    if ('13.1.0.B1' == $sVer || '13.1.0-B1' == $sVer)
+        $mixCheckResult = true;
+}
+
+return $mixCheckResult;

+ 12 - 0
upgrade/files/13.1.0.B1-13.1.0.B2/files_delete.php

@@ -0,0 +1,12 @@
+<?php
+
+$aFilesDelete = array(
+
+//	'plugins/phpmailer/Exception.php',
+//	'plugins/phpmailer/LICENSE',
+//	'plugins/phpmailer/PHPMailer.php',
+//	'plugins/phpmailer/README.md',
+//	'plugins/phpmailer/SMTP.php',
+//	'plugins/phpmailer/VERSION',
+);
+

+ 9 - 0
upgrade/files/13.1.0.B1-13.1.0.B2/script.php

@@ -0,0 +1,9 @@
+<?php
+
+    if (!$this->oDb->isFieldExists('sys_recommendation_data', 'item_type'))
+        $this->oDb->query("ALTER TABLE `sys_recommendation_data` ADD `item_type` varchar(64) NOT NULL default '' AFTER `item_id`");
+
+    if (!$this->oDb->isFieldExists('sys_form_inputs', 'icon'))
+        $this->oDb->query("ALTER TABLE `sys_form_inputs` ADD `icon` text NOT NULL AFTER `help`");
+
+    return true;

+ 59 - 0
upgrade/files/13.1.0.B1-13.1.0.B2/sql.sql

@@ -0,0 +1,59 @@
+
+SET @sStorageEngine = (SELECT `value` FROM `sys_options` WHERE `name` = 'sys_storage_default');
+
+-- Settings
+
+SET @iTypeId = (SELECT `id` FROM `sys_options_types` WHERE `name` = 'system');
+
+DELETE FROM `sys_options_categories` WHERE `name` = 'pwa_manifest';
+INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `hidden`, `order`) VALUES (@iTypeId, 'pwa_manifest', '_adm_stg_cpt_category_pwa_manifest', 1, 2);
+SET @iCategoryId = LAST_INSERT_ID();
+
+DELETE FROM `sys_options` WHERE `name` IN('sys_pwa_manifest_name', 'sys_pwa_manifest_short_name', 'sys_pwa_manifest_description', 'sys_pwa_manifest_background_color', 'sys_pwa_manifest_theme_color');
+INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
+(@iCategoryId, 'sys_pwa_manifest_name', '_adm_stg_cpt_option_sys_pwa_manifest_name', '', 'digit', '', '', '', 1),
+(@iCategoryId, 'sys_pwa_manifest_short_name', '_adm_stg_cpt_option_sys_pwa_manifest_short_name', '', 'digit', '', '', '', 2),
+(@iCategoryId, 'sys_pwa_manifest_description', '_adm_stg_cpt_option_sys_pwa_manifest_description', '', 'text', '', '', '', 3), 
+(@iCategoryId, 'sys_pwa_manifest_background_color', '_adm_stg_cpt_option_sys_pwa_manifest_background_color', '', 'digit', '', '', '', 4),
+(@iCategoryId, 'sys_pwa_manifest_theme_color', '_adm_stg_cpt_option_sys_pwa_manifest_theme_color', '', 'digit', '', '', '', 5);
+
+DELETE FROM `sys_options_categories` WHERE `name` = 'pwa_sw';
+INSERT INTO `sys_options_categories`(`type_id`, `name`, `caption`, `hidden`, `order`) VALUES (@iTypeId, 'pwa_sw', '_adm_stg_cpt_category_pwa_sw', 1, 2);
+SET @iCategoryId = LAST_INSERT_ID();
+
+DELETE FROM `sys_options` WHERE `name` IN('sys_pwa_sw_enable', 'sys_pwa_sw_cache', 'sys_pwa_sw_offline');
+INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `extra`, `check`, `check_error`, `order`) VALUES
+(@iCategoryId, 'sys_pwa_sw_enable', '_adm_stg_cpt_option_sys_pwa_sw_enable', '', 'checkbox', '', '', '', 1),
+(@iCategoryId, 'sys_pwa_sw_cache', '_adm_stg_cpt_option_sys_pwa_sw_cache', '', 'text', '', '', '', 2), 
+(@iCategoryId, 'sys_pwa_sw_offline', '_adm_stg_cpt_option_sys_pwa_sw_offline', '', 'digit', '', '', '', 3);
+
+-- Vote and Score objects
+
+UPDATE `sys_objects_vote` SET `ClassName` = 'BxTemplCmtsVoteLikes' WHERE `Name` = 'sys_cmts';
+UPDATE `sys_objects_vote` SET `ClassName` = 'BxTemplCmtsVoteReactions' WHERE `Name` = 'sys_cmts_reactions';
+
+UPDATE `sys_objects_score` SET `class_name` = 'BxTemplCmtsScore' WHERE `name` = 'sys_cmts';
+
+-- Recomendations
+
+SET @iRecFriends = (SELECT `id` FROM `sys_objects_recommendation` WHERE `name` = 'sys_friends');
+
+DELETE FROM `sys_recommendation_criteria` WHERE `name` IN('shared_context', 'shared_location', 'last_active') AND `object_id` = @iRecFriends;
+INSERT INTO `sys_recommendation_criteria` (`object_id`, `name`, `source_type`, `source`, `params`, `weight`, `active`) VALUES
+(@iRecFriends, 'shared_context', 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:44:"get_friend_recommendations_by_shared_context";s:6:"params";a:3:{i:0;s:12:"{profile_id}";i:1;s:12:"{connection}";i:2;s:8:"{points}";}s:5:"class";s:27:"TemplServiceRecommendations";}', 'a:2:{s:6:"points";i:1;s:10:"connection";s:14:"bx_groups_fans";}', 0.20, 1),
+(@iRecFriends, 'shared_location', 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:45:"get_friend_recommendations_by_shared_location";s:6:"params";a:3:{i:0;s:12:"{profile_id}";i:1;s:8:"{radius}";i:2;s:8:"{points}";}s:5:"class";s:27:"TemplServiceRecommendations";}', 'a:2:{s:6:"radius";i:10;s:6:"points";i:1;}', 0.20, 1),
+(@iRecFriends, 'last_active', 'sql', 'SELECT `tp`.`id` AS `id`, {points} AS `value` FROM `sys_profiles` AS `tp` INNER JOIN `sys_accounts` AS `ta` ON `tp`.`account_id`=`ta`.`id` LEFT JOIN `sys_sessions` AS `ts` ON `tp`.`account_id`=`ts`.`user_id` WHERE `tp`.`id`<>{profile_id} AND `tp`.`id` NOT IN (SELECT `content` FROM `sys_profiles_conn_friends` WHERE `initiator`={profile_id} AND `mutual`=''1'') AND `tp`.`type` IN (''bx_persons'', ''bx_organizations'') ORDER BY `ts`.`date` DESC, `ta`.`logged` DESC, {order_by}', 'a:1:{s:6:"points";i:0;}', 0.1, 1);
+
+
+SET @iRecSubscriptions = (SELECT `id` FROM `sys_objects_recommendation` WHERE `name` = 'sys_subscriptions');
+
+DELETE FROM `sys_recommendation_criteria` WHERE `name` = 'shared_context' AND `object_id` = @iRecSubscriptions;
+INSERT INTO `sys_recommendation_criteria` (`object_id`, `name`, `source_type`, `source`, `params`, `weight`, `active`) VALUES
+(@iRecSubscriptions, 'shared_context', 'service', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:50:"get_subscription_recommendations_by_shared_context";s:6:"params";a:3:{i:0;s:12:"{profile_id}";i:1;s:12:"{connection}";i:2;s:8:"{points}";}s:5:"class";s:27:"TemplServiceRecommendations";}', 'a:2:{s:6:"points";i:1;s:10:"connection";s:14:"bx_groups_fans";}', 0.5, 1);
+
+
+
+-- Last step is to update current version
+
+UPDATE `sys_modules` SET `version` = '13.1.0-B2' WHERE (`version` = '13.1.0.B1' OR `version` = '13.1.0-B1') AND `name` = 'system';
+