Release 0.255: migrate remaining Languages usages to repository DI

This commit is contained in:
2026-02-12 22:28:57 +01:00
parent a02f718a41
commit 5e9b998043
25 changed files with 95 additions and 44 deletions

View File

@@ -802,7 +802,7 @@ class ShopProduct
if ( $id )
{
$langs = \admin\factory\Languages::languages_list( true );
$langs = ( new \Domain\Languages\LanguagesRepository( $mdb ) )->languagesList( true );
foreach ( $langs as $lg )
{
$mdb -> insert( 'pp_shop_products_langs', [
@@ -1009,7 +1009,7 @@ class ShopProduct
\admin\factory\ShopProduct::update_product_combinations_prices( $product_id, $price_brutto, $vat, $price_brutto_promo );
$langs = \admin\factory\Languages::languages_list( true );
$langs = ( new \Domain\Languages\LanguagesRepository( $mdb ) )->languagesList( true );
foreach ( $langs as $lg )
{
if ( $translation_id = $mdb -> get( 'pp_shop_products_langs', 'id', [ 'AND' => [ 'product_id' => $product_id, 'lang_id' => $lg['id'] ] ] ) )