root/branches/release-26/php/lib/function.mtcategorycommentcount.php @ 1174

Revision 1174, 465 bytes (checked in by bchoate, 23 months ago)

Updated copyright year for source.

Line 
1<?php
2# Movable Type (r) Open Source (C) 2001-2008 Six Apart, Ltd.
3# This program is distributed under the terms of the
4# GNU General Public License, version 2.
5#
6# $Id$
7
8function smarty_function_mtcategorycommentcount($args, &$ctx) {
9    global $mt;
10    $db =& $mt->db;
11    $category = $ctx->stash('category');
12    $cat_id = (int)$category['category_id'];
13    if (!$cat_id) return 0;
14    return $db->category_comment_count(array( 'category_id' => $cat_id ));
15}
16?>
Note: See TracBrowser for help on using the browser.