Changeset 39507 for branches/4.7/src/wp-includes/post.php
- Timestamp:
- 12/05/2016 07:38:16 PM (8 years ago)
- Location:
- branches/4.7
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.7
-
branches/4.7/src/wp-includes/post.php
r39463 r39507 3679 3679 if ( 'attachment' == $post_type ) { 3680 3680 // Attachment slugs must be unique across all types. 3681 $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_ status != 'auto-draft' AND post_name = %s AND ID != %d LIMIT 1";3681 $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND ID != %d LIMIT 1"; 3682 3682 $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_ID ) ); 3683 3683 … … 3707 3707 * namespace than posts so page slugs are allowed to overlap post slugs. 3708 3708 */ 3709 $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_ status != 'auto-draft' AND post_name = %s AND post_type IN ( %s, 'attachment' ) AND ID != %d AND post_parent = %d LIMIT 1";3709 $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_type IN ( %s, 'attachment' ) AND ID != %d AND post_parent = %d LIMIT 1"; 3710 3710 $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_type, $post_ID, $post_parent ) ); 3711 3711 … … 3731 3731 } else { 3732 3732 // Post slugs must be unique across all posts. 3733 $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_ status != 'auto-draft' AND post_name = %s AND post_type = %s AND ID != %d LIMIT 1";3733 $check_sql = "SELECT post_name FROM $wpdb->posts WHERE post_name = %s AND post_type = %s AND ID != %d LIMIT 1"; 3734 3734 $post_name_check = $wpdb->get_var( $wpdb->prepare( $check_sql, $slug, $post_type, $post_ID ) ); 3735 3735
Note: See TracChangeset
for help on using the changeset viewer.