Code Duplication    Length = 2-5 lines in 2 locations

other/install.php 2 locations

@@ 363-367 (lines=5) @@
360
			{
361
				$port = ((int) $_POST['db_port'] == ini_get($db_type . 'default_port')) ? '' : (int) $_POST['db_port'];
362
			}
363
			elseif ($db_type == 'postgresql')
364
			{
365
				// PostgreSQL doesn't have a default port setting in php.ini, so just check against the default
366
				$port = ((int) $_POST['db_port'] == 5432) ? '' : (int) $_POST['db_port'];
367
			}
368
		}
369
370
		if (!empty($port))
@@ 778-779 (lines=2) @@
775
			// For MySQL, we can get the "default port" from PHP. PostgreSQL has no such option though.
776
			if (($db_type == 'mysql' || $db_type == 'mysqli') && $_POST['db_port'] != ini_get($db_type . '.default_port'))
777
				$vars['db_port'] = (int) $_POST['db_port'];
778
			elseif ($db_type == 'postgresql' && $_POST['db_port'] != 5432)
779
				$vars['db_port'] = (int) $_POST['db_port'];
780
		}
781
782
		// God I hope it saved!