1
0
mirror of synced 2025-01-31 07:11:42 +03:00

Fix customized classes load (#245)

* fix customized classes load
* bump to 6.0.1
This commit is contained in:
Vlad 2022-04-08 18:21:05 +03:00 committed by GitHub
parent 34e8105583
commit 559bf79f7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 11 deletions

View File

@ -1,3 +1,6 @@
## 2021-04-08 v.6.0.1
* Исправлены ошибки подключения кастомных классов
## 2021-11-12 v.6.0.0
* Добавлена поддержка программы лояльности

View File

@ -17,6 +17,16 @@ class RetailcrmClasspathBuilder
*/
protected $moduleId = 'intaro.retailcrm';
/**
* @var string
*/
protected $customizedFilesPath = '/bitrix/php_interface/retailcrm/';
/**
* @var string
*/
protected $customizedClassesPath = '../../php_interface/retailcrm/';
/**
* The topmost directory where recursion should begin. Default: `classes/general`. Relative to the __DIR__.
* @var string
@ -115,10 +125,8 @@ class RetailcrmClasspathBuilder
protected function buildCustomizableClasspath()
{
foreach (static::$customizableClasses as $className => $fileName) {
$customizedFile = $this->documentRoot . '/bitrix/php_interface/retailcrm/' . $fileName;
if (file_exists($customizedFile)) {
$this->result[$className] = $customizedFile;
if (file_exists($this->documentRoot . $this->customizedFilesPath . $fileName)) {
$this->result[$className] = $this->customizedClassesPath . $fileName;
} else {
$this->notIncluded[$className] = $fileName;
}
@ -128,10 +136,8 @@ class RetailcrmClasspathBuilder
protected function buildVersionedClasspath()
{
foreach (static::$versionedClasses as $className => $fileNames) {
$customizedFile = $this->documentRoot . '/bitrix/php_interface/retailcrm/' . $fileNames[0];
if (file_exists($customizedFile)) {
$this->result[$className] = $customizedFile;
if (file_exists($this->documentRoot . $this->customizedFilesPath . $fileNames[0])) {
$this->result[$className] = $this->customizedClassesPath . $fileNames[0];
} else {
$this->notIncluded[$className] = sprintf($fileNames[1], $this->version);
}

View File

@ -1 +1 @@
- Добавлена поддержка программы лояльности
- Исправлены ошибки подключения кастомных классов

View File

@ -1,6 +1,6 @@
<?php
$arModuleVersion = [
'VERSION' => '6.0.0',
'VERSION_DATE' => '2022-02-04 13:00:00'
'VERSION' => '6.0.1',
'VERSION_DATE' => '2022-04-08 17:00:00'
];