/[drupal]/drupal/modules/forum/forum.pages.inc
ViewVC logotype

Contents of /drupal/modules/forum/forum.pages.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download) (as text)
Fri Oct 9 00:59:59 2009 UTC (6 weeks, 4 days ago) by dries
Branch: MAIN
CVS Tags: DRUPAL-7-0-UNSTABLE-10, HEAD
Changes since 1.2: +2 -2 lines
File MIME type: text/x-php
- Patch #572618 by effulgentsia, pwolanin, sun: all theme functions should take a single argument. Code clean-up and performance improvement. Woot.
1 <?php
2 // $Id: forum.pages.inc,v 1.2 2007/07/26 06:48:03 dries Exp $
3
4 /**
5 * @file
6 * User page callbacks for the forum module.
7 */
8
9 /**
10 * Menu callback; prints a forum listing.
11 */
12 function forum_page($tid = 0) {
13 $topics = '';
14 $forum_per_page = variable_get('forum_per_page', 25);
15 $sortby = variable_get('forum_order', 1);
16
17 $forums = forum_get_forums($tid);
18 $parents = taxonomy_get_parents_all($tid);
19 if ($tid && !in_array($tid, variable_get('forum_containers', array()))) {
20 $topics = forum_get_topics($tid, $sortby, $forum_per_page);
21 }
22
23 return theme('forums', array('forums' => $forums, 'topics' => $topics, 'parents' => $parents, 'tid' => $tid, 'sortby' => $sortby, 'forums_per_page' => $forum_per_page));
24 }

  ViewVC Help
Powered by ViewVC 1.1.2