WordPress.org

Make WordPress Core

Changeset 10693


Ignore:
Timestamp:
03/04/2009 08:03:02 AM (12 years ago)
Author:
westi
Message:

Syncronise the queries used for attachment slug uniqueness checking. Fixes #4396 props futurix and Nazgul.

File:
1 edited

Legend:

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

    r10620 r10693  
    23822382            $alt_post_name = $post_name . "-$suffix";
    23832383            // expected_slashed ($alt_post_name, $post_name)
    2384             $post_name_check = $wpdb->get_var( $wpdb->prepare( "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_status = 'inherit' AND ID != %d AND post_parent = %d LIMIT 1", $alt_post_name, $post_ID, $post_parent));
     2384            $post_name_check = $wpdb->get_var( $wpdb->prepare( "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_status = 'inherit' AND ID != %d LIMIT 1", $alt_post_name, $post_ID, $post_parent));
    23852385            $suffix++;
    23862386        }
Note: See TracChangeset for help on using the changeset viewer.