Skip to content

Commit 10917c9

Browse files
authored
Merge pull request #1740 from abantecart/1.4.2.1
1.4.2.1
2 parents 7296267 + 7d95a1e commit 10917c9

File tree

7 files changed

+45
-1187
lines changed

7 files changed

+45
-1187
lines changed

public_html/core/engine/layout.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
* Copyright © 2011-2025 Belavier Commerce LLC
99
*
1010
* This source file is subject to Open Software License (OSL 3.0)
11-
* License details is bundled with this package in the file LICENSE.txt.
11+
* License details are bundled with this package in the file LICENSE.txt.
1212
* It is also available at this URL:
1313
* <http://www.opensource.org/licenses/OSL-3.0>
1414
*
1515
* UPGRADE NOTE:
1616
* Do not edit or add to this file if you wish to upgrade AbanteCart to newer
1717
* versions in the future. If you wish to customize AbanteCart for your
18-
* needs please refer to http://www.AbanteCart.com for more information.
18+
* needs, please refer to http://www.AbanteCart.com for more information.
1919
*/
2020
if (!defined('DIR_CORE')) {
2121
header('Location: static_pages/');
@@ -52,7 +52,7 @@ class ALayout
5252
public function __construct($registry, $template_id)
5353
{
5454
$this->registry = $registry;
55-
$this->tmpl_id = $template_id;
55+
$this->tmpl_id = preformatTextID($template_id);
5656
$this->page_id = '';
5757
}
5858

public_html/core/init.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
<?php
2-
/*------------------------------------------------------------------------------
3-
$Id$
4-
5-
AbanteCart, Ideal OpenSource Ecommerce Solution
6-
http://www.AbanteCart.com
7-
8-
Copyright © 2011-2022 Belavier Commerce LLC
9-
10-
This source file is subject to Open Software License (OSL 3.0)
11-
License details is bundled with this package in the file LICENSE.txt.
12-
It is also available at this URL:
13-
<http://www.opensource.org/licenses/OSL-3.0>
14-
15-
UPGRADE NOTE:
16-
Do not edit or add to this file if you wish to upgrade AbanteCart to newer
17-
versions in the future. If you wish to customize AbanteCart for your
18-
needs please refer to http://www.AbanteCart.com for more information.
19-
------------------------------------------------------------------------------*/
2+
/*
3+
* $Id$
4+
*
5+
* AbanteCart, Ideal OpenSource Ecommerce Solution
6+
* http://www.AbanteCart.com
7+
*
8+
* Copyright © 2011-2025 Belavier Commerce LLC
9+
*
10+
* This source file is subject to Open Software License (OSL 3.0)
11+
* License details are bundled with this package in the file LICENSE.txt.
12+
* It is also available at this URL:
13+
* <http://www.opensource.org/licenses/OSL-3.0>
14+
*
15+
* UPGRADE NOTE:
16+
* Do not edit or add to this file if you wish to upgrade AbanteCart to newer
17+
* versions in the future. If you wish to customize AbanteCart for your
18+
* needs, please refer to http://www.AbanteCart.com for more information.
19+
*/
2020

2121
//check minimal system requirements
2222
$composerJson = file_get_contents(DIR_ROOT.'/composer.json');
@@ -497,7 +497,7 @@ function clean($data)
497497
//check if we specify template directly
498498
$template = 'default';
499499
if (IS_ADMIN !== true && !empty($request->get['sf'])) {
500-
$template = preg_replace('/[^A-Za-z0-9_]+/', '', $request->get['sf']);
500+
$template = preformatTextID($request->get['sf']);
501501
$dir = $template.DIR_EXT_STORE.DIR_EXT_TEMPLATE.$template;
502502
if (in_array($template, $enabled_extensions) && is_dir(DIR_EXT.$dir)) {
503503
$is_valid = true;

public_html/core/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?php
22
define('MASTER_VERSION', '1');
33
define('MINOR_VERSION', '4');
4-
define('VERSION_BUILT', '2');
4+
define('VERSION_BUILT', '2.1');

public_html/extensions/page_builder/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<extension>
33
<id>page_builder</id>
4-
<version>1.4.0</version>
4+
<version>1.4.2</version>
55
<type>extension</type>
66
<category>tools</category>
77
<cartversions>

public_html/extensions/page_builder/core/page_builder_hooks.php

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
* AbanteCart, Ideal OpenSource Ecommerce Solution
66
* http://www.AbanteCart.com
77
*
8-
* Copyright © 2011-2024 Belavier Commerce LLC
8+
* Copyright © 2011-2025 Belavier Commerce LLC
99
*
1010
* This source file is subject to Open Software License (OSL 3.0)
11-
* License details is bundled with this package in the file LICENSE.txt.
11+
* License details are bundled with this package in the file LICENSE.txt.
1212
* It is also available at this URL:
1313
* <http://www.opensource.org/licenses/OSL-3.0>
1414
*
1515
* UPGRADE NOTE:
1616
* Do not edit or add to this file if you wish to upgrade AbanteCart to newer
1717
* versions in the future. If you wish to customize AbanteCart for your
18-
* needs please refer to http://www.AbanteCart.com for more information.
18+
* needs, please refer to http://www.AbanteCart.com for more information.
1919
*/
2020

2121
use AbanteCart\PBRender;
@@ -172,8 +172,9 @@ public function onAHook_InitEnd()
172172
{
173173
$registry = Registry::getInstance();
174174
if ($registry?->get('request')->get['tmpl_id']) {
175-
$registry?->get('config')->set('config_storefront_template', $registry->get('request')->get['tmpl_id']);
176-
$registry?->set('layout', new ALayout($registry, $registry->get('request')->get['tmpl_id']));
175+
$templateTextId = preformatTextID($registry->get('request')->get['tmpl_id']);
176+
$registry->get('config')->set('config_storefront_template', $templateTextId);
177+
$registry->set('layout', new ALayout($registry, $templateTextId));
177178
}
178179
}
179180

@@ -377,7 +378,7 @@ public function onControllerPagesDesignLayout_UpdateData()
377378

378379
$execController = $pageData['controller'];
379380
if(!$keyParam) {
380-
$templateTxtId = $that->request->get['tmpl_id']
381+
$templateTxtId = preformatTextID($that->request->get['tmpl_id'])
381382
?: Registry::getInstance()->get('config')->get('config_storefront_template');
382383
$l = new ALayout(Registry::getInstance(), $templateTxtId);
383384
$keyParam = $l->getKeyParamByController($execController);
@@ -398,7 +399,7 @@ protected function getLayoutIdsByParameters(string $rt, string $keyParam, int $k
398399
$that = $this->baseObject;
399400
$pageId = $layoutId = null;
400401

401-
$templateTxtId = $that->request->get['tmpl_id']
402+
$templateTxtId = preformatTextID($that->request->get['tmpl_id'])
402403
?: Registry::getInstance()->get('config')->get('config_storefront_template');
403404
$layout = new ALayout(Registry::getInstance(), $templateTxtId);
404405
if(!$keyParam) {

0 commit comments

Comments
 (0)