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 Index: branches/RC/core/units/general/cat_event_handler.php =================================================================== diff -u -N -r9824 -r9839 --- branches/RC/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 9824) +++ branches/RC/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 9839) @@ -172,7 +172,7 @@ } } } - + /** * Deletes all selected items. * Automatically recurse into sub-items using temp handler, and deletes sub-items @@ -189,7 +189,7 @@ $event->status=erSUCCESS; $ids = $this->StoreSelectedIDs($event); - + $to_delete = array(); if ($recycle_bin = $this->Application->ConfigValue('RecycleBinFolder')) { $rb = $this->Application->recallObject('c.recycle', null, array('skip_autoload' => true)); @@ -207,7 +207,7 @@ } $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); - + $event->setEventParam('ids', $ids); $this->customProcessing($event, 'before'); $ids = $event->getEventParam('ids'); @@ -2282,26 +2282,6 @@ } /** - * Set sorting directly to session - * - * @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'); - } - - /** * Set's correct sorting for list * based on data provided with event *