fix
This commit is contained in:
+6
-5
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user