Code Duplication    Length = 11-16 lines in 2 locations

engine/lib/upgrades/2009102801.php 1 location

@@ 194-204 (lines=11) @@
191
 *
192
 * @return string File matrix path
193
 */
194
function user_file_matrix($guid) {
195
	// lookup the entity
196
	$user = get_entity($guid);
197
	if ($user->type != 'user') {
198
		// only to be used for user directories
199
		return FALSE;
200
	}
201
202
	$time_created = date('Y/m/d', $user->time_created);
203
	return "$time_created/$user->guid/";
204
}
205
206
global $ENTITY_CACHE, $CONFIG;
207
/**

engine/lib/upgrades/2010071001.php 1 location

@@ 14-29 (lines=16) @@
11
 *
12
 * @return string File matrix
13
 */
14
function user_file_matrix_2010071001($guid) {
15
	// lookup the entity
16
	$user = get_entity($guid);
17
	if ($user->type != 'user') {
18
		// only to be used for user directories
19
		return FALSE;
20
	}
21
22
	if (!$user->time_created) {
23
		// no idea where this user has its files
24
		return FALSE;
25
	}
26
27
	$time_created = date('Y/m/d', $user->time_created);
28
	return "$time_created/$user->guid/";
29
}
30
31
$sizes = array('large', 'medium', 'small', 'tiny', 'master', 'topbar');
32