From 1ed56e388b5facdf6f3ad2e1c35b4cee5dd4376f Mon Sep 17 00:00:00 2001 From: jekkos Date: Thu, 6 Sep 2018 00:26:18 +0200 Subject: [PATCH] Rename migration script (#68) --- application/helpers/tabular_helper.php | 2 +- ...80220100000_attributes.php => 20180905100000_attributes.php} | 0 application/models/Item.php | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename application/migrations/{20180220100000_attributes.php => 20180905100000_attributes.php} (100%) diff --git a/application/helpers/tabular_helper.php b/application/helpers/tabular_helper.php index 3fb7044a0..90902f91e 100644 --- a/application/helpers/tabular_helper.php +++ b/application/helpers/tabular_helper.php @@ -407,7 +407,7 @@ function get_item_data_row($item) ), 'edit' => anchor($controller_name."/view/$item->item_id", '', array('class' => 'modal-dlg', 'data-btn-submit' => $CI->lang->line('common_submit'), 'title' => $CI->lang->line($controller_name.'_update')) - ), explode(',', $item->attribute_values))); + ), explode(',', (property_exists($item, 'attribute_values')) ? $item->attribute_values : ""))); } diff --git a/application/migrations/20180220100000_attributes.php b/application/migrations/20180905100000_attributes.php similarity index 100% rename from application/migrations/20180220100000_attributes.php rename to application/migrations/20180905100000_attributes.php diff --git a/application/models/Item.php b/application/models/Item.php index deedb74f6..91d24e980 100644 --- a/application/models/Item.php +++ b/application/models/Item.php @@ -193,7 +193,7 @@ class Item extends CI_Model } else if (count($filters['definition_ids']) > 0) { - $this->db->select('GROUP_CONCAT(attribute_value) AS attribute_values'); + $this->db->select('GROUP_CONCAT(attribute_value) AS attribute_values'); $this->db->join('attribute_links', 'attribute_links.item_id = items.item_id AND attribute_links.receiving_id IS NULL AND attribute_links.sale_id IS NULL AND definition_id IN (' . implode(',', $filters['definition_ids']) . ')', 'left'); $this->db->join('attribute_values', 'attribute_values.attribute_id = attribute_links.attribute_id', 'left'); $this->db->order_by('definition_id');