Index: branches/5.1.x/core/kernel/db/db_tag_processor.php =================================================================== diff -u -N -r14027 -r14060 --- branches/5.1.x/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 14027) +++ branches/5.1.x/core/kernel/db/db_tag_processor.php (.../db_tag_processor.php) (revision 14060) @@ -1,6 +1,6 @@ getUserSortIndex() + --$params['pos']; $list =& $this->GetList($params); -// $object =& $this->Application->recallObject( $this->getPrefixSpecial() ); if($params['type'] == 'field') return $list->GetOrderField($user_sorting_start); if($params['type'] == 'direction') return $list->GetOrderDirection($user_sorting_start); Index: branches/5.1.x/core/kernel/db/dblist.php =================================================================== diff -u -N -r13994 -r14060 --- branches/5.1.x/core/kernel/db/dblist.php (.../dblist.php) (revision 13994) +++ branches/5.1.x/core/kernel/db/dblist.php (.../dblist.php) (revision 14060) @@ -1,6 +1,6 @@ OrderFields[$pos][0]) ? $this->OrderFields[$pos][0] : ''; + if ( isset($this->OrderFields[$pos][0]) ) { + $field = $this->OrderFields[$pos][0]; + $lang = $this->Application->GetVar('m_lang'); + + if ( preg_match('/^IF\(COALESCE\(.*?\.(l' . $lang . '_.*?), ""\),/', $field, $regs) ) { + // undo result of kDBList::getMLSortField method + return $regs[1]; + } + + return $field; + } + + return ''; } function GetOrderDirection($pos = NULL, $no_default = false)