Code Duplication    Length = 11-11 lines in 2 locations

other/install.php 1 location

@@ 274-284 (lines=11) @@
271
	$incontext['detected_languages'] = array();
272
273
	// Make sure the languages directory actually exists.
274
	if (file_exists(dirname(__FILE__) . '/Themes/default/languages'))
275
	{
276
		// Find all the "Install" language files in the directory.
277
		$dir = dir(dirname(__FILE__) . '/Themes/default/languages');
278
		while ($entry = $dir->read())
279
		{
280
			if (substr($entry, 0, 8) == 'Install.' && substr($entry, -4) == '.php')
281
				$incontext['detected_languages'][$entry] = ucfirst(substr($entry, 8, strlen($entry) - 12));
282
		}
283
		$dir->close();
284
	}
285
286
	// Didn't find any, show an error message!
287
	if (empty($incontext['detected_languages']))

other/upgrade.php 1 location

@@ 429-439 (lines=11) @@
426
	$incontext['detected_languages'] = array();
427
428
	// Make sure the languages directory actually exists.
429
	if (file_exists(dirname(__FILE__) . '/Themes/default/languages'))
430
	{
431
		// Find all the "Install" language files in the directory.
432
		$dir = dir(dirname(__FILE__) . '/Themes/default/languages');
433
		while ($entry = $dir->read())
434
		{
435
			if (substr($entry, 0, 8) == 'Install.' && substr($entry, -4) == '.php')
436
				$incontext['detected_languages'][$entry] = ucfirst(substr($entry, 8, strlen($entry) - 12));
437
		}
438
		$dir->close();
439
	}
440
441
	// Didn't find any, show an error message!
442
	if (empty($incontext['detected_languages']))