Skip to content

Commit

Permalink
Core: AttributeManager getAttributes method changed. Now to get all r…
Browse files Browse the repository at this point in the history
…ows without limits need to set limit=null into parameter $data.

Control Panel: product option global attribute lIst limitation in selectbox fix.
  • Loading branch information
abolabo committed Feb 6, 2014
1 parent fadf134 commit 82d5221
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -56,7 +56,8 @@ public function main() {
AND ga.status = 1
AND ga.attribute_parent_id = 0 ",
'sort' => 'sort_order',
'order' => 'ASC'
'order' => 'ASC',
'limit' => null // !set unlimit rows
),
$this->session->data['content_language_id']
);
Expand Down
6 changes: 4 additions & 2 deletions public_html/core/lib/attribute_manager.php
Expand Up @@ -580,7 +580,8 @@ public function getAttributes( $data = array(), $language_id = 0, $attribute_par
'grid_filter_params' => $grid_filter_params,
'additional_filter_string' => $filter_form->getFilterString()
) );
$data = array_merge( $filter_grid->getFilterData(), $data);
$filter_data = $filter_grid->getFilterData();
$data = array_merge($filter_data, $data);

if ($mode == 'total_only') {
$total_sql = 'count(*) as total';
Expand Down Expand Up @@ -635,7 +636,7 @@ public function getAttributes( $data = array(), $language_id = 0, $attribute_par
$sql .= " ASC";
}

if (isset($data['start']) || isset($data['limit'])) {
if (has_value($data['start']) || has_value($data['limit'])) {
if ($data['start'] < 0) {
$data['start'] = 0;
}
Expand All @@ -646,6 +647,7 @@ public function getAttributes( $data = array(), $language_id = 0, $attribute_par

$sql .= " LIMIT " . (int)$data['start'] . "," . (int)$data['limit'];
}

$query = $this->db->query($sql);
return $query->rows;
}
Expand Down

0 comments on commit 82d5221

Please sign in to comment.