Changeset 1435 for trunk/wp-includes/functions.php
- Timestamp:
- 06/18/2004 12:22:09 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/functions.php (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/functions.php
r1428 r1435 167 167 global $wpdb, $cache_userdata; 168 168 if ( empty($cache_userdata[$userid]) ) { 169 $user = $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID = '$userid'"); 170 $user->user_nickname = stripslashes($user->user_nickname); 171 $user->user_firstname = stripslashes($user->user_firstname); 172 $user->user_lastname = stripslashes($user->user_lastname); 173 $user->user_description = stripslashes($user->user_description); 174 $cache_userdata[$userid] = $user; 175 } else { 176 $user = $cache_userdata[$userid]; 177 } 178 return $user; 169 $cache_userdata[$userid] = 170 $wpdb->get_row("SELECT * FROM $wpdb->users WHERE ID = '$userid'"); 171 } 172 173 return $cache_userdata[$userid]; 179 174 } 180 175 … … 316 311 if ('home' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value); 317 312 if ('category_base' == $option->option_name) $option->option_value = preg_replace('|/+$|', '', $option->option_value); 318 $all_options->{$option->option_name} = stripslashes($option->option_value);313 $all_options->{$option->option_name} = $option->option_value; 319 314 } 320 315 } … … 324 319 function update_option($option_name, $newvalue) { 325 320 global $wpdb, $cache_settings; 326 $newvalue = stripslashes($newvalue);321 $newvalue = $newvalue; 327 322 $newvalue = trim($newvalue); // I can't think of any situation we wouldn't want to trim 328 323 $newvalue = $wpdb->escape($newvalue); … … 517 512 function trackback($trackback_url, $title, $excerpt, $ID) { 518 513 global $wpdb; 519 $title = urlencode( stripslashes($title));520 $excerpt = urlencode( stripslashes($excerpt));521 $blog_name = urlencode( stripslashes(get_settings('blogname')));514 $title = urlencode($title); 515 $excerpt = urlencode($excerpt); 516 $blog_name = urlencode(get_settings('blogname')); 522 517 $tb_url = $trackback_url; 523 518 $url = urlencode(get_permalink($ID)); … … 933 928 $comment_author_domain = gethostbyaddr($comment->comment_author_IP); 934 929 935 $blogname = stripslashes(get_settings('blogname'));930 $blogname = get_settings('blogname'); 936 931 937 932 if ('comment' == $comment_type) { 938 $notify_message = "New comment on your post #$comment->comment_post_ID \"". stripslashes($post->post_title)."\"\r\n\r\n";933 $notify_message = "New comment on your post #$comment->comment_post_ID \"".$post->post_title."\"\r\n\r\n"; 939 934 $notify_message .= "Author : $comment->comment_author (IP: $comment->comment_author_IP , $comment_author_domain)\r\n"; 940 935 $notify_message .= "E-mail : $comment->comment_author_email\r\n"; 941 936 $notify_message .= "URI : $comment->comment_author_url\r\n"; 942 937 $notify_message .= "Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$comment->comment_author_IP\r\n"; 943 $notify_message .= "Comment:\r\n". stripslashes($comment->comment_content)."\r\n\r\n";938 $notify_message .= "Comment:\r\n".$comment->comment_content."\r\n\r\n"; 944 939 $notify_message .= "You can see all comments on this post here: \r\n"; 945 $subject = '[' . $blogname . '] Comment: "' . stripslashes($post->post_title).'"';940 $subject = '[' . $blogname . '] Comment: "' .$post->post_title.'"'; 946 941 } elseif ('trackback' == $comment_type) { 947 $notify_message = "New trackback on your post #$comment_post_ID \"". stripslashes($post->post_title)."\"\r\n\r\n";942 $notify_message = "New trackback on your post #$comment_post_ID \"".$post->post_title."\"\r\n\r\n"; 948 943 $notify_message .= "Website: $comment->comment_author (IP: $comment->comment_author_IP , $comment_author_domain)\r\n"; 949 944 $notify_message .= "URI : $comment->comment_author_url\r\n"; 950 $notify_message .= "Excerpt: \n". stripslashes($comment->comment_content)."\r\n\r\n";945 $notify_message .= "Excerpt: \n".$comment->comment_content."\r\n\r\n"; 951 946 $notify_message .= "You can see all trackbacks on this post here: \r\n"; 952 $subject = '[' . $blogname . '] Trackback: "' . stripslashes($post->post_title).'"';947 $subject = '[' . $blogname . '] Trackback: "' .$post->post_title.'"'; 953 948 } elseif ('pingback' == $comment_type) { 954 $notify_message = "New pingback on your post #$comment_post_ID \"". stripslashes($post->post_title)."\"\r\n\r\n";949 $notify_message = "New pingback on your post #$comment_post_ID \"".$post->post_title."\"\r\n\r\n"; 955 950 $notify_message .= "Website: $comment->comment_author\r\n"; 956 951 $notify_message .= "URI : $comment->comment_author_url\r\n"; 957 952 $notify_message .= "Excerpt: \n[...] $original_context [...]\r\n\r\n"; 958 953 $notify_message .= "You can see all pingbacks on this post here: \r\n"; 959 $subject = '[' . $blogname . '] Pingback: "' . stripslashes($post->post_title).'"';954 $subject = '[' . $blogname . '] Pingback: "' .$post->post_title.'"'; 960 955 } 961 956 $notify_message .= get_permalink($comment->comment_post_ID) . '#comments'; … … 964 959 $from = "From: \"$blogname\" <wordpress@" . $_SERVER['SERVER_NAME'] . '>'; 965 960 } else { 966 $from = 'From: "' . stripslashes($comment->comment_author). "\" <$comment->comment_author_email>";961 $from = 'From: "' . $comment->comment_author . "\" <$comment->comment_author_email>"; 967 962 } 968 963 … … 992 987 $comments_waiting = $wpdb->get_var("SELECT count(comment_ID) FROM $wpdb->comments WHERE comment_approved = '0'"); 993 988 994 $notify_message = "A new comment on the post #$comment->comment_post_ID \"". stripslashes($post->post_title)."\" is waiting for your approval\r\n\r\n";989 $notify_message = "A new comment on the post #$comment->comment_post_ID \"".$post->post_title."\" is waiting for your approval\r\n\r\n"; 995 990 $notify_message .= "Author : $comment->comment_author (IP: $comment->comment_author_IP , $comment_author_domain)\r\n"; 996 991 $notify_message .= "E-mail : $comment->comment_author_email\r\n"; 997 992 $notify_message .= "URL : $comment->comment_author_url\r\n"; 998 993 $notify_message .= "Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=$comment->comment_author_IP\r\n"; 999 $notify_message .= "Comment:\r\n". stripslashes($comment->comment_content)."\r\n\r\n";994 $notify_message .= "Comment:\r\n".$comment->comment_content."\r\n\r\n"; 1000 995 $notify_message .= "To approve this comment, visit: " . get_settings('siteurl') . "/wp-admin/post.php?action=mailapprovecomment&p=".$comment->comment_post_ID."&comment=$comment_id\r\n"; 1001 996 $notify_message .= "To delete this comment, visit: " . get_settings('siteurl') . "/wp-admin/post.php?action=confirmdeletecomment&p=".$comment->comment_post_ID."&comment=$comment_id\r\n"; … … 1003 998 $notify_message .= get_settings('siteurl') . "/wp-admin/moderation.php\r\n"; 1004 999 1005 $subject = '[' . stripslashes(get_settings('blogname')) . '] Please approve: "' .stripslashes($post->post_title).'"';1000 $subject = '[' . get_settings('blogname') . '] Please approve: "' .$post->post_title.'"'; 1006 1001 $admin_email = get_settings("admin_email"); 1007 1002 $from = "From: $admin_email";
Note: See TracChangeset
for help on using the changeset viewer.