[wp-cvs] wordpress wp-comments-post.php,1.26,1.27
Matthew Mullenweg
saxmatt at users.sourceforge.net
Mon Jan 31 06:38:13 GMT 2005
- Previous message: [wp-cvs] wordpress/wp-admin options-discussion.php, 1.25,
1.26 options-general.php, 1.33, 1.34 profile.php, 1.39,
1.40 upgrade-schema.php, 1.19, 1.20
- Next message: [wp-cvs] wordpress/wp-content/themes/default comments.php,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/cafelog/wordpress
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12524
Modified Files:
wp-comments-post.php
Log Message:
Comment registration goodness. Hat tip to Jason at noprequisite.com for user_identity code.
Index: wp-comments-post.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-comments-post.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -d -r1.26 -r1.27
*** wp-comments-post.php 25 Dec 2004 18:01:06 -0000 1.26
--- wp-comments-post.php 31 Jan 2005 06:38:11 -0000 1.27
***************
*** 19,25 ****
$comment_content = $_POST['comment'];
! $comment_type = '';
! $user_ip = apply_filters('pre_comment_user_ip', $_SERVER['REMOTE_ADDR']);
if ( get_settings('require_name_email') && ('' == $comment_author_email || '' == $comment_author) )
--- 19,34 ----
$comment_content = $_POST['comment'];
! // If the user is logged in
! get_currentuserinfo();
! if ( $user_ID ) :
! $comment_author = $user_login;
! $comment_author_email = $user_email;
! $comment_author_url = str_replace('http://', '', $user_url);
! else :
! if ( get_option('comment_registration') )
! die( __('Sorry, you must be logged in to post a comment.') );
! endif;
! $comment_type = '';
if ( get_settings('require_name_email') && ('' == $comment_author_email || '' == $comment_author) )
***************
*** 29,33 ****
die( __('Error: please type a comment.') );
! $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type');
wp_new_comment($commentdata);
--- 38,42 ----
die( __('Error: please type a comment.') );
! $commentdata = compact('comment_post_ID', 'comment_author', 'comment_author_email', 'comment_author_url', 'comment_content', 'comment_type', 'user_ID');
wp_new_comment($commentdata);
- Previous message: [wp-cvs] wordpress/wp-admin options-discussion.php, 1.25,
1.26 options-general.php, 1.33, 1.34 profile.php, 1.39,
1.40 upgrade-schema.php, 1.19, 1.20
- Next message: [wp-cvs] wordpress/wp-content/themes/default comments.php,1.5,1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the cvs
mailing list