Skip to content

Commit

Permalink
Fixing merges
Browse files Browse the repository at this point in the history
  • Loading branch information
srtfisher committed Jan 25, 2024
1 parent 822eb28 commit 40128cb
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions msm-sitemap.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,15 +408,10 @@ public static function date_range_has_posts( $start_date, $end_date ) {
$end_date .= ' 23:59:59';
$post_status = self::get_post_status();

<<<<<<< HEAD
$post_types_in = self::get_supported_post_types_in();
$post_statuses_in = self::get_supported_post_statuses_in();

return $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_status IN ( {$post_statuses_in} ) AND post_date >= %s AND post_date <= %s AND post_type IN ( {$post_types_in} ) LIMIT 1", $start_date, $end_date ) );
=======
$post_types_in = self::get_supported_post_types_in();
return $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM $wpdb->posts WHERE post_status = %s AND post_date >= %s AND post_date <= %s AND post_type IN ( {$post_types_in} ) LIMIT 1", $post_status, $start_date, $end_date ) );
>>>>>>> fork/main
}

/**
Expand All @@ -433,14 +428,10 @@ public static function get_post_ids_for_date( $sitemap_date, $limit = 500 ) {
$start_date = $sitemap_date . ' 00:00:00';
$end_date = $sitemap_date . ' 23:59:59';

<<<<<<< HEAD
$post_types_in = self::get_supported_post_types_in();
$post_statuses_in = self::get_supported_post_statuses_in();

$posts = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_date FROM $wpdb->posts WHERE post_status IN ( {$post_statuses_in} ) AND post_date >= %s AND post_date <= %s AND post_type IN ( {$post_types_in} ) LIMIT %d", $start_date, $end_date, $limit ) );
=======
$posts = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_date FROM $wpdb->posts WHERE post_status = %s AND post_date >= %s AND post_date <= %s AND post_type IN ( {$post_types_in} ) LIMIT %d", $post_status, $start_date, $end_date, $limit ) );
>>>>>>> fork/main

usort( $posts, array( __CLASS__ , 'order_by_post_date' ) );

Expand Down Expand Up @@ -632,12 +623,7 @@ public static function get_last_modified_posts() {
$post_types_in = self::get_supported_post_types_in();
$post_statuses_in = self::get_supported_post_statuses_in();

<<<<<<< HEAD
$modified_posts = $wpdb->get_results(
$wpdb->prepare( "SELECT ID, post_date FROM $wpdb->posts WHERE post_type IN ( {$post_types_in} ) AND post_status IN ( {$post_statuses_in} ) AND post_modified_gmt >= %s LIMIT 1000", $date )
);
=======
$query = $wpdb->prepare( "SELECT ID, post_date FROM $wpdb->posts WHERE post_type IN ( {$post_types_in} ) AND post_modified_gmt >= %s LIMIT 1000", $date );
$query = $wpdb->prepare( "SELECT ID, post_date FROM $wpdb->posts WHERE post_type IN ( {$post_types_in} ) AND post_status IN ( {$post_statuses_in} ) AND post_modified_gmt >= %s LIMIT 1000", $date );

/**
* Filter the query used to get the last modified posts.
Expand All @@ -651,7 +637,6 @@ public static function get_last_modified_posts() {

$modified_posts = $wpdb->get_results( $query );

>>>>>>> fork/main
return $modified_posts;
}

Expand Down

0 comments on commit 40128cb

Please sign in to comment.