Changeset 5100

Show
Ignore:
Timestamp:
03/25/07 23:12:38 (1 year ago)
Author:
ryan
Message:

More int casts

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/2.0/wp-includes/comment-functions.php

    r5041 r5100  
    9191    "); 
    9292 
    93     $id = $wpdb->insert_id; 
     93    $id = (int) $wpdb->insert_id; 
    9494 
    9595    if ( $comment_approved == 1) { 
     
    225225 
    226226    if ( !$post_id ) 
    227         $post_id = $id; 
     227        $post_id = (int) $id; 
    228228 
    229229    if ( !isset($comment_count_cache[$post_id]) ) 
  • branches/2.0/wp-includes/functions-post.php

    r5084 r5100  
    4848    // Get the post ID. 
    4949    if ( $update ) 
    50         $post_ID = $ID; 
     50        $post_ID = (int) $ID; 
    5151 
    5252    // Create a valid post name.  Drafts are allowed to have an empty 
  • branches/2.0/wp-includes/functions.php

    r5058 r5100  
    20232023    global $wp_query; 
    20242024 
    2025     $id = $wp_query->post->ID; 
     2025    $id = (int) $wp_query->post->ID; 
    20262026    $template = get_post_meta($id, '_wp_page_template', true); 
    20272027 
  • branches/2.0/wp-includes/pluggable-functions.php

    r4514 r5100  
    467467function wp_verify_nonce($nonce, $action = -1) { 
    468468    $user = wp_get_current_user(); 
    469     $uid = $user->id; 
     469    $uid = (int) $user->id; 
    470470 
    471471    $i = ceil(time() / 43200); 
     
    481481function wp_create_nonce($action = -1) { 
    482482    $user = wp_get_current_user(); 
    483     $uid = $user->id; 
     483    $uid = (int) $user->id; 
    484484 
    485485    $i = ceil(time() / 43200); 
  • branches/2.0/wp-includes/registration-functions.php

    r3802 r5100  
    7878        $query = apply_filters('update_user_query', $query); 
    7979        $wpdb->query( $query ); 
    80         $user_id = $ID; 
     80        $user_id = (int) $ID; 
    8181    } else { 
    8282        $query = "INSERT INTO $wpdb->users  
     
    8686        $query = apply_filters('create_user_query', $query); 
    8787        $wpdb->query( $query ); 
    88         $user_id = $wpdb->insert_id; 
     88        $user_id = (int) $wpdb->insert_id; 
    8989    } 
    9090     
  • branches/2.0/wp-includes/template-functions-author.php

    r4656 r5100  
    137137function get_author_link($echo = false, $author_id, $author_nicename = '') { 
    138138    global $wpdb, $wp_rewrite, $post, $cache_userdata; 
    139     $auth_ID = $author_id; 
     139    $auth_ID = (int) $author_id; 
    140140    $link = $wp_rewrite->get_author_permastruct(); 
    141141 
  • branches/2.0/wp-includes/template-functions-category.php

    r5084 r5100  
    66    $id = (int) $id; 
    77    if ( !$id ) 
    8         $id = $post->ID; 
     8        $id = (int) $post->ID; 
    99 
    1010    if ( !isset($category_cache[$id]) ) 
  • branches/2.0/wp-includes/template-functions-links.php

    r5080 r5100  
    9090    $id = (int) $id; 
    9191    if ( !$id ) 
    92         $id = $post->ID; 
     92        $id = (int) $post->ID; 
    9393 
    9494    $pagestruct = $wp_rewrite->get_page_permastruct(); 
     
    111111 
    112112    if (! $id) { 
    113         $id = $post->ID; 
     113        $id = (int) $post->ID; 
    114114    } 
    115115