Code Duplication    Length = 7-7 lines in 2 locations

mod/bookmarks/start.php 1 location

@@ 157-163 (lines=7) @@
154
 * @param array  $params
155
 * @return string bookmarked item URL
156
 */
157
function bookmark_set_url($hook, $type, $url, $params) {
158
	$entity = $params['entity'];
159
	if (elgg_instanceof($entity, 'object', 'bookmarks')) {
160
		$title = elgg_get_friendly_title($entity->title);
161
		return "bookmarks/view/" . $entity->getGUID() . "/" . $title;
162
	}
163
}
164
165
/**
166
 * Add a menu item to an ownerblock

mod/file/start.php 1 location

@@ 338-344 (lines=7) @@
335
 * @param array  $params
336
 * @return string File URL
337
 */
338
function file_set_url($hook, $type, $url, $params) {
339
	$entity = $params['entity'];
340
	if (elgg_instanceof($entity, 'object', 'file')) {
341
		$title = elgg_get_friendly_title($entity->title);
342
		return "file/view/" . $entity->getGUID() . "/" . $title;
343
	}
344
}
345
346
/**
347
 * Override the default entity icon for files