Make WordPress Core

Changeset 5090


Ignore:
Timestamp:
03/23/2007 02:16:16 AM (18 years ago)
Author:
ryan
Message:

Castaways on Gilligan's Isle

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-db.php

    r5087 r5090  
    246246        return 0;
    247247
    248     return $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '$category_nicename'");
     248    return (int) $wpdb->get_var("SELECT cat_ID FROM $wpdb->categories WHERE category_nicename = '$category_nicename'");
    249249}
    250250
     
    299299    if ( !empty($link_id) )
    300300        $update = true;
     301
     302    $link_id = (int) $link_id;
    301303
    302304    if( trim( $link_name ) == '' )
     
    444446        SELECT category_id
    445447        FROM $wpdb->link2cat
    446         WHERE link_id = $link_ID");
     448        WHERE link_id = '$link_ID'");
    447449
    448450    if (!$old_categories) {
     
    457459    if ($delete_cats) {
    458460        foreach ($delete_cats as $del) {
     461            $del = (int) $del;
    459462            $wpdb->query("
    460463                DELETE FROM $wpdb->link2cat
    461                 WHERE category_id = $del
    462                     AND link_id = $link_ID
     464                WHERE category_id = '$del'
     465                    AND link_id = '$link_ID'
    463466                ");
    464467        }
  • trunk/wp-includes/bookmark-template.php

    r5087 r5090  
    166166        return '';
    167167
    168     $cat_id = (int)
    169     $cats[0]; // Take the first cat.
     168    $cat_id = (int) $cats[0]; // Take the first cat.
    170169
    171170    $cat = get_category($cat_id);
  • trunk/wp-includes/category-template.php

    r5087 r5090  
    6565    $id = (int) $id;
    6666    if ( !$id )
    67         $id = (int)
    68         $post->ID;
     67        $id = (int) $post->ID;
    6968
    7069    if ( !isset($category_cache[$blog_id][$id]) )
  • trunk/wp-includes/post.php

    r5087 r5090  
    644644            VALUES
    645645            ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$post_status', '$post_type', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type')");
    646             $post_ID = $wpdb->insert_id;
     646            $post_ID = (int) $wpdb->insert_id;
    647647    }
    648648
     
    13521352            VALUES
    13531353            ('$post_author', '$post_date', '$post_date_gmt', '$post_content', '$post_content_filtered', '$post_title', '$post_excerpt', '$post_status', '$post_type', '$comment_status', '$ping_status', '$post_password', '$post_name', '$to_ping', '$pinged', '$post_date', '$post_date_gmt', '$post_parent', '$menu_order', '$post_mime_type', '$guid')");
    1354             $post_ID = $wpdb->insert_id;
     1354            $post_ID = (int) $wpdb->insert_id;
    13551355    }
    13561356
Note: See TracChangeset for help on using the changeset viewer.