diff options
author | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-04-23 18:41:28 +0000 |
---|---|---|
committer | Ludovic Arnaud <ludovic_arnaud@users.sourceforge.net> | 2003-04-23 18:41:28 +0000 |
commit | eb9ed9d0077d52bebad98ce23f92882a43fdf5b4 (patch) | |
tree | de25a701c19e3f5e41c79a72c2e1e2b3f7dd7607 /phpBB/includes/functions_posting.php | |
parent | 72fbb43a1e039e29aadd5faf761c377588d030e6 (diff) | |
download | forums-eb9ed9d0077d52bebad98ce23f92882a43fdf5b4.tar forums-eb9ed9d0077d52bebad98ce23f92882a43fdf5b4.tar.gz forums-eb9ed9d0077d52bebad98ce23f92882a43fdf5b4.tar.bz2 forums-eb9ed9d0077d52bebad98ce23f92882a43fdf5b4.tar.xz forums-eb9ed9d0077d52bebad98ce23f92882a43fdf5b4.zip |
Fixed: decode_text() not decoding /list tags properly
Fixed: topic_replies not incremented when quoting another post
git-svn-id: file:///svn/phpbb/trunk@3929 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r-- | phpBB/includes/functions_posting.php | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 9cb2dabd02..6fc6654f26 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -95,6 +95,20 @@ function decode_text(&$message, $bbcode_uid) $server_protocol = ($config['cookie_secure']) ? 'https://' : 'http://'; $server_port = ($config['server_port'] <> 80) ? ':' . trim($config['server_port']) . '/' : '/'; + $search = array( + '<br />', + ":u:$bbcode_uid", + ":o:$bbcode_uid", + ":$bbcode_uid" + ); + $replace = array( + "\n", + '', + '', + '' + ); + $message = str_replace($search, $replace, $message); + $match = array( '#<!\-\- e \-\-><a href="mailto:(.*?)">.*?</a><!\-\- e \-\->#', '#<!\-\- m \-\-><a href="(.*?)" target="_blank">.*?</a><!\-\- m \-\->#', @@ -103,7 +117,6 @@ function decode_text(&$message, $bbcode_uid) '#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '#<.*?>#s' ); - $replace = array( '\1', '\1', @@ -112,9 +125,6 @@ function decode_text(&$message, $bbcode_uid) '\1', '' ); - - $message = str_replace(":$bbcode_uid", '', $message); - $message = str_replace('<br />', "\n", $message); $message = preg_replace($match, $replace, $message); return; @@ -1144,7 +1154,7 @@ function submit_post($mode, $message, $subject, $username, $topic_type, $bbcode_ )); } - $topic_replies_sql = ($mode == 'reply') ? ', topic_replies = topic_replies + 1, topic_replies_real = topic_replies_real + 1' : ''; + $topic_replies_sql = ($mode == 'reply' || $mode == 'quote') ? ', topic_replies = topic_replies + 1, topic_replies_real = topic_replies_real + 1' : ''; $sql = 'UPDATE ' . TOPICS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $topic_sql) . $topic_replies_sql . ' WHERE topic_id = ' . $post_data['topic_id']; $db->sql_query($sql); |