Blob Blame History Raw
diff --git a/admin/install.php b/admin/install.php
index f3ea11a..120d17b 100644
--- a/admin/install.php
+++ b/admin/install.php
@@ -398,10 +398,18 @@ if( 1 == $t_install_state ) {
 <?php if( !$g_database_upgrade ) {?>
 <tr>
 	<td>
+		<div style="background-color: #FCC; padding: 5px; border: 1px solid red;">
+		To change any of the disabled options below, edit /etc/mantis/config_inc.php and reload this page!
+		</div>
+	</td>
+</tr>
+
+<tr>
+	<td>
 		Type of Database
 	</td>
 	<td>
-		<select name="db_type">
+		<select disabled="true" name="db_type">
 		<?php
 			if( $f_db_type == 'mysql' ) {
 			echo '<option value="mysql" selected="selected">MySql (default)</option>';
@@ -451,7 +459,7 @@ if( !$g_database_upgrade ) {?>
 		Hostname (for Database Server)
 	</td>
 	<td>
-		<input name="hostname" type="textbox" value="<?php echo $f_hostname?>"></input>
+		<input name="hostname" type="textbox" disabled="disabled" value="<?php echo $f_hostname?>"></input>
 	</td>
 </tr>
 <?php
@@ -463,7 +471,7 @@ if( !$g_database_upgrade ) {?>
 		Username (for Database)
 	</td>
 	<td>
-		<input name="db_username" type="textbox" value="<?php echo $f_db_username?>"></input>
+		<input name="db_username" type="textbox" disabled="disabled" value="<?php echo $f_db_username?>"></input>
 	</td>
 </tr>
 <?php
@@ -475,7 +483,7 @@ if( !$g_database_upgrade ) {?>
 		Password (for Database)
 	</td>
 	<td>
-		<input name="db_password" type="password" value="<?php echo( !is_blank( $f_db_password ) ? CONFIGURED_PASSWORD : "" )?>"></input>
+		<input name="db_password" type="password" disabled="disabled" value="<?php echo( !is_blank( $f_db_password ) ? CONFIGURED_PASSWORD : "" )?>"></input>
 	</td>
 </tr>
 <?php
@@ -487,7 +495,7 @@ if( !$g_database_upgrade ) {?>
 		Database name (for Database)
 	</td>
 	<td>
-		<input name="database_name" type="textbox" value="<?php echo $f_database_name?>"></input>
+		<input name="database_name" type="textbox" disabled="disabled" value="<?php echo $f_database_name?>"></input>
 	</td>
 </tr>
 <?php
@@ -809,79 +817,9 @@ if( 4 == $t_install_state ) {
 if( 5 == $t_install_state ) {
 	$t_config_filename = $g_absolute_path . 'config_inc.php';
 	$t_config_exists = file_exists( $t_config_filename );
-	?>
-<table width="100%" border="0" cellpadding="10" cellspacing="1">
-<tr>
-	<td bgcolor="#e8e8e8" colspan="2">
-		<span class="title">Write Configuration File(s)</span>
-	</td>
-</tr>
 
-<tr>
-	<td bgcolor="#ffffff">
-		<?php
-			if( !$t_config_exists ) {
-		echo 'Creating Configuration File (config_inc.php)<br />';
-		echo '<font color="red">(if this file is not created, create it manually with the contents below)</font>';
-	} else {
-		echo 'Updating Configuration File (config_inc.php)<br />';
-	}
-	?>
-	</td>
-	<?php
-		$t_config = '<?php' . "\r\n";
-	$t_config .= "\t\$g_hostname = '$f_hostname';\r\n";
-	$t_config .= "\t\$g_db_type = '$f_db_type';\r\n";
-	$t_config .= "\t\$g_database_name = '$f_database_name';\r\n";
-	$t_config .= "\t\$g_db_username = '$f_db_username';\r\n";
-	$t_config .= "\t\$g_db_password = '$f_db_password';\r\n";
+        // FEDORA PATCH: Removed config_inc.php manipulation code
 
-	if( $f_db_type == 'db2' ) {
-		$t_config .= "\t\$g_db_schema = '$f_db_schema';\r\n";
-	}
-
-	$t_config .= '?>' . "\r\n";
-	$t_write_failed = true;
-
-	if( !$t_config_exists ) {
-		if( $fd = @fopen( $t_config_filename, 'w' ) ) {
-			fwrite( $fd, $t_config );
-			fclose( $fd );
-		}
-
-		if( file_exists( $t_config_filename ) ) {
-			print_test_result( GOOD );
-			$t_write_failed = false;
-		} else {
-			print_test_result( BAD, false, 'cannot write ' . $t_config_filename );
-		}
-	} else {
-		# already exists, see if the information is the same
-		if ( ( $f_hostname != config_get( 'hostname', '' ) ) ||
-			( $f_db_type != config_get( 'db_type', '' ) ) ||
-			( $f_database_name != config_get( 'database_name', '') ) ||
-			( $f_db_schema != config_get( 'db_schema', '') ) ||
-			( $f_db_username != config_get( 'db_username', '' ) ) ||
-			( $f_db_password != config_get( 'db_password', '' ) ) ) {
-			print_test_result( BAD, false, 'file ' . $g_absolute_path . 'config_inc.php' . ' already exists and has different settings' );
-		} else {
-			print_test_result( GOOD, false );
-			$t_write_failed = false;
-		}
-	}
-	?>
-</tr>
-<?php
-	if( true == $t_write_failed ) {
-		echo '<tr><table width="50%" border="0" cellpadding="10" cellspacing="1" align="center">';
-		echo '<tr><td>Please add the following lines to ' . $g_absolute_path . 'config_inc.php before continuing to the database upgrade check:</td></tr>';
-		echo '<tr><td><pre>' . htmlentities( $t_config ) . '</pre></td></tr></table></tr>';
-	}
-	?>
-
-</table>
-
-<?php
 	if( false == $g_failed ) {
 		$t_install_state++;
 	}