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'];
@@ 627-630 (lines=4) @@
624
		//if we have any additional query_params, let's add them to the 'AND' condition
625
		$where_params['AND']['status'] = array( '!=', 'publish' );
626
627
		if ( isset( $where_params['OR'] ) ) {
628
			$where_params['AND']['OR'] = $where_params['OR'];
629
			unset( $where_params['OR'] );
630
		}
631
632
		if ( isset( $where_params['Datetime.DTT_EVT_end'] ) ) {
633
			$where_params['AND']['Datetime.DTT_EVT_end****'] = $where_params['Datetime.DTT_EVT_end'];