Code Duplication    Length = 1-5 lines in 3 locations

calendar/inc/class.calendar_so.inc.php 3 locations

@@ 2526-2526 (lines=1) @@
2523
	{
2524
		$participant_status = array();
2525
		$where = array('cal_id' => $cal_id);
2526
		if ($start != 0 && $end == 0) $where[] = '(cal_recur_date = 0 OR cal_recur_date >= ' . (int)$start . ')';
2527
		if ($start == 0 && $end != 0) $where[] = '(cal_recur_date = 0 OR cal_recur_date <= ' . (int)$end . ')';
2528
		if ($start != 0 && $end != 0)
2529
		{
@@ 2527-2527 (lines=1) @@
2524
		$participant_status = array();
2525
		$where = array('cal_id' => $cal_id);
2526
		if ($start != 0 && $end == 0) $where[] = '(cal_recur_date = 0 OR cal_recur_date >= ' . (int)$start . ')';
2527
		if ($start == 0 && $end != 0) $where[] = '(cal_recur_date = 0 OR cal_recur_date <= ' . (int)$end . ')';
2528
		if ($start != 0 && $end != 0)
2529
		{
2530
			$where[] = '(cal_recur_date = 0 OR (cal_recur_date >= ' . (int)$start .
@@ 2528-2532 (lines=5) @@
2525
		$where = array('cal_id' => $cal_id);
2526
		if ($start != 0 && $end == 0) $where[] = '(cal_recur_date = 0 OR cal_recur_date >= ' . (int)$start . ')';
2527
		if ($start == 0 && $end != 0) $where[] = '(cal_recur_date = 0 OR cal_recur_date <= ' . (int)$end . ')';
2528
		if ($start != 0 && $end != 0)
2529
		{
2530
			$where[] = '(cal_recur_date = 0 OR (cal_recur_date >= ' . (int)$start .
2531
						' AND cal_recur_date <= ' . (int)$end . '))';
2532
		}
2533
		foreach($this->db->select($this->user_table,'DISTINCT cal_recur_date',$where,__LINE__,__FILE__,false,'','calendar') as $row)
2534
		{
2535
			// inititalize the array