Code Duplication    Length = 10-12 lines in 2 locations

mod/event_calendar/start.php 2 locations

@@ 343-354 (lines=12) @@
340
					'priority' => 150,
341
				);
342
				$return[] = ElggMenuItem::factory($options);
343
			} else {
344
				if (!event_calendar_is_full($entity->guid) && !event_calendar_has_collision($entity->guid, $user_guid)) {
345
					$options = array(
346
						'name' => 'personal_calendar',
347
						'text' => elgg_echo('event_calendar:add_to_the_calendar_menu_text'),
348
						'title' => elgg_echo('event_calendar:add_to_my_calendar'),
349
						'href' => elgg_add_action_tokens_to_url("action/event_calendar/add_personal?guid={$entity->guid}"),
350
						'priority' => 150,
351
					);
352
					$return[] = ElggMenuItem::factory($options);
353
				}
354
			}
355
		} else if ($calendar_status == 'closed') {
356
			if (!event_calendar_has_personal_event($entity->guid, $user_guid) && !check_entity_relationship($user_guid, 'event_calendar_request', $entity->guid)) {
357
				$options = array(
@@ 356-365 (lines=10) @@
353
				}
354
			}
355
		} else if ($calendar_status == 'closed') {
356
			if (!event_calendar_has_personal_event($entity->guid, $user_guid) && !check_entity_relationship($user_guid, 'event_calendar_request', $entity->guid)) {
357
				$options = array(
358
					'name' => 'personal_calendar',
359
					'text' => elgg_echo('event_calendar:make_request_title'),
360
					'title' => elgg_echo('event_calendar:make_request_title'),
361
					'href' => elgg_add_action_tokens_to_url("action/event_calendar/request_personal_calendar?guid={$entity->guid}"),
362
					'priority' => 150,
363
				);
364
				$return[] = ElggMenuItem::factory($options);
365
			}
366
		}
367
	}
368