Code Duplication    Length = 7-12 lines in 2 locations

other/upgrade.php 2 locations

@@ 970-976 (lines=7) @@
967
			// Get the unique site ID.
968
			preg_match('~SITE-ID:\s(\w{10})~', $return_data, $ID);
969
970
			if (!empty($ID[1]))
971
				$smcFunc['db_insert']('replace',
972
					$db_prefix . 'settings',
973
					array('variable' => 'string', 'value' => 'string'),
974
					array('allow_sm_stats', $ID[1]),
975
					array('variable')
976
				);
977
		}
978
	}
979
	else
@@ 1293-1304 (lines=12) @@
1290
			if (!isset($modSettings['smfVersion']) || $modSettings['smfVersion'] < $file[1])
1291
			{
1292
				$nextFile = parse_sql(dirname(__FILE__) . '/' . $file[0]);
1293
				if ($nextFile)
1294
				{
1295
					// Only update the version of this if complete.
1296
					$smcFunc['db_insert']('replace',
1297
						$db_prefix . 'settings',
1298
						array('variable' => 'string', 'value' => 'string'),
1299
						array('smfVersion', $file[2]),
1300
						array('variable')
1301
					);
1302
1303
					$modSettings['smfVersion'] = $file[2];
1304
				}
1305
1306
				// If this is XML we only do this stuff once.
1307
				if (isset($_GET['xml']))