diff --git a/admin/check/check_database_inc.php b/admin/check/check_database_inc.php index a8aec47451..b4ff814b8c 100644 --- a/admin/check/check_database_inc.php +++ b/admin/check/check_database_inc.php @@ -51,7 +51,7 @@ # This bug has been fixed in ADOdb 5.11 (May 5, 2010) but we still # need to use the backwards compatible approach to detect ADOdb <5.11. if( preg_match( '/^[Vv]([0-9\.]+)/', $ADODB_vers, $t_matches ) == 1 ) { - $t_adodb_version_check_ok = version_compare( $t_matches[1], '5.10', '>=' ); + $t_adodb_version_check_ok = version_compare( $t_matches[1], DB_MIN_VERSION_ADODB, '>=' ); $t_adodb_version_info = 'ADOdb version ' . htmlentities( $t_matches[1] ) . ' was found.'; } @@ -63,7 +63,7 @@ ); } check_print_test_row( - 'Version of ADOdb available is at least 5.11', + 'Version of ADOdb available is at least ' . DB_MIN_VERSION_ADODB, $t_adodb_version_check_ok, $t_adodb_version_info ); diff --git a/admin/install.php b/admin/install.php index dcf1adb02d..250515b172 100644 --- a/admin/install.php +++ b/admin/install.php @@ -306,21 +306,11 @@ function print_test( $p_test_description, $p_result, $p_hard_fail = true, $p_mes print_test( 'Checking PHP support for database type', db_check_database_support( $f_db_type ), true, 'database is not supported by PHP. Check that it has been compiled into your server.' ); # ADOdb library version check - # PostgreSQL, Oracle and MSSQL require at least 5.18. - # @TODO dregad 20131001 req is 5.19 actually, but must wait until official release - # MySQL should be fine with 5.10 + # PostgreSQL, Oracle and MSSQL require at least 5.19. MySQL should be fine + # with 5.10 but to simplify we align to the requirement of the others. $t_adodb_version = substr( $ADODB_vers, 1, strpos( $ADODB_vers, ' ' ) - 1 ); - switch( $f_db_type ) { - case 'mssqlnative': - case 'oci8' : - case 'pgsql' : - $t_adodb_min = '5.18'; - break; - default: - $t_adodb_min = '5.10'; - } - print_test( "Checking ADOdb Library version is at least $t_adodb_min", - version_compare( $t_adodb_version, $t_adodb_min, '>=' ), + print_test( "Checking ADOdb Library version is at least " . DB_MIN_VERSION_ADODB, + version_compare( $t_adodb_version, DB_MIN_VERSION_ADODB, '>=' ), true, 'Current version: ' . $ADODB_vers ); diff --git a/core/constant_inc.php b/core/constant_inc.php index b92c5677d0..ef5892f1da 100644 --- a/core/constant_inc.php +++ b/core/constant_inc.php @@ -39,6 +39,7 @@ # installation define( 'CONFIGURED_PASSWORD', "______" ); +define( 'DB_MIN_VERSION_ADODB', '5.19dev' ); # For mssql, oracle and pgsql define( 'DB_MIN_VERSION_MSSQL', '9.0.0' ); define( 'DB_MIN_VERSION_MYSQL', '5.0.8' ); # See #16584 define( 'DB_MIN_VERSION_PGSQL', '8.4' ); # Earliest supported version as of Jan 2014