Skip to content

Commit ad36484

Browse files
committed
upd to 1.1.9
1 parent 2fcc69e commit ad36484

File tree

17 files changed

+121
-16
lines changed

17 files changed

+121
-16
lines changed

.github/FUNDING.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# github: [darkfriend]
44
custom: [
5-
'yasobe.ru/na/thankyou_bitrix',
6-
'paypal.me/darkfriend'
5+
'https://sobe.ru/na/thankyou_bitrix',
6+
'https://paypal.me/darkfriend',
7+
'https://www.tinkoff.ru/cf/36wVfnMf7mo'
78
]

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Лог обновлений модуля
22

3+
## Версия 1.1.9 (29 июня 2022)
4+
5+
### Изменения
6+
* исправлен баг при сохранении настроек модуля
7+
8+
### Миграция используя github
9+
* скачать версию 1.1.9 из [releases](https://github.com/darkfriend/dev2fun.multidomain/releases)
10+
* на сервере заменить файлы в папке `/bitrix/modules/dev2fun.multidomain` на новые файлы из папки в нужной (в которой работает ваш сайт) кодировке
11+
* готово
12+
313
## Версия 1.1.8 (22 мая 2022)
414

515
### Изменения

migrations/1.1.9.php

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?php
2+
/**
3+
* @author dev2fun (darkfriend)
4+
* @copyright darkfriend <hi@darkfriend.ru>
5+
* @version 1.1.9
6+
*/
7+
8+
require_once $_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_before.php";
9+
10+
\Bitrix\Main\Loader::includeModule('main');
11+
\Bitrix\Main\Loader::includeModule('dev2fun.multidomain');
12+
\Bitrix\Main\Loader::registerAutoLoadClasses(
13+
"dev2fun.multidomain",
14+
array(
15+
'Dev2fun\MultiDomain\Base' => 'include.php',
16+
'Dev2fun\MultiDomain\SubDomain' => 'classes/general/SubDomain.php',
17+
'Dev2fun\MultiDomain\Seo' => 'classes/general/Seo.php',
18+
'Dev2fun\MultiDomain\Geo' => 'classes/general/Geo.php',
19+
'Dev2fun\MultiDomain\HLHelpers' => 'lib/HLHelpers.php',
20+
'Dev2fun\MultiDomain\Config' => 'classes/general/Config.php',
21+
'Dev2fun\MultiDomain\TemplateSeo' => 'classes/general/TemplateSeo.php',
22+
'Dev2fun\MultiDomain\TabOptions' => 'classes/general/TabOptions.php',
23+
'Dev2fun\MultiDomain\LangData' => 'classes/general/LangData.php',
24+
)
25+
);
26+
27+
$moduleId = \Dev2fun\MultiDomain\Base::$module_id;
28+
29+
// path to module dev2fun.multidomain
30+
$pathToModule = $_SERVER["DOCUMENT_ROOT"].'/bitrix/modules/dev2fun.multidomain';
31+
32+
// remove old vue-js files
33+
DeleteDirFilesEx($_SERVER["DOCUMENT_ROOT"] . "/bitrix/js/" . $moduleId.'/vue');
34+
35+
// copy vue-js files
36+
if (!CopyDirFiles($pathToModule . "/frontend/dist", $_SERVER["DOCUMENT_ROOT"] . "/bitrix/js/" . $moduleId.'/vue', true, true)) {
37+
throw new Exception('ERRORS_SAVE_FILE '.$_SERVER['DOCUMENT_ROOT'] . 'bitrix/js/' . $moduleId.'/vue');
38+
}
39+
40+
\Dev2fun\MultiDomain\Base::ShowThanksNotice();
41+
42+
die("1.1.9 - Success");

utf8/dev2fun.multidomain/classes/general/Site.php

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
33
* @author darkfriend
4-
* @version 1.1.8
4+
* @version 1.1.9
55
* @since 1.0.0
66
*/
77

@@ -12,6 +12,8 @@ class Site
1212
{
1313
/** @var array */
1414
protected static $currentSite;
15+
/** @var string */
16+
protected static $defaultSite;
1517

1618
/**
1719
* @param array $filter
@@ -58,4 +60,26 @@ public static function getCurrent()
5860

5961
return self::$currentSite;
6062
}
63+
64+
/**
65+
* @return string
66+
* @throws \Bitrix\Main\SystemException
67+
*/
68+
public static function getDefault()
69+
{
70+
if(self::$defaultSite === null) {
71+
$currentSite = current(
72+
array_filter(
73+
static::all(['DEF'=>'Y']),
74+
function($item) {
75+
return $item['DEF'] === 'Y';
76+
}
77+
)
78+
);
79+
80+
self::$defaultSite = isset($currentSite['LID']) ? $currentSite['LID'] : '';
81+
}
82+
83+
return self::$defaultSite;
84+
}
6185
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = '1.1.2';
1+
module.exports = '1.1.3';

utf8/dev2fun.multidomain/include/staticVersion.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
* Time: 1:18
77
*/
88

9-
return '1.1.2';
9+
return '1.1.3';
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22
$arModuleVersion = [
3-
"VERSION" => "1.1.8",
4-
"VERSION_DATE" => "2022-05-22 17:20",
3+
"VERSION" => "1.1.9",
4+
"VERSION_DATE" => "2022-06-29 21:20",
55
];

utf8/dev2fun.multidomain/options.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* @author dev2fun (darkfriend)
44
* @copyright darkfriend
5-
* @version 1.1.0
5+
* @version 1.1.9
66
*/
77

88
defined('B_PROLOG_INCLUDED') and (B_PROLOG_INCLUDED === true) or die();
@@ -360,10 +360,12 @@
360360
// "/bitrix/modules/dev2fun.multidomain/frontend/dist/js/polyfill.{$staticVersion}.bundle.js",
361361
//];
362362
foreach ($vueScripts as $script) {
363+
// echo '<script src="'.$script.'"></script>';
363364
$assets->addJs($script);
364365
}
365366
$config = Config::getInstance();
366-
$siteId = \Dev2fun\MultiDomain\Site::getCurrent();
367+
$siteId = \Dev2fun\MultiDomain\Site::getDefault();
368+
367369
$mappingList = $config->get("mapping_list", [['KEY' => '', 'SUBNAME' => '']], $siteId);
368370
$excludeList = $config->get("exclude_path", ['\/(bitrix|local)\/(admin|tools)\/'], $siteId);
369371
$hl = \Darkfriend\HLHelpers::getInstance();

win1251/dev2fun.multidomain/classes/general/Site.php

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
33
* @author darkfriend
4-
* @version 1.1.8
4+
* @version 1.1.9
55
* @since 1.0.0
66
*/
77

@@ -12,6 +12,8 @@ class Site
1212
{
1313
/** @var array */
1414
protected static $currentSite;
15+
/** @var string */
16+
protected static $defaultSite;
1517

1618
/**
1719
* @param array $filter
@@ -58,4 +60,26 @@ public static function getCurrent()
5860

5961
return self::$currentSite;
6062
}
63+
64+
/**
65+
* @return string
66+
* @throws \Bitrix\Main\SystemException
67+
*/
68+
public static function getDefault()
69+
{
70+
if(self::$defaultSite === null) {
71+
$currentSite = current(
72+
array_filter(
73+
static::all(['DEF'=>'Y']),
74+
function($item) {
75+
return $item['DEF'] === 'Y';
76+
}
77+
)
78+
);
79+
80+
self::$defaultSite = isset($currentSite['LID']) ? $currentSite['LID'] : '';
81+
}
82+
83+
return self::$defaultSite;
84+
}
6185
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = '1.1.2';
1+
module.exports = '1.1.3';

win1251/dev2fun.multidomain/include/staticVersion.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
* Time: 1:18
77
*/
88

9-
return '1.1.2';
9+
return '1.1.3';
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22
$arModuleVersion = [
3-
"VERSION" => "1.1.8",
4-
"VERSION_DATE" => "2022-05-22 17:20",
3+
"VERSION" => "1.1.9",
4+
"VERSION_DATE" => "2022-06-29 21:20",
55
];

win1251/dev2fun.multidomain/options.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/**
33
* @author dev2fun (darkfriend)
44
* @copyright darkfriend
5-
* @version 1.1.0
5+
* @version 1.1.9
66
*/
77

88
defined('B_PROLOG_INCLUDED') and (B_PROLOG_INCLUDED === true) or die();
@@ -360,10 +360,12 @@
360360
// "/bitrix/modules/dev2fun.multidomain/frontend/dist/js/polyfill.{$staticVersion}.bundle.js",
361361
//];
362362
foreach ($vueScripts as $script) {
363+
// echo '<script src="'.$script.'"></script>';
363364
$assets->addJs($script);
364365
}
365366
$config = Config::getInstance();
366-
$siteId = \Dev2fun\MultiDomain\Site::getCurrent();
367+
$siteId = \Dev2fun\MultiDomain\Site::getDefault();
368+
367369
$mappingList = $config->get("mapping_list", [['KEY' => '', 'SUBNAME' => '']], $siteId);
368370
$excludeList = $config->get("exclude_path", ['\/(bitrix|local)\/(admin|tools)\/'], $siteId);
369371
$hl = \Darkfriend\HLHelpers::getInstance();

0 commit comments

Comments
 (0)