Make WordPress Core


Ignore:
Timestamp:
12/09/2008 06:03:31 PM (18 years ago)
Author:
ryan
Message:

Strip trailing whitespace

File:
1 edited

Legend:

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

    r10130 r10150  
    204204 * @param int|object $post Post ID or post object.
    205205 * @param string $output Optional, default is Object. Either OBJECT, ARRAY_A, or ARRAY_N.
    206  * @param string $filter Optional, default is raw. 
     206 * @param string $filter Optional, default is raw.
    207207 * @return mixed Post data
    208208 */
    … …  
    21622162
    21632163        }
    2164        
    2165         if ( $parent >= 0 ) 
    2166                 $where .= $wpdb->prepare(' AND post_parent = %d ', $parent); 
    2167        
     2164
     2165        if ( $parent >= 0 )
     2166                $where .= $wpdb->prepare(' AND post_parent = %d ', $parent);
     2167
    21682168        $query = "SELECT * FROM $wpdb->posts $join WHERE (post_type = 'page' AND post_status = 'publish') $where ";
    21692169        $query .= $author_query;
    … …  
    21852185        if ( !empty($exclude_tree) ) {
    21862186                $exclude = array();
    2187                
     2187
    21882188                $exclude = (int) $exclude_tree;
    21892189                $children = get_page_children($exclude, $pages);
    … …  
    23802380        } else {
    23812381                // If there is a suggested ID, use it if not already present
    2382                 if ( !empty($import_id) ) { 
    2383                         $import_id = (int) $import_id; 
    2384                         if ( ! $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE ID = %d", $import_id) ) ) { 
    2385                                 $data['ID'] = $import_id; 
    2386                         } 
    2387                 } 
     2382                if ( !empty($import_id) ) {
     2383                        $import_id = (int) $import_id;
     2384                        if ( ! $wpdb->get_var( $wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE ID = %d", $import_id) ) ) {
     2385                                $data['ID'] = $import_id;
     2386                        }
     2387                }
    23882388
    23892389                $wpdb->insert( $wpdb->posts, $data );
Note: See TracChangeset for help on using the changeset viewer.