Code Duplication    Length = 2-5 lines in 2 locations

other/install.php 2 locations

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