Code Duplication    Length = 15-15 lines in 2 locations

other/upgrade.php 1 location

@@ 5271-5285 (lines=15) @@
5268
		$end = count($settingsArray) - 1;
5269
5270
	// Still more variables to go?  Then lets add them at the end.
5271
	if (!empty($config_vars))
5272
	{
5273
		if (trim($settingsArray[$end]) == '?' . '>')
5274
			$settingsArray[$end++] = '';
5275
		else
5276
			$end++;
5277
5278
		// Add in any newly defined vars that were passed
5279
		foreach ($config_vars as $var => $val)
5280
			$settingsArray[$end++] = '$' . $var . ' = ' . $val . ';' . "\n";
5281
5282
		$settingsArray[$end] = '?' . '>';
5283
	}
5284
	else
5285
		$settingsArray[$end] = trim($settingsArray[$end]);
5286
5287
	// Sanity error checking: the file needs to be at least 12 lines.
5288
	if (count($settingsArray) < 12)

Sources/Subs-Admin.php 1 location

@@ 360-374 (lines=15) @@
357
		$end = count($settingsArray) - 1;
358
359
	// Still more variables to go?  Then lets add them at the end.
360
	if (!empty($config_vars))
361
	{
362
		if (trim($settingsArray[$end]) == '?' . '>')
363
			$settingsArray[$end++] = '';
364
		else
365
			$end++;
366
367
		// Add in any newly defined vars that were passed
368
		foreach ($config_vars as $var => $val)
369
			$settingsArray[$end++] = '$' . $var . ' = ' . $val . ';' . "\n";
370
371
		$settingsArray[$end] = '?' . '>';
372
	}
373
	else
374
		$settingsArray[$end] = trim($settingsArray[$end]);
375
376
	// Sanity error checking: the file needs to be at least 12 lines.
377
	if (count($settingsArray) < 12)