Code Duplication    Length = 4-4 lines in 2 locations

core/db_models/EEM_Event.model.php 2 locations

@@ 581-584 (lines=4) @@
578
			'EVT_ID' =>  array( 'NOT IN', $event_ids )
579
			);
580
581
		if ( isset( $where_params['OR'] ) ) {
582
			$and_condition['OR'] = $where_params['OR'];
583
			unset( $where_params['OR'] );
584
		}
585
586
		if ( isset( $where_params['Datetime.DTT_EVT_end'] ) ) {
587
			$and_condition['Datetime.DTT_EVT_end****'] = $where_params['Datetime.DTT_EVT_end'];
@@ 629-632 (lines=4) @@
626
		//if we have any additional query_params, let's add them to the 'AND' condition
627
		$where_params['AND']['status'] = array( '!=', 'publish' );
628
629
		if ( isset( $where_params['OR'] ) ) {
630
			$where_params['AND']['OR'] = $where_params['OR'];
631
			unset( $where_params['OR'] );
632
		}
633
634
		if ( isset( $where_params['Datetime.DTT_EVT_end'] ) ) {
635
			$where_params['AND']['Datetime.DTT_EVT_end****'] = $where_params['Datetime.DTT_EVT_end'];