|
From: Jon O. <jon...@us...> - 2006-06-26 21:35:04
|
Update of /cvsroot/mxbb/mx_newssuite/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv13272/modules/mx_newssuite/includes Modified Files: newssuite_functions.php Log Message: A few fixes related to new mx_text class, and other minor fixes Index: newssuite_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_newssuite/includes/newssuite_functions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** newssuite_functions.php 5 Apr 2006 22:35:24 -0000 1.2 --- newssuite_functions.php 26 Jun 2006 21:35:00 -0000 1.3 *************** *** 8,12 **** * */ ! if ( !defined( 'IN_PORTAL' ) ) { --- 8,12 ---- * */ ! if ( !defined( 'IN_PORTAL' ) ) { *************** *** 73,77 **** break; } ! } // not used? function readmore_link( $i, $newssuite_config, $news, $item_id, $page_id ) --- 73,77 ---- break; } ! } // not used? function readmore_link( $i, $newssuite_config, $news, $item_id, $page_id ) *************** *** 96,100 **** switch ( $newssuite_config['news_source_switch'] ) { ! case 'phpbb': $sql = "SELECT t.topic_id, t.topic_type, t.forum_id, f.forum_name, t.topic_title, t.topic_time, t.topic_replies, t.topic_last_post_id, t.topic_views, t.topic_vote, u.username, u.user_id, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid, u2.username as user2, u2.user_id as id2, p2.post_username AS post_username2, p2.post_time, cat.cat_title --- 96,100 ---- switch ( $newssuite_config['news_source_switch'] ) { ! case 'phpbb': $sql = "SELECT t.topic_id, t.topic_type, t.forum_id, f.forum_name, t.topic_title, t.topic_time, t.topic_replies, t.topic_last_post_id, t.topic_views, t.topic_vote, u.username, u.user_id, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid, u2.username as user2, u2.user_id as id2, p2.post_username AS post_username2, p2.post_time, cat.cat_title *************** *** 107,124 **** AND t.topic_last_post_id <= t2.topic_last_post_id "; } ! ! $sql .= "WHERE t.forum_id = f.forum_id ! AND p.topic_id = t.topic_id ! AND p.post_id = t.topic_first_post_id ! AND pt.post_id = p.post_id ! AND u.user_id = p.poster_id AND p2.post_id = t.topic_last_post_id ! AND u2.user_id = p2.poster_id ! AND f.cat_id = cat.cat_id AND t.topic_moved_id = 0 AND f.forum_id IN ( $news_auth_data ) "; ! if ( $news_time_filter_lo != 'no' && !empty($news_time_filter_lo) ) ! { $sql .= " AND p2.post_time > " . $news_time_filter_lo ; } --- 107,124 ---- AND t.topic_last_post_id <= t2.topic_last_post_id "; } ! ! $sql .= "WHERE t.forum_id = f.forum_id ! AND p.topic_id = t.topic_id ! AND p.post_id = t.topic_first_post_id ! AND pt.post_id = p.post_id ! AND u.user_id = p.poster_id AND p2.post_id = t.topic_last_post_id ! AND u2.user_id = p2.poster_id ! AND f.cat_id = cat.cat_id AND t.topic_moved_id = 0 AND f.forum_id IN ( $news_auth_data ) "; ! if ( $news_time_filter_lo != 'no' && !empty($news_time_filter_lo) ) ! { $sql .= " AND p2.post_time > " . $news_time_filter_lo ; } *************** *** 128,132 **** $sql .= " AND t.topic_type_active > 0 "; } ! $sql .= $sql_find . " "; --- 128,132 ---- $sql .= " AND t.topic_type_active > 0 "; } ! $sql .= $sql_find . " "; *************** *** 135,139 **** $sql .= " GROUP BY t2.forum_id ASC, t2.topic_type DESC, p2.post_time DESC"; $sql .= " HAVING count(*) >= " . $cat_start[$block_id] . " AND count(*) <= " . intval( $newssuite_config['news_items'] + $cat_start[$block_id] - 1 ); ! } else --- 135,139 ---- $sql .= " GROUP BY t2.forum_id ASC, t2.topic_type DESC, p2.post_time DESC"; $sql .= " HAVING count(*) >= " . $cat_start[$block_id] . " AND count(*) <= " . intval( $newssuite_config['news_items'] + $cat_start[$block_id] - 1 ); ! } else *************** *** 144,148 **** } return $sql; ! break; case 'kb': --- 144,148 ---- } return $sql; ! break; case 'kb': *************** *** 156,171 **** } ! $sql .= "WHERE kbt.article_category_id = kbc.category_id ! AND t.topic_id = kbt.topic_id ! AND u.user_id = kbt.article_author_id ! AND p2.post_id = t.topic_last_post_id ! AND u2.user_id = p2.poster_id ! ! AND kbt.approved = 1 ! ! AND kbc.category_id IN ( $news_auth_data ) ! " . $sql_find . " "; --- 156,171 ---- } ! $sql .= "WHERE kbt.article_category_id = kbc.category_id ! AND t.topic_id = kbt.topic_id ! AND u.user_id = kbt.article_author_id ! AND p2.post_id = t.topic_last_post_id ! AND u2.user_id = p2.poster_id ! ! AND kbt.approved = 1 ! ! AND kbc.category_id IN ( $news_auth_data ) ! " . $sql_find . " "; *************** *** 188,193 **** /** * News auth ! * Authenticates a forum and checks if the user can view/read it. ! * If not, pops the news item out of the array and checks the next * news item. */ --- 188,193 ---- /** * News auth ! * Authenticates a forum and checks if the user can view/read it. ! * If not, pops the news item out of the array and checks the next * news item. */ *************** *** 198,214 **** switch ( $newssuite_config['news_source_switch'] ) { ! case 'phpbb': // Get all forum data (only once) if ( empty( $is_auth ) ) { $is_auth = auth( AUTH_ALL, AUTH_LIST_ALL, $userdata ); ! } // Check permissions // if( !$is_auth[$news[$i]['forum_id']]['auth_view'] || !$is_auth[$news[$i]['forum_id']]['auth_read'] ) // This less strict check lets you have hidden but readable posts displayed by newssuite if ( !$is_auth[$news[$i]['forum_id']]['auth_read'] ) ! { // Pop off unauthorized entry ! array_splice( $news, $i, 1 ); // If an entry still exists, check it if ( isset( $news[$i] ) ) --- 198,214 ---- switch ( $newssuite_config['news_source_switch'] ) { ! case 'phpbb': // Get all forum data (only once) if ( empty( $is_auth ) ) { $is_auth = auth( AUTH_ALL, AUTH_LIST_ALL, $userdata ); ! } // Check permissions // if( !$is_auth[$news[$i]['forum_id']]['auth_view'] || !$is_auth[$news[$i]['forum_id']]['auth_read'] ) // This less strict check lets you have hidden but readable posts displayed by newssuite if ( !$is_auth[$news[$i]['forum_id']]['auth_read'] ) ! { // Pop off unauthorized entry ! array_splice( $news, $i, 1 ); // If an entry still exists, check it if ( isset( $news[$i] ) ) *************** *** 236,245 **** switch ( $newssuite_config['news_source_switch'] ) { ! case 'phpbb': ! // Get array of categories from the database ! $sql = "SELECT cat_id, cat_title ! FROM " . CATEGORIES_TABLE . " ORDER BY cat_order"; if ( !( $result = $db->sql_query( $sql ) ) ) --- 236,245 ---- switch ( $newssuite_config['news_source_switch'] ) { ! case 'phpbb': ! // Get array of categories from the database ! $sql = "SELECT cat_id, cat_title ! FROM " . CATEGORIES_TABLE . " ORDER BY cat_order"; if ( !( $result = $db->sql_query( $sql ) ) ) *************** *** 256,260 **** break; } ! } // get type list for adding and editing articles --- 256,260 ---- break; } ! } // get type list for adding and editing articles *************** *** 264,268 **** global $db, $template; ! $sql = "SELECT * FROM " . KB_TYPES_TABLE; --- 264,268 ---- global $db, $template; ! $sql = "SELECT * FROM " . KB_TYPES_TABLE; *************** *** 290,302 **** { global $board_config, $newssuite_config; ! // $mytext = stripslashes($mytext); // Remove KB markup $search = array ( "'\[toc*?[^\[\]]*?\]'si", "'\[abstract*?[^\[\]]*?\]'si", ! "'\[page*?[^\[\]]*?\]'si" ); $replace = array ( "", "", ! "" ); $mytext = preg_replace( $search, $replace, $mytext ); --- 290,302 ---- { global $board_config, $newssuite_config; ! // $mytext = stripslashes($mytext); // Remove KB markup $search = array ( "'\[toc*?[^\[\]]*?\]'si", "'\[abstract*?[^\[\]]*?\]'si", ! "'\[page*?[^\[\]]*?\]'si" ); $replace = array ( "", "", ! "" ); $mytext = preg_replace( $search, $replace, $mytext ); *************** *** 309,313 **** function ns_decode_BBCODE_fixup( $mytext = '' ) { ! global $board_config, $newssuite_config; // Fix up // This function converts some standard BBCODEs to slicker html equivalents --- 309,313 ---- function ns_decode_BBCODE_fixup( $mytext = '' ) { ! global $board_config, $newssuite_config; // Fix up // This function converts some standard BBCODEs to slicker html equivalents *************** *** 316,322 **** // ------------------------------------------------------------------------ $search = array (); ! $replace = array (); // $mytext = stripslashes($mytext); ! $search = array ( // "'([\r\n])[\s]+'", // Strip out white space "'([\n])[\s]+'", // Strip out white space --- 316,322 ---- // ------------------------------------------------------------------------ $search = array (); ! $replace = array (); // $mytext = stripslashes($mytext); ! $search = array ( // "'([\r\n])[\s]+'", // Strip out white space "'([\n])[\s]+'", // Strip out white space *************** *** 340,344 **** // "'\[\/u*?[^\[\]]*?\]'si", // "'\[i*?[^\[\]]*?\]'si", ! // "'\[\/i*?[^\[\]]*?\]'si", ); $replace = array ( "\\1", --- 340,344 ---- // "'\[\/u*?[^\[\]]*?\]'si", // "'\[i*?[^\[\]]*?\]'si", ! // "'\[\/i*?[^\[\]]*?\]'si", ); $replace = array ( "\\1", *************** *** 363,367 **** // "</i>", // "<i>", ! // "</i>" ); $mytext = preg_replace( $search, $replace, $mytext ); --- 363,367 ---- // "</i>", // "<i>", ! // "</i>" ); $mytext = preg_replace( $search, $replace, $mytext ); *************** *** 374,381 **** function ns_decode_BBCODE( $mytext = '', $bbcode_uid, $remove = false ) { ! global $board_config, $newssuite_config; // remove BBCODE tags $search = array (); ! $replace = array (); // $mytext = stripslashes($mytext); if ( $remove || !$newssuite_config['enable_bbcode_msg'] ) --- 374,381 ---- function ns_decode_BBCODE( $mytext = '', $bbcode_uid, $remove = false ) { ! global $board_config, $newssuite_config; // remove BBCODE tags $search = array (); ! $replace = array (); // $mytext = stripslashes($mytext); if ( $remove || !$newssuite_config['enable_bbcode_msg'] ) *************** *** 384,393 **** ); ! $replace = array ( "" ); // $mytext = preg_replace( $search, $replace, $mytext ); ! } // BBCODE ! $mytext = ( $newssuite_config['enable_bbcode_msg'] ) ? bbencode_second_pass( $mytext, $bbcode_uid ) : preg_replace( "/\:[0-9a-z\:]+\]/si", "]", $mytext ); return $mytext; } --- 384,393 ---- ); ! $replace = array ( "" ); // $mytext = preg_replace( $search, $replace, $mytext ); ! } // BBCODE ! $mytext = ( $newssuite_config['enable_bbcode_msg'] ) ? mx_decode( $mytext, $bbcode_uid ) : preg_replace( "/\:[0-9a-z\:]+\]/si", "]", $mytext ); return $mytext; } *************** *** 395,407 **** function ns_decode_HTML( $mytext = '', $remove = false ) { ! global $board_config, $newssuite_config; // remove BBCODE tags $search = array (); ! $replace = array (); // $mytext = stripslashes($mytext); if ( $remove || !$newssuite_config['enable_html_msg'] ) { ! $search = array ( ! /* "'<script[^>]*?>.*?</script>'si", // Strip out javascript "'([\r\n])[\s]+'", // Strip out white space --- 395,407 ---- function ns_decode_HTML( $mytext = '', $remove = false ) { ! global $board_config, $newssuite_config; // remove BBCODE tags $search = array (); ! $replace = array (); // $mytext = stripslashes($mytext); if ( $remove || !$newssuite_config['enable_html_msg'] ) { ! $search = array ( ! /* "'<script[^>]*?>.*?</script>'si", // Strip out javascript "'([\r\n])[\s]+'", // Strip out white space *************** *** 419,426 **** "'<br />'i", "'<[\/\!]*?[^<>]*?>'si", // Strip out HTML tags ! "'--br--'i" ); ! $replace = array ( ! /* "", "\\1", --- 419,426 ---- "'<br />'i", "'<[\/\!]*?[^<>]*?>'si", // Strip out HTML tags ! "'--br--'i" ); ! $replace = array ( ! /* "", "\\1", *************** *** 438,445 **** "--br--", "", ! "<br />" ); $mytext = preg_replace( $search, $replace, $mytext ); ! } // HTML // $mytext = ( !$newssuite_config['enable_html_msg'] ) ? preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $mytext) : $mytext; --- 438,445 ---- "--br--", "", ! "<br />" ); $mytext = preg_replace( $search, $replace, $mytext ); ! } // HTML // $mytext = ( !$newssuite_config['enable_html_msg'] ) ? preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $mytext) : $mytext; *************** *** 449,453 **** function ns_decode_truncate_fixup( $mytext = '' ) { ! global $board_config, $newssuite_config; // ------------------------------------------------------------------------ // $mytext = stripslashes($mytext); --- 449,453 ---- function ns_decode_truncate_fixup( $mytext = '' ) { ! global $board_config, $newssuite_config; // ------------------------------------------------------------------------ // $mytext = stripslashes($mytext); *************** *** 475,479 **** $mytext = substr( $mytext, 0, strrpos( $mytext, ' ' ) ); $mytext = str_replace('<br/>', '<br />', $mytext); ! if ( $add_dots ) { --- 475,479 ---- $mytext = substr( $mytext, 0, strrpos( $mytext, ' ' ) ); $mytext = str_replace('<br/>', '<br />', $mytext); ! if ( $add_dots ) { *************** *** 489,493 **** function magic_url( $url ) { ! global $board_config; // $url = stripslashes($url); if ( $url ) --- 489,493 ---- function magic_url( $url ) { ! global $board_config; // $url = stripslashes($url); if ( $url ) *************** *** 497,511 **** $match = array(); ! $replace = array(); // relative urls for this board $match[] = '#(^|[\n ])' . $server_protocol . trim( $board_config['server_name'] ) . $server_port . preg_replace( '/^\/?(.*?)(\/)?$/', '$1', trim( $board_config['script_path'] ) ) . '/([^ \t\n\r <"\']+)#i'; ! $replace[] = '<a href="$1" target="_blank">$1</a>'; // matches a xxxx://aaaaa.bbb.cccc. ... $match[] = '#(^|[\n ])([\w]+?://.*?[^ \t\n\r<"]*)#ie'; ! $replace[] = "'\$1<a href=\"\$2\" target=\"_blank\">' . ((strlen('\$2') > 20) ? substr(str_replace('http://','','\$2'), 0, 12) . '...' : '\$2') . '</a>'"; // $replace[] = "'\$1<a href=\"\$2\" target=\"_blank\">' . ((strlen('\$2') > 25) ? substr(str_replace('http://','','\$2'), 0, 12) . ' ... ' . substr('\$2', -3) : '\$2') . '</a>'"; // matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing $match[] = '#(^|[\n ])(www\.[\w\-]+\.[\w\-.\~]+(?:/[^ \t\n\r<"]*)?)#ie'; ! $replace[] = "'\$1<a href=\"http://\$2\" target=\"_blank\">' . ((strlen('\$2') > 20) ? substr(str_replace(' ', '%20', str_replace('http://','', '\$2')), 0, 12) . '...' : '\$2') . '</a>'"; // $replace[] = "'\$1<a href=\"http://\$2\" target=\"_blank\">' . ((strlen('\$2') > 25) ? substr(str_replace(' ', '%20', str_replace('http://','', '\$2')), 0, 12) . ' ... ' . substr('\$2', -3) : '\$2') . '</a>'"; // matches an email@domain type address at the start of a line, or after a space. --- 497,511 ---- $match = array(); ! $replace = array(); // relative urls for this board $match[] = '#(^|[\n ])' . $server_protocol . trim( $board_config['server_name'] ) . $server_port . preg_replace( '/^\/?(.*?)(\/)?$/', '$1', trim( $board_config['script_path'] ) ) . '/([^ \t\n\r <"\']+)#i'; ! $replace[] = '<a href="$1" target="_blank">$1</a>'; // matches a xxxx://aaaaa.bbb.cccc. ... $match[] = '#(^|[\n ])([\w]+?://.*?[^ \t\n\r<"]*)#ie'; ! $replace[] = "'\$1<a href=\"\$2\" target=\"_blank\">' . ((strlen('\$2') > 20) ? substr(str_replace('http://','','\$2'), 0, 12) . '...' : '\$2') . '</a>'"; // $replace[] = "'\$1<a href=\"\$2\" target=\"_blank\">' . ((strlen('\$2') > 25) ? substr(str_replace('http://','','\$2'), 0, 12) . ' ... ' . substr('\$2', -3) : '\$2') . '</a>'"; // matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing $match[] = '#(^|[\n ])(www\.[\w\-]+\.[\w\-.\~]+(?:/[^ \t\n\r<"]*)?)#ie'; ! $replace[] = "'\$1<a href=\"http://\$2\" target=\"_blank\">' . ((strlen('\$2') > 20) ? substr(str_replace(' ', '%20', str_replace('http://','', '\$2')), 0, 12) . '...' : '\$2') . '</a>'"; // $replace[] = "'\$1<a href=\"http://\$2\" target=\"_blank\">' . ((strlen('\$2') > 25) ? substr(str_replace(' ', '%20', str_replace('http://','', '\$2')), 0, 12) . ' ... ' . substr('\$2', -3) : '\$2') . '</a>'"; // matches an email@domain type address at the start of a line, or after a space. *************** *** 513,517 **** $replace[] = "'\$1<a href=\"mailto:\$2\">' . ((strlen('\$2') > 25) ? substr('\$2', 0, 15) . ' ... ' . substr('\$2', -5) : '\$2') . '</a>'"; ! $url = preg_replace( $match, $replace, $url ); // Also fix already tagged links $url = preg_replace( "/<a href=(.*?)>(.*?)<\/a>/ie", "(strlen(\"\\2\") > 20 && !eregi(\"<\", \"\\2\") ) ? '<a href='.stripslashes(\"\\1\").'>'.substr(str_replace(\"http://\",\"\",\"\\2\"), 0, 12) . '...</a>' : '<a href='.stripslashes(\"\\1\").'>'.\"\\2\".'</a>'", $url ); --- 513,517 ---- $replace[] = "'\$1<a href=\"mailto:\$2\">' . ((strlen('\$2') > 25) ? substr('\$2', 0, 15) . ' ... ' . substr('\$2', -5) : '\$2') . '</a>'"; ! $url = preg_replace( $match, $replace, $url ); // Also fix already tagged links $url = preg_replace( "/<a href=(.*?)>(.*?)<\/a>/ie", "(strlen(\"\\2\") > 20 && !eregi(\"<\", \"\\2\") ) ? '<a href='.stripslashes(\"\\1\").'>'.substr(str_replace(\"http://\",\"\",\"\\2\"), 0, 12) . '...</a>' : '<a href='.stripslashes(\"\\1\").'>'.\"\\2\".'</a>'", $url ); *************** *** 520,533 **** } return $url; ! } // Validates the img for block_size and resizes when needed // run within a div tag to ensure the table layout is not broken function magic_img( $img ) { ! global $board_config, $block_size; // $img = stripslashes($img); $image_size = $block_size - 30; if ( $img ) ! { // Also fix already tagged links // $img = preg_replace("/<img src=(.*?)(|border(.*?)|alt(.*?))>/ie", "'<br /><br /><center><img src='.stripslashes(\"\\1\").' width=\"'.makeImgWidth(trim(stripslashes(\"\\1\"))).'\" ></center><br />'", $img); --- 520,533 ---- } return $url; ! } // Validates the img for block_size and resizes when needed // run within a div tag to ensure the table layout is not broken function magic_img( $img ) { ! global $board_config, $block_size; // $img = stripslashes($img); $image_size = $block_size - 30; if ( $img ) ! { // Also fix already tagged links // $img = preg_replace("/<img src=(.*?)(|border(.*?)|alt(.*?))>/ie", "'<br /><br /><center><img src='.stripslashes(\"\\1\").' width=\"'.makeImgWidth(trim(stripslashes(\"\\1\"))).'\" ></center><br />'", $img); *************** *** 536,540 **** } return $img; ! } // Very slow...not used atm function makeImgWidth( $image ) --- 536,540 ---- } return $img; ! } // Very slow...not used atm function makeImgWidth( $image ) *************** *** 557,561 **** return $newwidth; ! } // Not always working...not used atm function WrapWords( $str, $chars ) --- 557,561 ---- return $newwidth; ! } // Not always working...not used atm function WrapWords( $str, $chars ) *************** *** 563,567 **** $str = preg_replace( '/([^\s\<\>]{' . $chars . ',' . $chars . '})/', '\1 ', $str ); return $str; ! } // Force Word Wrapping (by TerraFrost) function word_wrap_pass( $message ) --- 563,567 ---- $str = preg_replace( '/([^\s\<\>]{' . $chars . ',' . $chars . '})/', '\1 ', $str ); return $str; ! } // Force Word Wrapping (by TerraFrost) function word_wrap_pass( $message ) *************** *** 618,622 **** function addWrap( $curChar, $nextChar, &$finalText, &$tempText, &$curCount, &$tempCount ) { ! $softHyph = "­"; // $softHyph = " "; $maxChars = 10; --- 618,622 ---- function addWrap( $curChar, $nextChar, &$finalText, &$tempText, &$curCount, &$tempCount ) { ! $softHyph = "­"; // $softHyph = " "; $maxChars = 10; *************** *** 639,651 **** $tempText .= $curChar; $curCount++; ! } // the following code takes care of (unicode) characters prohibiting non-mandatory breaks directly before them. // $curChar isn't a " " or "\n" if ( $tempText != "" && $curChar != "" ) ! $tempCount++; // $curChar is " " or "\n", but $nextChar prohibits wrapping. elseif ( ( $curCount == 1 && strstr( $wrapProhibitedChars, $curChar ) !== false ) || ( $curCount == 0 && $nextChar != "" && $nextChar != " " && $nextChar != "\n" && strstr( $wrapProhibitedChars, $nextChar ) !== false ) ) ! $tempCount++; // $curChar and $nextChar aren't both either " " or "\n" elseif ( !( $curCount == 0 && ( $nextChar == " " || $nextChar == "\n" ) ) ) --- 639,651 ---- $tempText .= $curChar; $curCount++; ! } // the following code takes care of (unicode) characters prohibiting non-mandatory breaks directly before them. // $curChar isn't a " " or "\n" if ( $tempText != "" && $curChar != "" ) ! $tempCount++; // $curChar is " " or "\n", but $nextChar prohibits wrapping. elseif ( ( $curCount == 1 && strstr( $wrapProhibitedChars, $curChar ) !== false ) || ( $curCount == 0 && $nextChar != "" && $nextChar != " " && $nextChar != "\n" && strstr( $wrapProhibitedChars, $nextChar ) !== false ) ) ! $tempCount++; // $curChar and $nextChar aren't both either " " or "\n" elseif ( !( $curCount == 0 && ( $nextChar == " " || $nextChar == "\n" ) ) ) *************** *** 671,675 **** if ( $opt &1 ) ! { // Translating single quotes // Add single quote to translation table; --- 671,675 ---- if ( $opt &1 ) ! { // Translating single quotes // Add single quote to translation table; *************** *** 679,683 **** if ( !( $opt &2 ) ) ! { // Not translating double quotes // Remove double quote from translation table --- 679,683 ---- if ( !( $opt &2 ) ) ! { // Not translating double quotes // Remove double quote from translation table |