Make WordPress Core

Changeset 5037


Ignore:
Timestamp:
03/14/2007 07:40:56 AM (18 years ago)
Author:
markjaquith
Message:

More int casting, just to be safe.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/wp-includes/functions.php

    r5022 r5037  
    172172function get_usernumposts($userid) {
    173173    global $wpdb;
     174    $userid = (int) $userid;
    174175    return $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$userid' AND post_status = 'publish'");
    175176}
  • branches/2.1/wp-includes/user.php

    r4582 r5037  
    1010function get_usernumposts($userid) {
    1111    global $wpdb;
     12    $userid = (int) $userid;
    1213    return $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$userid' AND post_type = 'post' AND post_status = 'publish'");
    1314}
  • trunk/wp-includes/user.php

    r4862 r5037  
    1010function get_usernumposts($userid) {
    1111    global $wpdb;
     12    $userid = (int) $userid;
    1213    return $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_author = '$userid' AND post_type = 'post' AND post_status = 'publish'");
    1314}
Note: See TracChangeset for help on using the changeset viewer.