Dodanie obsługi tokenów przesyłania i kluczy RFM w edytorach artykułów, banerów i produktów; aktualizacja adresu URL do changeloga w widoku aktualizacji; usunięcie plików .DS_Store z katalogów szablonów.
This commit is contained in:
@@ -39,19 +39,24 @@ class Articles
|
||||
exit;
|
||||
}
|
||||
|
||||
public static function article_edit()
|
||||
{
|
||||
public static function article_edit() {
|
||||
global $user;
|
||||
|
||||
if ( !$user ) {
|
||||
header( 'Location: /admin/' );
|
||||
exit;
|
||||
}
|
||||
|
||||
\admin\factory\Articles::delete_nonassigned_images();
|
||||
\admin\factory\Articles::delete_nonassigned_files();
|
||||
|
||||
return \admin\view\Articles::article_edit(
|
||||
\admin\factory\Articles::article_details(
|
||||
\S::get( 'id' )
|
||||
),
|
||||
\admin\factory\Pages::menus_list(),
|
||||
\admin\factory\Languages::languages_list(),
|
||||
\admin\factory\Layouts::layouts_list()
|
||||
);
|
||||
return \Tpl::view( 'articles/article-edit', [
|
||||
'article' => \admin\factory\Articles::article_details( (int)\S::get( 'id' ) ),
|
||||
'menus' => \admin\factory\Pages::menus_list(),
|
||||
'languages' => \admin\factory\Languages::languages_list(),
|
||||
'layouts' => \admin\factory\Layouts::layouts_list(),
|
||||
'user' => $user
|
||||
] );
|
||||
}
|
||||
|
||||
public static function view_list()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -8,7 +8,7 @@ class Articles
|
||||
$tpl = new \Tpl;
|
||||
return $tpl -> render( 'articles/articles-browse-list' );
|
||||
}
|
||||
|
||||
|
||||
public static function subpages_list( $pages, $article_pages, $parent_id = 0, $step = 1 )
|
||||
{
|
||||
$tpl = new \Tpl();
|
||||
@@ -18,21 +18,11 @@ class Articles
|
||||
$tpl -> article_pages = $article_pages;
|
||||
return $tpl -> render( 'articles/subpages-list' );
|
||||
}
|
||||
|
||||
|
||||
public static function articles_list()
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
return $tpl -> render( 'articles/articles-list' );
|
||||
}
|
||||
|
||||
public static function article_edit( $article, $menus, $languages, $layouts )
|
||||
{
|
||||
$tpl = new \Tpl;
|
||||
$tpl -> article = $article;
|
||||
$tpl -> menus = $menus;
|
||||
$tpl -> languages = $languages;
|
||||
$tpl -> layouts = $layouts;
|
||||
return $tpl -> render( 'articles/article-edit' );
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -5,7 +5,6 @@ class Coupon implements \ArrayAccess
|
||||
public function __construct( int $element_id )
|
||||
{
|
||||
global $mdb;
|
||||
|
||||
if ( $element_id )
|
||||
{
|
||||
$result = $mdb -> get( 'pp_shop_coupon', '*', [ 'id' => $element_id ] );
|
||||
@@ -47,7 +46,7 @@ class Coupon implements \ArrayAccess
|
||||
|
||||
public function __get( $variable )
|
||||
{
|
||||
if ( is_array( $this -> data ) and array_key_exists( $variable, $this -> data ) )
|
||||
if ( array_key_exists( $variable, $this -> data ) )
|
||||
return $this -> $variable;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user