Code Duplication    Length = 2-5 lines in 2 locations

other/install.php 2 locations

@@ 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!
@@ 362-366 (lines=5) @@
359
			{
360
				$port = ((int) $_POST['db_port'] == ini_get($db_type . 'default_port')) ? '' : (int) $_POST['db_port'];
361
			}
362
			elseif ($db_type == 'postgresql')
363
			{
364
				// PostgreSQL doesn't have a default port setting in php.ini, so just check against the default
365
				$port = ((int) $_POST['db_port'] == 5432) ? '' : (int) $_POST['db_port'];
366
			}
367
		}
368
369
		if (!empty($port))