Show more used PHP extensions

This helps user to see what features are available.

Issue #11874

Signed-off-by: Michal Čihař <michal@cihar.com>
This commit is contained in:
Michal Čihař 2016-01-22 09:31:44 +01:00
parent 95b1cb173e
commit 47798a60e4
3 changed files with 32 additions and 6 deletions

View File

@ -34,6 +34,7 @@ phpMyAdmin - ChangeLog
+ issue #11796 Use modals for displaying forms in db structure page
+ issue #11789 Show MySQL error messages in user language
+ issue Add 'ssl_verify' configuration directive for self-signed certificates with mysqlnd and PHP >= 5.6
+ issue #11874 Show more used PHP extensions
4.5.5.0 (not yet released)
- issue Undefined index: is_ajax_request

View File

@ -335,13 +335,13 @@ if ($GLOBALS['cfg']['ShowServerInfo'] || $GLOBALS['cfg']['ShowPhpInfo']) {
);
$php_ext_string = __('PHP extension:') . ' ';
if (PMA\libraries\DatabaseInterface::checkDbExtension('mysqli')) {
$extension = 'mysqli';
} else {
$extension = 'mysql';
$extensions = PMA\libraries\Util::listPHPExtensions();
foreach ($extensions as $extension) {
$php_ext_string .= ' ' . $extension
. PMA\libraries\Util::showPHPDocu('book.' . $extension . '.php');
}
$php_ext_string .= $extension . ' '
. PMA\libraries\Util::showPHPDocu('book.' . $extension . '.php');
PMA_printListItem(
$php_ext_string,

View File

@ -4957,5 +4957,30 @@ class Util
}
return $tables;
}
/**
* Returs list of used PHP extensions.
*
* @return array of strings
*/
public static function listPHPExtensions()
{
$result = array();
if (DatabaseInterface::checkDbExtension('mysqli')) {
$result[] = 'mysqli';
} else {
$result[] = 'mysql';
}
if (extension_loaded('curl')) {
$result[] = 'curl';
}
if (extension_loaded('mbstring')) {
$result[] = 'mbstring';
}
return $result;
}
}