Changeset 3903
- Timestamp:
- 06/22/2006 10:09:17 PM (20 years ago)
- Location:
- branches/2.0
- Files:
-
- 5 edited
-
wp-content/themes/classic/comments-popup.php (modified) (1 diff)
-
wp-content/themes/default/comments-popup.php (modified) (1 diff)
-
wp-includes/comment-functions.php (modified) (3 diffs)
-
wp-includes/default-filters.php (modified) (1 diff)
-
wp-settings.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/wp-content/themes/classic/comments-popup.php
r3115 r3903 30 30 <?php 31 31 // this line is WordPress' motor, do not delete it. 32 $comment_author = (isset($_COOKIE['comment_author_' . COOKIEHASH])) ? trim($_COOKIE['comment_author_'. COOKIEHASH]) : ''; 33 $comment_author_email = (isset($_COOKIE['comment_author_email_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_email_'. COOKIEHASH]) : ''; 34 $comment_author_url = (isset($_COOKIE['comment_author_url_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_url_'. COOKIEHASH]) : ''; 32 $commenter = wp_get_current_commenter(); 33 extract($commenter); 35 34 $comments = get_approved_comments($id); 36 35 $commentstatus = get_post($id); -
branches/2.0/wp-content/themes/default/comments-popup.php
r3115 r3903 30 30 <?php 31 31 // this line is WordPress' motor, do not delete it. 32 $comment_author = (isset($_COOKIE['comment_author_' . COOKIEHASH])) ? trim($_COOKIE['comment_author_'. COOKIEHASH]) : ''; 33 $comment_author_email = (isset($_COOKIE['comment_author_email_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_email_'. COOKIEHASH]) : ''; 34 $comment_author_url = (isset($_COOKIE['comment_author_url_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_url_'. COOKIEHASH]) : ''; 32 $commenter = wp_get_current_commenter(); 33 extract($commenter); 35 34 $comments = get_approved_comments($id); 36 35 $post = get_post($id); -
branches/2.0/wp-includes/comment-functions.php
r3888 r3903 6 6 global $wp_query, $withcomments, $post, $wpdb, $id, $comment, $user_login, $user_ID, $user_identity; 7 7 8 if ( is_single() || is_page() || $withcomments ) : 9 $req = get_settings('require_name_email'); 10 $comment_author = ''; 11 if ( isset($_COOKIE['comment_author_'.COOKIEHASH]) ) { 12 $comment_author = apply_filters('pre_comment_author_name', $_COOKIE['comment_author_'.COOKIEHASH]); 13 $comment_author = stripslashes($comment_author); 14 $comment_author = wp_specialchars($comment_author, true); 15 } 16 $comment_author_email = ''; 17 if ( isset($_COOKIE['comment_author_email_'.COOKIEHASH]) ) { 18 $comment_author_email = apply_filters('pre_comment_author_email', $_COOKIE['comment_author_email_'.COOKIEHASH]); 19 $comment_author_email = stripslashes($comment_author_email); 20 $comment_author_email = wp_specialchars($comment_author_email, true); 21 } 22 $comment_author_url = ''; 23 if ( isset($_COOKIE['comment_author_url_'.COOKIEHASH]) ) { 24 $comment_author_url = apply_filters('pre_comment_author_url', $_COOKIE['comment_author_url_'.COOKIEHASH]); 25 $comment_author_url = stripslashes($comment_author_url); 26 $comment_author_url = wp_specialchars($comment_author_url, true); 27 } 28 8 if ( ! (is_single() || is_page() || $withcomments) ) 9 return; 10 11 $req = get_settings('require_name_email'); 12 $commenter = wp_get_current_commenter(); 13 extract($commenter); 14 15 // TODO: Use API instead of SELECTs. 29 16 if ( empty($comment_author) ) { 30 17 $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = '$post->ID' AND comment_approved = '1' ORDER BY comment_date"); … … 41 28 else 42 29 require( ABSPATH . 'wp-content/themes/default/comments.php'); 43 44 endif;45 30 } 46 31 … … 909 894 } 910 895 896 function sanitize_comment_cookies() { 897 if ( isset($_COOKIE['comment_author_'.COOKIEHASH]) ) { 898 $comment_author = apply_filters('pre_comment_author_name', $_COOKIE['comment_author_'.COOKIEHASH]); 899 $comment_author = stripslashes($comment_author); 900 $comment_author = wp_specialchars($comment_author, true); 901 $_COOKIE['comment_author_'.COOKIEHASH] = $comment_author; 902 } 903 904 if ( isset($_COOKIE['comment_author_email_'.COOKIEHASH]) ) { 905 $comment_author_email = apply_filters('pre_comment_author_email', $_COOKIE['comment_author_email_'.COOKIEHASH]); 906 $comment_author_email = stripslashes($comment_author_email); 907 $comment_author_email = wp_specialchars($comment_author_email, true); 908 $_COOKIE['comment_author_email_'.COOKIEHASH] = $comment_author_email; 909 } 910 911 if ( isset($_COOKIE['comment_author_url_'.COOKIEHASH]) ) { 912 $comment_author_url = apply_filters('pre_comment_author_url', $_COOKIE['comment_author_url_'.COOKIEHASH]); 913 $comment_author_url = stripslashes($comment_author_url); 914 $comment_author_url = wp_specialchars($comment_author_url, true); 915 $_COOKIE['comment_author_url_'.COOKIEHASH] = $comment_author_url; 916 } 917 } 918 919 function wp_get_current_commenter() { 920 // Cookies should already be sanitized. 921 922 $comment_author = ''; 923 if ( isset($_COOKIE['comment_author_'.COOKIEHASH]) ) 924 $comment_author = $_COOKIE['comment_author_'.COOKIEHASH]; 925 926 $comment_author_email = ''; 927 if ( isset($_COOKIE['comment_author_email_'.COOKIEHASH]) ) 928 $comment_author_email = $_COOKIE['comment_author_email_'.COOKIEHASH]; 929 930 $comment_author_url = ''; 931 if ( isset($_COOKIE['comment_author_url_'.COOKIEHASH]) ) 932 $comment_author_url = $_COOKIE['comment_author_url_'.COOKIEHASH]; 933 934 return compact('comment_author', 'comment_author_email', 'comment_author_url'); 935 } 936 911 937 ?> -
branches/2.0/wp-includes/default-filters.php
r3832 r3903 117 117 add_action('publish_post', 'generic_ping'); 118 118 add_action('wp_head', 'rsd_link'); 119 add_action('sanitize_comment_cookies', 'sanitize_comment_cookies'); 119 120 120 121 ?> -
branches/2.0/wp-settings.php
r3580 r3903 199 199 $_SERVER = add_magic_quotes($_SERVER); 200 200 201 do_action('sanitize_comment_cookies'); 202 201 203 $wp_query = new WP_Query(); 202 204 $wp_rewrite = new WP_Rewrite();
Note: See TracChangeset
for help on using the changeset viewer.