Code Duplication    Length = 19-20 lines in 2 locations

mod/cp_notifications/start.php 2 locations

@@ 491-510 (lines=20) @@
488
			break;
489
490
491
		case 'cp_hjpost': // gcforums/actions/gcforums/create.php
492
			$message = array(
493
				'cp_hjpost_author' => $params['cp_topic_author'],
494
				'cp_hjpost_title' => $params['cp_topic_title'],
495
				'cp_hjpost_description' => $params['cp_topic_description'],
496
				'cp_hjpost_url' => $params['cp_topic_url'],
497
				'cp_msg_type' => $cp_msg_type
498
				);
499
			$t_user = $params['cp_subscribers'];
500
			$subject = elgg_echo('cp_notify:subject:hjpost',array($params['cp_topic_author'],$params['cp_topic_title']),'en');
501
			$subject .= ' | '.elgg_echo('cp_notify:subject:hjpost',array($params['cp_topic_author'],$params['cp_topic_title']),'fr');
502
			foreach ($t_user as $s_uer)
503
				$to_recipients[] = get_user($s_uer);
504
505
			$info_notif = 'cp_hjpost';												
506
			$content_entity = $params['cp_post'];
507
			$content_url = $params['cp_topic_url'];
508
			$author = $params['cp_post']->getOwnerEntity();
509
510
			break;
511
512
513
		case 'cp_hjtopic': // gcforums/actions/gcforums/create.php
@@ 513-531 (lines=19) @@
510
			break;
511
512
513
		case 'cp_hjtopic': // gcforums/actions/gcforums/create.php
514
			$message = array(
515
				'cp_hjtopic_author' => $params['cp_topic_author'],
516
				'cp_hjtopic_title' => $params['cp_topic_title'],
517
				'cp_hjtopic_description' => $params['cp_topic_description'],
518
				'cp_hjtopic_url' => $params['cp_topic_url'],
519
				'cp_msg_type' => $cp_msg_type
520
				);
521
			$t_user = $params['cp_subscribers'];
522
			$subject = elgg_echo('cp_notify:subject:hjtopic',array($params['cp_topic_author'],$params['cp_topic_title']),'en');
523
			$subject .= ' | '.elgg_echo('cp_notify:subject:hjtopic',array($params['cp_topic_author'],$params['cp_topic_title']),'fr');
524
			foreach ($t_user as $s_uer)
525
				$to_recipients[] = get_user($s_uer);
526
527
			$info_notif = 'cp_hjtopic';															
528
			$content_url = $params['cp_topic_url'];
529
			$content_entity = $params['cp_topic'];
530
			$author = $params['cp_topic']->getOwnerEntity();
531
			break;
532
533
		case 'cp_event_request': // event_calendar/actions/event_calendar/request_personal_calendar.php
534
			$message = array(