mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-06-29 18:14:26 +02:00
Check the mysql or pgsql extension instead of just pdo, really
This commit is contained in:
parent
f7d168c80f
commit
9a5d01b3fd
@ -216,7 +216,7 @@ class ResourceConfigForm extends ConfigForm
|
|||||||
if ($resourceType === 'ldap' || Platform::extensionLoaded('ldap')) {
|
if ($resourceType === 'ldap' || Platform::extensionLoaded('ldap')) {
|
||||||
$resourceTypes['ldap'] = 'LDAP';
|
$resourceTypes['ldap'] = 'LDAP';
|
||||||
}
|
}
|
||||||
if ($resourceType === 'db' || Platform::extensionLoaded('pdo')) {
|
if ($resourceType === 'db' || Platform::extensionLoaded('mysql') || Platform::extensionLoaded('pgsql')) {
|
||||||
$resourceTypes['db'] = t('SQL Database');
|
$resourceTypes['db'] = t('SQL Database');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,9 +39,7 @@ class AuthenticationPage extends Form
|
|||||||
);
|
);
|
||||||
|
|
||||||
$backendTypes = array();
|
$backendTypes = array();
|
||||||
if (Platform::extensionLoaded('pdo') && (Platform::zendClassExists('Zend_Db_Adapter_Pdo_Mysql')
|
if (Platform::extensionLoaded('mysql') || Platform::extensionLoaded('pgsql')) {
|
||||||
|| Platform::zendClassExists('Zend_Db_Adapter_Pdo_Pgsql')))
|
|
||||||
{
|
|
||||||
$backendTypes['db'] = t('Database');
|
$backendTypes['db'] = t('Database');
|
||||||
}
|
}
|
||||||
if (Platform::extensionLoaded('ldap')) {
|
if (Platform::extensionLoaded('ldap')) {
|
||||||
|
@ -52,9 +52,7 @@ class PreferencesPage extends Form
|
|||||||
|
|
||||||
$storageTypes = array();
|
$storageTypes = array();
|
||||||
$storageTypes['ini'] = t('File System (INI Files)');
|
$storageTypes['ini'] = t('File System (INI Files)');
|
||||||
if (Platform::extensionLoaded('pdo') && (Platform::zendClassExists('Zend_Db_Adapter_Pdo_Mysql')
|
if (Platform::extensionLoaded('mysql') || Platform::extensionLoaded('pgsql')) {
|
||||||
|| Platform::zendClassExists('Zend_Db_Adapter_Pdo_Pgsql')))
|
|
||||||
{
|
|
||||||
$storageTypes['db'] = t('Database');
|
$storageTypes['db'] = t('Database');
|
||||||
}
|
}
|
||||||
$storageTypes['null'] = t('Don\'t Store Preferences');
|
$storageTypes['null'] = t('Don\'t Store Preferences');
|
||||||
|
@ -473,8 +473,8 @@ class WebSetup extends Wizard implements SetupWizard
|
|||||||
$requirements->addOptional(
|
$requirements->addOptional(
|
||||||
t('PHP Module: PDO-MySQL'),
|
t('PHP Module: PDO-MySQL'),
|
||||||
t('Is Icinga Web 2 supposed to access a MySQL database the PDO-MySQL module for PHP is required.'),
|
t('Is Icinga Web 2 supposed to access a MySQL database the PDO-MySQL module for PHP is required.'),
|
||||||
Platform::extensionLoaded('pdo'),
|
Platform::extensionLoaded('mysql'),
|
||||||
Platform::extensionLoaded('pdo') ? t('The PHP module PDO-MySQL is available.') : (
|
Platform::extensionLoaded('mysql') ? t('The PHP module PDO-MySQL is available.') : (
|
||||||
t('The PHP module PDO-MySQL is missing.')
|
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'
|
'Is Icinga Web 2 supposed to access a PostgreSQL database'
|
||||||
. ' the PDO-PostgreSQL module for PHP is required.'
|
. ' the PDO-PostgreSQL module for PHP is required.'
|
||||||
),
|
),
|
||||||
Platform::extensionLoaded('pdo'),
|
Platform::extensionLoaded('pgsql'),
|
||||||
Platform::extensionLoaded('pdo') ? t('The PHP module PDO-PostgreSQL is available.') : (
|
Platform::extensionLoaded('pgsql') ? t('The PHP module PDO-PostgreSQL is available.') : (
|
||||||
t('The PHP module PDO-PostgreSQL is missing.')
|
t('The PHP module PDO-PostgreSQL is missing.')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -40,12 +40,7 @@ class BackendPage extends Form
|
|||||||
);
|
);
|
||||||
|
|
||||||
$resourceTypes = array('livestatus' => 'Livestatus');
|
$resourceTypes = array('livestatus' => 'Livestatus');
|
||||||
if (
|
if (Platform::extensionLoaded('mysql') || Platform::extensionLoaded('pgsql')) {
|
||||||
Platform::extensionLoaded('pdo') && (
|
|
||||||
Platform::zendClassExists('Zend_Db_Adapter_Pdo_Mysql')
|
|
||||||
|| Platform::zendClassExists('Zend_Db_Adapter_Pdo_Pgsql')
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
$resourceTypes['ido'] = 'IDO';
|
$resourceTypes['ido'] = 'IDO';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user