function _forum_get_topic_order in Drupal 5
Same name and namespace in other branches
- 4 modules/forum.module \_forum_get_topic_order()
- 6 modules/forum/forum.module \_forum_get_topic_order()
- 7 modules/forum/forum.module \_forum_get_topic_order()
2 calls to _forum_get_topic_order()
- forum_get_topics in modules/
forum/ forum.module - _forum_get_topic_order_sql in modules/
forum/ forum.module
File
- modules/
forum/ forum.module, line 1103 - Enable threaded discussions about general topics.
Code
function _forum_get_topic_order($sortby) {
switch ($sortby) {
case 1:
return array(
'field' => 'l.last_comment_timestamp',
'sort' => 'desc',
);
break;
case 2:
return array(
'field' => 'l.last_comment_timestamp',
'sort' => 'asc',
);
break;
case 3:
return array(
'field' => 'l.comment_count',
'sort' => 'desc',
);
break;
case 4:
return array(
'field' => 'l.comment_count',
'sort' => 'asc',
);
break;
}
}