Fix customized classes load (#245)
* fix customized classes load * bump to 6.0.1
This commit is contained in:
parent
34e8105583
commit
559bf79f7b
@ -1,3 +1,6 @@
|
||||
## 2021-04-08 v.6.0.1
|
||||
* Исправлены ошибки подключения кастомных классов
|
||||
|
||||
## 2021-11-12 v.6.0.0
|
||||
* Добавлена поддержка программы лояльности
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
- Добавлена поддержка программы лояльности
|
||||
- Исправлены ошибки подключения кастомных классов
|
||||
|
@ -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'
|
||||
];
|
||||
|
Loading…
x
Reference in New Issue
Block a user