|
From: Jon O. <jon...@us...> - 2006-07-05 22:48:31
|
Update of /cvsroot/mxbb/mx_kb/kb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv6489/modules/mx_kb/kb/includes Modified Files: functions.php functions_comment.php functions_kb.php Log Message: massive fix Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** functions.php 4 Jul 2006 22:33:31 -0000 1.10 --- functions.php 5 Jul 2006 22:48:26 -0000 1.11 *************** *** 26,30 **** { /** ! * Enter description here... * * @param unknown_type $config_name --- 26,30 ---- { /** ! * This class is used for general kb handling * [...1722 lines suppressed...] ! $mxurl .= '?page=' . $page_id . ( $args == '' ? '' : ( $non_html_amp ? '&' : '&' ) . $args ); ! } ! else ! { ! $mxurl .= ( $args == '' ? '' : '?' . $args ); ! } } - return $mxurl; } ?> \ No newline at end of file --- 806,812 ---- $this->data['item_editor_id'] = $userdata['user_id']; $this->data['item_editor'] = ( $userdata['user_id'] != '-1' ) ? $userdata['username'] : $lang['Guest']; ! $this->temp_url = PORTAL_URL . $mx_kb->this_mxurl("mode=" . "article&k=" . $this->data['item_id'], false, true); } } ?> \ No newline at end of file Index: functions_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions_comment.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** functions_comment.php 25 Jun 2006 21:55:12 -0000 1.7 --- functions_comment.php 5 Jul 2006 22:48:26 -0000 1.8 *************** *** 90,94 **** // ! // This is specific for pafileDB // $this->forum_id = $mx_kb->modules[$mx_kb->module_name]->comments[$this->cat_id]['comments_forum_id']; --- 90,94 ---- // ! // Auth // $this->forum_id = $mx_kb->modules[$mx_kb->module_name]->comments[$this->cat_id]['comments_forum_id']; *************** *** 170,179 **** // ! // Instatiate text tools ! // ! $mx_kb_text_tools = new mx_kb_text_tools(); ! ! // ! // Instantiate the mx_text class // include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); --- 170,174 ---- // ! // Instantiate the mx_text and mx_text_formatting classes // include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); *************** *** 182,185 **** --- 177,183 ---- $mx_text->allow_all_html_tags = $kb_config['allow_wysiwyg'] ? true : false; + $mx_text_formatting = new mx_text_formatting(); + + $template->assign_block_vars( 'use_comments', array( 'L_COMMENTS' => $lang['Comments'], *************** *** 209,213 **** if (!$kb_config['allow_comment_images'] || !$kb_config['allow_comment_links']) { ! $comments_text = $mx_kb_text_tools->remove_images_links( $comments_text, $kb_config['allow_comment_images'], $kb_config['no_comment_image_message'], $kb_config['allow_comment_links'], $kb_config['no_comment_link_message'] ); } --- 207,211 ---- if (!$kb_config['allow_comment_images'] || !$kb_config['allow_comment_links']) { ! $comments_text = $mx_text_formatting->remove_images_links( $comments_text, $kb_config['allow_comment_images'], $kb_config['no_comment_image_message'], $kb_config['allow_comment_links'], $kb_config['no_comment_link_message'] ); } *************** *** 267,281 **** if ( $kb_config['max_comment_subject_chars'] > 0 ) { ! $comments_title = $mx_kb_text_tools->truncate_text( $comments_title, $kb_config['max_comment_subject_chars'], true ); } if ( $kb_config['max_comment_chars'] > 0 ) { ! $comments_text = $mx_kb_text_tools->truncate_text( $comments_text, $kb_config['max_comment_chars'], true ); } if ( $kb_config['formatting_comment_truncate_links'] || $kb_config['formatting_comment_image_resize'] > 0 || $kb_config['formatting_comment_wordwrap'] ) { ! $comments_text = $mx_kb_text_tools->decode( $comments_text, $kb_config['formatting_comment_truncate_links'], intval($kb_config['formatting_comment_image_resize']), $kb_config['formatting_comment_wordwrap'] ); } --- 265,279 ---- if ( $kb_config['max_comment_subject_chars'] > 0 ) { ! $comments_title = $mx_text_formatting->truncate_text( $comments_title, $kb_config['max_comment_subject_chars'], true ); } if ( $kb_config['max_comment_chars'] > 0 ) { ! $comments_text = $mx_text_formatting->truncate_text( $comments_text, $kb_config['max_comment_chars'], true ); } if ( $kb_config['formatting_comment_truncate_links'] || $kb_config['formatting_comment_image_resize'] > 0 || $kb_config['formatting_comment_wordwrap'] ) { ! $comments_text = $mx_text_formatting->decode( $comments_text, $kb_config['formatting_comment_truncate_links'], intval($kb_config['formatting_comment_image_resize']), $kb_config['formatting_comment_wordwrap'] ); } *************** *** 299,303 **** $template->assign_block_vars( 'use_comments.text.auth_edit', array( 'L_COMMENT_EDIT' => $lang['Comment_edit'], ! 'U_COMMENT_EDIT' => append_sid( this_kb_mxurl( 'mode=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id . '&cid='.$this->comments_row['comments_id'] ) ), 'EDIT_IMG' => $images['kb_icon_edit'], )); --- 297,301 ---- $template->assign_block_vars( 'use_comments.text.auth_edit', array( 'L_COMMENT_EDIT' => $lang['Comment_edit'], ! 'U_COMMENT_EDIT' => append_sid( $mx_kb->this_mxurl( 'mode=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id . '&cid='.$this->comments_row['comments_id'] ) ), 'EDIT_IMG' => $images['kb_icon_edit'], )); *************** *** 308,312 **** $template->assign_block_vars( 'use_comments.text.auth_delete', array( 'L_COMMENT_DELETE' => $lang['Comment_delete'], ! 'U_COMMENT_DELETE' => append_sid( this_kb_mxurl( "mode=post_comment&cid=".$this->comments_row['comments_id']."&delete=do&item_id=".$this->item_id . '&cat_id=' . $this->cat_id )), 'DELETE_IMG' => $images['kb_icon_delpost'], )); --- 306,310 ---- $template->assign_block_vars( 'use_comments.text.auth_delete', array( 'L_COMMENT_DELETE' => $lang['Comment_delete'], ! 'U_COMMENT_DELETE' => append_sid( $mx_kb->this_mxurl( "mode=post_comment&cid=".$this->comments_row['comments_id']."&delete=do&item_id=".$this->item_id . '&cat_id=' . $this->cat_id )), 'DELETE_IMG' => $images['kb_icon_delpost'], )); *************** *** 319,323 **** $template->assign_block_vars( 'use_comments.auth_post', array( 'L_COMMENT_ADD' => $lang['Comment_add'], ! 'U_COMMENT_POST' => append_sid( this_kb_mxurl( 'mode=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id) ), 'REPLY_IMG' => $images['kb_icon_reply'], )); --- 317,321 ---- $template->assign_block_vars( 'use_comments.auth_post', array( 'L_COMMENT_ADD' => $lang['Comment_add'], ! 'U_COMMENT_POST' => append_sid( $mx_kb->this_mxurl( 'mode=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id) ), 'REPLY_IMG' => $images['kb_icon_reply'], )); *************** *** 325,329 **** $num_of_replies = intval( $this->total_comments ); ! $pagination = generate_pagination( this_kb_mxurl( $this->pagination_action . "&" . $this->pagination_target . $this->item_id . $page_num ), $num_of_replies, $this->pagination_num, $this->start ) . ' '; if ($num_of_replies > 0) { --- 323,327 ---- $num_of_replies = intval( $this->total_comments ); ! $pagination = generate_pagination( $mx_kb->this_mxurl( $this->pagination_action . "&" . $this->pagination_target . $this->item_id . $page_num ), $num_of_replies, $this->pagination_num, $this->start ) . ' '; if ($num_of_replies > 0) { *************** *** 344,348 **** function display_phpbb_comments( ) { ! global $template, $mx_kb, $lang, $board_config, $phpEx, $kb_config, $db, $userdata, $images; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars; --- 342,346 ---- function display_phpbb_comments( ) { ! global $template, $mx_kb, $mx_kb_functions, $lang, $board_config, $phpEx, $kb_config, $db, $userdata, $images; global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars; *************** *** 378,387 **** // ! // Instatiate text tools ! // ! $mx_kb_text_tools = new mx_kb_text_tools(); ! ! // ! // Instantiate the mx_text class // include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); --- 376,380 ---- // ! // Instantiate the mx_text and mx_text_formatting classes // include_once($mx_root_path . 'includes/mx_functions_tools.'.$phpEx); *************** *** 390,393 **** --- 383,388 ---- $mx_text->allow_all_html_tags = $kb_config['allow_wysiwyg'] ? true : false; + $mx_text_formatting = new mx_text_formatting(); + $template->assign_block_vars( 'use_comments', array( 'L_COMMENTS' => $lang['Comments'], *************** *** 432,436 **** if (!$kb_config['allow_comment_images'] || !$kb_config['allow_comment_links']) { ! $comments_text = $mx_kb_text_tools->remove_images_links( $comments_text, $kb_config['allow_comment_images'], $kb_config['no_comment_image_message'], $kb_config['allow_comment_links'], $kb_config['no_comment_link_message'] ); } --- 427,431 ---- if (!$kb_config['allow_comment_images'] || !$kb_config['allow_comment_links']) { ! $comments_text = $mx_text_formatting->remove_images_links( $comments_text, $kb_config['allow_comment_images'], $kb_config['no_comment_image_message'], $kb_config['allow_comment_links'], $kb_config['no_comment_link_message'] ); } *************** *** 440,454 **** if ( $kb_config['max_comment_subject_chars'] > 0 ) { ! $comments_title = $mx_kb_text_tools->truncate_text( $comments_title, $kb_config['max_comment_subject_chars'], true ); } if ( $kb_config['max_comment_chars'] > 0 ) { ! $comments_text = $mx_kb_text_tools->truncate_text( $comments_text, $kb_config['max_comment_chars'], true ); } if ( $kb_config['formatting_comment_truncate_links'] || $kb_config['formatting_comment_image_resize'] > 0 || $kb_config['formatting_comment_wordwrap'] ) { ! $comments_text = $mx_kb_text_tools->decode( $comments_text, $kb_config['formatting_comment_truncate_links'], intval($kb_config['formatting_comment_image_resize']), $kb_config['formatting_comment_wordwrap'] ); } --- 435,449 ---- if ( $kb_config['max_comment_subject_chars'] > 0 ) { ! $comments_title = $mx_text_formatting->truncate_text( $comments_title, $kb_config['max_comment_subject_chars'], true ); } if ( $kb_config['max_comment_chars'] > 0 ) { ! $comments_text = $mx_text_formatting->truncate_text( $comments_text, $kb_config['max_comment_chars'], true ); } if ( $kb_config['formatting_comment_truncate_links'] || $kb_config['formatting_comment_image_resize'] > 0 || $kb_config['formatting_comment_wordwrap'] ) { ! $comments_text = $mx_text_formatting->decode( $comments_text, $kb_config['formatting_comment_truncate_links'], intval($kb_config['formatting_comment_image_resize']), $kb_config['formatting_comment_wordwrap'] ); } *************** *** 535,539 **** $template->assign_block_vars( 'use_comments.text.auth_edit', array( 'L_COMMENT_EDIT' => $lang['Comment_edit'], ! 'U_COMMENT_EDIT' => append_sid( this_kb_mxurl( 'mode=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id . '&cid='.$this->comments_row['post_id'] ) ), 'EDIT_IMG' => $images['kb_icon_edit'], )); --- 530,534 ---- $template->assign_block_vars( 'use_comments.text.auth_edit', array( 'L_COMMENT_EDIT' => $lang['Comment_edit'], ! 'U_COMMENT_EDIT' => append_sid( $mx_kb->this_mxurl( 'mode=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id . '&cid='.$this->comments_row['post_id'] ) ), 'EDIT_IMG' => $images['kb_icon_edit'], )); *************** *** 544,548 **** $template->assign_block_vars( 'use_comments.text.auth_delete', array( 'L_COMMENT_DELETE' => $lang['Comment_delete'], ! 'U_COMMENT_DELETE' => append_sid( this_kb_mxurl( "mode=post_comment&cid=".$this->comments_row['post_id']."&delete=do&item_id=".$this->item_id . '&cat_id=' . $this->cat_id )), 'DELETE_IMG' => $images['kb_icon_delpost'], )); --- 539,543 ---- $template->assign_block_vars( 'use_comments.text.auth_delete', array( 'L_COMMENT_DELETE' => $lang['Comment_delete'], ! 'U_COMMENT_DELETE' => append_sid( $mx_kb->this_mxurl( "mode=post_comment&cid=".$this->comments_row['post_id']."&delete=do&item_id=".$this->item_id . '&cat_id=' . $this->cat_id )), 'DELETE_IMG' => $images['kb_icon_delpost'], )); *************** *** 555,559 **** $template->assign_block_vars( 'use_comments.auth_post', array( 'L_COMMENT_ADD' => $lang['Comment_add'], ! 'U_COMMENT_POST' => append_sid( this_kb_mxurl( 'mode=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id ) ), 'REPLY_IMG' => $images['kb_comment_post'], )); --- 550,554 ---- $template->assign_block_vars( 'use_comments.auth_post', array( 'L_COMMENT_ADD' => $lang['Comment_add'], ! 'U_COMMENT_POST' => append_sid( $mx_kb->this_mxurl( 'mode=post_comment&item_id=' . $this->item_id . '&cat_id=' . $this->cat_id ) ), 'REPLY_IMG' => $images['kb_comment_post'], )); *************** *** 561,565 **** $num_of_replies = intval( $this->total_comments ); ! $pagination = generate_pagination( this_kb_mxurl( $this->pagination_action . "&" . $this->pagination_target . $this->item_id . $page_num ), $num_of_replies, $this->pagination_num, $this->start ) . ' '; if ($num_of_replies > 0) --- 556,560 ---- $num_of_replies = intval( $this->total_comments ); ! $pagination = generate_pagination( $mx_kb->this_mxurl( $this->pagination_action . "&" . $this->pagination_target . $this->item_id . $page_num ), $num_of_replies, $this->pagination_num, $this->start ) . ' '; if ($num_of_replies > 0) Index: functions_kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb/includes/functions_kb.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** functions_kb.php 4 Jul 2006 22:33:31 -0000 1.12 --- functions_kb.php 5 Jul 2006 22:48:26 -0000 1.13 *************** *** 15,19 **** /** ! * public mx_kb class. * */ --- 15,19 ---- /** ! * Public mx_kb class. * [...1592 lines suppressed...] ! break; ! case 'delete': ! $mx_notification_action = MX_DELETED_NOTIFICATION; ! break; ! } ! $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#'); ! $html_entities_replace = array('&', '<', '>', '"'); ! ! $mx_kb_notification->notify( $mx_notification_mode, $mx_notification_action ); ! ! if ( $this->notification[$cat_id]['notify_group'] > 0 ) ! { ! $mx_kb_notification->notify( $mx_notification_mode, $mx_notification_action, - intval($this->notification[$catId]['notify_group']) ); ! } ! } ! } ! } } } |