Commit 66ea2e8b authored by git's avatar git Committed by davisben

Issue #2470087 by cosolom: Does not save the weight in multilingual materials

parent 14eaf237
......@@ -83,11 +83,12 @@ class views_handler_weight_selector extends views_handler_field {
function views_form_submit($form, &$form_state) {
$values = $form_state['values'];
$field = str_replace('_selector', '' , $values['views_field']);
$field_name = str_replace('_selector', '' , $values['views_field']);
foreach ($values[$values['views_field']] as $value) {
$entity = $value['entity'];
$entity->{$field}[$entity->language][0]['value'] = $value['weight'];
$lang = field_language($values['entity_type'], $entity, $field_name);
$entity->{$field_name}[$lang][0]['value'] = $value['weight'];
entity_save($values['entity_type'], $entity);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment