Code Duplication    Length = 4-4 lines in 2 locations

core/db_models/EEM_Event.model.php 2 locations

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