|
From: Jon O. <jon...@us...> - 2005-04-01 20:39:56
|
Update of /cvsroot/mxbb/mx_kb/includes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6096/modules/mx_kb/includes Modified Files: functions_kb.php kb_article.php kb_cat.php kb_moderator.php Log Message: minor fixes...sprung from the phpbb dev thread Index: kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_cat.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** kb_cat.php 1 Apr 2005 14:14:48 -0000 1.12 --- kb_cat.php 1 Apr 2005 20:39:47 -0000 1.13 *************** *** 131,134 **** --- 131,135 ---- $path_kb_array = array(); get_kb_nav( $category_id ); + // Pagination $sql_pag = "SELECT count(article_id) AS total Index: kb_article.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_article.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** kb_article.php 1 Apr 2005 14:14:48 -0000 1.18 --- kb_article.php 1 Apr 2005 20:39:47 -0000 1.19 *************** *** 362,366 **** $show_num_comments = $kb_config['comments_pagination']; ! $pagination = generate_pagination( this_kb_mxurl( "mode=article&k=$article_id" . $page_numm ), $num_of_replies, $kb_config['comments_pagination'], $start ) . ' '; get_kb_comments( $topic_id, $start, $show_num_comments ); } --- 362,366 ---- $show_num_comments = $kb_config['comments_pagination']; ! $pagination = generate_pagination( this_kb_mxurl( "mode=article&k=$article_id" . $page_numm ), $num_of_replies, $show_num_comments, $start ) . ' '; get_kb_comments( $topic_id, $start, $show_num_comments ); } Index: kb_moderator.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/kb_moderator.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** kb_moderator.php 1 Apr 2005 14:14:48 -0000 1.7 --- kb_moderator.php 1 Apr 2005 20:39:47 -0000 1.8 *************** *** 31,34 **** --- 31,35 ---- $page_id = ( isset( $HTTP_GET_VARS['page'] ) ) ? intval ( $HTTP_GET_VARS['page']) : intval ( $HTTP_POST_VARS['page'] ); $ref_stats = ( isset( $HTTP_GET_VARS['ref'] ) ) ? true : 0; + $start = ( isset( $HTTP_GET_VARS['start'] ) ) ? intval( $HTTP_GET_VARS['start'] ) : 0; // Start auth check *************** *** 119,123 **** mx_add_search_words( 'single', $article_id, stripslashes( $row['article_body'] ), stripslashes( $row['article_title'] ), 'kb' ); ! $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id" ) ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); --- 120,124 ---- mx_add_search_words( 'single', $article_id, stripslashes( $row['article_body'] ), stripslashes( $row['article_title'] ), 'kb' ); ! $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id&start=$start" ) ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 151,155 **** mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); --- 152,156 ---- mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl( "page=$page_id&mode=cat&cat=$category_id&start=$start") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 311,315 **** mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl("page=$page_id&mode=cat&cat=$category_id") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); --- 312,316 ---- mx_remove_search_post( $article_id, 'kb' ); ! $message = $lang['Article_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( this_kb_mxurl("page=$page_id&mode=cat&cat=$category_id&start=$start") ) . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 319,323 **** $category_id = ( $ref_stats ? 1 : $category_id ); ! $message = $lang['Confirm_art_delete'] . '<br /><br />' . sprintf( $lang['Confirm_art_delete_yes'], '<a href="' . append_sid( this_kb_mxurl( "mode=moderate&action=delete&page=$page_id&cat=$category_id&c=yes&a=" . $article_id ) ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Confirm_art_delete_no'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx?page=$page_id&mode=cat&cat=$category_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } --- 320,324 ---- $category_id = ( $ref_stats ? 1 : $category_id ); ! $message = $lang['Confirm_art_delete'] . '<br /><br />' . sprintf( $lang['Confirm_art_delete_yes'], '<a href="' . append_sid( this_kb_mxurl( "mode=moderate&action=delete&page=$page_id&cat=$category_id&c=yes&a=$article_id&start=$start" ) ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Confirm_art_delete_no'], '<a href="' . append_sid( $mx_root_path . "index.$phpEx?page=$page_id&mode=cat&cat=$category_id&start=$start" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/includes/functions_kb.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** functions_kb.php 1 Apr 2005 14:14:48 -0000 1.24 --- functions_kb.php 1 Apr 2005 20:39:46 -0000 1.25 *************** *** 298,311 **** { // approve ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=approve&a=$article_id" ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; }elseif ( $article_approved == 1 ) { // unapprove ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=unapprove&a=$article_id" ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; } // delete ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=delete&a=$article_id" ); $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } --- 298,311 ---- { // approve ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=approve&a=$article_id" . "&start=" . $start); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; }elseif ( $article_approved == 1 ) { // unapprove ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=unapprove&a=$article_id" . "&start=" . $start); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; } // delete ! $temp_url = append_sid( $module_root_path . "admin/admin_kb_art.$phpEx?mode=delete&a=$article_id" . "&start=" . $start); $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } *************** *** 318,331 **** { // approve ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=approve&a=$article_id&cat=$article_cat&page=$page_id") ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; }elseif ( $article_approved == 1 ) { // unapprove ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=unapprove&a=$article_id&cat=$article_cat&page=$page_id" ) ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; } // delete ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=delete&a=$article_id&cat=$article_cat&page=$page_id") ); $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } --- 318,331 ---- { // approve ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=approve&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_approve'] . '" border="0" alt="' . $lang['Approve'] . '"></a>'; }elseif ( $article_approved == 1 ) { // unapprove ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=unapprove&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); $approve = '<a href="' . $temp_url . '"><img src="' . $images['icon_unapprove'] . '" border="0" alt="' . $lang['Un_approve'] . '"></a>'; } // delete ! $temp_url = append_sid( this_kb_mxurl( "mode=moderate&action=delete&a=$article_id&cat=$article_cat&page=$page_id" . "&start=" . $start) ); $delete = '<a href="' . $temp_url . '"><img src="' . $phpbb_root_path . $images['icon_delpost'] . '" border="0" alt="' . $lang['Delete'] . '"></a>'; } *************** *** 361,371 **** if ( $i == 0 ) { ! $template->assign_block_vars( 'no_articles', array( 'COMMENT' => $lang['No_Articles'] ) ! ); } ! ! ! return $template; } --- 361,368 ---- if ( $i == 0 ) { ! $template->assign_block_vars( 'no_articles', array( 'COMMENT' => $lang['No_Articles'] ) ); } ! return $i; } |