Code Duplication    Length = 11-11 lines in 2 locations

mod/gc_mobile_api/models/discussion.php 1 location

@@ 267-277 (lines=11) @@
264
		}
265
266
		//handle results differently for new topics and topic edits
267
		if ($new_topic) {
268
			system_message(elgg_echo('discussion:topic:created'));
269
			elgg_create_river_item(array(
270
				'view' => 'river/object/groupforumtopic/create',
271
				'action_type' => 'create',
272
				'subject_guid' => elgg_get_logged_in_user_guid(),
273
				'object_guid' => $topic->guid,
274
			));
275
		} else {
276
			system_message(elgg_echo('discussion:topic:updated'));
277
		}
278
279
		return $topic->getURL();
280
}

mod/groups/actions/discussion/save.php 1 location

@@ 76-86 (lines=11) @@
73
74
75
// handle results differently for new topics and topic edits
76
if ($new_topic) {
77
	system_message(elgg_echo('discussion:topic:created'));
78
	elgg_create_river_item(array(
79
		'view' => 'river/object/groupforumtopic/create',
80
		'action_type' => 'create',
81
		'subject_guid' => elgg_get_logged_in_user_guid(),
82
		'object_guid' => $topic->guid,
83
	));
84
} else {
85
	system_message(elgg_echo('discussion:topic:updated'));
86
}
87
88
forward($topic->getURL());
89