Code Duplication    Length = 4-4 lines in 2 locations

core/db_models/EEM_Event.model.php 2 locations

@@ 589-592 (lines=4) @@
586
			unset( $where_params['Datetime.DTT_EVT_end'] );
587
		}
588
589
		if ( isset( $where_params['Datetime.DTT_EVT_start'] ) ) {
590
			$and_condition['Datetime.DTT_EVT_start'] = $where_params['Datetime.DTT_EVT_start'];
591
			unset( $where_params['Datetime.DTT_EVT_start'] );
592
		}
593
594
		//merge remaining $where params with the and conditions.
595
		$and_condtion = array_merge( $and_condition, $where_params );
@@ 637-640 (lines=4) @@
634
			unset( $where_params['Datetime.DTT_EVT_end'] );
635
		}
636
637
		if ( isset( $where_params['Datetime.DTT_EVT_start'] ) ) {
638
			$where_params['AND']['Datetime.DTT_EVT_start'] = $where_params['Datetime.DTT_EVT_start'];
639
			unset( $where_params['Datetime.DTT_EVT_start'] );
640
		}
641
642
		$query_params[0] = $where_params;
643
		// don't use $query_params with count() because we don't want to include additional query clauses like "GROUP BY"