Code Duplication    Length = 2-5 lines in 2 locations

other/install.php 2 locations

@@ 387-391 (lines=5) @@
384
			{
385
				$port = ((int) $_POST['db_port'] == ini_get($db_type . 'default_port')) ? '' : (int) $_POST['db_port'];
386
			}
387
			elseif ($db_type == 'postgresql')
388
			{
389
				// PostgreSQL doesn't have a default port setting in php.ini, so just check against the default
390
				$port = ((int) $_POST['db_port'] == 5432) ? '' : (int) $_POST['db_port'];
391
			}
392
		}
393
394
		if (!empty($port))
@@ 816-817 (lines=2) @@
813
			// For MySQL, we can get the "default port" from PHP. PostgreSQL has no such option though.
814
			if (($db_type == 'mysql' || $db_type == 'mysqli') && $_POST['db_port'] != ini_get($db_type . '.default_port'))
815
				$vars['db_port'] = (int) $_POST['db_port'];
816
			elseif ($db_type == 'postgresql' && $_POST['db_port'] != 5432)
817
				$vars['db_port'] = (int) $_POST['db_port'];
818
		}
819
820
		// God I hope it saved!