[wp-cvs] wordpress wp-comments-popup.php, 1.16, 1.17 wp-comments.php, 1.25, 1.26 wp-login.php, 1.39, 1.40 wp-settings.php, 1.56, 1.57

Matthew Mullenweg saxmatt at users.sourceforge.net
Sun Oct 10 18:02:31 UTC 2004


Update of /cvsroot/cafelog/wordpress
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11071

Modified Files:
	wp-comments-popup.php wp-comments.php wp-login.php 
	wp-settings.php 
Log Message:
Move to cookiehash define, use wp_login()  function for auth.php.

Index: wp-settings.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-settings.php,v
retrieving revision 1.56
retrieving revision 1.57
diff -C2 -d -r1.56 -r1.57
*** wp-settings.php	4 Oct 2004 08:03:52 -0000	1.56
--- wp-settings.php	10 Oct 2004 18:02:29 -0000	1.57
***************
*** 69,73 ****
  
      // Used to guarantee unique hash cookies
!     $cookiehash = md5(get_settings('siteurl'));
  	define('COOKIEHASH', $cookiehash); 
  endif;
--- 69,73 ----
  
      // Used to guarantee unique hash cookies
!     $cookiehash = md5(get_settings('siteurl')); // Remove in 1.4
  	define('COOKIEHASH', $cookiehash); 
  endif;

Index: wp-login.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-login.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** wp-login.php	6 Oct 2004 05:31:52 -0000	1.39
--- wp-login.php	10 Oct 2004 18:02:29 -0000	1.40
***************
*** 149,158 ****
  	}
  
! 	if ( !login($log, $pwd) ) {
! 		header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
! 		header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
! 		header('Cache-Control: no-cache, must-revalidate');
! 		header('Pragma: no-cache');
! 	} else {
  		$user_login = $log;
  		$user_pass = $pwd;
--- 149,158 ----
  	}
  
! 	header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
! 	header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
! 	header('Cache-Control: no-cache, must-revalidate');
! 	header('Pragma: no-cache');
! 
! 	if ( wp_login($log, $pwd) ) {
  		$user_login = $log;
  		$user_pass = $pwd;
***************
*** 160,168 ****
  		setcookie('wordpresspass_'. COOKIEHASH, md5($user_pass), time() + 31536000, COOKIEPATH);
  
- 		header('Expires: Wed, 11 Jan 1984 05:00:00 GMT');
- 		header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
- 		header('Cache-Control: no-cache, must-revalidate');
- 		header('Pragma: no-cache');
- 
  		if ($is_IIS)
  			header("Refresh: 0;url=$redirect_to");
--- 160,163 ----
***************
*** 176,180 ****
  	}
  
! 	if ( login($user_login, $user_pass_md5, true) ) {
  		header('Expires: Wed, 5 Jun 1979 23:41:00 GMT'); // Michel's birthday
  		header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
--- 171,175 ----
  	}
  
! 	if ( wp_login($user_login, $user_pass_md5, true) ) {
  		header('Expires: Wed, 5 Jun 1979 23:41:00 GMT'); // Michel's birthday
  		header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');

Index: wp-comments.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-comments.php,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** wp-comments.php	5 Sep 2004 07:25:31 -0000	1.25
--- wp-comments.php	10 Oct 2004 18:02:29 -0000	1.26
***************
*** 1,3 ****
! <?php if ( !empty($post->post_password) && $_COOKIE['wp-postpass_'.$cookiehash] != $post->post_password) : ?>
  <p><?php _e('Enter your password to view comments.'); ?></p>
  <?php return; endif; ?>
--- 1,3 ----
! <?php if ( !empty($post->post_password) && $_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) : ?>
  <p><?php _e('Enter your password to view comments.'); ?></p>
  <?php return; endif; ?>

Index: wp-comments-popup.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-comments-popup.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** wp-comments-popup.php	8 Oct 2004 17:58:01 -0000	1.16
--- wp-comments-popup.php	10 Oct 2004 18:02:29 -0000	1.17
***************
*** 32,41 ****
  <?php
  // this line is WordPress' motor, do not delete it.
! $comment_author = (isset($_COOKIE['comment_author_'.$cookiehash])) ? trim($_COOKIE['comment_author_'.$cookiehash]) : '';
! $comment_author_email = (isset($_COOKIE['comment_author_email_'.$cookiehash])) ? trim($_COOKIE['comment_author_email_'.$cookiehash]) : '';
! $comment_author_url = (isset($_COOKIE['comment_author_url_'.$cookiehash])) ? trim($_COOKIE['comment_author_url_'.$cookiehash]) : '';
  $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date");
  $commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $wpdb->posts WHERE ID = $id");
! if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'.$cookiehash] != $commentstatus->post_password) {  // and it doesn't match the cookie
  	echo(get_the_password_form());
  } else { ?>
--- 32,41 ----
  <?php
  // this line is WordPress' motor, do not delete it.
! $comment_author = (isset($_COOKIE['comment_author_' . COOKIEHASH])) ? trim($_COOKIE['comment_author_'. COOKIEHASH]) : '';
! $comment_author_email = (isset($_COOKIE['comment_author_email_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_email_'. COOKIEHASH]) : '';
! $comment_author_url = (isset($_COOKIE['comment_author_url_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_url_'. COOKIEHASH]) : '';
  $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date");
  $commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $wpdb->posts WHERE ID = $id");
! if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $commentstatus->post_password) {  // and it doesn't match the cookie
  	echo(get_the_password_form());
  } else { ?>




More information about the cvs mailing list