fix
This commit is contained in:
+9
-9
@@ -6,7 +6,7 @@ IncludeModuleLangFile(__FILE__);
|
||||
|
||||
class bx_null extends \CModule
|
||||
{
|
||||
public $sys = [];
|
||||
public $module = [];
|
||||
var $MODULE_GROUP_RIGHTS = 'Y';
|
||||
|
||||
function __construct()
|
||||
@@ -16,18 +16,18 @@ class bx_null extends \CModule
|
||||
$module = json_decode(file_get_contents(__DIR__.'/../.module.json'), true);
|
||||
}
|
||||
|
||||
$this->sys = $module;
|
||||
$this->module = $module;
|
||||
|
||||
$this->MODULE_ID = $module['id'];
|
||||
$this->MODULE_VERSION = $module['version'];
|
||||
$this->MODULE_VERSION_DATE = $module['date'];
|
||||
|
||||
$langPrefix = strtoupper($module['prefix']);
|
||||
$langPrefix = $module['prefix'];
|
||||
|
||||
$this->PARTNER_NAME = GetMessage("{$langPrefix}_PARTNER_NAME");
|
||||
$this->PARTNER_URI = GetMessage("{$langPrefix}_PARTNER_URI");
|
||||
$this->MODULE_NAME = GetMessage("{$langPrefix}_MODULE_NAME");
|
||||
$this->MODULE_DESCRIPTION = GetMessage("{$langPrefix}_MODULE_DESCRIPTION");
|
||||
$this->PARTNER_NAME = GetMessage("{$langPrefix}_partner_name");
|
||||
$this->PARTNER_URI = GetMessage("{$langPrefix}_partner_uri");
|
||||
$this->MODULE_NAME = GetMessage("{$langPrefix}_module_name");
|
||||
$this->MODULE_DESCRIPTION = GetMessage("{$langPrefix}_module_description");
|
||||
}
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ class bx_null extends \CModule
|
||||
{
|
||||
global $DOCUMENT_ROOT, $APPLICATION;
|
||||
|
||||
if(is_array($this->sys['deps'])){
|
||||
foreach ($this->sys['deps'] as $moduleId){
|
||||
if(is_array($this->module['deps'])){
|
||||
foreach ($this->module['deps'] as $moduleId){
|
||||
if (!\Bitrix\Main\Loader::includeModule($moduleId)) {
|
||||
$APPLICATION->ThrowException("Module {$moduleId} not installed!");
|
||||
return false;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<?
|
||||
$MESS ['BX_NULL_PARTNER_NAME'] = "CoreLion";
|
||||
$MESS ['BX_NULL_PARTNER_URI'] = "https://corelion.ru/";
|
||||
$MESS ['BX_NULL_MODULE_NAME'] = "Создание CML";
|
||||
$MESS ['BX_NULL_MODULE_DESCRIPTION'] = "Работа с форматом CML";
|
||||
$MESS ['BX_NULL_INSTALL_MODULE'] = "Установка модуля";
|
||||
$MESS ['BX_NULL_DELETE_MODULE'] = "Деинсталляция модуля";
|
||||
$MESS ['bx_null_partner_name'] = "CoreLion";
|
||||
$MESS ['bx_null_partner_uri'] = "https://corelion.ru/";
|
||||
$MESS ['bx_null_module_name'] = "Bx: Null";
|
||||
$MESS ['bx_null_module_description'] = "Null module";
|
||||
|
||||
Reference in New Issue
Block a user