Make WordPress Core


Ignore:
Timestamp:
02/10/2009 07:16:00 PM (18 years ago)
Author:
azaozz
Message:

Make comment_karma accessible from normal comment API functions, props beaulebens, fixes #9085

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/comment.php

    r10465 r10536  
    874874        if ( ! isset($comment_approved) )
    875875                $comment_approved = 1;
     876        if ( ! isset($comment_karma) )
     877                $comment_karma = 0;
    876878        if ( ! isset($user_id) )
    877879                $user_id = 0;
    … …  
    880882
    881883        $result = $wpdb->query( $wpdb->prepare("INSERT INTO $wpdb->comments
    882         (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_approved, comment_agent, comment_type, comment_parent, user_id)
    883         VALUES (%d, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %d, %d)",
    884         $comment_post_ID, $comment_author, $comment_author_email, $comment_author_url, $comment_author_IP, $comment_date, $comment_date_gmt, $comment_content, $comment_approved, $comment_agent, $comment_type, $comment_parent, $user_id) );
     884        (comment_post_ID, comment_author, comment_author_email, comment_author_url, comment_author_IP, comment_date, comment_date_gmt, comment_content, comment_karma, comment_approved, comment_agent, comment_type, comment_parent, user_id)
     885        VALUES (%d, %s, %s, %s, %s, %s, %s, %s, %d, %s, %s, %s, %d, %d)",
     886        $comment_post_ID, $comment_author, $comment_author_email, $comment_author_url, $comment_author_IP, $comment_date, $comment_date_gmt, $comment_content, $comment_karma, $comment_approved, $comment_agent, $comment_type, $comment_parent, $user_id) );
    885887
    886888        $id = (int) $wpdb->insert_id;
    … …  
    11001102                        comment_author_email = %s,
    11011103                        comment_approved     = %s,
     1104                        comment_karma        = %d,
    11021105                        comment_author_url   = %s,
    11031106                        comment_date         = %s,
    … …  
    11081111                        $comment_author_email,
    11091112                        $comment_approved,
     1113                        $comment_karma,
    11101114                        $comment_author_url,
    11111115                        $comment_date,
Note: See TracChangeset for help on using the changeset viewer.