Code Duplication    Length = 4-4 lines in 4 locations

calendar/inc/class.calendar_ui.inc.php 1 location

@@ 714-717 (lines=4) @@
711
		if (empty($event['location'])) $event['location'] = ' ';	// no location screws the owner horz. alignment
712
713
		// respect category permissions
714
		if(!empty($event['category']))
715
		{
716
			$event['category'] = $this->categories->check_list(Acl::READ, $event['category']);
717
		}
718
		$event['non_blocking'] = (bool)$event['non_blocking'];
719
720
		$matches = null;

addressbook/inc/class.addressbook_ui.inc.php 2 locations

@@ 2668-2671 (lines=4) @@
2665
		}
2666
2667
		// respect category permissions
2668
		if(!empty($content['cat_id']))
2669
		{
2670
			$content['cat_id'] = $this->categories->check_list(Acl::READ,$content['cat_id']);
2671
		}
2672
		$content['cat_id_tree'] = $content['cat_id'];
2673
2674
		$content['view'] = true;
@@ 1785-1788 (lines=4) @@
1782
			if (($row['addr_format2'] = $this->addr_format_by_country($row['adr_two_countryname']))=='postcode_city') unset($row['adr_two_region']);
1783
1784
			// respect category permissions
1785
			if(!empty($row['cat_id']))
1786
			{
1787
				$row['cat_id'] = $this->categories->check_list(Acl::READ,$row['cat_id']);
1788
			}
1789
		}
1790
		$rows['no_distribution_list'] = (bool)$query['filter2'];
1791

calendar/inc/class.calendar_uiforms.inc.php 1 location

@@ 1774-1777 (lines=4) @@
1771
			}
1772
1773
			// respect category permissions
1774
			if(!empty($event['category']))
1775
			{
1776
				$content['category'] = $this->categories->check_list(Acl::READ, $event['category']);
1777
			}
1778
		}
1779
		else
1780
		{