Index: branches/unlabeled/unlabeled-1.79.4/core/kernel/db/db_event_handler.php =================================================================== diff -u -r7492 -r7504 --- branches/unlabeled/unlabeled-1.79.4/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 7492) +++ branches/unlabeled/unlabeled-1.79.4/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 7504) @@ -131,6 +131,7 @@ 'OnSetFilter' => Array('self' => true, 'subitem' => true), 'OnApplyFilters' => Array('self' => true, 'subitem' => true), 'OnRemoveFilters' => Array('self' => true, 'subitem' => true), + 'OnSetFilterPattern' => Array('self' => true, 'subitem' => true), 'OnSetPerPage' => Array('self' => true, 'subitem' => true), @@ -791,24 +792,33 @@ { $cur_sort1 = $this->Application->RecallVar($event->Prefix_Special.'_Sort1'); $cur_sort1_dir = $this->Application->RecallVar($event->Prefix_Special.'_Sort1_Dir'); - $cur_sort2 = $this->Application->RecallVar($event->Prefix_Special.'_Sort2'); - $cur_sort2_dir = $this->Application->RecallVar($event->Prefix_Special.'_Sort2_Dir'); + $use_double_sorting = $this->Application->ConfigValue('UseDoubleSorting') !== false ? $this->Application->ConfigValue('UseDoubleSorting') : true; + + if ($use_double_sorting) { + $cur_sort2 = $this->Application->RecallVar($event->Prefix_Special.'_Sort2'); + $cur_sort2_dir = $this->Application->RecallVar($event->Prefix_Special.'_Sort2_Dir'); + } + $passed_sort1 = $this->Application->GetVar($event->getPrefixSpecial(true).'_Sort1'); if ($cur_sort1 == $passed_sort1) { $cur_sort1_dir = $cur_sort1_dir == 'asc' ? 'desc' : 'asc'; } else { - $cur_sort2 = $cur_sort1; - $cur_sort2_dir = $cur_sort1_dir; + if ($use_double_sorting) { + $cur_sort2 = $cur_sort1; + $cur_sort2_dir = $cur_sort1_dir; + } $cur_sort1 = $passed_sort1; $cur_sort1_dir = 'asc'; } $this->Application->StoreVar($event->Prefix_Special.'_Sort1', $cur_sort1); $this->Application->StoreVar($event->Prefix_Special.'_Sort1_Dir', $cur_sort1_dir); - $this->Application->StoreVar($event->Prefix_Special.'_Sort2', $cur_sort2); - $this->Application->StoreVar($event->Prefix_Special.'_Sort2_Dir', $cur_sort2_dir); + if ($use_double_sorting) { + $this->Application->StoreVar($event->Prefix_Special.'_Sort2', $cur_sort2); + $this->Application->StoreVar($event->Prefix_Special.'_Sort2_Dir', $cur_sort2_dir); + } } /**