Code Duplication    Length = 3-3 lines in 2 locations

geodirectory-functions/listing_filters.php 1 location

@@ 928-930 (lines=3) @@
925
function geodir_filter_widget_join($join)
926
{
927
    global $wp_query, $table;
928
    if (!empty($wp_query->query['with_pics_only'])) {
929
        $join .= " LEFT JOIN " . GEODIR_ATTACHMENT_TABLE . " ON ( " . GEODIR_ATTACHMENT_TABLE . ".post_id=" . $table . ".post_id AND " . GEODIR_ATTACHMENT_TABLE . ".mime_type LIKE '%image%' )";
930
    }
931
    return $join;
932
}
933

geodirectory-functions/general_functions.php 1 location

@@ 2442-2444 (lines=3) @@
2439
	$post_type = empty( $query_args['post_type'] ) ? 'gd_place' : $query_args['post_type'];
2440
	$table     = $plugin_prefix . $post_type . '_detail';
2441
2442
	if ( ! empty( $query_args['with_pics_only'] ) ) {
2443
		$join .= " LEFT JOIN " . GEODIR_ATTACHMENT_TABLE . " ON ( " . GEODIR_ATTACHMENT_TABLE . ".post_id=" . $table . ".post_id AND " . GEODIR_ATTACHMENT_TABLE . ".mime_type LIKE '%image%' )";
2444
	}
2445
2446
	if ( ! empty( $query_args['tax_query'] ) ) {
2447
		$tax_queries = get_tax_sql( $query_args['tax_query'], $wpdb->posts, 'ID' );