diff --git a/ChangeLog b/ChangeLog index 3e2073662..e6f47c50a 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2003-03-22 Alexander M. Turek + * libraries/defines.lib.php3: Small bugfix. + * libraries/defines_php.lib.php3: New constant: PMA_MYSQL_CLIENT_API. + 2003-03-22 Marc Delisle * libraries/transformations/text_plain__imagelink: display the * libraries/transformations/text_plain__link: the link was not @@ -91,7 +95,7 @@ $Source$ * pdf_pages.php3 will now check if the pdf_pages table has entries that reference tables that no longer exist. if it does user is prompted to delete them. - + 2003-03-17 Marc Delisle * user_password.php3, header.inc.php3, libraries/user_password.js: put back js functions for user password change (= old user_details.js) @@ -106,7 +110,7 @@ $Source$ 2003-03-14 Garvin Hicking * libraries/display_tbl.lib.php3, db_details_importdocsql.php3: Fixed - '../' safety issues, display transformations only if file exists + '../' safety issues, display transformations only if file exists (Bug #703555) 2003-03-14 Robin Johnson @@ -114,7 +118,7 @@ $Source$ - Typo fixes: s/RestricColumnTypes/RestrictColumnTypes/ s/RestricFunctions/RestrictFunctions/ - * scripts/create_tables.sql: + * scripts/create_tables.sql: - Neaten up SQL, add DROP TABLE/DATABASE cleanness 2003-03-13 Alexander M. Turek diff --git a/libraries/defines.lib.php3 b/libraries/defines.lib.php3 index 94d230fed..120ddb59a 100644 --- a/libraries/defines.lib.php3 +++ b/libraries/defines.lib.php3 @@ -38,7 +38,7 @@ if (!defined('PMA_MYSQL_INT_VERSION') && isset($userlink)) { } if(!isset($row)) { - $row = '3.21.0'; + $row['version'] = '3.21.0'; } define('PMA_MYSQL_INT_VERSION', (int)sprintf('%d%02d%02d', $match[0], $match[1], intval($match[2]))); diff --git a/libraries/defines_php.lib.php3 b/libraries/defines_php.lib.php3 index 351bd3a51..cbcdb13d8 100644 --- a/libraries/defines_php.lib.php3 +++ b/libraries/defines_php.lib.php3 @@ -8,6 +8,8 @@ * PMA_VERSION (string) - phpMyAdmin version string * PMA_PHP_INT_VERSION (int) - eg: 30017 instead of 3.0.17 or * 40006 instead of 4.0.6RC3 + * PMA_MYSQL_CLIENT_API (int) - the version number of the MySQL client + * API which php is built against. * PMA_IS_WINDOWS (bool) - mark if phpMyAdmin running on windows * server * PMA_IS_GD2 (bool) - true is GD2 is present @@ -37,6 +39,20 @@ if (!defined('PMA_PHP_INT_VERSION')) { define('PMA_PHP_STR_VERSION', phpversion()); } +// MySQL client API +if (!defined('PMA_MYSQL_CLIENT_API')) { + if (function_exists('mysql_get_client_info')) { + $client_api = mysql_get_client_info(); + } else { + // for compatibility with php <= 4.0.5 + // expect the worst! + $client_api = '3.21.0'; + } + $client_api = explode('.', $client_api); + define('PMA_MYSQL_CLIENT_API', (int)sprintf('%d%02d%02d', $client_api[0], $client_api[1], intval($client_api[2]))); + unset($client_api); +} + // Whether the os php is running on is windows or not if (!defined('PMA_IS_WINDOWS')) { if (defined('PHP_OS') && eregi('win', PHP_OS)) {