Index: branches/RC/core/kernel/db/db_event_handler.php =================================================================== diff -u -N -r9639 -r9839 --- branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 9639) +++ branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 9839) @@ -901,6 +901,26 @@ } /** + * Set sorting directly to session (used for category item sorting (front-end), grid sorting (admin, view menu) + * + * @param kEvent $event + */ + function OnSetSortingDirect(&$event) + { + $combined = $this->Application->GetVar($event->Prefix.'_CombinedSorting'); + if ($combined) { + list($field, $dir) = explode('|', $combined); + $this->Application->StoreVar($event->Prefix.'_Sort1', $field); + $this->Application->StoreVar($event->Prefix.'_Sort1_Dir', $dir); + return ; + } + + $field_pos = $this->Application->GetVar($event->Prefix.'_SortPos'); + $this->Application->LinkVar($event->Prefix.'_Sort'.$field_pos, $event->Prefix.'_Sort'.$field_pos); + $this->Application->LinkVar($event->Prefix.'_Sort'.$field_pos.'_Dir', $event->Prefix.'_Sort'.$field_pos.'_Dir'); + } + + /** * Reset grid sorting to default (from config) * * @param kEvent $event