Добавлена поддержка PHP 8.0 (#279)
This commit is contained in:
parent
6cd01dd572
commit
2e6b105d8d
@ -1,19 +1,12 @@
|
|||||||
FROM php:7.3-apache
|
FROM php:8.0-apache
|
||||||
|
|
||||||
RUN a2enmod rewrite
|
RUN a2enmod rewrite
|
||||||
|
|
||||||
RUN set -xe \
|
RUN set -xe \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends git wget unzip imagemagick libpng-dev libjpeg-dev \
|
&& apt-get install -y unzip libpng-dev libzip-dev libonig-dev libjpeg-dev libmcrypt-dev wget \
|
||||||
libfreetype6-dev default-mysql-client libmcrypt-dev libicu-dev libxml2 libxml2-dev libmagickwand-dev \
|
&& docker-php-ext-install mysqli zip
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
|
||||||
&& docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr --with-freetype-dir=/usr \
|
|
||||||
&& docker-php-ext-install opcache soap gd mbstring mysqli zip intl \
|
|
||||||
&& pecl install mcrypt-1.0.1 imagick-3.4.4 \
|
|
||||||
&& docker-php-ext-enable mcrypt imagick \
|
|
||||||
&& apt-get clean; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
|
|
||||||
|
|
||||||
RUN curl --insecure https://getcomposer.org/composer.phar -o /usr/bin/composer && chmod +x /usr/bin/composer
|
RUN curl --insecure https://getcomposer.org/composer.phar -o /usr/bin/composer && chmod +x /usr/bin/composer
|
||||||
RUN wget -O /usr/bin/phpunit https://phar.phpunit.de/phpunit-7.phar && chmod +x /usr/bin/phpunit
|
|
||||||
|
|
||||||
WORKDIR /bitrix-module
|
WORKDIR /bitrix-module
|
||||||
|
@ -7,7 +7,6 @@ log_errors = On
|
|||||||
display_startup_errors = On
|
display_startup_errors = On
|
||||||
cgi.fix_pathinfo = 0
|
cgi.fix_pathinfo = 0
|
||||||
date.timezone = "Europe/Moscow"
|
date.timezone = "Europe/Moscow"
|
||||||
mbstring.internal_encoding = "UTF-8"
|
|
||||||
default_charset = utf-8
|
default_charset = utf-8
|
||||||
max_input_vars = 10000
|
max_input_vars = 10000
|
||||||
post_max_size = 1024M
|
post_max_size = 1024M
|
||||||
|
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
php-version: ['7.3']
|
php-version: ['7.4', '8.0']
|
||||||
bitrix-edition: ['small_business_encode', 'business_encode']
|
bitrix-edition: ['small_business_encode', 'business_encode']
|
||||||
services:
|
services:
|
||||||
mysql:
|
mysql:
|
||||||
|
@ -1,3 +1,6 @@
|
|||||||
|
## 2023-03-10 v.6.2.0
|
||||||
|
- Добавлена поддержка PHP 8.0
|
||||||
|
|
||||||
## 2023-02-16 v.6.1.16
|
## 2023-02-16 v.6.1.16
|
||||||
- Добавление передачи магазина для корпоративных клиентов
|
- Добавление передачи магазина для корпоративных клиентов
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@ if (!file_exists($_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/install/wizar
|
|||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/install/wizard/wizard.php';
|
require_once $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/main/install/wizard/wizard.php';
|
||||||
|
ob_clean();
|
||||||
|
|
||||||
require_once __DIR__ . '/../helpers/installation/ExtendedCreateModulesStep.php';
|
require_once __DIR__ . '/../helpers/installation/ExtendedCreateModulesStep.php';
|
||||||
require_once __DIR__ . '/../helpers/installation/Installer.php';
|
require_once __DIR__ . '/../helpers/installation/Installer.php';
|
||||||
|
|
||||||
@ -25,8 +27,6 @@ $installer = new Installer();
|
|||||||
|
|
||||||
$step = $argv[1];
|
$step = $argv[1];
|
||||||
|
|
||||||
ob_clean();
|
|
||||||
|
|
||||||
switch ($step) {
|
switch ($step) {
|
||||||
case 'db_type':
|
case 'db_type':
|
||||||
$installer->dbTypeStep();
|
$installer->dbTypeStep();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "retailcrm/bitrix-module",
|
"name": "retailcrm/bitrix-module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"pre-module-install": "cp -R intaro.retailcrm $BITRIX_PATH/bitrix/modules",
|
"pre-module-install": "cp -R intaro.retailcrm $BITRIX_PATH/bitrix/modules",
|
||||||
"tests": "php vendor/bin/phpunit -c phpunit.xml.dist --whitelist=$BITRIX_PATH/bitrix/modules/intaro.retailcrm"
|
"tests": "vendor/bin/phpunit -c phpunit.xml.dist --whitelist=$BITRIX_PATH/bitrix/modules/intaro.retailcrm"
|
||||||
},
|
},
|
||||||
"description": "Integration module for Bitrix & RetailCRM",
|
"description": "Integration module for Bitrix & RetailCRM",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -20,9 +20,9 @@
|
|||||||
"ext-xmlwriter": "*"
|
"ext-xmlwriter": "*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "^7",
|
"phpunit/phpunit": "^8.5",
|
||||||
"vlucas/phpdotenv": "^3.3",
|
"vlucas/phpdotenv": "^3.3",
|
||||||
"mockery/mockery" : "^1.0",
|
"mockery/mockery" : "^1.0",
|
||||||
"fzaninotto/faker" : "^1.7"
|
"fakerphp/faker": "^1.21"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
892
composer.lock
generated
892
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -138,7 +138,7 @@ class CustomerBuilder extends AbstractBuilder implements RetailcrmBuilderInterfa
|
|||||||
|
|
||||||
if (isset($this->dataCrm['phones'])) {
|
if (isset($this->dataCrm['phones'])) {
|
||||||
foreach ($this->dataCrm['phones'] as $phone) {
|
foreach ($this->dataCrm['phones'] as $phone) {
|
||||||
if (isset($phone['old_number']) && in_array($phone['old_number'], $this->user)) {
|
if (is_array($this->user) && isset($phone['old_number']) && in_array($phone['old_number'], $this->user)) {
|
||||||
$key = array_search($phone['old_number'], $this->user);
|
$key = array_search($phone['old_number'], $this->user);
|
||||||
|
|
||||||
if (isset($phone['number'])) {
|
if (isset($phone['number'])) {
|
||||||
|
@ -99,7 +99,7 @@ class RestNormalizer
|
|||||||
$formatted[ $code ] = $this->formatting($value, true);
|
$formatted[ $code ] = $this->formatting($value, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($formatted[ $code ] === null || $formatted[ $code ] === '' || count($formatted[ $code ]) < 1) {
|
if (empty($formatted[$code])) {
|
||||||
if ($this->clear === true) {
|
if ($this->clear === true) {
|
||||||
unset($formatted[ $code ]);
|
unset($formatted[ $code ]);
|
||||||
}
|
}
|
||||||
|
@ -18,8 +18,9 @@ class RetailCrmCollector
|
|||||||
{
|
{
|
||||||
$keys = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_COLL_KEY, 0));
|
$keys = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_COLL_KEY, 0));
|
||||||
$collector = COption::GetOptionString(self::$MODULE_ID, self::$CRM_COLL, 0);
|
$collector = COption::GetOptionString(self::$MODULE_ID, self::$CRM_COLL, 0);
|
||||||
|
$request = \Bitrix\Main\Context::getCurrent()->getRequest();
|
||||||
|
|
||||||
if ($collector === 'Y' && !empty($keys[SITE_ID]) && ADMIN_SECTION !== true) {
|
if ($collector === 'Y' && !empty($keys[SITE_ID]) && $request->isAdminSection() !== true) {
|
||||||
global $USER;
|
global $USER;
|
||||||
|
|
||||||
$params = array();
|
$params = array();
|
||||||
|
@ -12,7 +12,9 @@ class RetailCrmOnlineConsultant
|
|||||||
*/
|
*/
|
||||||
public static function add()
|
public static function add()
|
||||||
{
|
{
|
||||||
if (RetailcrmConfigProvider::isOnlineConsultantEnabled() && ADMIN_SECTION !== true) {
|
$request = \Bitrix\Main\Context::getCurrent()->getRequest();
|
||||||
|
|
||||||
|
if (RetailcrmConfigProvider::isOnlineConsultantEnabled() && $request->isAdminSection() !== true) {
|
||||||
\Bitrix\Main\Page\Asset::getInstance()->addString(
|
\Bitrix\Main\Page\Asset::getInstance()->addString(
|
||||||
RetailcrmConfigProvider::getOnlineConsultantScript(),
|
RetailcrmConfigProvider::getOnlineConsultantScript(),
|
||||||
true
|
true
|
||||||
|
@ -40,7 +40,7 @@ class RetailCrmEvent
|
|||||||
* @return bool
|
* @return bool
|
||||||
* @throws InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public function OnAfterUserUpdate($arFields)
|
public static function OnAfterUserUpdate($arFields)
|
||||||
{
|
{
|
||||||
if (isset($GLOBALS['RETAIL_CRM_HISTORY']) && $GLOBALS['RETAIL_CRM_HISTORY']) {
|
if (isset($GLOBALS['RETAIL_CRM_HISTORY']) && $GLOBALS['RETAIL_CRM_HISTORY']) {
|
||||||
return false;
|
return false;
|
||||||
@ -67,7 +67,7 @@ class RetailCrmEvent
|
|||||||
* @param mixed $ID - Order id
|
* @param mixed $ID - Order id
|
||||||
* @param mixed $arFields - Order arFields
|
* @param mixed $arFields - Order arFields
|
||||||
*/
|
*/
|
||||||
public function onUpdateOrder($ID, $arFields)
|
public static function onUpdateOrder($ID, $arFields)
|
||||||
{
|
{
|
||||||
if (isset($GLOBALS['RETAIL_CRM_HISTORY']) && $GLOBALS['RETAIL_CRM_HISTORY']) {
|
if (isset($GLOBALS['RETAIL_CRM_HISTORY']) && $GLOBALS['RETAIL_CRM_HISTORY']) {
|
||||||
$GLOBALS['RETAILCRM_ORDER_OLD_EVENT'] = false;
|
$GLOBALS['RETAILCRM_ORDER_OLD_EVENT'] = false;
|
||||||
@ -91,7 +91,7 @@ class RetailCrmEvent
|
|||||||
*
|
*
|
||||||
* @param object $event - Order object
|
* @param object $event - Order object
|
||||||
*/
|
*/
|
||||||
public function orderDelete($event)
|
public static function orderDelete($event)
|
||||||
{
|
{
|
||||||
$GLOBALS['RETAILCRM_ORDER_DELETE'] = true;
|
$GLOBALS['RETAILCRM_ORDER_DELETE'] = true;
|
||||||
|
|
||||||
@ -426,7 +426,7 @@ class RetailCrmEvent
|
|||||||
* @throws InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function paymentSave(Payment $event)
|
public static function paymentSave(Payment $event)
|
||||||
{
|
{
|
||||||
$apiVersion = COption::GetOptionString(self::$MODULE_ID, 'api_version', 0);
|
$apiVersion = COption::GetOptionString(self::$MODULE_ID, 'api_version', 0);
|
||||||
|
|
||||||
@ -472,7 +472,9 @@ class RetailCrmEvent
|
|||||||
$payments = $orderCrm['order']['payments'];
|
$payments = $orderCrm['order']['payments'];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($payments) {
|
$paymentsExternalIds = [];
|
||||||
|
|
||||||
|
if (!empty($payments)) {
|
||||||
foreach ($payments as $payment) {
|
foreach ($payments as $payment) {
|
||||||
if (isset($payment['externalId'])) {
|
if (isset($payment['externalId'])) {
|
||||||
if (RCrmActions::isNewExternalId($payment['externalId'])) {
|
if (RCrmActions::isNewExternalId($payment['externalId'])) {
|
||||||
@ -524,9 +526,9 @@ class RetailCrmEvent
|
|||||||
|
|
||||||
$arPaymentExtId = RCrmActions::generatePaymentExternalId($arPayment['ID']);
|
$arPaymentExtId = RCrmActions::generatePaymentExternalId($arPayment['ID']);
|
||||||
|
|
||||||
if (array_key_exists($arPaymentExtId, $paymentsExternalIds)) {
|
if (!empty($paymentsExternalIds) && array_key_exists($arPaymentExtId, $paymentsExternalIds)) {
|
||||||
$paymentData = $paymentsExternalIds[$arPaymentExtId];
|
$paymentData = $paymentsExternalIds[$arPaymentExtId];
|
||||||
} elseif (array_key_exists($arPayment['ID'], $paymentsExternalIds)) {
|
} elseif (!empty($paymentsExternalIds) && array_key_exists($arPayment['ID'], $paymentsExternalIds)) {
|
||||||
$paymentData = $paymentsExternalIds[$arPayment['ID']];
|
$paymentData = $paymentsExternalIds[$arPayment['ID']];
|
||||||
} else {
|
} else {
|
||||||
$paymentData = [];
|
$paymentData = [];
|
||||||
@ -564,7 +566,7 @@ class RetailCrmEvent
|
|||||||
*
|
*
|
||||||
* @throws InvalidArgumentException
|
* @throws InvalidArgumentException
|
||||||
*/
|
*/
|
||||||
public function paymentDelete(Payment $event): void
|
public static function paymentDelete(Payment $event): void
|
||||||
{
|
{
|
||||||
$apiVersion = COption::GetOptionString(self::$MODULE_ID, 'api_version', 0);
|
$apiVersion = COption::GetOptionString(self::$MODULE_ID, 'api_version', 0);
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ class RetailCrmHistory
|
|||||||
|
|
||||||
Logger::getInstance()->write($customerH, 'customerHistory');
|
Logger::getInstance()->write($customerH, 'customerHistory');
|
||||||
|
|
||||||
if (count($customerH) == 0) {
|
if (is_array($customerH) && count($customerH) === 0) {
|
||||||
if ($customerHistory['history']['totalPageCount'] > $customerHistory['history']['currentPage']) {
|
if ($customerHistory['history']['totalPageCount'] > $customerHistory['history']['currentPage']) {
|
||||||
$historyFilter['page'] = $customerHistory['history']['currentPage'] + 1;
|
$historyFilter['page'] = $customerHistory['history']['currentPage'] + 1;
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ class RetailCrmHistory
|
|||||||
|
|
||||||
Logger::getInstance()->write($orderH, 'orderHistory');
|
Logger::getInstance()->write($orderH, 'orderHistory');
|
||||||
|
|
||||||
if (count($orderH) === 0) {
|
if (is_array($orderH) && count($orderH) === 0) {
|
||||||
if ($orderHistory['history']['totalPageCount'] > $orderHistory['history']['currentPage']) {
|
if ($orderHistory['history']['totalPageCount'] > $orderHistory['history']['currentPage']) {
|
||||||
$historyFilter['page'] = $orderHistory['history']['currentPage'] + 1;
|
$historyFilter['page'] = $orderHistory['history']['currentPage'] + 1;
|
||||||
|
|
||||||
@ -722,7 +722,7 @@ class RetailCrmHistory
|
|||||||
} else {
|
} else {
|
||||||
self::setProp($somePropValue, RCrmActions::fromJSON($order[$key]));
|
self::setProp($somePropValue, RCrmActions::fromJSON($order[$key]));
|
||||||
}
|
}
|
||||||
} elseif (array_key_exists($key, $order['delivery']['address'])) {
|
} elseif (is_array($order['delivery']['address']) && array_key_exists($key, $order['delivery']['address'])) {
|
||||||
if ($propsKey[$orderProp]['TYPE'] == 'LOCATION') {
|
if ($propsKey[$orderProp]['TYPE'] == 'LOCATION') {
|
||||||
|
|
||||||
if (!empty($order['delivery']['address'][$key])) {
|
if (!empty($order['delivery']['address'][$key])) {
|
||||||
@ -793,7 +793,7 @@ class RetailCrmHistory
|
|||||||
->getItemByOrderPropertyId($propsKey[$orderProp]['ID']);
|
->getItemByOrderPropertyId($propsKey[$orderProp]['ID']);
|
||||||
|
|
||||||
self::setProp($somePropValue, RCrmActions::fromJSON($order[$key]));
|
self::setProp($somePropValue, RCrmActions::fromJSON($order[$key]));
|
||||||
} elseif(array_key_exists($key, $order['contragent'])) {
|
} elseif(is_array($order['contragent']) && array_key_exists($key, $order['contragent'])) {
|
||||||
$somePropValue = $propertyCollection
|
$somePropValue = $propertyCollection
|
||||||
->getItemByOrderPropertyId($propsKey[$orderProp]['ID']);
|
->getItemByOrderPropertyId($propsKey[$orderProp]['ID']);
|
||||||
self::setProp($somePropValue, RCrmActions::fromJSON($order['contragent'][$key]));
|
self::setProp($somePropValue, RCrmActions::fromJSON($order['contragent'][$key]));
|
||||||
@ -1115,7 +1115,7 @@ class RetailCrmHistory
|
|||||||
$orderSumm += $item->getFinalPrice();
|
$orderSumm += $item->getFinalPrice();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists('cost', $order['delivery'])) {
|
if (is_array($order['delivery']) && array_key_exists('cost', $order['delivery'])) {
|
||||||
$deliverySumm = $order['delivery']['cost'];
|
$deliverySumm = $order['delivery']['cost'];
|
||||||
} else {
|
} else {
|
||||||
$deliverySumm = $newOrder->getDeliveryPrice();
|
$deliverySumm = $newOrder->getDeliveryPrice();
|
||||||
@ -1228,8 +1228,9 @@ class RetailCrmHistory
|
|||||||
|
|
||||||
if (!empty($newHistoryPayments)) {
|
if (!empty($newHistoryPayments)) {
|
||||||
foreach ($newOrder->getPaymentCollection() as $orderPayment) {
|
foreach ($newOrder->getPaymentCollection() as $orderPayment) {
|
||||||
if (array_key_exists($orderPayment->getField('XML_ID'), $newHistoryPayments)) {
|
if (is_array($newHistoryPayments)
|
||||||
|
&& array_key_exists($orderPayment->getField('XML_ID'), $newHistoryPayments)
|
||||||
|
) {
|
||||||
$paymentId = $orderPayment->getId();
|
$paymentId = $orderPayment->getId();
|
||||||
$paymentExternalId = RCrmActions::generatePaymentExternalId($paymentId);
|
$paymentExternalId = RCrmActions::generatePaymentExternalId($paymentId);
|
||||||
if (is_null($paymentId)) {
|
if (is_null($paymentId)) {
|
||||||
@ -1372,7 +1373,10 @@ class RetailCrmHistory
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($fields['customer'][$change['field']] == 'phones') {
|
if ($fields['customer'][$change['field']] == 'phones') {
|
||||||
$key = count($customers[$change['customer']['id']]['phones']);
|
if (is_array($customers[$change['customer']['id']]['phones'])) {
|
||||||
|
$key = count($customers[$change['customer']['id']]['phones']);
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($change['oldValue'])) {
|
if (isset($change['oldValue'])) {
|
||||||
$customers[$change['customer']['id']]['phones'][$key]['old_number'] = $change['oldValue'];
|
$customers[$change['customer']['id']]['phones'][$key]['old_number'] = $change['oldValue'];
|
||||||
}
|
}
|
||||||
@ -1463,7 +1467,7 @@ class RetailCrmHistory
|
|||||||
$change['order']['payments'] = $payments;
|
$change['order']['payments'] = $payments;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($change['order']['contragent']) && count($change['order']['contragent']) > 0) {
|
if (is_array($change['order']['contragent']) && isset($change['order']['contragent']) && count($change['order']['contragent']) > 0) {
|
||||||
foreach ($change['order']['contragent'] as $name => $value) {
|
foreach ($change['order']['contragent'] as $name => $value) {
|
||||||
$change['order'][$name] = self::newValue($value);
|
$change['order'][$name] = self::newValue($value);
|
||||||
}
|
}
|
||||||
@ -1875,7 +1879,7 @@ class RetailCrmHistory
|
|||||||
|
|
||||||
public static function newValue($value)
|
public static function newValue($value)
|
||||||
{
|
{
|
||||||
if (array_key_exists('code', $value)) {
|
if (is_array($value) && array_key_exists('code', $value)) {
|
||||||
return $value['code'];
|
return $value['code'];
|
||||||
} else {
|
} else {
|
||||||
return $value;
|
return $value;
|
||||||
|
@ -59,7 +59,6 @@ class RetailCrmOrder
|
|||||||
|
|
||||||
$dimensionsSetting = RetailcrmConfigProvider::getOrderDimensions();
|
$dimensionsSetting = RetailcrmConfigProvider::getOrderDimensions();
|
||||||
$currency = RetailcrmConfigProvider::getCurrencyOrDefault();
|
$currency = RetailcrmConfigProvider::getCurrencyOrDefault();
|
||||||
$optionCorpClient = RetailcrmConfigProvider::getCorporateClientStatus();
|
|
||||||
|
|
||||||
$order = [
|
$order = [
|
||||||
'number' => $arOrder['NUMBER'],
|
'number' => $arOrder['NUMBER'],
|
||||||
@ -105,6 +104,7 @@ class RetailCrmOrder
|
|||||||
//fields
|
//fields
|
||||||
foreach ($arOrder['PROPS']['properties'] as $prop) {
|
foreach ($arOrder['PROPS']['properties'] as $prop) {
|
||||||
if (!empty($arParams['optionsLegalDetails'])
|
if (!empty($arParams['optionsLegalDetails'])
|
||||||
|
&& is_array($arParams['optionsLegalDetails'][$arOrder['PERSON_TYPE_ID']])
|
||||||
&& $search = array_search($prop['CODE'], $arParams['optionsLegalDetails'][$arOrder['PERSON_TYPE_ID']])
|
&& $search = array_search($prop['CODE'], $arParams['optionsLegalDetails'][$arOrder['PERSON_TYPE_ID']])
|
||||||
) {
|
) {
|
||||||
$order['contragent'][$search] = $prop['VALUE'][0];//legal order data
|
$order['contragent'][$search] = $prop['VALUE'][0];//legal order data
|
||||||
@ -112,7 +112,8 @@ class RetailCrmOrder
|
|||||||
&& $search = array_search($prop['CODE'], $arParams['optionsCustomFields'][$arOrder['PERSON_TYPE_ID']])
|
&& $search = array_search($prop['CODE'], $arParams['optionsCustomFields'][$arOrder['PERSON_TYPE_ID']])
|
||||||
) {
|
) {
|
||||||
$order['customFields'][$search] = $prop['VALUE'][0];//custom properties
|
$order['customFields'][$search] = $prop['VALUE'][0];//custom properties
|
||||||
} elseif ($search = array_search($prop['CODE'], $arParams['optionsOrderProps'][$arOrder['PERSON_TYPE_ID']])) {//other
|
} elseif (is_array($arParams['optionsOrderProps'][$arOrder['PERSON_TYPE_ID']])
|
||||||
|
&& $search = array_search($prop['CODE'], $arParams['optionsOrderProps'][$arOrder['PERSON_TYPE_ID']])) {//other
|
||||||
if (in_array($search, ['fio', 'phone', 'email'])) {//fio, phone, email
|
if (in_array($search, ['fio', 'phone', 'email'])) {//fio, phone, email
|
||||||
if ($search === 'fio') {
|
if ($search === 'fio') {
|
||||||
$order = array_merge($order, RCrmActions::explodeFio($prop['VALUE'][0]));//add fio fields
|
$order = array_merge($order, RCrmActions::explodeFio($prop['VALUE'][0]));//add fio fields
|
||||||
@ -188,6 +189,7 @@ class RetailCrmOrder
|
|||||||
}
|
}
|
||||||
|
|
||||||
//basket
|
//basket
|
||||||
|
|
||||||
foreach ($arOrder['BASKET'] as $position => $product) {
|
foreach ($arOrder['BASKET'] as $position => $product) {
|
||||||
$itemId = null;
|
$itemId = null;
|
||||||
$externalId = $position . '_' . $product['PRODUCT_ID'];
|
$externalId = $position . '_' . $product['PRODUCT_ID'];
|
||||||
@ -196,9 +198,15 @@ class RetailCrmOrder
|
|||||||
$externalIds = $orderItems[$externalId]['externalIds'];
|
$externalIds = $orderItems[$externalId]['externalIds'];
|
||||||
$itemId = $orderItems[$externalId]['id'];
|
$itemId = $orderItems[$externalId]['id'];
|
||||||
|
|
||||||
$key = array_search('bitrix', array_column($externalIds, 'code'));
|
$key = null;
|
||||||
|
$keyBasketId = null;
|
||||||
|
|
||||||
if ($externalIds[$key]['code'] === 'bitrix') {
|
if (is_array($externalIds)) {
|
||||||
|
$key = array_search('bitrix', array_column($externalIds, 'code'));
|
||||||
|
$keyBasketId = array_search('bitrixBasketId', array_column($externalIds, 'code'));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($externalIds[$key]['code']) && $externalIds[$key]['code'] === 'bitrix') {
|
||||||
$externalIds[$key] = [
|
$externalIds[$key] = [
|
||||||
'code' => 'bitrix',
|
'code' => 'bitrix',
|
||||||
'value' => $externalId,
|
'value' => $externalId,
|
||||||
@ -208,11 +216,11 @@ class RetailCrmOrder
|
|||||||
'code' => 'bitrix',
|
'code' => 'bitrix',
|
||||||
'value' => $externalId,
|
'value' => $externalId,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
$keyBasketId = array_search('bitrixBasketId', array_column($externalIds, 'code'));
|
if (isset($externalIds[$keyBasketId]['code'])
|
||||||
|
&& $externalIds[$keyBasketId]['code'] === 'bitrixBasketId'
|
||||||
if ($externalIds[$keyBasketId]['code'] === 'bitrixBasketId') {
|
) {
|
||||||
$externalIds[$keyBasketId] = [
|
$externalIds[$keyBasketId] = [
|
||||||
'code' => 'bitrixBasketId',
|
'code' => 'bitrixBasketId',
|
||||||
'value' => $product['ID'],
|
'value' => $product['ID'],
|
||||||
@ -222,7 +230,7 @@ class RetailCrmOrder
|
|||||||
'code' => 'bitrixBasketId',
|
'code' => 'bitrixBasketId',
|
||||||
'value' => $product['ID'],
|
'value' => $product['ID'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
} else { //create
|
} else { //create
|
||||||
$externalIds = [
|
$externalIds = [
|
||||||
[
|
[
|
||||||
|
@ -9,8 +9,9 @@ class RetailCrmUa
|
|||||||
{
|
{
|
||||||
$ua = COption::GetOptionString(self::$MODULE_ID, self::$CRM_UA, 0);
|
$ua = COption::GetOptionString(self::$MODULE_ID, self::$CRM_UA, 0);
|
||||||
$uaKeys = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_UA_KEYS, 0));
|
$uaKeys = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_UA_KEYS, 0));
|
||||||
|
$request = \Bitrix\Main\Context::getCurrent()->getRequest();
|
||||||
|
|
||||||
if ($ua === 'Y' && !empty($uaKeys[SITE_ID]['ID']) && !empty($uaKeys[SITE_ID]['INDEX']) && ADMIN_SECTION !== true) {
|
if ($ua === 'Y' && !empty($uaKeys[SITE_ID]['ID']) && !empty($uaKeys[SITE_ID]['INDEX']) && $request->isAdminSection() !== true) {
|
||||||
global $APPLICATION;
|
global $APPLICATION;
|
||||||
|
|
||||||
$ua = "
|
$ua = "
|
||||||
|
@ -1 +1 @@
|
|||||||
- Добавлена поддержка работы с корпоративными клиентами при мультисайтовости cms системы
|
- Добавлена поддержка PHP 8.0
|
||||||
|
@ -495,7 +495,7 @@ if ($STEP === 1) {
|
|||||||
<?php
|
<?php
|
||||||
if ($isSetupModulePage) { ?>
|
if ($isSetupModulePage) { ?>
|
||||||
<span class="text"><?=GetMessage('AGENT_LOADING')?> </span>
|
<span class="text"><?=GetMessage('AGENT_LOADING')?> </span>
|
||||||
<input type="checkbox" name="NEED_CATALOG_AGENT" value="agent" onclick="checkProfile(this);"><Br>
|
<input type="checkbox" name="NEED_CATALOG_AGENT" value="agent" onclick="checkProfile(this);"><br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<span class="text"><?=GetMessage('LOAD_NOW')?> </span>
|
<span class="text"><?=GetMessage('LOAD_NOW')?> </span>
|
||||||
|
@ -61,9 +61,7 @@ if (empty(ConfigProvider::getSitesAvailable())) {
|
|||||||
try {
|
try {
|
||||||
$credentials = $client->getCredentials();
|
$credentials = $client->getCredentials();
|
||||||
|
|
||||||
ConfigProvider::setSitesAvailable(
|
ConfigProvider::setSitesAvailable($credentials->sitesAvailable[0] ?? '');
|
||||||
count($credentials->sitesAvailable) > 0 ? $credentials->sitesAvailable[0] : ''
|
|
||||||
);
|
|
||||||
} catch (ArgumentOutOfRangeException | CurlException $exception) {
|
} catch (ArgumentOutOfRangeException | CurlException $exception) {
|
||||||
Logger::getInstance()->write($exception->getMessage());
|
Logger::getInstance()->write($exception->getMessage());
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ class intaro_retailcrm extends CModule
|
|||||||
public $PROTOCOL = 'protocol';
|
public $PROTOCOL = 'protocol';
|
||||||
public $INSTALL_PATH;
|
public $INSTALL_PATH;
|
||||||
|
|
||||||
function intaro_retailcrm()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$arModuleVersion = [];
|
$arModuleVersion = [];
|
||||||
$path = str_replace("\\", '/', __FILE__);
|
$path = str_replace("\\", '/', __FILE__);
|
||||||
@ -615,15 +615,69 @@ class intaro_retailcrm extends CModule
|
|||||||
COption::SetOptionString($this->MODULE_ID, $this->PROTOCOL, 'http://');
|
COption::SetOptionString($this->MODULE_ID, $this->PROTOCOL, 'http://');
|
||||||
}
|
}
|
||||||
|
|
||||||
COption::SetOptionString($this->MODULE_ID, $this->CRM_ORDER_TYPES_ARR, serialize(RCrmActions::clearArr($orderTypesArr)));
|
// Set order types
|
||||||
COption::SetOptionString($this->MODULE_ID, $this->CRM_DELIVERY_TYPES_ARR, serialize(RCrmActions::clearArr($deliveryTypesArr)));
|
if (!empty($orderTypesArr)) {
|
||||||
COption::SetOptionString($this->MODULE_ID, $this->CRM_PAYMENT_TYPES, serialize(RCrmActions::clearArr($paymentTypesArr)));
|
COption::SetOptionString(
|
||||||
COption::SetOptionString($this->MODULE_ID, $this->CRM_PAYMENT_STATUSES, serialize(RCrmActions::clearArr($paymentStatusesArr)));
|
$this->MODULE_ID,
|
||||||
COption::SetOptionString($this->MODULE_ID, $this->CRM_PAYMENT, serialize(RCrmActions::clearArr($paymentArr)));
|
$this->CRM_ORDER_TYPES_ARR,
|
||||||
|
serialize(RCrmActions::clearArr($orderTypesArr)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set delivery types
|
||||||
|
if (!empty($deliveryTypesArr)) {
|
||||||
|
COption::SetOptionString(
|
||||||
|
$this->MODULE_ID,
|
||||||
|
$this->CRM_DELIVERY_TYPES_ARR,
|
||||||
|
serialize(RCrmActions::clearArr($deliveryTypesArr)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set payment types
|
||||||
|
if (!empty($paymentTypesArr)) {
|
||||||
|
COption::SetOptionString(
|
||||||
|
$this->MODULE_ID,
|
||||||
|
$this->CRM_PAYMENT_TYPES,
|
||||||
|
serialize(RCrmActions::clearArr($paymentTypesArr)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set payment statuses
|
||||||
|
if (!empty($paymentStatusesArr)) {
|
||||||
|
COption::SetOptionString(
|
||||||
|
$this->MODULE_ID,
|
||||||
|
$this->CRM_PAYMENT_STATUSES,
|
||||||
|
serialize(RCrmActions::clearArr($paymentStatusesArr)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Set payments
|
||||||
|
if (!empty($paymentArr)) {
|
||||||
|
COption::SetOptionString(
|
||||||
|
$this->MODULE_ID,
|
||||||
|
$this->CRM_PAYMENT,
|
||||||
|
serialize(RCrmActions::clearArr($paymentArr)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
COption::SetOptionString($this->MODULE_ID, $this->CRM_ORDER_LAST_ID, 0);
|
COption::SetOptionString($this->MODULE_ID, $this->CRM_ORDER_LAST_ID, 0);
|
||||||
COption::SetOptionString($this->MODULE_ID, $this->CRM_ORDER_DISCHARGE, 1);
|
COption::SetOptionString($this->MODULE_ID, $this->CRM_ORDER_DISCHARGE, 1);
|
||||||
COption::SetOptionString($this->MODULE_ID, $this->CRM_ORDER_FAILED_IDS, serialize([]));
|
COption::SetOptionString($this->MODULE_ID, $this->CRM_ORDER_FAILED_IDS, serialize([]));
|
||||||
COption::SetOptionString($this->MODULE_ID, $this->CRM_CANSEL_ORDER, serialize(RCrmActions::clearArr($canselOrderArr)));
|
|
||||||
|
// Set cansel order
|
||||||
|
if (!empty($canselOrderArr)) {
|
||||||
|
COption::SetOptionString(
|
||||||
|
$this->MODULE_ID,
|
||||||
|
$this->CRM_CANSEL_ORDER,
|
||||||
|
serialize(RCrmActions::clearArr($canselOrderArr)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if ($orderProps = COption::GetOptionString($this->OLD_MODULE_ID, $this->CRM_ORDER_PROPS, 0)) {
|
if ($orderProps = COption::GetOptionString($this->OLD_MODULE_ID, $this->CRM_ORDER_PROPS, 0)) {
|
||||||
$arResult['ORDER_PROPS'] = unserialize($orderProps);
|
$arResult['ORDER_PROPS'] = unserialize($orderProps);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$arModuleVersion = [
|
$arModuleVersion = [
|
||||||
'VERSION' => '6.1.16',
|
'VERSION' => '6.2.0',
|
||||||
'VERSION_DATE' => '2023-02-16 12:00:00'
|
'VERSION_DATE' => '2023-03-10 12:00:00'
|
||||||
];
|
];
|
||||||
|
@ -236,7 +236,7 @@ class CustomerBuilder implements BuilderInterface
|
|||||||
|
|
||||||
private function handleFields(): void
|
private function handleFields(): void
|
||||||
{
|
{
|
||||||
if (count($this->customFields) === 0) {
|
if (is_array($this->customFields) && count($this->customFields) === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ class EventsHandlers
|
|||||||
* @param array $arParams
|
* @param array $arParams
|
||||||
* @param array $arResult
|
* @param array $arResult
|
||||||
*/
|
*/
|
||||||
public function OnSaleComponentOrderResultPreparedHandler(
|
public static function OnSaleComponentOrderResultPreparedHandler(
|
||||||
Order $order,
|
Order $order,
|
||||||
array $arUserResult,
|
array $arUserResult,
|
||||||
HttpRequest $request,
|
HttpRequest $request,
|
||||||
@ -125,7 +125,7 @@ class EventsHandlers
|
|||||||
*
|
*
|
||||||
* @param \Bitrix\Main\Event $event
|
* @param \Bitrix\Main\Event $event
|
||||||
*/
|
*/
|
||||||
public function OnSaleOrderSavedHandler(Event $event): void
|
public static function OnSaleOrderSavedHandler(Event $event): void
|
||||||
{
|
{
|
||||||
if (self::$disableSaleHandler === true) {
|
if (self::$disableSaleHandler === true) {
|
||||||
return;
|
return;
|
||||||
@ -222,7 +222,7 @@ class EventsHandlers
|
|||||||
* @return mixed
|
* @return mixed
|
||||||
* @throws \ReflectionException
|
* @throws \ReflectionException
|
||||||
*/
|
*/
|
||||||
public function OnAfterUserRegisterHandler(array $arFields): void
|
public static function OnAfterUserRegisterHandler(array $arFields): void
|
||||||
{
|
{
|
||||||
if (isset($arFields['USER_ID']) && $arFields['USER_ID'] > 0) {
|
if (isset($arFields['USER_ID']) && $arFields['USER_ID'] > 0) {
|
||||||
$user = UserRepository::getById($arFields['USER_ID']);
|
$user = UserRepository::getById($arFields['USER_ID']);
|
||||||
|
@ -37,6 +37,10 @@ class TypedArrayStrategy implements DeserializeStrategyInterface
|
|||||||
$valueType = '';
|
$valueType = '';
|
||||||
$result = [];
|
$result = [];
|
||||||
|
|
||||||
|
if (!is_array($value)) {
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
if (strpos($this->innerType, ',') !== false) {
|
if (strpos($this->innerType, ',') !== false) {
|
||||||
[$keyType, $valueType] = static::getInnerTypes($this->innerType);
|
[$keyType, $valueType] = static::getInnerTypes($this->innerType);
|
||||||
|
|
||||||
|
@ -36,6 +36,10 @@ class TypedArrayStrategy implements SerializeStrategyInterface
|
|||||||
$valueType = '';
|
$valueType = '';
|
||||||
$result = [];
|
$result = [];
|
||||||
|
|
||||||
|
if (!is_array($value)) {
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
if (strpos($this->innerType, ',') !== false) {
|
if (strpos($this->innerType, ',') !== false) {
|
||||||
[$keyType, $valueType] = static::getInnerTypes($this->innerType);
|
[$keyType, $valueType] = static::getInnerTypes($this->innerType);
|
||||||
|
|
||||||
|
@ -46,12 +46,12 @@ class Register extends Controller
|
|||||||
return [
|
return [
|
||||||
'saveUserLpFields' => [
|
'saveUserLpFields' => [
|
||||||
'-prefilters' => [
|
'-prefilters' => [
|
||||||
new Authentication,
|
Authentication::class,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'resetUserLpFields' => [
|
'resetUserLpFields' => [
|
||||||
'-prefilters' => [
|
'-prefilters' => [
|
||||||
new Authentication,
|
Authentication::class,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
@ -624,7 +624,7 @@ class SettingsService
|
|||||||
*/
|
*/
|
||||||
public function isExport($iblockId, $iblockExport): bool
|
public function isExport($iblockId, $iblockExport): bool
|
||||||
{
|
{
|
||||||
if (count($iblockExport) !== 0) {
|
if (is_array($iblockExport) && count($iblockExport) !== 0) {
|
||||||
return (in_array($iblockId, $iblockExport));
|
return (in_array($iblockId, $iblockExport));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,7 @@ use Intaro\RetailCrm\Component\ConfigProvider;
|
|||||||
use Intaro\RetailCrm\Component\Factory\ClientFactory;
|
use Intaro\RetailCrm\Component\Factory\ClientFactory;
|
||||||
use Intaro\RetailCrm\Component\Json\Serializer;
|
use Intaro\RetailCrm\Component\Json\Serializer;
|
||||||
use Intaro\RetailCrm\Component\ServiceLocator;
|
use Intaro\RetailCrm\Component\ServiceLocator;
|
||||||
|
use Intaro\RetailCrm\Model\Api\IdentifiersPair;
|
||||||
use Intaro\RetailCrm\Model\Api\LoyaltyAccount;
|
use Intaro\RetailCrm\Model\Api\LoyaltyAccount;
|
||||||
use Intaro\RetailCrm\Model\Api\LoyaltyAccountApiFilterType;
|
use Intaro\RetailCrm\Model\Api\LoyaltyAccountApiFilterType;
|
||||||
use Intaro\RetailCrm\Model\Api\Request\Loyalty\Account\LoyaltyAccountRequest;
|
use Intaro\RetailCrm\Model\Api\Request\Loyalty\Account\LoyaltyAccountRequest;
|
||||||
@ -118,9 +119,12 @@ class LoyaltyAccountService
|
|||||||
$createRequest->loyaltyAccount = new SerializedCreateLoyaltyAccount();
|
$createRequest->loyaltyAccount = new SerializedCreateLoyaltyAccount();
|
||||||
$createRequest->loyaltyAccount->phoneNumber = $phone ?? '';
|
$createRequest->loyaltyAccount->phoneNumber = $phone ?? '';
|
||||||
$createRequest->loyaltyAccount->cardNumber = $card ?? '';
|
$createRequest->loyaltyAccount->cardNumber = $card ?? '';
|
||||||
$createRequest->loyaltyAccount->customer->externalId = $externalId;
|
|
||||||
$createRequest->loyaltyAccount->customFields = [];
|
$createRequest->loyaltyAccount->customFields = [];
|
||||||
|
|
||||||
|
$createRequest->loyaltyAccount->customer = new IdentifiersPair();
|
||||||
|
$createRequest->loyaltyAccount->customer->externalId = $externalId;
|
||||||
|
|
||||||
|
|
||||||
$createResponse = $client->createLoyaltyAccount($createRequest);
|
$createResponse = $client->createLoyaltyAccount($createRequest);
|
||||||
|
|
||||||
if ($createResponse instanceof LoyaltyAccountCreateResponse) {
|
if ($createResponse instanceof LoyaltyAccountCreateResponse) {
|
||||||
|
@ -22,6 +22,7 @@ use Intaro\RetailCrm\Component\Constants;
|
|||||||
use Intaro\RetailCrm\Component\Factory\ClientFactory;
|
use Intaro\RetailCrm\Component\Factory\ClientFactory;
|
||||||
use Intaro\RetailCrm\Component\ServiceLocator;
|
use Intaro\RetailCrm\Component\ServiceLocator;
|
||||||
use Intaro\RetailCrm\Model\Api\LoyaltyAccount;
|
use Intaro\RetailCrm\Model\Api\LoyaltyAccount;
|
||||||
|
use Intaro\RetailCrm\Model\Api\LoyaltyAccountApiFilterType;
|
||||||
use Intaro\RetailCrm\Model\Api\OrderProduct;
|
use Intaro\RetailCrm\Model\Api\OrderProduct;
|
||||||
use Intaro\RetailCrm\Model\Api\PriceType;
|
use Intaro\RetailCrm\Model\Api\PriceType;
|
||||||
use Intaro\RetailCrm\Model\Api\Request\Loyalty\Account\LoyaltyAccountRequest;
|
use Intaro\RetailCrm\Model\Api\Request\Loyalty\Account\LoyaltyAccountRequest;
|
||||||
@ -176,6 +177,7 @@ class LoyaltyService
|
|||||||
public function getLoyaltyAccounts(int $idInLoyalty): ?LoyaltyAccount
|
public function getLoyaltyAccounts(int $idInLoyalty): ?LoyaltyAccount
|
||||||
{
|
{
|
||||||
$request = new LoyaltyAccountRequest();
|
$request = new LoyaltyAccountRequest();
|
||||||
|
$request->filter = new LoyaltyAccountApiFilterType();
|
||||||
$request->filter->id = $idInLoyalty;
|
$request->filter->id = $idInLoyalty;
|
||||||
$request->filter->sites = $this->site;
|
$request->filter->sites = $this->site;
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ class Utils
|
|||||||
foreach ($arr as $index => $node) {
|
foreach ($arr as $index => $node) {
|
||||||
$result[$index] = is_array($node) === true ? $this->clearArray($node) : trim($node);
|
$result[$index] = is_array($node) === true ? $this->clearArray($node) : trim($node);
|
||||||
|
|
||||||
if ($result[$index] === '' || $result[$index] === null || count($result[$index]) < 1) {
|
if (empty($result[$index])) {
|
||||||
unset($result[$index]);
|
unset($result[$index]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -99,14 +99,22 @@ class TokenParser
|
|||||||
*/
|
*/
|
||||||
public function parseUseStatement()
|
public function parseUseStatement()
|
||||||
{
|
{
|
||||||
|
|
||||||
$groupRoot = '';
|
$groupRoot = '';
|
||||||
$class = '';
|
$class = '';
|
||||||
$alias = '';
|
$alias = '';
|
||||||
$statements = [];
|
$statements = [];
|
||||||
$explicitAlias = false;
|
$explicitAlias = false;
|
||||||
while (($token = $this->next())) {
|
while (($token = $this->next())) {
|
||||||
|
if (false !== strpos(PHP_VERSION, '8') && $token[0] === T_NAME_QUALIFIED) {
|
||||||
|
$fullAlias = explode('\\', $token[1]);
|
||||||
|
$alias = $fullAlias[array_key_last($fullAlias)];
|
||||||
|
$statements[strtolower($alias)] = $token[1];
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
$isNameToken = $token[0] === T_STRING || $token[0] === T_NS_SEPARATOR;
|
$isNameToken = $token[0] === T_STRING || $token[0] === T_NS_SEPARATOR;
|
||||||
|
|
||||||
if (!$explicitAlias && $isNameToken) {
|
if (!$explicitAlias && $isNameToken) {
|
||||||
$class .= $token[1];
|
$class .= $token[1];
|
||||||
$alias = $token[1];
|
$alias = $token[1];
|
||||||
|
@ -525,11 +525,8 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$bitrixCorpShopsArr = array_values(array_filter($_POST, 'maskCorp', ARRAY_FILTER_USE_KEY));
|
$bitrixCorpShopsArr = array_values(array_filter($_POST, 'maskCorp', ARRAY_FILTER_USE_KEY));
|
||||||
|
|
||||||
RegisterModuleDependences("main", "OnBeforeProlog", $mid, "RetailCrmCc", "add");
|
|
||||||
} else {
|
} else {
|
||||||
$cc = 'N';
|
$cc = 'N';
|
||||||
UnRegisterModuleDependences("main", "OnBeforeProlog", $mid, "RetailCrmCc", "add");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//purchasePrice_null
|
//purchasePrice_null
|
||||||
@ -983,6 +980,8 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<script type="text/javascript" src="/bitrix/js/main/jquery/jquery-1.7.min.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function createTemplates(donor) {
|
function createTemplates(donor) {
|
||||||
BX.ajax.runAction('intaro:retailcrm.api.adminpanel.createTemplate',
|
BX.ajax.runAction('intaro:retailcrm.api.adminpanel.createTemplate',
|
||||||
@ -1282,6 +1281,7 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<form method="POST" action="<?php echo $uri; ?>" id="FORMACTION">
|
<form method="POST" action="<?php echo $uri; ?>" id="FORMACTION">
|
||||||
<?php
|
<?php
|
||||||
echo bitrix_sessid_post();
|
echo bitrix_sessid_post();
|
||||||
@ -1436,7 +1436,7 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
|
|||||||
</td>
|
</td>
|
||||||
<td width="30%">
|
<td width="30%">
|
||||||
<label>
|
<label>
|
||||||
<input name="order-cansel-<?php echo $bitrixPaymentStatus['ID']; ?>" <?php if (in_array($bitrixPaymentStatus['ID'], $canselOrderArr)) {
|
<input name="order-cansel-<?php echo $bitrixPaymentStatus['ID']; ?>" <?php if (is_array($canselOrderArr) && in_array($bitrixPaymentStatus['ID'], $canselOrderArr)) {
|
||||||
echo "checked";
|
echo "checked";
|
||||||
} ?> value="Y" type="checkbox"/>
|
} ?> value="Y" type="checkbox"/>
|
||||||
</label>
|
</label>
|
||||||
@ -1602,7 +1602,7 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
|
|||||||
</tr>
|
</tr>
|
||||||
<? endforeach; ?>
|
<? endforeach; ?>
|
||||||
<? endif; ?>
|
<? endif; ?>
|
||||||
<tr class="heading legal-detail-title-<?php echo $bitrixOrderType['ID']; ?>" <?php if (count($optionsLegalDetails[$bitrixOrderType['ID']]) < 1) {
|
<tr class="heading legal-detail-title-<?php echo $bitrixOrderType['ID']; ?>" <?php if (is_array($optionsLegalDetails[$bitrixOrderType['ID']]) && count($optionsLegalDetails[$bitrixOrderType['ID']]) < 1) {
|
||||||
echo 'style="display:none"';
|
echo 'style="display:none"';
|
||||||
} ?>>
|
} ?>>
|
||||||
<td colspan="2" style="background-color: transparent;">
|
<td colspan="2" style="background-color: transparent;">
|
||||||
@ -2115,7 +2115,7 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
|
|||||||
echo 'style="display: none;"';
|
echo 'style="display: none;"';
|
||||||
} ?>>
|
} ?>>
|
||||||
<td colspan="2" class="option-other-center">
|
<td colspan="2" class="option-other-center">
|
||||||
<label><input class="addr" type="checkbox" name="shops-exoprt-<?= $sitesList['code']; ?>" value="<?= $sitesList['code']?>" <?php if (in_array($sitesList['code'], $optionShops)) {
|
<label><input class="addr" type="checkbox" name="shops-exoprt-<?= $sitesList['code']; ?>" value="<?= $sitesList['code']?>" <?php if (is_array($optionShops) && in_array($sitesList['code'], $optionShops)) {
|
||||||
echo "checked";
|
echo "checked";
|
||||||
} ?>> <?php echo $sitesList['name'] . ' (' . $sitesList['code'] . ')'; ?>
|
} ?>> <?php echo $sitesList['name'] . ' (' . $sitesList['code'] . ')'; ?>
|
||||||
</label>
|
</label>
|
||||||
@ -2136,8 +2136,7 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
|
|||||||
echo 'style="display: none;"';
|
echo 'style="display: none;"';
|
||||||
} ?>>
|
} ?>>
|
||||||
<td colspan="2" class="option-other-center">
|
<td colspan="2" class="option-other-center">
|
||||||
<label><input class="addr" type="checkbox" name="iblocks-stores-<? echo $catalogExportIblock['ID']; ?>" value="Y" <?php if (in_array($catalogExportIblock['ID'],
|
<label><input class="addr" type="checkbox" name="iblocks-stores-<? echo $catalogExportIblock['ID']; ?>" value="Y" <?php if (is_array($optionIblocksInventories) && in_array($catalogExportIblock['ID'], $optionIblocksInventories)) {
|
||||||
$optionIblocksInventories)) {
|
|
||||||
echo "checked";
|
echo "checked";
|
||||||
} ?>> <?php echo '[' . $catalogExportIblock['CODE'] . '] ' . $catalogExportIblock['NAME'] . ' (' . $catalogExportIblock['LID'] . ')'; ?></label>
|
} ?>> <?php echo '[' . $catalogExportIblock['CODE'] . '] ' . $catalogExportIblock['NAME'] . ' (' . $catalogExportIblock['LID'] . ')'; ?></label>
|
||||||
</td>
|
</td>
|
||||||
@ -2194,7 +2193,7 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
|
|||||||
echo 'style="display: none;"';
|
echo 'style="display: none;"';
|
||||||
} ?>>
|
} ?>>
|
||||||
<td colspan="2" class="option-other-center">
|
<td colspan="2" class="option-other-center">
|
||||||
<label><input class="addr" type="checkbox" name="shops-price-<? echo $sitesList['code']; ?>" value="<? echo $sitesList['code']; ?>" <?php if (in_array($sitesList['code'], $optionPriceShops)) {
|
<label><input class="addr" type="checkbox" name="shops-price-<? echo $sitesList['code']; ?>" value="<? echo $sitesList['code']; ?>" <?php if (is_array($optionPriceShops) && in_array($sitesList['code'], $optionPriceShops)) {
|
||||||
echo "checked";
|
echo "checked";
|
||||||
} ?>> <?php echo $sitesList['name'] . ' (' . $sitesList['code'] . ')'; ?>
|
} ?>> <?php echo $sitesList['name'] . ' (' . $sitesList['code'] . ')'; ?>
|
||||||
</label>
|
</label>
|
||||||
@ -2215,8 +2214,7 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
|
|||||||
echo 'style="display: none;"';
|
echo 'style="display: none;"';
|
||||||
} ?>>
|
} ?>>
|
||||||
<td colspan="2" class="option-other-center">
|
<td colspan="2" class="option-other-center">
|
||||||
<label><input class="addr" type="checkbox" name="iblocks-prices-<? echo $catalogExportIblock['ID']; ?>" value="Y" <?php if (in_array($catalogExportIblock['ID'],
|
<label><input class="addr" type="checkbox" name="iblocks-prices-<? echo $catalogExportIblock['ID']; ?>" value="Y" <?php if (is_array($optionIblocksPrices) && in_array($catalogExportIblock['ID'], $optionIblocksPrices)) {
|
||||||
$optionIblocksPrices)) {
|
|
||||||
echo "checked";
|
echo "checked";
|
||||||
} ?>> <?php echo '[' . $catalogExportIblock['CODE'] . '] ' . $catalogExportIblock['NAME'] . ' (' . $catalogExportIblock['LID'] . ')'; ?></label>
|
} ?>> <?php echo '[' . $catalogExportIblock['CODE'] . '] ' . $catalogExportIblock['NAME'] . ' (' . $catalogExportIblock['LID'] . ')'; ?></label>
|
||||||
</td>
|
</td>
|
||||||
@ -2383,7 +2381,7 @@ if (isset($_POST['Update']) && ($_POST['Update'] === 'Y')) {
|
|||||||
<td width="50%" class="" name="<?php ?>" align="center">
|
<td width="50%" class="" name="<?php ?>" align="center">
|
||||||
<?php foreach ($arResult['sitesList'] as $sitesList): ?>
|
<?php foreach ($arResult['sitesList'] as $sitesList): ?>
|
||||||
<td colspan="2" class="option-other-center">
|
<td colspan="2" class="option-other-center">
|
||||||
<label><input class="addr" type="checkbox" name="shops-corporate-<? echo $sitesList['code']; ?>" value="<? echo $sitesList['code']; ?>" <?php if (in_array($sitesList['code'], $optionCorpShops)) {
|
<label><input class="addr" type="checkbox" name="shops-corporate-<? echo $sitesList['code']; ?>" value="<? echo $sitesList['code']; ?>" <?php if (is_array($optionCorpShops) && in_array($sitesList['code'], $optionCorpShops)) {
|
||||||
echo "checked";
|
echo "checked";
|
||||||
} ?>> <?php echo $sitesList['name'] . ' (' . $sitesList['code'] . ')'; ?>
|
} ?>> <?php echo $sitesList['name'] . ' (' . $sitesList['code'] . ')'; ?>
|
||||||
</label>
|
</label>
|
||||||
|
@ -19,7 +19,7 @@ class BitrixTestCase extends \PHPUnit\Framework\TestCase
|
|||||||
* этот метод phpUnit вызывает перед запуском текущего теста
|
* этот метод phpUnit вызывает перед запуском текущего теста
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
// создание экземпляра Faker, который будет создавать рандомные данные
|
// создание экземпляра Faker, который будет создавать рандомные данные
|
||||||
$this->faker = \Faker\Factory::create();
|
$this->faker = \Faker\Factory::create();
|
||||||
@ -29,7 +29,7 @@ class BitrixTestCase extends \PHPUnit\Framework\TestCase
|
|||||||
* этот метод phpUnit вызывает после исполнения текущего теста
|
* этот метод phpUnit вызывает после исполнения текущего теста
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
*/
|
*/
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
// без этого вызова Mockery не будет работать
|
// без этого вызова Mockery не будет работать
|
||||||
\Mockery::close();
|
\Mockery::close();
|
||||||
|
@ -12,7 +12,7 @@ class AddressBuilderTest extends \PHPUnit\Framework\TestCase
|
|||||||
/**@var array $dataCrm */
|
/**@var array $dataCrm */
|
||||||
protected $dataCrm;
|
protected $dataCrm;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ class CustomerBuilderTest extends \PHPUnit\Framework\TestCase
|
|||||||
/**@var array $dataCrm */
|
/**@var array $dataCrm */
|
||||||
protected $dataCrm;
|
protected $dataCrm;
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ class RetailCrmCollectorTest extends \PHPUnit\Framework\TestCase
|
|||||||
{
|
{
|
||||||
const TEST_KEY = 'RC-XXXXXXXXXX-X';
|
const TEST_KEY = 'RC-XXXXXXXXXX-X';
|
||||||
|
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ class RetailCrmCollectorTest extends \PHPUnit\Framework\TestCase
|
|||||||
RetailCrmCollector::add();
|
RetailCrmCollector::add();
|
||||||
$strings = \Bitrix\Main\Page\Asset::getInstance()->getStrings();
|
$strings = \Bitrix\Main\Page\Asset::getInstance()->getStrings();
|
||||||
|
|
||||||
$this->assertContains(self::TEST_KEY, $strings);
|
$this->assertStringContainsString(self::TEST_KEY, $strings);
|
||||||
$this->assertContains('customerId', $strings);
|
$this->assertStringContainsString('customerId', $strings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,12 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
class RetailCrmEventTest extends PHPUnit\Framework\TestCase
|
class RetailCrmEventTest extends PHPUnit\Framework\TestCase
|
||||||
{
|
{
|
||||||
/**
|
public function setUp(): void
|
||||||
* @var RetailCrmEvent
|
|
||||||
*/
|
|
||||||
private $retailcrmEvent;
|
|
||||||
|
|
||||||
public function setUp()
|
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
@ -44,7 +39,7 @@ class RetailCrmEventTest extends PHPUnit\Framework\TestCase
|
|||||||
$arFields['RESULT'] = [];
|
$arFields['RESULT'] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->retailcrmEvent->OnAfterUserUpdate($arFields);
|
$result = RetailCrmEvent::OnAfterUserUpdate($arFields);
|
||||||
|
|
||||||
$this->assertEquals(false, $result);
|
$this->assertEquals(false, $result);
|
||||||
}
|
}
|
||||||
@ -86,7 +81,7 @@ class RetailCrmEventTest extends PHPUnit\Framework\TestCase
|
|||||||
COption::SetOptionString('intaro.retailcrm', 'api_version', 'v4');
|
COption::SetOptionString('intaro.retailcrm', 'api_version', 'v4');
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->retailcrmEvent->paymentSave($event);
|
$result = RetailCrmEvent::paymentSave($event);
|
||||||
|
|
||||||
$this->assertEquals(false, $result);
|
$this->assertEquals(false, $result);
|
||||||
}
|
}
|
||||||
@ -114,7 +109,7 @@ class RetailCrmEventTest extends PHPUnit\Framework\TestCase
|
|||||||
COption::SetOptionString('intaro.retailcrm', 'api_version', 'v4');
|
COption::SetOptionString('intaro.retailcrm', 'api_version', 'v4');
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->retailcrmEvent->paymentDelete($event);
|
$result = RetailCrmEvent::paymentDelete($event);
|
||||||
|
|
||||||
$this->assertEquals(false, $result);
|
$this->assertEquals(false, $result);
|
||||||
}
|
}
|
||||||
@ -149,7 +144,7 @@ class RetailCrmEventTest extends PHPUnit\Framework\TestCase
|
|||||||
{
|
{
|
||||||
$event = $this->createMock(\Bitrix\Main\Event::class);
|
$event = $this->createMock(\Bitrix\Main\Event::class);
|
||||||
|
|
||||||
$result = $this->retailcrmEvent->OrderDelete($event);
|
$result = RetailCrmEvent::OrderDelete($event);
|
||||||
|
|
||||||
$this->assertEquals(true, $GLOBALS['RETAILCRM_ORDER_DELETE']);
|
$this->assertEquals(true, $GLOBALS['RETAILCRM_ORDER_DELETE']);
|
||||||
}
|
}
|
||||||
@ -166,7 +161,7 @@ class RetailCrmEventTest extends PHPUnit\Framework\TestCase
|
|||||||
'ORDER_PROP' => []
|
'ORDER_PROP' => []
|
||||||
];
|
];
|
||||||
|
|
||||||
$result = $this->retailcrmEvent->OnUpdateOrder(1, $arFields);
|
$result = RetailCrmEvent::OnUpdateOrder(1, $arFields);
|
||||||
|
|
||||||
$this->assertEquals(true, $GLOBALS['RETAILCRM_ORDER_OLD_EVENT']);
|
$this->assertEquals(true, $GLOBALS['RETAILCRM_ORDER_OLD_EVENT']);
|
||||||
|
|
||||||
@ -235,7 +230,7 @@ class RetailCrmEventTest extends PHPUnit\Framework\TestCase
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function tearDown()
|
public function tearDown(): void
|
||||||
{
|
{
|
||||||
parent::tearDown();
|
parent::tearDown();
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ class RetailCrmHistory_v5Test extends \BitrixTestCase
|
|||||||
/**
|
/**
|
||||||
* setUp method
|
* setUp method
|
||||||
*/
|
*/
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ class RetailCrmOrder_v5Test extends BitrixTestCase {
|
|||||||
/**
|
/**
|
||||||
* setUp method
|
* setUp method
|
||||||
*/
|
*/
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ use Tests\Intaro\RetailCrm\Helpers;
|
|||||||
|
|
||||||
class CustomerBuilderTest extends TestCase
|
class CustomerBuilderTest extends TestCase
|
||||||
{
|
{
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
Helpers::setConfigProperty('contragentTypes', [
|
Helpers::setConfigProperty('contragentTypes', [
|
||||||
'individual' => 'individual'
|
'individual' => 'individual'
|
||||||
|
@ -5,7 +5,7 @@ use Bitrix\Main\EventManager;
|
|||||||
|
|
||||||
class EventsHandlersTest extends \BitrixTestCase
|
class EventsHandlersTest extends \BitrixTestCase
|
||||||
{
|
{
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
@ -27,8 +27,7 @@ class EventsHandlersTest extends \BitrixTestCase
|
|||||||
|
|
||||||
$spy = \Mockery::spy('overload:' .RetailCrmEvent::class);
|
$spy = \Mockery::spy('overload:' .RetailCrmEvent::class);
|
||||||
|
|
||||||
$onSaleOrderSaved = new EventsHandlers();
|
EventsHandlers::OnSaleOrderSavedHandler($event);
|
||||||
$onSaleOrderSaved->OnSaleOrderSavedHandler($event);
|
|
||||||
|
|
||||||
//Проверяет, был ли вызван метод класса. Если метод не вызывался, выдает ошибку теста
|
//Проверяет, был ли вызван метод класса. Если метод не вызывался, выдает ошибку теста
|
||||||
//Если метод вызывался, ошибку не выдает, но phpunit выдает сообщение об отсутствии тестов
|
//Если метод вызывался, ошибку не выдает, но phpunit выдает сообщение об отсутствии тестов
|
||||||
@ -50,9 +49,9 @@ class EventsHandlersTest extends \BitrixTestCase
|
|||||||
|
|
||||||
$spy = \Mockery::spy('overload:' .RetailCrmEvent::class);
|
$spy = \Mockery::spy('overload:' .RetailCrmEvent::class);
|
||||||
|
|
||||||
$onSaleOrderSaved = new EventsHandlers();
|
|
||||||
$onSaleOrderSaved::$disableSaleHandler = true;
|
EventsHandlers::$disableSaleHandler = true;
|
||||||
$onSaleOrderSaved->OnSaleOrderSavedHandler($event);
|
EventsHandlers::OnSaleOrderSavedHandler($event);
|
||||||
|
|
||||||
$spy->shouldNotHaveReceived('orderSave');
|
$spy->shouldNotHaveReceived('orderSave');
|
||||||
self::assertTrue(true);
|
self::assertTrue(true);
|
||||||
|
@ -8,16 +8,18 @@ use Intaro\RetailCrm\Service\LoyaltyAccountService;
|
|||||||
*/
|
*/
|
||||||
class LoyaltyAccountServiceTest extends BitrixTestCase
|
class LoyaltyAccountServiceTest extends BitrixTestCase
|
||||||
{
|
{
|
||||||
|
private LoyaltyAccountService $loyaltyAccountService;
|
||||||
/**
|
/**
|
||||||
* setUp method
|
* setUp method
|
||||||
*/
|
*/
|
||||||
public function setUp()
|
public function setUp(): void
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
|
|
||||||
COption::SetOptionString('intaro.retailcrm', 'api_version', 'v5');
|
COption::SetOptionString('intaro.retailcrm', 'api_version', 'v5');
|
||||||
CModule::IncludeModule('intaro.retailcrm');
|
CModule::IncludeModule('intaro.retailcrm');
|
||||||
|
|
||||||
|
$this->loyaltyAccountService = new LoyaltyAccountService();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -28,7 +30,7 @@ class LoyaltyAccountServiceTest extends BitrixTestCase
|
|||||||
*/
|
*/
|
||||||
public function testProveUserInLpExists(LoyaltyAccountCreateResponse $createResponse, $expected)
|
public function testProveUserInLpExists(LoyaltyAccountCreateResponse $createResponse, $expected)
|
||||||
{
|
{
|
||||||
self::assertEquals($expected,LoyaltyAccountService::proveUserInLpExists($createResponse));
|
self::assertEquals($expected, $this->loyaltyAccountService->proveUserInLpExists($createResponse));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -39,7 +41,7 @@ class LoyaltyAccountServiceTest extends BitrixTestCase
|
|||||||
*/
|
*/
|
||||||
public function testNotProveUserInLpExists(LoyaltyAccountCreateResponse $createResponse, $expected)
|
public function testNotProveUserInLpExists(LoyaltyAccountCreateResponse $createResponse, $expected)
|
||||||
{
|
{
|
||||||
self::assertEquals($expected,LoyaltyAccountService::proveUserInLpExists($createResponse));
|
self::assertEquals($expected, $this->loyaltyAccountService->proveUserInLpExists($createResponse));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user