Permalink
Browse files

Added constant for ADOdb minimum version

Modified installer and admin checks page to use the new constant
  • Loading branch information...
1 parent 34b961d commit 5981daa8b7c3996f260dd3cefc15b543fc37655f @dregad dregad committed Jan 28, 2014
Showing with 7 additions and 16 deletions.
  1. +2 −2 admin/check/check_database_inc.php
  2. +4 −14 admin/install.php
  3. +1 −0 core/constant_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 <a href="http://en.wikipedia.org/wiki/ADOdb">ADOdb</a> available is at least 5.11',
+ 'Version of <a href="http://en.wikipedia.org/wiki/ADOdb">ADOdb</a> available is at least ' . DB_MIN_VERSION_ADODB,
$t_adodb_version_check_ok,
$t_adodb_version_info
);
View
@@ -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
);
View
@@ -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

0 comments on commit 5981daa

Please sign in to comment.