ver. 0.285: Tpl → Shared\Tpl namespace, CurlServer removal, thumb.php fix

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 00:13:59 +01:00
parent fc7d18123d
commit 28b30c1e56
144 changed files with 385 additions and 285 deletions

View File

@@ -32,7 +32,7 @@ class ShopBasket
\Shared\Helpers\Helpers::set_session( 'basket', $basket );
echo json_encode( [
'basket' => \Tpl::view( 'shop-basket/basket-details', [
'basket' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
'basket' => $basket,
'lang_id' => $lang_id,
'coupon' => $coupon
@@ -40,7 +40,7 @@ class ShopBasket
'basket_mini_count' => \front\factory\ShopBasket::count_products_text( \front\factory\ShopBasket::count_products( $basket ) ),
'basket_mini_value' => \front\factory\ShopBasket::summary_price( $basket, $coupon ),
'products_count' => count( $basket ),
'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
'transport_id' => $basket_transport_method_id
] )
@@ -67,7 +67,7 @@ class ShopBasket
\Shared\Helpers\Helpers::set_session( 'basket', $basket );
echo json_encode( [
'basket' => \Tpl::view( 'shop-basket/basket-details', [
'basket' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
'basket' => $basket,
'lang_id' => $lang_id,
'coupon' => $coupon
@@ -75,7 +75,7 @@ class ShopBasket
'basket_mini_count' => \front\factory\ShopBasket::count_products_text( \front\factory\ShopBasket::count_products( $basket ) ),
'basket_mini_value' => \front\factory\ShopBasket::summary_price( $basket, $coupon ),
'products_count' => count( $basket ),
'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
'transport_id' => $basket_transport_method_id
] )
@@ -103,7 +103,7 @@ class ShopBasket
\Shared\Helpers\Helpers::set_session( 'basket', $basket );
echo json_encode( [
'basket' => \Tpl::view( 'shop-basket/basket-details', [
'basket' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
'basket' => $basket,
'lang_id' => $lang_id,
'coupon' => $coupon
@@ -111,7 +111,7 @@ class ShopBasket
'basket_mini_count' => \front\factory\ShopBasket::count_products_text( \front\factory\ShopBasket::count_products( $basket ) ),
'basket_mini_value' => \front\factory\ShopBasket::summary_price( $basket, $coupon ),
'products_count' => count( $basket ),
'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
'transport_id' => $basket_transport_method_id
] )
@@ -140,7 +140,7 @@ class ShopBasket
$basket = \Shared\Helpers\Helpers::get_session( 'basket' );
echo json_encode( [
'basket' => \Tpl::view( 'shop-basket/basket-details', [
'basket' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
'basket' => $basket,
'lang_id' => $lang_id,
'coupon' => $coupon
@@ -148,7 +148,7 @@ class ShopBasket
'basket_mini_count' => \front\factory\ShopBasket::count_products_text( \front\factory\ShopBasket::count_products( $basket ) ),
'basket_mini_value' => \front\factory\ShopBasket::summary_price( $basket, $coupon ),
'products_count' => count( $basket ),
'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
'transport_id' => $basket_transport_method_id
] )
@@ -339,7 +339,7 @@ class ShopBasket
$client = \Shared\Helpers\Helpers::get_session( 'client' );
return \Tpl::view( 'shop-basket/summary-view', [
return \Shared\Tpl\Tpl::view( 'shop-basket/summary-view', [
'lang_id' => $lang_id,
'client' => \Shared\Helpers\Helpers::get_session( 'client' ),
'basket' => \Shared\Helpers\Helpers::get_session( 'basket' ),
@@ -437,16 +437,16 @@ class ShopBasket
$basket = \shop\Promotion::find_promotion( $basket );
return \Tpl::view( 'shop-basket/basket', [
return \Shared\Tpl\Tpl::view( 'shop-basket/basket', [
'basket' => $basket,
'coupon' => $coupon,
'transport_id' => \Shared\Helpers\Helpers::get_session( 'basket-transport-method-id' ),
'transport_methods' => \Tpl::view( 'shop-basket/basket-transport-methods', [
'transport_methods' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-transport-methods', [
'transports_methods' => \front\factory\ShopTransport::transport_methods( $basket, $coupon ),
'transport_id' => $basket_transport_method_id
] ),
'payment_method_id' => $payment_method_id,
'basket_details' => \Tpl::view( 'shop-basket/basket-details', [
'basket_details' => \Shared\Tpl\Tpl::view( 'shop-basket/basket-details', [
'basket' => $basket,
'lang_id' => $lang_id,
'coupon' => $coupon,

View File

@@ -8,7 +8,7 @@ class ShopOrder
$order = \front\factory\ShopOrder::order_details( null, \Shared\Helpers\Helpers::get( 'order_hash' ) );
return \Tpl::view( 'shop-order/payment-confirmation', [
return \Shared\Tpl\Tpl::view( 'shop-order/payment-confirmation', [
'order' => $order,
'settings' => $settings
] );
@@ -143,7 +143,7 @@ class ShopOrder
);
$coupon = (int)$order['coupon_id'] ? new \shop\Coupon( (int)$order['coupon_id'] ) : null;
return \Tpl::view( 'shop-order/order-details', [
return \Shared\Tpl\Tpl::view( 'shop-order/order-details', [
'order' => $order,
'coupon' => $coupon,
'client' => \Shared\Helpers\Helpers::get_session( 'client' ),

View File

@@ -15,7 +15,7 @@ class ShopProducer
if ( $results['ls'] > 1 )
{
$pager = \Tpl::view( 'site/pager', [
$pager = \Shared\Tpl\Tpl::view( 'site/pager', [
'ls' => $results['ls'],
'bs' => (int) \Shared\Helpers\Helpers::get( 'bs' ) ? (int) \Shared\Helpers\Helpers::get( 'bs' ) : 1,
'page' => $page,
@@ -23,7 +23,7 @@ class ShopProducer
] );
}
return \Tpl::view( 'shop-producer/products', [
return \Shared\Tpl\Tpl::view( 'shop-producer/products', [
'producer' => $producer,
'products' => $results['products'],
'pager' => $pager
@@ -41,7 +41,7 @@ class ShopProducer
if ( \Shared\Helpers\Helpers::is_array_fix( $rows ) ) foreach ( $rows as $row )
$producers[] = new \shop\Producer( $row );
return \Tpl::view( 'shop-producer/list', [
return \Shared\Tpl\Tpl::view( 'shop-producer/list', [
'producers' => $producers
] );
}

View File

@@ -12,7 +12,7 @@ class ShopProduct
$products_ids = \front\factory\ShopCategory::products_id( \Shared\Helpers\Helpers::get( 'category_id' ), \front\factory\ShopCategory::get_category_sort( (int)\Shared\Helpers\Helpers::get( 'category_id' ) ), $lang_id, 8, \Shared\Helpers\Helpers::get( 'offset' ) );
if ( is_array( $products_ids ) ): foreach ( $products_ids as $product_id ):
$output .= \Tpl::view('shop-product/product-mini', [
$output .= \Shared\Tpl\Tpl::view('shop-product/product-mini', [
'product' => Product::getFromCache( $product_id, $lang_id )
] );
endforeach;

View File

@@ -44,7 +44,7 @@ class Site
if ( $product )
{
\shop\Product::add_visit( $product -> id );
return \Tpl::view( 'shop-product/product', [
return \Shared\Tpl\Tpl::view( 'shop-product/product', [
'product' => $product,
'settings' => $settings,
'lang_id' => $lang_id,