Check the mysql or pgsql extension instead of just pdo, really

This commit is contained in:
Johannes Meyer 2014-11-07 14:31:20 +01:00
parent f7d168c80f
commit 9a5d01b3fd
5 changed files with 8 additions and 17 deletions

View File

@ -216,7 +216,7 @@ class ResourceConfigForm extends ConfigForm
if ($resourceType === 'ldap' || Platform::extensionLoaded('ldap')) {
$resourceTypes['ldap'] = 'LDAP';
}
if ($resourceType === 'db' || Platform::extensionLoaded('pdo')) {
if ($resourceType === 'db' || Platform::extensionLoaded('mysql') || Platform::extensionLoaded('pgsql')) {
$resourceTypes['db'] = t('SQL Database');
}

View File

@ -39,9 +39,7 @@ class AuthenticationPage extends Form
);
$backendTypes = array();
if (Platform::extensionLoaded('pdo') && (Platform::zendClassExists('Zend_Db_Adapter_Pdo_Mysql')
|| Platform::zendClassExists('Zend_Db_Adapter_Pdo_Pgsql')))
{
if (Platform::extensionLoaded('mysql') || Platform::extensionLoaded('pgsql')) {
$backendTypes['db'] = t('Database');
}
if (Platform::extensionLoaded('ldap')) {

View File

@ -52,9 +52,7 @@ class PreferencesPage extends Form
$storageTypes = array();
$storageTypes['ini'] = t('File System (INI Files)');
if (Platform::extensionLoaded('pdo') && (Platform::zendClassExists('Zend_Db_Adapter_Pdo_Mysql')
|| Platform::zendClassExists('Zend_Db_Adapter_Pdo_Pgsql')))
{
if (Platform::extensionLoaded('mysql') || Platform::extensionLoaded('pgsql')) {
$storageTypes['db'] = t('Database');
}
$storageTypes['null'] = t('Don\'t Store Preferences');

View File

@ -473,8 +473,8 @@ class WebSetup extends Wizard implements SetupWizard
$requirements->addOptional(
t('PHP Module: PDO-MySQL'),
t('Is Icinga Web 2 supposed to access a MySQL database the PDO-MySQL module for PHP is required.'),
Platform::extensionLoaded('pdo'),
Platform::extensionLoaded('pdo') ? t('The PHP module PDO-MySQL is available.') : (
Platform::extensionLoaded('mysql'),
Platform::extensionLoaded('mysql') ? t('The PHP module PDO-MySQL is available.') : (
t('The PHP module PDO-MySQL is missing.')
)
);
@ -485,8 +485,8 @@ class WebSetup extends Wizard implements SetupWizard
'Is Icinga Web 2 supposed to access a PostgreSQL database'
. ' the PDO-PostgreSQL module for PHP is required.'
),
Platform::extensionLoaded('pdo'),
Platform::extensionLoaded('pdo') ? t('The PHP module PDO-PostgreSQL is available.') : (
Platform::extensionLoaded('pgsql'),
Platform::extensionLoaded('pgsql') ? t('The PHP module PDO-PostgreSQL is available.') : (
t('The PHP module PDO-PostgreSQL is missing.')
)
);

View File

@ -40,12 +40,7 @@ class BackendPage extends Form
);
$resourceTypes = array('livestatus' => 'Livestatus');
if (
Platform::extensionLoaded('pdo') && (
Platform::zendClassExists('Zend_Db_Adapter_Pdo_Mysql')
|| Platform::zendClassExists('Zend_Db_Adapter_Pdo_Pgsql')
)
) {
if (Platform::extensionLoaded('mysql') || Platform::extensionLoaded('pgsql')) {
$resourceTypes['ido'] = 'IDO';
}