Permalink
Browse files

Added filtering for MantisBT installation script to only allow select…

…ing PDO drivers that are available.
  • Loading branch information...
1 parent 0315203 commit c1867508aa47afd0b78cbe1e8d07d9d2428dfc11 @vboctor vboctor committed Jul 25, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 public/admin/install.php
View
9 public/admin/install.php
@@ -408,7 +408,16 @@ function InsertData( $p_table, $p_data ) {
<select name="db_type">
<?php
$t_db_types = explode(',',check_get_database_extensions(true));
+
+ # These are the extensions that have corresponding PDO drivers
+ # at /application/MantisBT/Db/PDO
+ $t_db_supported_types = array( 'pdo_mysql' );
+
foreach( $t_db_types as $t_type ) {
+ if ( !in_array( $t_type, $t_db_supported_types ) ) {
+ continue;
+ }
+
if( $f_db_type == $t_type ) {
echo '<option value="' . $t_type . '" selected="selected">' . $t_type . '</option>';
} else {

0 comments on commit c186750

Please sign in to comment.