Dodanie obsługi tokenów przesyłania i kluczy API w edytorach artykułów, banerów i produktów; aktualizacja adresu URL do changeloga
This commit is contained in:
@@ -229,22 +229,29 @@ class ShopProduct
|
||||
}
|
||||
|
||||
// edycja produktu
|
||||
public static function product_edit()
|
||||
{
|
||||
public static function product_edit() {
|
||||
global $user;
|
||||
|
||||
if ( !$user ) {
|
||||
header( 'Location: /admin/' );
|
||||
exit;
|
||||
}
|
||||
|
||||
\admin\factory\ShopProduct::delete_nonassigned_images();
|
||||
\admin\factory\ShopProduct::delete_nonassigned_files();
|
||||
|
||||
return \Tpl::view( 'shop-product/product-edit', [
|
||||
'product' => \admin\factory\ShopProduct::product_details( (int) \S::get( 'id' ) ),
|
||||
'languages' => \admin\factory\Languages::languages_list(),
|
||||
'categories' => \admin\factory\ShopCategory::subcategories( null ),
|
||||
'layouts' => \admin\factory\Layouts::layouts_list(),
|
||||
'products' => \admin\factory\ShopProduct::products_list(),
|
||||
'dlang' => \front\factory\Languages::default_language(),
|
||||
'sets' => \shop\ProductSet::sets_list(),
|
||||
'producers' => \admin\factory\ShopProducer::all(),
|
||||
'units' => \admin\factory\Dictionaries::all_units()
|
||||
] );
|
||||
'product' => \admin\factory\ShopProduct::product_details( (int) \S::get( 'id' ) ),
|
||||
'languages' => \admin\factory\Languages::languages_list(),
|
||||
'categories' => \admin\factory\ShopCategory::subcategories( null ),
|
||||
'layouts' => \admin\factory\Layouts::layouts_list(),
|
||||
'products' => \admin\factory\ShopProduct::products_list(),
|
||||
'dlang' => \front\factory\Languages::default_language(),
|
||||
'sets' => \shop\ProductSet::sets_list(),
|
||||
'producers' => \admin\factory\ShopProducer::all(),
|
||||
'units' => \admin\factory\Dictionaries::all_units(),
|
||||
'user' => $user
|
||||
] );
|
||||
}
|
||||
|
||||
// ajax_load_products ARCHIVE
|
||||
|
||||
Reference in New Issue
Block a user