CASE WHEN
'$l' = 'en' THEN display_name
ELSE
- cms_templatestr.txt
+ CASE WHEN cms_templatestr.txt IS NOT NULL AND cms_templatestr.txt != '' THEN
+ cms_templatestr.txt
+ ELSE
+ display_name
+ END
END as display_name_tr
");
* @return array ID of core_enum
*/
- function lookupAllByName($etype,$name) {
+ function lookupAllByName($etype,$names) {
$ce = DB_DataObject::Factory('core_enum');
$ce->etype = $etype;
- $ce->whereAddIn('name', $name, 'string');
+ $ce->whereAddIn('name', $names, 'string');
if ($ce->count() > 0) {
return $ce->fetchAll('id');