Code Duplication    Length = 14-14 lines in 2 locations

mod/etherpad/start.php 1 location

@@ 206-219 (lines=14) @@
203
 *
204
 * @return string Relative URL
205
 */
206
function etherpad_icon_url_override($hook, $type, $returnvalue, $params) {
207
	$entity = $params['entity'];
208
	if (elgg_instanceof($entity, 'object', 'etherpad') ||
209
		elgg_instanceof($entity, 'object', 'subpad')) {
210
		switch ($params['size']) {
211
			case 'small':
212
				return 'mod/etherpad/images/etherpad.png';
213
				break;
214
			case 'medium':
215
				return 'mod/etherpad/images/etherpad_lrg.png';
216
				break;
217
		}
218
	}
219
}
220
221
/**
222
 * Add a menu item to the user ownerblock

mod/tasks/start.php 1 location

@@ 266-279 (lines=14) @@
263
 *
264
 * @return string Relative URL
265
 */
266
function tasks_icon_url_override($hook, $type, $returnvalue, $params) {
267
	$entity = $params['entity'];
268
	if (elgg_instanceof($entity, 'object', 'task_top') ||
269
		elgg_instanceof($entity, 'object', 'task')) {
270
		switch ($params['size']) {
271
			case 'small':
272
				return 'mod/tasks/images/tasks.gif';
273
				break;
274
			case 'medium':
275
				return 'mod/tasks/images/tasks_lrg.gif';
276
				break;
277
		}
278
	}
279
}
280
281
/**
282
 * Add a menu item to the user ownerblock