Fix attribute visibility view if none selected (#2485)

This commit is contained in:
jekkos
2019-08-07 00:14:22 +02:00
parent 0a2894c582
commit 0d3a33f1ba

View File

@@ -131,7 +131,7 @@ class Attributes extends Secure_Controller
$definition_flag_names = array();
foreach (Attribute::get_definition_flags() as $id => $term)
{
if (empty($definition_flags) || ($id & $definition_flags))
if ($id & $definition_flags)
{
$definition_flag_names[$id] = $this->lang->line('attributes_' . strtolower($term) . '_visibility');
}
@@ -153,7 +153,8 @@ class Attributes extends Secure_Controller
$data['definition_group'][''] = $this->lang->line('common_none_selected_text');
$data['definition_info'] = $info;
$data['definition_flags'] = $this->_get_attributes();
$show_all = Attribute::SHOW_IN_ITEMS | Attribute::SHOW_IN_RECEIVINGS | Attribute::SHOW_IN_SALES;
$data['definition_flags'] = $this->_get_attributes($show_all);
$data['selected_definition_flags'] = $this->_get_attributes($info->definition_flags);
$this->load->view("attributes/form", $data);