Changeset View
Changeset View
Standalone View
Standalone View
core/units/promo_blocks/promo_block_tp.php
Show First 20 Lines • Show All 82 Lines • ▼ Show 20 Line(s) | |||||
WHERE PromoBlockGroupId = ' . (int)$group_id; | WHERE PromoBlockGroupId = ' . (int)$group_id; | ||||
$group_data = $this->Conn->GetRow($sql); | $group_data = $this->Conn->GetRow($sql); | ||||
} | } | ||||
$setting_name = $params['name']; | $setting_name = $params['name']; | ||||
return isset($group_data[$setting_name]) ? $group_data[$setting_name] : ''; | return isset($group_data[$setting_name]) ? $group_data[$setting_name] : ''; | ||||
} | } | ||||
/** | |||||
* Image Field | |||||
* | |||||
* @param array $params Tag params. | |||||
* | |||||
* @return string | |||||
*/ | |||||
protected function ImageField(array $params) | |||||
{ | |||||
$field = $this->SelectParam($params, 'name,field'); | |||||
if ( !$field ) { | |||||
$field = 'Image'; | |||||
} | |||||
alex: This code isn't covered by test plan at all. To test it you actually need to:
# create 2nd… | |||||
/** @var kMultiLanguage $multi_language_formatter */ | |||||
$multi_language_formatter = $this->Application->recallObject('kMultiLanguage'); | |||||
$current_language_field = $multi_language_formatter->LangFieldname($field); | |||||
/** @var kDBItem $object */ | |||||
$object = $this->getObject($params); | |||||
if ( !$object->GetDBField($current_language_field) ) { | |||||
$current_language_field = $multi_language_formatter->LangFieldname($field, true); | |||||
} | |||||
$params['name'] = $current_language_field; | |||||
return $this->Field($params); | |||||
Not Done ReplyThis, according to plan from task, should:
Such behavior is also not covered by test plan, where currently image on all languages is uploaded. alex: This, according to plan from task, should:
# take value from current language, when available… | |||||
} | |||||
} | } |
This code isn't covered by test plan at all. To test it you actually need to: