Index: branches/5.3.x/core/units/helpers/cat_dbitem_export_helper.php =================================================================== diff -u -N -r16111 -r16395 --- branches/5.3.x/core/units/helpers/cat_dbitem_export_helper.php (.../cat_dbitem_export_helper.php) (revision 16111) +++ branches/5.3.x/core/units/helpers/cat_dbitem_export_helper.php (.../cat_dbitem_export_helper.php) (revision 16395) @@ -1,6 +1,6 @@ exportOptions['ForceSelectSQL']; } else { - $items_list = $this->Application->recallObject($this->curItem->Prefix . '.export-items-list', $this->curItem->Prefix . '_List'); - /* @var $items_list kDBList */ + /** @var kDBList $items_list */ + $items_list = $this->Application->recallObject( + $this->curItem->Prefix . '.' . $this->exportOptions['export_special'], + $this->curItem->Prefix . '_List', + array('grid' => $this->exportOptions['export_grid']) + ); $items_list->SetPerPage(-1); @@ -527,7 +531,7 @@ $sql = substr($sql, 0, -4); } - $sql .= ' ORDER BY ci.PrimaryCat DESC'; // NEW + $sql .= ' ORDER BY ci.PrimaryCat DESC, c.TreeLeft ASC, item_table.' . $this->curItem->IDField . ' ASC'; } else { // get only selected links @@ -1471,6 +1475,8 @@ // used for multistep export $field_values['export_ids'] = $export_ids ? explode(',', $export_ids) : false; $field_values['export_cats_ids'] = $export_cats_ids ? explode(',', $export_cats_ids) : Array ($this->Application->GetVar('m_cat_id')); + $field_values['export_special'] = $this->Application->RecallVar('export_special'); + $field_values['export_grid'] = $this->Application->RecallVar('export_grid'); } $field_values['ExportColumns'] = $field_values['ExportColumns'] ? explode('|', substr($field_values['ExportColumns'], 1, -1) ) : Array(); @@ -1578,4 +1584,4 @@ $object->setRequired($required_fields); } - } \ No newline at end of file + }