Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/languages/languages_tag_processor.php
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Line(s) | |||||
$params['m_lang'] = $object->GetID(); | $params['m_lang'] = $object->GetID(); | ||||
return $this->Application->ProcessParsedTag('m', 'Link', $params); | return $this->Application->ProcessParsedTag('m', 'Link', $params); | ||||
} | } | ||||
function SelectedLanguage($params) | function SelectedLanguage($params) | ||||
{ | { | ||||
/** @var kDBList $object */ | |||||
$object = $this->getObject($params); | $object = $this->getObject($params); | ||||
/* @var $object kDBList */ | |||||
if (array_key_exists('type', $params) && $params['type'] == 'data') { | if (array_key_exists('type', $params) && $params['type'] == 'data') { | ||||
// when using language selector on editing forms | // when using language selector on editing forms | ||||
return $object->GetDBField('LanguageId') == $this->Application->GetVar('m_lang'); | return $object->GetDBField('LanguageId') == $this->Application->GetVar('m_lang'); | ||||
} | } | ||||
return $object->GetDBField('LanguageId') == $this->Application->Phrases->LanguageId; | return $object->GetDBField('LanguageId') == $this->Application->Phrases->LanguageId; | ||||
} | } | ||||
Show All 35 Lines | |||||
/* function Main_IsMetricUnits($params) | /* function Main_IsMetricUnits($params) | ||||
{ | { | ||||
$object = $this->Application->recallObject($this->Prefix.'.current'); | $object = $this->Application->recallObject($this->Prefix.'.current'); | ||||
$measure_system = $object->GetDBField('UnitSystem'); | $measure_system = $object->GetDBField('UnitSystem'); | ||||
return $measure_system == 1 ? 1 : 0; | return $measure_system == 1 ? 1 : 0; | ||||
}*/ | }*/ | ||||
} | } | ||||
No newline at end of file | No newline at end of file |