Code Duplication    Length = 7-9 lines in 3 locations

engine/lib/deprecated-1.8.php 1 location

@@ 2384-2392 (lines=9) @@
2381
		}
2382
	}
2383
2384
	if ($owner_guid) {
2385
		if (is_array($owner_guid)) {
2386
			foreach ($owner_guid as $k => $v) {
2387
				$owner_guid[$k] = (int)$v;
2388
			}
2389
		} else {
2390
			$owner_guid = array((int)$owner_guid);
2391
		}
2392
	}
2393
2394
	$owner_relationship = sanitise_string($owner_relationship);
2395

engine/lib/deprecated-1.9.php 1 location

@@ 1574-1580 (lines=7) @@
1571
	}
1572
	$order_by = sanitise_string($order_by);
1573
	$site_guid = (int) $site_guid;
1574
	if ((is_array($owner_guid) && (count($owner_guid)))) {
1575
		foreach ($owner_guid as $key => $guid) {
1576
			$owner_guid[$key] = (int) $guid;
1577
		}
1578
	} else {
1579
		$owner_guid = (int) $owner_guid;
1580
	}
1581
1582
	if ($site_guid == 0) {
1583
		$site_guid = $CONFIG->site_guid;

mod/event_calendar/models/model.php 1 location

@@ 813-819 (lines=7) @@
810
	}
811
	$order_by = sanitise_string($order_by);
812
	$site_guid = (int) $site_guid;
813
	if ((is_array($owner_guid) && (count($owner_guid)))) {
814
		foreach($owner_guid as $key => $guid) {
815
			$owner_guid[$key] = (int) $guid;
816
		}
817
	} else {
818
		$owner_guid = (int) $owner_guid;
819
	}
820
821
	if ((is_array($container_guid) && (count($container_guid)))) {
822
		foreach($container_guid as $key => $guid) {