|
From: Jon O. <jon...@us...> - 2005-04-20 20:48:39
|
Update of /cvsroot/mxbb/mx_kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9334/modules/mx_kb/includes Modified Files: functions_kb.php Log Message: adding S_CONTENT_DIR_RIGHT compatibility reverting to use the db stored row for "number artcles" Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/functions_kb.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** functions_kb.php 12 Apr 2005 19:30:42 -0000 1.30 --- functions_kb.php 20 Apr 2005 20:48:23 -0000 1.31 *************** *** 885,907 **** while ( $category = $db->sql_fetchrow( $result ) ) { - // Get number of articles in cat - newssuite addon - $sql_num = "SELECT count(article_id) AS total - FROM " . KB_ARTICLES_TABLE . " - WHERE "; // newssuite addon - if ( $kb_config['news_operate_mode'] ) - { - $kb_types_list = ns_auth_item( $category['category_id'] ); - $sql_num .= " article_type IN " . $kb_types_list . ' AND'; - } - $sql_num .= " article_category_id = " . $category['category_id'] . " AND approved = '1'"; ! if ( !( $result_num = $db->sql_query( $sql_num ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Error getting total articles', '', __LINE__, __FILE__, $sql ); ! } ! if ( $total = $db->sql_fetchrow( $result_num ) ) { ! $category_articles = $total['total']; } else --- 885,912 ---- while ( $category = $db->sql_fetchrow( $result ) ) { // newssuite addon ! if ( MXBB_MODULE && !MXBB_27x ) { ! // Get number of articles in cat - newssuite addon ! $sql_num = "SELECT count(article_id) AS total ! FROM " . KB_ARTICLES_TABLE . " ! WHERE "; ! ! if ( $kb_config['news_operate_mode'] ) ! { ! $kb_types_list = ns_auth_item( $category['category_id'] ); ! $sql_num .= " article_type IN " . $kb_types_list . ' AND'; ! } ! $sql_num .= " article_category_id = " . $category['category_id'] . " AND approved = '1'"; ! ! if ( !( $result_num = $db->sql_query( $sql_num ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Error getting total articles', '', __LINE__, __FILE__, $sql ); ! } ! if ( $total = $db->sql_fetchrow( $result_num ) ) ! { ! $category_articles = $total['total']; ! } } else |