|
From: Jon O. <jon...@us...> - 2005-04-02 20:36:20
|
Update of /cvsroot/mxbb/kb_076_mxaddon/root/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28989/modules/kb_076_mxaddon/root/admin Modified Files: admin_kb_art.php admin_kb_cat.php Log Message: fixing up: - permissions - tpl - footers adding - cat jump box Index: admin_kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/admin/admin_kb_cat.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin_kb_cat.php 1 Apr 2005 14:12:28 -0000 1.3 --- admin_kb_cat.php 2 Apr 2005 20:35:40 -0000 1.4 *************** *** 188,191 **** --- 188,197 ---- 'DELETE_MOD' => 'selected="selected"', 'APPROVAL_DISABLED' => 'selected="selected"', + + 'S_GUEST' => AUTH_ALL, + 'S_USER' => AUTH_REG, + 'S_PRIVATE' => AUTH_ACL, + 'S_MOD' => AUTH_MOD, + 'S_ADMIN' => AUTH_ADMIN ) ); } *************** *** 229,233 **** $cat_order = $id['cat_order'] + 10; ! $sql = "INSERT INTO " . KB_CATEGORIES_TABLE . " ( category_name, category_details, number_articles, parent, cat_order, auth_view, auth_post, auth_rate, auth_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit, comments_forum_id)" . " VALUES ( '$cat_name', ' $cat_desc', '0', '$parent', '$cat_order', '$view_level', '$view_post', '$view_rate', '$comment_level', '$comment_edit', '$comment_delete', '$approval', '$approval_edit', '$comments_forum_id')"; if ( !( $results = $db->sql_query( $sql ) ) ) --- 235,240 ---- $cat_order = $id['cat_order'] + 10; ! $sql = "INSERT INTO " . KB_CATEGORIES_TABLE . " ( category_name, category_details, number_articles, parent, cat_order, auth_view, auth_post, auth_rate, auth_comment, auth_edit, auth_delete, auth_approval, auth_approval_edit, comments_forum_id)" . " VALUES ! ( '$cat_name', ' $cat_desc', '0', '$parent', '$cat_order', '$view_level', '$post_level', '$rate_level', '$comment_level', '$edit_level', '$delete_level', '$approval_level', '$approval_edit_level', '$comments_forum_id')"; if ( !( $results = $db->sql_query( $sql ) ) ) *************** *** 620,623 **** --- 627,631 ---- } + $ss = 0; while ( $category = $db->sql_fetchrow( $cat_result ) ) { *************** *** 642,647 **** $down = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_down'] . '</a>'; ! $row_color = ( !( $i % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ( !( $i % 2 ) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars( 'catrow', array( 'CATEGORY' => $category_link, --- 650,655 ---- $down = '<a href="' . $temp_url . '" class="gen">' . $lang['Move_down'] . '</a>'; ! $row_color = ( !( $ss % 2 ) ) ? $theme['td_color1'] : $theme['td_color2']; ! $row_class = ( !( $ss % 2 ) ) ? $theme['td_class1'] : $theme['td_class2']; $template->assign_block_vars( 'catrow', array( 'CATEGORY' => $category_link, *************** *** 659,663 **** $i++; ! get_kb_cat_subs_admin( $category_id, '1', '-> ' ); } break; --- 667,672 ---- $i++; ! $ss++; ! $ss = get_kb_cat_subs_admin( $category_id, '1', ' ', $ss ); } break; Index: admin_kb_art.php =================================================================== RCS file: /cvsroot/mxbb/kb_076_mxaddon/root/admin/admin_kb_art.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_kb_art.php 1 Apr 2005 20:38:43 -0000 1.4 --- admin_kb_art.php 2 Apr 2005 20:35:40 -0000 1.5 *************** *** 127,130 **** --- 127,142 ---- $topic_sql = ''; + $kb_comment = array(); + + // Populate the kb_comment variable + $kb_comment = kb_get_data($row, $userdata ); + + // Compose post header + $subject = $lang['KB_comment_prefix'] . $kb_comment['article_title']; + $message_temp = kb_compose_comment( $kb_comment ); + + $kb_message = $message_temp['message']; + $kb_update_message = $message_temp['update_message']; + // Insert comment, if not already present if ( $kb_config['use_comments'] ) *************** *** 132,147 **** if ( !$row['topic_id'] ) { - $kb_comment = array(); - - // Populate the kb_comment variable - $kb_comment = kb_get_data($row, $userdata); - - // Compose post header - $subject = $lang['KB_comment_prefix'] . $kb_comment['article_title']; - $message_temp = kb_compose_comment( $kb_comment ); - - $kb_message = $message_temp['message']; - $kb_update_message = $message_temp['update_message']; - // Post $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $kb_comment['article_editor'], $kb_comment['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); --- 144,147 ---- *************** *** 162,165 **** --- 162,166 ---- update_kb_number( $article_category_id, '+ 1' ); + kb_notify( $kb_config['notify'], $kb_message, $kb_config['admin_id'], $kb_comment['article_editor_id'] ); mx_add_search_words( 'single', $article_id, stripslashes( $row['article_body'] ), stripslashes( $row['article_title'] ), 'kb' ); |