Code Duplication    Length = 9-9 lines in 2 locations

mod/cp_notifications/start.php 2 locations

@@ 1512-1520 (lines=9) @@
1509
1510
 */
1511
1512
function get_subscribers($dbprefix, $user_guid, $entity_guid = '') {
1513
	$subscribed_to = ($entity_guid != '') ? $entity_guid : $user_guid;
1514
1515
	$query = "	SELECT DISTINCT u.guid, u.email, u.username, u.name
1516
				FROM {$dbprefix}entity_relationships r LEFT JOIN {$dbprefix}users_entity u ON r.guid_one = u.guid
1517
				WHERE r.guid_one <> {$user_guid} AND r.relationship = 'cp_subscribed_to_email' AND r.guid_two = {$subscribed_to}";
1518
1519
	return get_data($query);
1520
}
1521
1522
function get_site_subscribers($dbprefix, $user_guid, $entity_guid = '') {
1523
	$subscribed_to = ($entity_guid != '') ? $entity_guid : $user_guid;
@@ 1522-1530 (lines=9) @@
1519
	return get_data($query);
1520
}
1521
1522
function get_site_subscribers($dbprefix, $user_guid, $entity_guid = '') {
1523
	$subscribed_to = ($entity_guid != '') ? $entity_guid : $user_guid;
1524
1525
	$query = " SELECT DISTINCT u.guid, u.email, u.username, u.name
1526
	FROM {$dbprefix}entity_relationships r LEFT JOIN {$dbprefix}users_entity u ON r.guid_one = u.guid
1527
	WHERE r.guid_one <> {$user_guid} AND r.relationship = 'cp_subscribed_to_site_mail' AND r.guid_two = {$subscribed_to}";
1528
1529
	return get_data($query);
1530
}
1531
1532
1533
/**