Fix gravatars for infinite comments. Props mdawaffe. fixes #7432 for trunk

git-svn-id: http://svn.automattic.com/wordpress/trunk@8490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-07-29 22:14:53 +00:00
parent f69ddab179
commit 30d7084f60
3 changed files with 7 additions and 2 deletions

View File

@ -392,13 +392,16 @@ case 'add-comment' :
list($comments, $total) = _wp_get_comment_list( $status, $search, $start, 1 );
if ( get_option('show_avatars') )
add_filter( 'comment_author', 'floated_admin_avatar' );
if ( !$comments )
die('1');
$x = new WP_Ajax_Response();
foreach ( (array) $comments as $comment ) {
get_comment( $comment );
ob_start();
_wp_comment_row( $comment->comment_ID, $mode, false );
_wp_comment_row( $comment->comment_ID, $mode, $status );
$comment_list_item = ob_get_contents();
ob_end_clean();
$x->add( array(

View File

@ -88,6 +88,8 @@ var wpList = {
var res = wpAjax.parseAjaxResponse(r, s.response, s.element);
if ( !res || res.errors ) { return false; }
if ( true === res ) { return true; }
jQuery.each( res.responses, function() {
wpList.add.call( list, this.data, $.extend( {}, s, { // this.firstChild.nodevalue
pos: this.position || 0,

View File

@ -50,7 +50,7 @@ function wp_default_scripts( &$scripts ) {
$scripts->add( 'autosave', '/wp-includes/js/autosave.js', array('schedule', 'wp-ajax-response'), '20080622' );
$scripts->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('wp-ajax-response'), '20080411' );
$scripts->add( 'wp-lists', '/wp-includes/js/wp-lists.js', array('wp-ajax-response'), '20080729' );
$scripts->localize( 'wp-lists', 'wpListL10n', array(
'url' => admin_url('admin-ajax.php')
) );