Code Duplication    Length = 10-11 lines in 2 locations

install/class.update_db.php 1 location

@@ 1416-1425 (lines=10) @@
1413
					$newmodelsdb[$model] = $row[0];
1414
				}
1415
			}
1416
			if (file_exists('../models/models.md5sum')) {
1417
				if (($handle = fopen('../models/models.md5sum','r')) !== FALSE) {
1418
					while (($row = fgetcsv($handle,1000," ")) !== FALSE) {
1419
						$model = trim($row[2]);
1420
						$modelsdb[$model] = trim($row[0]);
1421
					}
1422
				}
1423
			} else {
1424
				$modelsdb = array();
1425
			}
1426
			$diff = array_diff($modelsdb,$newmodelsdb);
1427
			foreach ($diff as $key => $value) {
1428
				update_db::download('http://data.flightairmap.fr/data/models/'.$key,'../models/'.$key);

live-czml.php 1 location

@@ 114-124 (lines=11) @@
111
$sqltime = round(microtime(true)-$begintime,2);
112
113
114
if (file_exists('models/modelsdb')) {
115
	if (($handle = fopen('models/modelsdb','r')) !== FALSE) {
116
		while (($row = fgetcsv($handle,1000)) !== FALSE) {
117
			if (isset($row[1]) ){
118
				$model = $row[0];
119
				$modelsdb[$model] = $row[1];
120
			}
121
		}
122
		fclose($handle);
123
	}
124
}
125
126
$j = 0;
127
$prev_flightaware_id = '';