Index: branches/RC/core/kernel/db/db_event_handler.php =================================================================== diff -u -N -r11361 -r11381 --- branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 11361) +++ branches/RC/core/kernel/db/db_event_handler.php (.../db_event_handler.php) (revision 11381) @@ -803,10 +803,11 @@ } } - if ($sorting_configs && isset ($sorting_configs['DefaultSorting1Field'])){ + // get default sortings fields + if (array_key_exists('DefaultSorting1Field', $sorting_configs)) { $list_sortings[$sorting_prefix]['Sorting'] = Array( $this->Application->ConfigValue($sorting_configs['DefaultSorting1Field']) => $this->Application->ConfigValue($sorting_configs['DefaultSorting1Dir']), - $this->Application->ConfigValue($sorting_configs['DefaultSorting2Field']) => $this->Application->ConfigValue($sorting_configs['DefaultSorting2Dir']), + $this->Application->ConfigValue($sorting_configs['DefaultSorting2Field']) => $this->Application->ConfigValue($sorting_configs['DefaultSorting2Dir']), ); } @@ -824,12 +825,21 @@ } } + // get Editor Pick sorting preference and field + if (array_key_exists('ForceEditorPick', $sorting_configs) && $this->Application->ConfigValue($sorting_configs['ForceEditorPick']) && array_key_exists('ForceEditorPickField', $sorting_configs)) { + foreach ($sorting_configs['ForceEditorPickField'] as $field => $dir) { + $object->AddOrderField($field, $dir); + } + } + if ( $forced_sorting = getArrayValue($list_sortings, $sorting_prefix, 'ForcedSorting') ) { foreach ($forced_sorting as $field => $dir) { $object->AddOrderField($field, $dir); } } + if ( $forced_sorting = getArrayValue($list_sortings, $sorting_prefix, 'ForcedSorting') ) { + if($cur_sort1 != '' && $cur_sort1_dir != '') { $object->AddOrderField($cur_sort1, $cur_sort1_dir);