Code Duplication    Length = 10-11 lines in 2 locations

mod/event_calendar/start.php 1 location

@@ 320-329 (lines=10) @@
317
	if ($handler != 'event_calendar') {
318
		return $return;
319
	}
320
	if (elgg_is_active_plugin('event_poll') && $entity->canEdit() && $entity->schedule_type == 'poll') {
321
		$options = array(
322
			'name' => 'schedule',
323
			'text' => elgg_echo('event_poll:schedule_button'),
324
			'title' => elgg_echo('event_poll:schedule_button'),
325
			'href' => 'event_poll/vote/'.$entity->guid,
326
			'priority' => 150,
327
		);
328
		$return[] = ElggMenuItem::factory($options);
329
	}
330
	$user_guid = elgg_get_logged_in_user_guid();
331
	if ($user_guid) {
332
		$calendar_status = event_calendar_personal_can_manage($entity, $user_guid);

mod/groups/start.php 1 location

@@ 999-1009 (lines=11) @@
996
	if (elgg_instanceof($object, 'object', 'groupforumtopic')) {
997
		$group = $object->getContainerEntity();
998
999
		if ($group && ($group->canWriteToContainer() || elgg_is_admin_logged_in())) {
1000
				$options = array(
1001
				'name' => 'reply',
1002
				'href' => "#discussion-reply-{$object->guid}",
1003
				'text' => elgg_view_icon('speech-bubble'),
1004
				'title' => elgg_echo('reply:this'),
1005
				'rel' => 'toggle',
1006
				'priority' => 50,
1007
			);
1008
			$return[] = ElggMenuItem::factory($options);
1009
		}
1010
	} else {
1011
		if (elgg_instanceof($object, 'object', 'discussion_reply', 'ElggDiscussionReply')) {
1012
			// Group discussion replies cannot be commented