ver. 0.251 - migrate Dictionaries to Domain/Controller and remove legacy classes
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
<?
|
||||
namespace front\factory;
|
||||
class Dictionaries
|
||||
{
|
||||
static public function get_name_by_id( int $unit_id, $lang_id )
|
||||
{
|
||||
global $mdb;
|
||||
|
||||
if ( !$unit_name = \Cache::fetch( "get_name_by_id:$unit_id:$lang_id", "dictionaries" ) )
|
||||
{
|
||||
$unit_name = $mdb -> get( 'pp_units_langs', 'text', [ 'AND' => [ 'unit_id' => $unit_id, 'lang_id' => $lang_id ] ] );
|
||||
\Cache::store( "get_name_by_id:$unit_id:$lang_id", $unit_name, 86400, "dictionaries" );
|
||||
}
|
||||
return $unit_name;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user