Code Duplication    Length = 7-12 lines in 2 locations

other/upgrade.php 2 locations

@@ 1339-1345 (lines=7) @@
1336
			// Get the unique site ID.
1337
			preg_match('~SITE-ID:\s(\w{10})~', $return_data, $ID);
1338
1339
			if (!empty($ID[1]))
1340
				$smcFunc['db_insert']('replace',
1341
					$db_prefix . 'settings',
1342
					array('variable' => 'string', 'value' => 'string'),
1343
					array('allow_sm_stats', $ID[1]),
1344
					array('variable')
1345
				);
1346
		}
1347
	}
1348
	else
@@ 1728-1739 (lines=12) @@
1725
			if (!isset($modSettings['smfVersion']) || $modSettings['smfVersion'] < $file[1])
1726
			{
1727
				$nextFile = parse_sql(dirname(__FILE__) . '/' . $file[0]);
1728
				if ($nextFile)
1729
				{
1730
					// Only update the version of this if complete.
1731
					$smcFunc['db_insert']('replace',
1732
						$db_prefix . 'settings',
1733
						array('variable' => 'string', 'value' => 'string'),
1734
						array('smfVersion', $file[2]),
1735
						array('variable')
1736
					);
1737
1738
					$modSettings['smfVersion'] = $file[2];
1739
				}
1740
1741
				// If this is XML we only do this stuff once.
1742
				if (isset($_GET['xml']))