This commit is contained in:
Bellord
2026-09-12 10:14:11 +03:00
parent 47271d9413
commit e70a98e7b9
6 changed files with 241 additions and 127 deletions
+6 -5
View File
@@ -1,13 +1,14 @@
<?php
use Bitrix\Main\EventManager;
use Bitrix\Main\Loader;
IncludeModuleLangFile(__FILE__);
class bx_nullable extends \CModule
{
public $module = [];
var $MODULE_GROUP_RIGHTS = 'Y';
public $MODULE_GROUP_RIGHTS = 'Y';
public function __construct()
{
@@ -37,15 +38,15 @@ class bx_nullable extends \CModule
if (is_array($this->module['deps'])) {
foreach ($this->module['deps'] as $moduleId) {
if (!\Bitrix\Main\Loader::includeModule($moduleId)) {
if (!Loader::includeModule($moduleId)) {
$APPLICATION->ThrowException("Module {$moduleId} not installed!");
return false;
}
}
}
if (!CheckVersion(PHP_VERSION, '5.4.0')) {
$APPLICATION->ThrowException('Php version required more 5.4.0');
if (!(version_compare(PHP_VERSION, '8.0.0') >= 0)) {
$APPLICATION->ThrowException('Php version required more 8.0.0');
return false;
}
@@ -70,7 +71,7 @@ class bx_nullable extends \CModule
public function InstallCatalogExport()
{
if (is_dir(__DIR__ . '/catalog_export') && \Bitrix\Main\Loader::includeModule('catalog')) {
if (is_dir(__DIR__ . '/catalog_export') && Loader::includeModule('catalog')) {
CopyDirFiles(__DIR__ . '/catalog_export', $_SERVER['DOCUMENT_ROOT'] . CATALOG_PATH2EXPORTS, true, true);
}
return true;