Index: branches/RC/core/units/general/cat_event_handler.php =================================================================== diff -u -r11107 -r11392 --- branches/RC/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 11107) +++ branches/RC/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 11392) @@ -2414,6 +2414,23 @@ $file_helper->createItemFiles($event->Prefix, true); // create image fields $file_helper->createItemFiles($event->Prefix, false); // create file fields } + + // add EditorsPick to ForcedSorting if needed + $config_mapping = $this->Appication->getUnitOption($event->Prefix, 'ConfigMapping'); + if (array_key_exists('ForceEditorPick', $config_mapping) && $this->Application->ConfigValue($config_mapping['ForceEditorPick'])) { + $list_sortings = $this->Appication->getUnitOption($event->Prefix, 'ListSortings'); + + $new_forced_sorting = Array ('EditorsPick' => 'DESC'); + + if (array_key_exists('ForcedSorting', $list_sortings[''])) { + foreach ($list_sortings['']['ForcedSorting'] as $sort_field => $sort_order) { + $new_forced_sorting[$sort_field] = $sort_order; + } + } + $list_sortings['']['ForcedSorting'] = $new_forced_sorting; + + $this->Appication->setUnitOption($event->Prefix, 'ListSortings', $list_sortings); + } } /**