Installer database adjustments

We can't say we officially support PostgreSQL, unfortunately. There
are too many database calls with MySQL specific syntax. This would be
desirable for a 2.0 release, but too much work while maintaining 1.x.

The main difficulty is that we're using PEAR::DB which is aging. If
that's exchanged, maybe we could use PDO or something.
This commit is contained in:
Mikael Nordfeldth 2014-05-01 02:47:56 +02:00
parent caeb6e583c
commit e506b8f7f9
2 changed files with 7 additions and 5 deletions

View File

@ -165,7 +165,9 @@ class WebInstaller extends Installer
} else { } else {
$checked = ''; $checked = '';
} }
$dbRadios .= "<input type=\"radio\" name=\"dbtype\" id=\"dbtype-$type\" value=\"$type\" $checked/> $info[name]<br />\n"; $dbRadios .= sprintf('<input type="radio" name="dbtype" id="dbtype-%1$s" value="%1$s" %2$s/>%3$s<br />',
htmlspecialchars($type), $checked,
htmlspecialchars($info['name']));
} }
} }
@ -212,7 +214,7 @@ class WebInstaller extends Installer
</li> </li>
<li> <li>
<label for="dbtype">Type</label> <label for="dbtype">Type</label>
$dbRadios {$dbRadios}
<p class="form_guide">Database type</p> <p class="form_guide">Database type</p>
</li> </li>
<li> <li>

View File

@ -53,15 +53,15 @@ abstract class Installer
public static $dbModules = array( public static $dbModules = array(
'mysql' => array( 'mysql' => array(
'name' => 'MySQL', 'name' => 'MariaDB (or MySQL 5.5+)',
'check_module' => 'mysqli', 'check_module' => 'mysqli',
'scheme' => 'mysqli', // DSN prefix for PEAR::DB 'scheme' => 'mysqli', // DSN prefix for PEAR::DB
), ),
'pgsql' => array( /* 'pgsql' => array(
'name' => 'PostgreSQL', 'name' => 'PostgreSQL',
'check_module' => 'pgsql', 'check_module' => 'pgsql',
'scheme' => 'pgsql', // DSN prefix for PEAR::DB 'scheme' => 'pgsql', // DSN prefix for PEAR::DB
), ),*/
); );
/** /**