PMA_MYSQL_CLIENT_API

This commit is contained in:
Alexander M. Turek
2003-03-22 23:49:46 +00:00
parent 3a338e70a4
commit 66fb90359e
3 changed files with 24 additions and 4 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2003-03-22 Alexander M. Turek <rabus@users.sourceforge.net>
* libraries/defines.lib.php3: Small bugfix.
* libraries/defines_php.lib.php3: New constant: PMA_MYSQL_CLIENT_API.
2003-03-22 Marc Delisle <lem9@users.sourceforge.net>
* libraries/transformations/text_plain__imagelink: display the
* libraries/transformations/text_plain__link: the link was not

View File

@@ -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])));

View File

@@ -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)) {