Code Duplication    Length = 1-4 lines in 2 locations

calendar/inc/class.calendar_boupdate.inc.php 2 locations

@@ 181-181 (lines=1) @@
178
		// check category based ACL
179
		if ($event['category'])
180
		{
181
			if (!is_array($event['category'])) $event['category'] = explode(',',$event['category']);
182
			if (!$old_event || !isset($old_event['category']))
183
			{
184
				$old_event['category'] = array();
@@ 186-189 (lines=4) @@
183
			{
184
				$old_event['category'] = array();
185
			}
186
			elseif (!is_array($old_event['category']))
187
			{
188
				$old_event['category'] = explode(',', $old_event['category']);
189
			}
190
			foreach($event['category'] as $key => $cat_id)
191
			{
192
				// check if user is allowed to update event categories