summaryrefslogtreecommitdiffstats
path: root/wp-trackback.php
diff options
context:
space:
mode:
authordonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-04 16:44:15 +0000
committerdonncha <donncha@7be80a69-a1ef-0310-a953-fb0f7c49ff36>2008-04-04 16:44:15 +0000
commit7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc (patch)
treec6fd23b598f3994eddb18cb1c0f2e8d95ff054fa /wp-trackback.php
parentf650f48c048bfbbb2ae702b6425d87e39358d748 (diff)
downloadwordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.tar.gz
wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.tar.xz
wordpress-mu-7740e89de3e1bc0cc636120e3ca8ab9e97e4d3cc.zip
Merged with WordPress 2.5, unstable, only for testing
git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1218 7be80a69-a1ef-0310-a953-fb0f7c49ff36
Diffstat (limited to 'wp-trackback.php')
-rw-r--r--wp-trackback.php19
1 files changed, 7 insertions, 12 deletions
diff --git a/wp-trackback.php b/wp-trackback.php
index 9cac392..26f8763 100644
--- a/wp-trackback.php
+++ b/wp-trackback.php
@@ -43,6 +43,10 @@ if ($charset)
else
$charset = 'ASCII, UTF-8, ISO-8859-1, JIS, EUC-JP, SJIS';
+// No valid uses for UTF-7
+if ( false !== strpos($charset, 'UTF-7') )
+ die;
+
if ( function_exists('mb_convert_encoding') ) { // For international trackbacks
$title = mb_convert_encoding($title, get_option('blog_charset'), $charset);
$excerpt = mb_convert_encoding($excerpt, get_option('blog_charset'), $charset);
@@ -69,20 +73,11 @@ if (empty($title) && empty($tb_url) && empty($blog_name)) {
if ( !empty($tb_url) && !empty($title) ) {
header('Content-Type: text/xml; charset=' . get_option('blog_charset') );
- $pingstatus = $wpdb->get_var("SELECT ping_status FROM $wpdb->posts WHERE ID = $tb_id");
-
- if ( 'open' != $pingstatus )
+ if ( !pings_open($tb_id) )
trackback_response(1, 'Sorry, trackbacks are closed for this item.');
- $title = wp_specialchars( strip_tags( $title ) );
- $excerpt = strip_tags($excerpt);
- if ( function_exists('mb_strcut') ) { // For international trackbacks
- $excerpt = mb_strcut($excerpt, 0, 252, get_option('blog_charset')) . '...';
- $title = mb_strcut($title, 0, 250, get_option('blog_charset')) . '...';
- } else {
- $excerpt = (strlen($excerpt) > 255) ? substr($excerpt, 0, 252) . '...' : $excerpt;
- $title = (strlen($title) > 250) ? substr($title, 0, 250) . '...' : $title;
- }
+ $title = wp_html_excerpt( $title, 250 ).'...';
+ $excerpt = wp_html_excerpt( $excerpt, 252 ).'...';
$comment_post_ID = (int) $tb_id;
$comment_author = $blog_name;