Code Duplication    Length = 2-5 lines in 2 locations

other/install.php 2 locations

@@ 383-387 (lines=5) @@
380
			{
381
				$port = ((int) $_POST['db_port'] == ini_get($db_type . 'default_port')) ? '' : (int) $_POST['db_port'];
382
			}
383
			elseif ($db_type == 'postgresql')
384
			{
385
				// PostgreSQL doesn't have a default port setting in php.ini, so just check against the default
386
				$port = ((int) $_POST['db_port'] == 5432) ? '' : (int) $_POST['db_port'];
387
			}
388
		}
389
390
		if (!empty($port))
@@ 802-803 (lines=2) @@
799
			// For MySQL, we can get the "default port" from PHP. PostgreSQL has no such option though.
800
			if (($db_type == 'mysql' || $db_type == 'mysqli') && $_POST['db_port'] != ini_get($db_type . '.default_port'))
801
				$vars['db_port'] = (int) $_POST['db_port'];
802
			elseif ($db_type == 'postgresql' && $_POST['db_port'] != 5432)
803
				$vars['db_port'] = (int) $_POST['db_port'];
804
		}
805
806
		// God I hope it saved!