|
From: Jon O. <jon...@us...> - 2008-07-02 22:02:10
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv13831 Modified Files: mx_functions_tools.php Log Message: A couple of commenting fixes Removed debug output in phpbb2 last message block Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** mx_functions_tools.php 18 Jun 2008 11:05:28 -0000 1.33 --- mx_functions_tools.php 2 Jul 2008 22:02:02 -0000 1.34 *************** *** 132,136 **** function display($text, $bbcode_uid = '') { - global $mx_root_path; // // strip html if reqd --- 132,135 ---- *************** *** 144,170 **** } - if ((PORTAL_BACKEND !== 'phpbb3') && !function_exists('bbencode_second_pass')) - { - //mx_page::load_file('bbcode'); - } - // // BBCode if reqd // - if (PORTAL_BACKEND == 'phpbb3') - { - /* - if (!class_exists('bbcode')) - { - mx_page::load_file('bbcode', 'phpbb3'); - } - - if( !is_object($bbcode)) - { - $bbcode = new bbcode(); - } - */ - } - if ($text != '' && $bbcode_uid != '') { --- 143,149 ---- *************** *** 1214,1218 **** if ( !$result = $db->sql_query( $sql ) ) { ! message_die( GENERAL_ERROR, "Couldn't insert into $table ", "", __LINE__, __FILE__, $sql ); } } --- 1193,1197 ---- if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't insert into $table ", "", __LINE__, __FILE__, $sql ); } } *************** *** 1253,1257 **** if ( !$result = $db->sql_query( $sql ) ) { ! message_die( GENERAL_ERROR, "Couldn't insert into $table ", "", __LINE__, __FILE__, $sql ); } } --- 1232,1236 ---- if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't insert into $table ", "", __LINE__, __FILE__, $sql ); } } *************** *** 1274,1278 **** if ( !$result = $db->sql_query( $sql ) ) { ! message_die( GENERAL_ERROR, "Couldn't delete $table information", "", __LINE__, __FILE__, $sql ); } } --- 1253,1257 ---- if ( !$result = $db->sql_query( $sql ) ) { ! mx_message_die( GENERAL_ERROR, "Couldn't delete $table information", "", __LINE__, __FILE__, $sql ); } } *************** *** 3155,3159 **** // mx_page::load_file('functions_search', 'phpbb2'); - //include_once($phpbb_root_path . 'includes/functions_search.'.$phpEx); // --- 3134,3137 ---- *************** *** 3866,3869 **** --- 3844,3855 ---- // + // Little temp fix for autogenerated comments, with newlines. + // + if ($this->allow_comment_wysiwyg) + { + $comments_text = str_replace("\n", "\n<br />\n", $comments_text); + } + + // // Remove Images and/or links // *************** *** 3963,3967 **** 'L_COMMENT_EDIT' => $lang['Comment_edit'], 'U_COMMENT_EDIT' => $this->u_edit($this->comments_row['comments_id']), ! 'EDIT_IMG' => $images[$this->images['icon_edit']], 'B_EDIT_IMG' => $mx_user->create_button($this->images['icon_edit'], $lang['Comment_edit'], $this->u_edit($this->comments_row['comments_id'])), )); --- 3949,3953 ---- 'L_COMMENT_EDIT' => $lang['Comment_edit'], 'U_COMMENT_EDIT' => $this->u_edit($this->comments_row['comments_id']), ! 'EDIT_IMG' => $this->images['icon_edit'], 'B_EDIT_IMG' => $mx_user->create_button($this->images['icon_edit'], $lang['Comment_edit'], $this->u_edit($this->comments_row['comments_id'])), )); *************** *** 3973,3977 **** 'L_COMMENT_DELETE' => $lang['Comment_delete'], 'U_COMMENT_DELETE' => $this->u_delete($this->comments_row['comments_id']), ! 'DELETE_IMG' => $images[$this->images['icon_delpost']], 'B_DELETE_IMG' => $mx_user->create_button($this->images['icon_delpost'], $lang['Comment_delete'], $this->u_delete($this->comments_row['comments_id'])), )); --- 3959,3963 ---- 'L_COMMENT_DELETE' => $lang['Comment_delete'], 'U_COMMENT_DELETE' => $this->u_delete($this->comments_row['comments_id']), ! 'DELETE_IMG' => $this->images['icon_delpost'], 'B_DELETE_IMG' => $mx_user->create_button($this->images['icon_delpost'], $lang['Comment_delete'], $this->u_delete($this->comments_row['comments_id'])), )); *************** *** 3993,3997 **** 'L_COMMENT_ADD' => $lang['Comment_add'], 'U_COMMENT_POST' => $this->u_post(), ! 'REPLY_IMG' => $images[$this->images['comment_post']], 'B_REPLY_IMG' => $mx_user->create_button($this->images['comment_post'], $lang['Comment_add'], $this->u_post()), )); --- 3979,3983 ---- 'L_COMMENT_ADD' => $lang['Comment_add'], 'U_COMMENT_POST' => $this->u_post(), ! 'REPLY_IMG' => $this->images['comment_post'], 'B_REPLY_IMG' => $mx_user->create_button($this->images['comment_post'], $lang['Comment_add'], $this->u_post()), )); *************** *** 4028,4031 **** --- 4014,4022 ---- // + // Ensure Item data topic_id is valid + // + $this->validate_topic_id(); + + // // Request vars // *************** *** 4103,4106 **** --- 4094,4105 ---- // + // Little temp fix for autogenerated comments, with newlines. + // + if ($this->allow_comment_wysiwyg) + { + $comments_text = str_replace("\n", "\n<br />\n", $comments_text); + } + + // // Remove Images and/or links // *************** *** 4212,4216 **** 'L_COMMENT_EDIT' => $lang['Comment_edit'], 'U_COMMENT_EDIT' => $this->u_edit($this->comments_row['post_id']), ! 'EDIT_IMG' => $images[$this->images['icon_edit']], 'B_EDIT_IMG' => $mx_user->create_button($this->images['icon_edit'], $lang['Comment_edit'], $this->u_edit($this->comments_row['post_id'])), )); --- 4211,4215 ---- 'L_COMMENT_EDIT' => $lang['Comment_edit'], 'U_COMMENT_EDIT' => $this->u_edit($this->comments_row['post_id']), ! 'EDIT_IMG' => $this->images['icon_edit'], 'B_EDIT_IMG' => $mx_user->create_button($this->images['icon_edit'], $lang['Comment_edit'], $this->u_edit($this->comments_row['post_id'])), )); *************** *** 4222,4226 **** 'L_COMMENT_DELETE' => $lang['Comment_delete'], 'U_COMMENT_DELETE' => $this->u_delete($this->comments_row['post_id']), ! 'DELETE_IMG' => $images[$this->images['icon_delpost']], 'B_DELETE_IMG' => $mx_user->create_button($this->images['icon_delpost'], $lang['Comment_delete'], $this->u_delete($this->comments_row['post_id'])), )); --- 4221,4225 ---- 'L_COMMENT_DELETE' => $lang['Comment_delete'], 'U_COMMENT_DELETE' => $this->u_delete($this->comments_row['post_id']), ! 'DELETE_IMG' => $this->images['icon_delpost'], 'B_DELETE_IMG' => $mx_user->create_button($this->images['icon_delpost'], $lang['Comment_delete'], $this->u_delete($this->comments_row['post_id'])), )); *************** *** 4234,4238 **** 'L_COMMENT_ADD' => $lang['Comment_add'], 'U_COMMENT_POST' => $this->u_post(), ! 'REPLY_IMG' => $images[$this->images['comment_post']], 'B_REPLY_IMG' => $mx_user->create_button($this->images['comment_post'], $lang['Comment_add'], $this->u_post()), )); --- 4233,4237 ---- 'L_COMMENT_ADD' => $lang['Comment_add'], 'U_COMMENT_POST' => $this->u_post(), ! 'REPLY_IMG' => $this->images['comment_post'], 'B_REPLY_IMG' => $mx_user->create_button($this->images['comment_post'], $lang['Comment_add'], $this->u_post()), )); |