You are here

function _forum_get_topic_order in Drupal 4

Same name and namespace in other branches
  1. 5 modules/forum/forum.module \_forum_get_topic_order()
  2. 6 modules/forum/forum.module \_forum_get_topic_order()
  3. 7 modules/forum/forum.module \_forum_get_topic_order()
2 calls to _forum_get_topic_order()
forum_get_topics in modules/forum.module
_forum_get_topic_order_sql in modules/forum.module

File

modules/forum.module, line 1107
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;
  }
}