Skip to content

Commit 219e3ee

Browse files
committed
fixed include template
1 parent 2c352fa commit 219e3ee

File tree

4 files changed

+24
-12
lines changed

4 files changed

+24
-12
lines changed

utf8/dev2fun.stripepayment/install/sale_payment/stripe/payment.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();
22
/**
33
* @author darkfriend <hi@darkfriend.ru>
4-
* @copyright (c) 2019-2021, darkfriend
5-
* @version 1.3.10
4+
* @copyright (c) 2019-2022, darkfriend
5+
* @version 1.3.11
66
*/
77

88
use \Bitrix\Main\Application;
@@ -215,13 +215,19 @@
215215
die();
216216
}
217217

218+
if(empty($SALE_CORRESPONDENCE['STRIPE_TEMPLATE']['VALUE'])) {
219+
$fileTemplate = 'custom';
220+
} else {
221+
$fileTemplate = $SALE_CORRESPONDENCE['STRIPE_TEMPLATE']['VALUE'];
222+
}
223+
218224
$fileTemplate = Dev2funModuleStripeClass::GetPathTemplate($SALE_CORRESPONDENCE['STRIPE_TEMPLATE']['VALUE']);
225+
$fileTemplate .= '/templates.php';
219226

220227
$error = false;
221228

222-
$fileTemplate = __DIR__ . '/templates/custom';
223229
if ($fileTemplate && file_exists($fileTemplate)) {
224-
include_once $fileTemplate . '/templates.php';
230+
include $fileTemplate;
225231
} else {
226232
ShowError('No template "' . $SALE_CORRESPONDENCE['STRIPE_TEMPLATE']['VALUE'] . '"');
227233
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22
$arModuleVersion = [
3-
'VERSION' => '1.3.10',
4-
'VERSION_DATE' => '2021-11-11 02:00:00',
3+
"VERSION" => "1.3.11",
4+
"VERSION_DATE" => "2022-01-28 02:00:00",
55
];

win1251/dev2fun.stripepayment/install/sale_payment/stripe/payment.php

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();
22
/**
33
* @author darkfriend <hi@darkfriend.ru>
4-
* @copyright (c) 2019-2021, darkfriend
5-
* @version 1.3.10
4+
* @copyright (c) 2019-2022, darkfriend
5+
* @version 1.3.11
66
*/
77

88
use \Bitrix\Main\Application;
@@ -215,13 +215,19 @@
215215
die();
216216
}
217217

218+
if(empty($SALE_CORRESPONDENCE['STRIPE_TEMPLATE']['VALUE'])) {
219+
$fileTemplate = 'custom';
220+
} else {
221+
$fileTemplate = $SALE_CORRESPONDENCE['STRIPE_TEMPLATE']['VALUE'];
222+
}
223+
218224
$fileTemplate = Dev2funModuleStripeClass::GetPathTemplate($SALE_CORRESPONDENCE['STRIPE_TEMPLATE']['VALUE']);
225+
$fileTemplate .= '/templates.php';
219226

220227
$error = false;
221228

222-
$fileTemplate = __DIR__ . '/templates/custom';
223229
if ($fileTemplate && file_exists($fileTemplate)) {
224-
include_once $fileTemplate . '/templates.php';
230+
include $fileTemplate;
225231
} else {
226232
ShowError('No template "' . $SALE_CORRESPONDENCE['STRIPE_TEMPLATE']['VALUE'] . '"');
227233
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22
$arModuleVersion = [
3-
'VERSION' => '1.3.10',
4-
'VERSION_DATE' => '2021-11-11 02:00:00',
3+
"VERSION" => "1.3.11",
4+
"VERSION_DATE" => "2022-01-28 02:00:00",
55
];

0 commit comments

Comments
 (0)