Code Duplication    Length = 10-10 lines in 2 locations

engine/lib/upgrades/2009102801.php 1 location

@@ 212-221 (lines=10) @@
209
 */
210
$users = mysql_query("SELECT guid, username
211
	FROM {$CONFIG->dbprefix}users_entity WHERE username != ''");
212
while ($user = mysql_fetch_object($users)) {
213
	$ENTITY_CACHE = array();
214
215
	$to = $CONFIG->dataroot . user_file_matrix($user->guid);
216
	foreach (array('1_0', '1_1', '1_6') as $version) {
217
		$function = "file_matrix_$version";
218
		$from = $CONFIG->dataroot . $function($user->username);
219
		merge_directories($from, $to, $move = TRUE, $preference = 'from');
220
	}
221
}
222

engine/lib/upgrades/2010061501.php 1 location

@@ 62-71 (lines=10) @@
59
60
		$users = mysql_query("SELECT guid, username FROM {$CONFIG->dbprefix}users_entity
61
			WHERE username != ''", $link);
62
		while ($user = mysql_fetch_object($users)) {
63
			$ENTITY_CACHE = array();
64
65
			$to = $CONFIG->dataroot . user_file_matrix($user->guid);
66
			foreach (array('1_0', '1_1', '1_6') as $version) {
67
				$function = "file_matrix_$version";
68
				$from = $CONFIG->dataroot . $function($user->username);
69
				merge_directories($from, $to, $move = TRUE, $preference = 'from');
70
			}
71
		}
72
	}
73
}
74