Code Duplication    Length = 3-3 lines in 2 locations

geodirectory-functions/general_functions.php 1 location

@@ 2450-2452 (lines=3) @@
2447
	$post_type = empty( $query_args['post_type'] ) ? 'gd_place' : $query_args['post_type'];
2448
	$table     = $plugin_prefix . $post_type . '_detail';
2449
2450
	if ( ! empty( $query_args['with_pics_only'] ) ) {
2451
		$join .= " LEFT JOIN " . GEODIR_ATTACHMENT_TABLE . " ON ( " . GEODIR_ATTACHMENT_TABLE . ".post_id=" . $table . ".post_id AND " . GEODIR_ATTACHMENT_TABLE . ".mime_type LIKE '%image%' )";
2452
	}
2453
2454
	if ( ! empty( $query_args['tax_query'] ) ) {
2455
		$tax_queries = get_tax_sql( $query_args['tax_query'], $wpdb->posts, 'ID' );

geodirectory-functions/listing_filters.php 1 location

@@ 938-940 (lines=3) @@
935
function geodir_filter_widget_join($join)
936
{
937
    global $wp_query, $table;
938
    if (!empty($wp_query->query['with_pics_only'])) {
939
        $join .= " LEFT JOIN " . GEODIR_ATTACHMENT_TABLE . " ON ( " . GEODIR_ATTACHMENT_TABLE . ".post_id=" . $table . ".post_id AND " . GEODIR_ATTACHMENT_TABLE . ".mime_type LIKE '%image%' )";
940
    }
941
    return $join;
942
}
943