Code Duplication    Length = 27-27 lines in 2 locations

other/install.php 1 location

@@ 287-313 (lines=27) @@
284
	}
285
286
	// Didn't find any, show an error message!
287
	if (empty($incontext['detected_languages']))
288
	{
289
		// Let's not cache this message, eh?
290
		header('expires: Mon, 26 Jul 1997 05:00:00 GMT');
291
		header('last-modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
292
		header('cache-control: no-cache');
293
294
		echo '<!DOCTYPE html>
295
<html>
296
	<head>
297
		<title>SMF Installer: Error!</title>
298
	</head>
299
	<body style="font-family: sans-serif;"><div style="width: 600px;">
300
		<h1 style="font-size: 14pt;">A critical error has occurred.</h1>
301
302
		<p>This installer was unable to find the installer\'s language file or files.  They should be found under:</p>
303
304
		<div style="margin: 1ex; font-family: monospace; font-weight: bold;">', dirname($_SERVER['PHP_SELF']) != '/' ? dirname($_SERVER['PHP_SELF']) : '', '/Themes/default/languages</div>
305
306
		<p>In some cases, FTP clients do not properly upload files with this many folders.  Please double check to make sure you <span style="font-weight: 600;">have uploaded all the files in the distribution</span>.</p>
307
		<p>If that doesn\'t help, please make sure this install.php file is in the same place as the Themes folder.</p>
308
309
		<p>If you continue to get this error message, feel free to <a href="https://support.simplemachines.org/">look to us for support</a>.</p>
310
	</div></body>
311
</html>';
312
		die;
313
	}
314
315
	// Override the language file?
316
	if (isset($_GET['lang_file']))

other/upgrade.php 1 location

@@ 442-468 (lines=27) @@
439
	}
440
441
	// Didn't find any, show an error message!
442
	if (empty($incontext['detected_languages']))
443
	{
444
		// Let's not cache this message, eh?
445
		header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
446
		header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
447
		header('Cache-Control: no-cache');
448
449
		echo '<!DOCTYPE html>
450
<html>
451
	<head>
452
		<title>SMF Upgrader: Error!</title>
453
	</head>
454
	<body style="font-family: sans-serif;"><div style="width: 600px;">
455
		<h1 style="font-size: 14pt;">A critical error has occurred.</h1>
456
457
		<p>This upgrader was unable to find the upgrader\'s language file or files.  They should be found under:</p>
458
459
		<div style="margin: 1ex; font-family: monospace; font-weight: bold;">', dirname($_SERVER['PHP_SELF']) != '/' ? dirname($_SERVER['PHP_SELF']) : '', '/Themes/default/languages</div>
460
461
		<p>In some cases, FTP clients do not properly upload files with this many folders.  Please double check to make sure you <span style="font-weight: 600;">have uploaded all the files in the distribution</span>.</p>
462
		<p>If that doesn\'t help, please make sure this install.php file is in the same place as the Themes folder.</p>
463
464
		<p>If you continue to get this error message, feel free to <a href="https://support.simplemachines.org/">look to us for support</a>.</p>
465
	</div></body>
466
</html>';
467
		die;
468
	}
469
470
	// Override the language file?
471
	if (isset($_GET['lang_file']))