[wp-cvs] wordpress/wp-includes functions.php,1.122,1.123

Ryan Boren rboren at users.sourceforge.net
Tue Jun 15 03:30:03 UTC 2004


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

Modified Files:
	functions.php 
Log Message:
Call update_post_caches() from within query_posts() and get_posts().  http://mosquito.wordpress.org/bug_view_page.php?bug_id=0000046

Index: functions.php
===================================================================
RCS file: /cvsroot/cafelog/wordpress/wp-includes/functions.php,v
retrieving revision 1.122
retrieving revision 1.123
diff -C2 -d -r1.122 -r1.123
*** functions.php	14 Jun 2004 23:16:03 -0000	1.122
--- functions.php	15 Jun 2004 03:30:00 -0000	1.123
***************
*** 1353,1356 ****
--- 1353,1358 ----
  
  	$posts = $wpdb->get_results("SELECT DISTINCT * FROM $wpdb->posts WHERE post_date <= '$now' AND (post_status = 'publish') GROUP BY $wpdb->posts.ID ORDER BY post_date DESC LIMIT " . $r['offset'] . ',' . $r['numberposts']);
+ 
+     update_post_caches($posts);
  	
  	return $posts;
***************
*** 1705,1709 ****
      // error_log("$request");
      // echo $request;
!     return $wpdb->get_results($request);
  }
  
--- 1707,1713 ----
      // error_log("$request");
      // echo $request;
!     $posts = $wpdb->get_results($request);
!     update_post_caches($posts);
!     return $posts;
  }
  




More information about the cvs mailing list