Fix DBIExtension lib.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
This commit is contained in:
Hugues Peccatte 2015-09-12 23:04:37 +02:00
parent e8ece53a79
commit 21bca2d321
3 changed files with 28 additions and 24 deletions

View File

@ -0,0 +1,28 @@
<?php
/**
* Contract for every database extension supported by phpMyAdmin
*
* @package PhpMyAdmin-DBI
*/
/**
* Defines PMA_MYSQL_CLIENT_API if it does not exist based
* on MySQL client version.
*
* @param string $version MySQL version string
*
* @return void
*/
function PMA_defineClientAPI($version)
{
if (! defined('PMA_MYSQL_CLIENT_API')) {
$client_api = explode('.', $version);
define(
'PMA_MYSQL_CLIENT_API',
(int)sprintf(
'%d%02d%02d',
$client_api[0], $client_api[1], intval($client_api[2])
)
);
}
}

View File

@ -234,26 +234,3 @@ interface DBIExtension
*/
public function fieldFlags($result, $i);
}
/**
* Defines PMA_MYSQL_CLIENT_API if it does not exist based
* on MySQL client version.
*
* @param string $version MySQL version string
*
* @return void
*/
function PMA_defineClientAPI($version)
{
if (! defined('PMA_MYSQL_CLIENT_API')) {
$client_api = explode('.', $version);
define(
'PMA_MYSQL_CLIENT_API',
(int)sprintf(
'%d%02d%02d',
$client_api[0], $client_api[1], intval($client_api[2])
)
);
}
}

View File

@ -8,7 +8,6 @@
*/
namespace PMA\libraries\dbi;
use mysqli_result;
use PMA\libraries\DatabaseInterface;
if (! defined('PHPMYADMIN')) {