Dodanie obsługi dodatkowych danych producenta oraz informacji o bezpieczeństwie w klasach ShopProducer i ShopProduct
This commit is contained in:
@@ -9,11 +9,11 @@ class Languages
|
||||
global $mdb;
|
||||
return $mdb -> delete( 'pp_langs_translations', [ 'id' => $translation_id ] );
|
||||
}
|
||||
|
||||
|
||||
public static function translation_save( $translation_id, $text, $languages )
|
||||
{
|
||||
global $mdb;
|
||||
|
||||
|
||||
if ( $translation_id )
|
||||
{
|
||||
$mdb -> update( 'pp_langs_translations', [ 'text' => $text ], [ 'id' => $translation_id ] );
|
||||
@@ -38,13 +38,13 @@ class Languages
|
||||
return $translation_id;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static function translation_details( $translation_id )
|
||||
{
|
||||
global $mdb;
|
||||
return $mdb -> get( 'pp_langs_translations', '*', [ 'id' => $translation_id ] );
|
||||
}
|
||||
|
||||
|
||||
public static function language_delete( $language_id )
|
||||
{
|
||||
global $mdb;
|
||||
@@ -127,10 +127,15 @@ class Languages
|
||||
return $mdb -> get( 'pp_langs', '*', [ 'id' => $language_id ] );
|
||||
}
|
||||
|
||||
public static function languages_list()
|
||||
public static function languages_list( $only_active = false )
|
||||
{
|
||||
global $mdb;
|
||||
return $mdb -> select( 'pp_langs', '*', [ 'ORDER' => [ 'o' => 'ASC' ] ] );
|
||||
|
||||
$where = [];
|
||||
if ( $only_active )
|
||||
$where['status'] = 1;
|
||||
|
||||
return $mdb -> select( 'pp_langs', '*', array_merge( [ 'ORDER' => [ 'o' => 'ASC' ] ], $where ) );
|
||||
}
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user