Merge branch 'QA_4_7' into STABLE

This commit is contained in:
Isaac Bennetch 2017-06-29 15:23:10 -04:00
commit 0649924d9e
143 changed files with 51268 additions and 49563 deletions

View File

@ -1,3 +0,0 @@
src_dir: libraries
coverage_clover: build/logs/clover.xml
json_path: build/logs/coveralls-upload.json

1
.gitignore vendored
View File

@ -49,4 +49,5 @@ phpunit.xml
# Ant cache
cache.properties
# Composer
composer.lock
/vendor/

View File

@ -15,9 +15,8 @@ php:
- "7.0"
- "5.6"
- "5.5"
- hhvm-3.3
- hhvm-3.12
- hhvm-3.18
- "hhvm-3.12"
- "hhvm-3.18"
sudo: required
@ -46,7 +45,6 @@ script:
- ./test/ci-$CI_MODE
after_script:
- if [ -f vendor/bin/coveralls ] ; then php vendor/bin/coveralls -v || true ; fi
- if [ -f vendor/bin/codacycoverage ] ; then php vendor/bin/codacycoverage clover || true ; fi
- if [ -f php.log ] ; then cat php.log ; fi
- if [ -f build/logs/phpunit.json ] ; then ./scripts/phpunit-top-tests build/logs/phpunit.json ; fi
@ -74,6 +72,7 @@ matrix:
- brew update
- brew install gettext php70 mariadb
- brew link --force gettext
- sed -i -e 's/^memory_limit = .*/memory_limit = -1/' /usr/local/etc/php/7.0/php.ini
- curl https://getcomposer.org/installer | php
- ln -s "`pwd`/composer.phar" /usr/local/bin/composer
- mysql.server start

View File

@ -1,6 +1,26 @@
phpMyAdmin - ChangeLog
======================
4.7.2 (2017-06-29)
- issue #13314 Make theme selection keep current server
- issue #13311 Fixed direct login for accounts without password
- issue #13316 Fixed check for mbstring.func_overload
- issue #13323 Fixed wrong encoding of table at triggers
- issue #12976 Fixed natural sorting in several places
- issue #12718 Show warning for users removed from mysql.user table
- issue #13362 Fixed loading additional javascripts
- issue #13343 Fixed editing QBE
- issue #13193 Improved documentation on user settings
- issue #13092 Gracefully handle early fatal errors in AJAX requests
- issue #13327 Fixed Incorrect NavigationTreeEnableExpansion default value in the documentation
- issue #13008 Fixed export of database with a lot of tables
- issue #13318 Improved performance when importing with enabled tracking
- issue #13386 Avoid PHP errors with non existing configuration on OS X
- issue #13388 Show only supported charsets for conversion
- issue #13392 Fixed operation with session.auto_start enabled
- issue #13383 "Create PHP code" is broken
- issue #13189 Fixed links to resume timeouted import
4.7.1 (2017-05-25)
- issue #13132 Always execute tracking queries as controluser
- issue #13125 Focus on SQL editor after inserting field name

2
README
View File

@ -1,7 +1,7 @@
phpMyAdmin - Readme
===================
Version 4.7.1
Version 4.7.2
A web interface for MySQL and MariaDB.

View File

@ -16,8 +16,8 @@ Code status
:alt: Translation status
:target: https://hosted.weblate.org/engage/phpmyadmin/?utm_source=widget
.. image:: https://coveralls.io/repos/phpmyadmin/phpmyadmin/badge.svg?branch=master
:target: https://coveralls.io/r/phpmyadmin/phpmyadmin?branch=master
.. image:: https://codecov.io/gh/phpmyadmin/phpmyadmin/branch/master/graph/badge.svg
:target: https://codecov.io/gh/phpmyadmin/phpmyadmin
.. image:: https://scrutinizer-ci.com/g/phpmyadmin/phpmyadmin/badges/quality-score.png?s=93dfde29ffa5771d9c254b7ffb11c4e673315035
:target: https://scrutinizer-ci.com/g/phpmyadmin/phpmyadmin/

34
ajax.php Normal file
View File

@ -0,0 +1,34 @@
<?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* Generic AJAX endpoint for getting information about database
*
* @package PhpMyAdmin
*/
use PMA\libraries\Response;
use PMA\libraries\Util;
require_once 'libraries/common.inc.php';
$response = Response::getInstance();
if (empty($_POST['type'])) {
PMA_fatalError(__('Bad type!'));
}
switch ($_POST['type']) {
case 'list-databases':
$response->addJSON('databases', $GLOBALS['dblist']->databases);
break;
case 'list-tables':
Util::checkParameters(array('db'));
$response->addJSON('tables', $GLOBALS['dbi']->getTables($_REQUEST['db']));
break;
case 'list-columns':
Util::checkParameters(array('db', 'table'));
$response->addJSON('columns', $GLOBALS['dbi']->getColumnNames($_REQUEST['db'], $_REQUEST['table']));
break;
default:
PMA_fatalError(__('Bad type!'));
}

View File

@ -38,7 +38,7 @@
"ext-xml": "*",
"ext-pcre": "*",
"ext-json": "*",
"phpmyadmin/sql-parser": "^4.1.2",
"phpmyadmin/sql-parser": "^4.1.7",
"phpmyadmin/motranslator": "^3.0",
"phpmyadmin/shapefile": "^2.0",
"tecnickcom/tcpdf": "^6.2",
@ -56,7 +56,6 @@
"tecnickcom/tcpdf": "For PDF support"
},
"require-dev": {
"satooshi/php-coveralls": "^1.0",
"phpunit/phpunit": "~4.1",
"codacy/coverage": "dev-master",
"phpunit/phpunit-selenium": "~1.2",

566
composer.lock generated
View File

@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "a4b4de64e919bca5571e729751b4a58b",
"content-hash": "96b5f978d17e459021559b9733adf6c0",
"hash": "44faf697e70326eeaa2a37541fc26c9a",
"content-hash": "e7c0b6aa8d9546a22b1a9d0a098f680d",
"packages": [
{
"name": "google/recaptcha",
@ -54,16 +54,16 @@
},
{
"name": "phpmyadmin/motranslator",
"version": "3.2",
"version": "3.3",
"source": {
"type": "git",
"url": "https://github.com/phpmyadmin/motranslator.git",
"reference": "c8f913c75f8b52310d11f291c9748819763f6c02"
"reference": "877f76827fa69bf27e4ffc28d258e9fba3442d8f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpmyadmin/motranslator/zipball/c8f913c75f8b52310d11f291c9748819763f6c02",
"reference": "c8f913c75f8b52310d11f291c9748819763f6c02",
"url": "https://api.github.com/repos/phpmyadmin/motranslator/zipball/877f76827fa69bf27e4ffc28d258e9fba3442d8f",
"reference": "877f76827fa69bf27e4ffc28d258e9fba3442d8f",
"shasum": ""
},
"require": {
@ -99,7 +99,7 @@
"mo",
"translator"
],
"time": "2017-05-23 07:30:40"
"time": "2017-06-01 11:50:55"
},
{
"name": "phpmyadmin/shapefile",
@ -157,16 +157,16 @@
},
{
"name": "phpmyadmin/sql-parser",
"version": "v4.1.5",
"version": "v4.1.7",
"source": {
"type": "git",
"url": "https://github.com/phpmyadmin/sql-parser.git",
"reference": "2ccd17dc14b1e57376e58aebcd46831dc7c25de5"
"reference": "a6c1b67119d334b985cf2f386710c7e35623e09f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/2ccd17dc14b1e57376e58aebcd46831dc7c25de5",
"reference": "2ccd17dc14b1e57376e58aebcd46831dc7c25de5",
"url": "https://api.github.com/repos/phpmyadmin/sql-parser/zipball/a6c1b67119d334b985cf2f386710c7e35623e09f",
"reference": "a6c1b67119d334b985cf2f386710c7e35623e09f",
"shasum": ""
},
"require": {
@ -212,20 +212,20 @@
"parser",
"sql"
],
"time": "2017-05-15 08:28:56"
"time": "2017-06-06 13:05:05"
},
{
"name": "phpseclib/phpseclib",
"version": "2.0.5",
"version": "2.0.6",
"source": {
"type": "git",
"url": "https://github.com/phpseclib/phpseclib.git",
"reference": "f8dd0e18d2328c447dd4190fecd11ef52680d968"
"reference": "34a7699e6f31b1ef4035ee36444407cecf9f56aa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/f8dd0e18d2328c447dd4190fecd11ef52680d968",
"reference": "f8dd0e18d2328c447dd4190fecd11ef52680d968",
"url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/34a7699e6f31b1ef4035ee36444407cecf9f56aa",
"reference": "34a7699e6f31b1ef4035ee36444407cecf9f56aa",
"shasum": ""
},
"require": {
@ -304,7 +304,7 @@
"x.509",
"x509"
],
"time": "2017-05-08 05:58:35"
"time": "2017-06-05 06:31:10"
},
{
"name": "psr/cache",
@ -400,26 +400,79 @@
"time": "2016-10-10 12:19:37"
},
{
"name": "symfony/cache",
"version": "v3.2.8",
"name": "psr/simple-cache",
"version": "1.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/cache.git",
"reference": "ce81ce67baa387c556d03f389fb3c9efc11286aa"
"url": "https://github.com/php-fig/simple-cache.git",
"reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/cache/zipball/ce81ce67baa387c556d03f389fb3c9efc11286aa",
"reference": "ce81ce67baa387c556d03f389fb3c9efc11286aa",
"url": "https://api.github.com/repos/php-fig/simple-cache/zipball/753fa598e8f3b9966c886fe13f370baa45ef0e24",
"reference": "753fa598e8f3b9966c886fe13f370baa45ef0e24",
"shasum": ""
},
"require": {
"php": ">=5.3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.0.x-dev"
}
},
"autoload": {
"psr-4": {
"Psr\\SimpleCache\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "PHP-FIG",
"homepage": "http://www.php-fig.org/"
}
],
"description": "Common interfaces for simple caching",
"keywords": [
"cache",
"caching",
"psr",
"psr-16",
"simple-cache"
],
"time": "2017-01-02 13:31:39"
},
{
"name": "symfony/cache",
"version": "v3.3.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/cache.git",
"reference": "8e85dafad9c0680bcda90eec0a144d4b34923312"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/cache/zipball/8e85dafad9c0680bcda90eec0a144d4b34923312",
"reference": "8e85dafad9c0680bcda90eec0a144d4b34923312",
"shasum": ""
},
"require": {
"php": ">=5.5.9",
"psr/cache": "~1.0",
"psr/log": "~1.0"
"psr/log": "~1.0",
"psr/simple-cache": "^1.0"
},
"conflict": {
"symfony/var-dumper": "<3.3"
},
"provide": {
"psr/cache-implementation": "1.0"
"psr/cache-implementation": "1.0",
"psr/simple-cache-implementation": "1.0"
},
"require-dev": {
"cache/integration-tests": "dev-master",
@ -433,7 +486,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
"dev-master": "3.3-dev"
}
},
"autoload": {
@ -458,26 +511,26 @@
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony implementation of PSR-6",
"description": "Symfony Cache component with PSR-6, PSR-16, and tags",
"homepage": "https://symfony.com",
"keywords": [
"caching",
"psr6"
],
"time": "2017-04-12 14:14:23"
"time": "2017-06-06 03:13:52"
},
{
"name": "symfony/expression-language",
"version": "v3.2.8",
"version": "v3.3.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/expression-language.git",
"reference": "b43eea00de866786cc2fec2b86c7f6d22c6e47d8"
"reference": "48abe52c5b80babe29e956d900b7ab06faf50eef"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/expression-language/zipball/b43eea00de866786cc2fec2b86c7f6d22c6e47d8",
"reference": "b43eea00de866786cc2fec2b86c7f6d22c6e47d8",
"url": "https://api.github.com/repos/symfony/expression-language/zipball/48abe52c5b80babe29e956d900b7ab06faf50eef",
"reference": "48abe52c5b80babe29e956d900b7ab06faf50eef",
"shasum": ""
},
"require": {
@ -487,7 +540,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
"dev-master": "3.3-dev"
}
},
"autoload": {
@ -514,7 +567,7 @@
],
"description": "Symfony ExpressionLanguage Component",
"homepage": "https://symfony.com",
"time": "2017-05-01 14:55:58"
"time": "2017-05-01 15:01:29"
},
{
"name": "tecnickcom/tcpdf",
@ -734,102 +787,6 @@
"homepage": "http://gitonomy.com",
"time": "2016-05-11 08:25:40"
},
{
"name": "guzzle/guzzle",
"version": "v3.9.3",
"source": {
"type": "git",
"url": "https://github.com/guzzle/guzzle3.git",
"reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle3/zipball/0645b70d953bc1c067bbc8d5bc53194706b628d9",
"reference": "0645b70d953bc1c067bbc8d5bc53194706b628d9",
"shasum": ""
},
"require": {
"ext-curl": "*",
"php": ">=5.3.3",
"symfony/event-dispatcher": "~2.1"
},
"replace": {
"guzzle/batch": "self.version",
"guzzle/cache": "self.version",
"guzzle/common": "self.version",
"guzzle/http": "self.version",
"guzzle/inflection": "self.version",
"guzzle/iterator": "self.version",
"guzzle/log": "self.version",
"guzzle/parser": "self.version",
"guzzle/plugin": "self.version",
"guzzle/plugin-async": "self.version",
"guzzle/plugin-backoff": "self.version",
"guzzle/plugin-cache": "self.version",
"guzzle/plugin-cookie": "self.version",
"guzzle/plugin-curlauth": "self.version",
"guzzle/plugin-error-response": "self.version",
"guzzle/plugin-history": "self.version",
"guzzle/plugin-log": "self.version",
"guzzle/plugin-md5": "self.version",
"guzzle/plugin-mock": "self.version",
"guzzle/plugin-oauth": "self.version",
"guzzle/service": "self.version",
"guzzle/stream": "self.version"
},
"require-dev": {
"doctrine/cache": "~1.3",
"monolog/monolog": "~1.0",
"phpunit/phpunit": "3.7.*",
"psr/log": "~1.0",
"symfony/class-loader": "~2.1",
"zendframework/zend-cache": "2.*,<2.3",
"zendframework/zend-log": "2.*,<2.3"
},
"suggest": {
"guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated."
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.9-dev"
}
},
"autoload": {
"psr-0": {
"Guzzle": "src/",
"Guzzle\\Tests": "tests/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling"
},
{
"name": "Guzzle Community",
"homepage": "https://github.com/guzzle/guzzle/contributors"
}
],
"description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle",
"homepage": "http://guzzlephp.org/",
"keywords": [
"client",
"curl",
"framework",
"http",
"http client",
"rest",
"web service"
],
"abandoned": "guzzlehttp/guzzle",
"time": "2015-03-18 18:23:50"
},
{
"name": "phpdocumentor/reflection-common",
"version": "1.0",
@ -1326,16 +1283,16 @@
},
{
"name": "phpunit/phpunit",
"version": "4.8.35",
"version": "4.8.36",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit.git",
"reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87"
"reference": "46023de9a91eec7dfb06cc56cb4e260017298517"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/791b1a67c25af50e230f841ee7a9c6eba507dc87",
"reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87",
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517",
"reference": "46023de9a91eec7dfb06cc56cb4e260017298517",
"shasum": ""
},
"require": {
@ -1394,7 +1351,7 @@
"testing",
"xunit"
],
"time": "2017-02-06 05:18:07"
"time": "2017-06-21 08:07:12"
},
{
"name": "phpunit/phpunit-mock-objects",
@ -1507,64 +1464,6 @@
],
"time": "2014-11-02 09:23:27"
},
{
"name": "satooshi/php-coveralls",
"version": "v1.0.1",
"source": {
"type": "git",
"url": "https://github.com/satooshi/php-coveralls.git",
"reference": "da51d304fe8622bf9a6da39a8446e7afd432115c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/satooshi/php-coveralls/zipball/da51d304fe8622bf9a6da39a8446e7afd432115c",
"reference": "da51d304fe8622bf9a6da39a8446e7afd432115c",
"shasum": ""
},
"require": {
"ext-json": "*",
"ext-simplexml": "*",
"guzzle/guzzle": "^2.8|^3.0",
"php": ">=5.3.3",
"psr/log": "^1.0",
"symfony/config": "^2.1|^3.0",
"symfony/console": "^2.1|^3.0",
"symfony/stopwatch": "^2.0|^3.0",
"symfony/yaml": "^2.0|^3.0"
},
"suggest": {
"symfony/http-kernel": "Allows Symfony integration"
},
"bin": [
"bin/coveralls"
],
"type": "library",
"autoload": {
"psr-4": {
"Satooshi\\": "src/Satooshi/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Kitamura Satoshi",
"email": "with.no.parachute@gmail.com",
"homepage": "https://www.facebook.com/satooshi.jp"
}
],
"description": "PHP client library for Coveralls API",
"homepage": "https://github.com/satooshi/php-coveralls",
"keywords": [
"ci",
"coverage",
"github",
"test"
],
"time": "2016-01-20 17:35:46"
},
{
"name": "sebastian/comparator",
"version": "1.2.4",
@ -2015,74 +1914,18 @@
],
"time": "2017-05-22 02:43:20"
},
{
"name": "symfony/config",
"version": "v3.2.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/config.git",
"reference": "e5533fcc0b3dd377626153b2852707878f363728"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/config/zipball/e5533fcc0b3dd377626153b2852707878f363728",
"reference": "e5533fcc0b3dd377626153b2852707878f363728",
"shasum": ""
},
"require": {
"php": ">=5.5.9",
"symfony/filesystem": "~2.8|~3.0"
},
"require-dev": {
"symfony/yaml": "~3.0"
},
"suggest": {
"symfony/yaml": "To use the yaml reference dumper"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Config\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Config Component",
"homepage": "https://symfony.com",
"time": "2017-04-12 14:13:17"
},
{
"name": "symfony/console",
"version": "v3.2.8",
"version": "v3.3.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/console.git",
"reference": "a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38"
"reference": "70d2a29b2911cbdc91a7e268046c395278238b2e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/console/zipball/a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38",
"reference": "a7a17e0c6c3c4d70a211f80782e4b90ddadeaa38",
"url": "https://api.github.com/repos/symfony/console/zipball/70d2a29b2911cbdc91a7e268046c395278238b2e",
"reference": "70d2a29b2911cbdc91a7e268046c395278238b2e",
"shasum": ""
},
"require": {
@ -2090,10 +1933,16 @@
"symfony/debug": "~2.8|~3.0",
"symfony/polyfill-mbstring": "~1.0"
},
"conflict": {
"symfony/dependency-injection": "<3.3"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "~3.3",
"symfony/dependency-injection": "~3.3",
"symfony/event-dispatcher": "~2.8|~3.0",
"symfony/filesystem": "~2.8|~3.0",
"symfony/http-kernel": "~2.8|~3.0",
"symfony/process": "~2.8|~3.0"
},
"suggest": {
@ -2105,7 +1954,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
"dev-master": "3.3-dev"
}
},
"autoload": {
@ -2132,20 +1981,20 @@
],
"description": "Symfony Console Component",
"homepage": "https://symfony.com",
"time": "2017-04-26 01:39:17"
"time": "2017-06-02 19:24:58"
},
{
"name": "symfony/debug",
"version": "v3.2.8",
"version": "v3.3.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/debug.git",
"reference": "fd6eeee656a5a7b384d56f1072243fe1c0e81686"
"reference": "e9c50482841ef696e8fa1470d950a79c8921f45d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/debug/zipball/fd6eeee656a5a7b384d56f1072243fe1c0e81686",
"reference": "fd6eeee656a5a7b384d56f1072243fe1c0e81686",
"url": "https://api.github.com/repos/symfony/debug/zipball/e9c50482841ef696e8fa1470d950a79c8921f45d",
"reference": "e9c50482841ef696e8fa1470d950a79c8921f45d",
"shasum": ""
},
"require": {
@ -2156,13 +2005,12 @@
"symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2"
},
"require-dev": {
"symfony/class-loader": "~2.8|~3.0",
"symfony/http-kernel": "~2.8|~3.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
"dev-master": "3.3-dev"
}
},
"autoload": {
@ -2189,129 +2037,20 @@
],
"description": "Symfony Debug Component",
"homepage": "https://symfony.com",
"time": "2017-04-19 20:17:50"
},
{
"name": "symfony/event-dispatcher",
"version": "v2.8.20",
"source": {
"type": "git",
"url": "https://github.com/symfony/event-dispatcher.git",
"reference": "7fc8e2b4118ff316550596357325dfd92a51f531"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/7fc8e2b4118ff316550596357325dfd92a51f531",
"reference": "7fc8e2b4118ff316550596357325dfd92a51f531",
"shasum": ""
},
"require": {
"php": ">=5.3.9"
},
"require-dev": {
"psr/log": "~1.0",
"symfony/config": "^2.0.5|~3.0.0",
"symfony/dependency-injection": "~2.6|~3.0.0",
"symfony/expression-language": "~2.6|~3.0.0",
"symfony/stopwatch": "~2.3|~3.0.0"
},
"suggest": {
"symfony/dependency-injection": "",
"symfony/http-kernel": ""
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.8-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\EventDispatcher\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony EventDispatcher Component",
"homepage": "https://symfony.com",
"time": "2017-04-26 16:56:54"
},
{
"name": "symfony/filesystem",
"version": "v3.2.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/filesystem.git",
"reference": "040651db13cf061827a460cc10f6e36a445c45b4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/040651db13cf061827a460cc10f6e36a445c45b4",
"reference": "040651db13cf061827a460cc10f6e36a445c45b4",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Filesystem\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Filesystem Component",
"homepage": "https://symfony.com",
"time": "2017-04-12 14:13:17"
"time": "2017-06-01 21:01:25"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.3.0",
"version": "v1.4.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "e79d363049d1c2128f133a2667e4f4190904f7f4"
"reference": "f29dca382a6485c3cbe6379f0c61230167681937"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4",
"reference": "e79d363049d1c2128f133a2667e4f4190904f7f4",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937",
"reference": "f29dca382a6485c3cbe6379f0c61230167681937",
"shasum": ""
},
"require": {
@ -2323,7 +2062,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "1.3-dev"
"dev-master": "1.4-dev"
}
},
"autoload": {
@ -2357,20 +2096,20 @@
"portable",
"shim"
],
"time": "2016-11-14 01:06:16"
"time": "2017-06-09 14:24:12"
},
{
"name": "symfony/process",
"version": "v3.2.8",
"version": "v3.3.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/process.git",
"reference": "999c2cf5061e627e6cd551dc9ebf90dd1d11d9f0"
"reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/process/zipball/999c2cf5061e627e6cd551dc9ebf90dd1d11d9f0",
"reference": "999c2cf5061e627e6cd551dc9ebf90dd1d11d9f0",
"url": "https://api.github.com/repos/symfony/process/zipball/8e30690c67aafb6c7992d6d8eb0d707807dd3eaf",
"reference": "8e30690c67aafb6c7992d6d8eb0d707807dd3eaf",
"shasum": ""
},
"require": {
@ -2379,7 +2118,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
"dev-master": "3.3-dev"
}
},
"autoload": {
@ -2406,69 +2145,20 @@
],
"description": "Symfony Process Component",
"homepage": "https://symfony.com",
"time": "2017-04-12 14:13:17"
},
{
"name": "symfony/stopwatch",
"version": "v3.2.8",
"source": {
"type": "git",
"url": "https://github.com/symfony/stopwatch.git",
"reference": "5a0105afb670dbd38f521105c444de1b8e10cfe3"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/5a0105afb670dbd38f521105c444de1b8e10cfe3",
"reference": "5a0105afb670dbd38f521105c444de1b8e10cfe3",
"shasum": ""
},
"require": {
"php": ">=5.5.9"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Stopwatch\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Stopwatch Component",
"homepage": "https://symfony.com",
"time": "2017-04-12 14:13:17"
"time": "2017-05-22 12:32:03"
},
{
"name": "symfony/yaml",
"version": "v3.2.8",
"version": "v3.3.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/yaml.git",
"reference": "acec26fcf7f3031e094e910b94b002fa53d4e4d6"
"reference": "9752a30000a8ca9f4b34b5227d15d0101b96b063"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/yaml/zipball/acec26fcf7f3031e094e910b94b002fa53d4e4d6",
"reference": "acec26fcf7f3031e094e910b94b002fa53d4e4d6",
"url": "https://api.github.com/repos/symfony/yaml/zipball/9752a30000a8ca9f4b34b5227d15d0101b96b063",
"reference": "9752a30000a8ca9f4b34b5227d15d0101b96b063",
"shasum": ""
},
"require": {
@ -2483,7 +2173,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "3.2-dev"
"dev-master": "3.3-dev"
}
},
"autoload": {
@ -2510,7 +2200,7 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
"time": "2017-05-01 14:55:58"
"time": "2017-06-02 22:05:06"
},
{
"name": "webmozart/assert",

View File

@ -51,7 +51,7 @@ copyright = u'2012 - 2017, The phpMyAdmin devel team'
# built documents.
#
# The short X.Y version.
version = '4.7.1'
version = '4.7.2'
# The full version, including alpha/beta/rc tags.
release = version

View File

@ -401,7 +401,7 @@ Server connection settings
there is a chance your SSL connection will fail due to validation.
Setting this to ``false`` will disable the validation check.
Since PHP 5.6.0 it also verifies whether server name matches CN of it's
Since PHP 5.6.0 it also verifies whether server name matches CN of its
certificate. There is currently no way to disable just this check without
disabling complete SSL verification.
@ -1344,6 +1344,8 @@ Server connection settings
:type: string
:default: ``''``
.. versionadded:: 3.5.0
Name of PHP script to be sourced and executed to obtain login
credentials. This is alternative approach to session based single
signon. The script has to provide a function called
@ -1995,7 +1997,7 @@ Navigation panel setup
.. config:option:: $cfg['NavigationTreeEnableExpansion']
:type: boolean
:default: false
:default: true
Whether to offer the possibility of tree expansion in the navigation panel.

20
doc/settings.rst Normal file
View File

@ -0,0 +1,20 @@
Configuring phpMyAdmin
----------------------
phpMyAdmin has quite a lot of configuration settings, those are described in
:ref:`config`. There are several layers of the configuration.
The global settings can be configured in :file:`config.inc.php` as described in
:ref:`config`. This is only way to configure connections to databases and other
system wide settings.
On top of this there are user settings which can be persistently stored in
:ref:`linked-tables`, possibly automatically configured through
:ref:`zeroconf`. If the :ref:`linked-tables` are not configured, the settings
are temporarily stored in the session data, these are valid only until you
logout.
You can also save the user configuration for further use, either download them
as a file or to the browser local storage. You can find both those options in
the :guilabel:`Settings` tab. The settings stored in browser local storage will
be automatically offered for loading upon your login to phpMyAdmin.

View File

@ -677,6 +677,8 @@ in your own database, or in a central database for a multi-user installation
(this database would then be accessed by the controluser, so no other user
should have rights to it).
.. _zeroconf:
Zero configuration
------------------

View File

@ -4,6 +4,7 @@ User Guide
.. toctree::
:maxdepth: 2
settings
transformations
bookmarks
privileges

View File

@ -251,22 +251,20 @@ PMA\libraries\Util::checkParameters(array('import_type', 'format'));
// We don't want anything special in format
$format = PMA_securePath($format);
if (strlen($table) > 0 && strlen($db) > 0) {
$urlparams = array('db' => $db, 'table' => $table);
} elseif (strlen($db) > 0) {
$urlparams = array('db' => $db);
} else {
$urlparams = array();
}
// Create error and goto url
if ($import_type == 'table') {
$err_url = 'tbl_import.php' . URL::getCommon(
array(
'db' => $db, 'table' => $table
)
);
$_SESSION['Import_message']['go_back_url'] = $err_url;
$goto = 'tbl_import.php';
} elseif ($import_type == 'database') {
$err_url = 'db_import.php' . URL::getCommon(array('db' => $db));
$_SESSION['Import_message']['go_back_url'] = $err_url;
$goto = 'db_import.php';
} elseif ($import_type == 'server') {
$err_url = 'server_import.php' . URL::getCommon();
$_SESSION['Import_message']['go_back_url'] = $err_url;
$goto = 'server_import.php';
} else {
if (empty($goto) || !preg_match('@^(server|db|tbl)(_[a-z]*)*\.php$@i', $goto)) {
@ -278,19 +276,9 @@ if ($import_type == 'table') {
$goto = 'server_sql.php';
}
}
if (strlen($table) > 0 && strlen($db) > 0) {
$common = URL::getCommon(array('db' => $db, 'table' => $table));
} elseif (strlen($db) > 0) {
$common = URL::getCommon(array('db' => $db));
} else {
$common = URL::getCommon();
}
$err_url = $goto . $common
. (preg_match('@^tbl_[a-z]*\.php$@', $goto)
? '&amp;table=' . htmlspecialchars($table)
: '');
$_SESSION['Import_message']['go_back_url'] = $err_url;
}
$err_url = $goto . URL::getCommon($urlparams);
$_SESSION['Import_message']['go_back_url'] = $err_url;
// Avoid setting selflink to 'import.php'
// problem similar to bug 4276
if (basename($_SERVER['SCRIPT_NAME']) === 'import.php') {
@ -610,12 +598,14 @@ if (! empty($id_bookmark) && $_REQUEST['action_bookmark'] == 2) {
// Did we hit timeout? Tell it user.
if ($timeout_passed) {
$importUrl = $err_url .= '&timeout_passed=1&offset=' . urlencode(
$GLOBALS['offset']
);
$urlparams['timeout_passed'] = '1';
$urlparams['offset'] = $GLOBALS['offset'];
if (isset($local_import_file)) {
$importUrl .= '&local_import_file=' . urlencode($local_import_file);
$urlparams['local_import_file'] = $local_import_file;
}
$importUrl = $err_url = $goto . URL::getCommon($urlparams);
$message = PMA\libraries\Message::error(
__(
'Script timeout passed, if you want to finish import,'

View File

@ -573,13 +573,19 @@ var AJAX = {
needRequest = true;
this.add(script);
request.push("scripts%5B%5D=" + script);
if (request.length >= 10) {
// Download scripts in chunks
this.appendScript(request);
request = [];
needRequest = false;
}
}
}
request.push("call_done=1");
request.push("v=" + encodeURIComponent(PMA_commonParams.get('PMA_VERSION')));
// Download the composite js file, if necessary
if (needRequest) {
this.appendScript("js/get_scripts.js.php?" + request.join("&"));
this.appendScript(request);
} else {
self.done(callback);
}
@ -606,11 +612,14 @@ var AJAX = {
*
* @return void
*/
appendScript: function (url) {
appendScript: function (request) {
var head = document.head || document.getElementsByTagName('head')[0];
var script = document.createElement('script');
request.push("call_done=1");
request.push("v=" + encodeURIComponent(PMA_commonParams.get('PMA_VERSION')));
script.type = 'text/javascript';
script.src = url;
script.src = "js/get_scripts.js.php?" + request.join("&");
script.async = false;
head.appendChild(script);
},

View File

@ -225,8 +225,10 @@ AJAX.registerTeardown('export.js', function () {
$("input[type='radio'][name='quick_or_custom']").unbind('change');
$("input[type='radio'][name='allrows']").unbind('change');
$('#btn_alias_config').off('click');
$('#db_alias_select').off('change');
$('.table_alias_select').off('change');
$('.alias_remove').off('click');
$('#db_alias_button').off('click');
$('#table_alias_button').off('click');
$('#column_alias_button').off('click');
$('input[name="table_select[]"]').off('change');
$('input[name="table_structure[]"]').off('change');
$('input[name="table_data[]"]').off('change');
@ -764,23 +766,10 @@ function aliasSelectHandler(event) {
function createAliasModal(event) {
event.preventDefault();
var dlgButtons = {};
dlgButtons[PMA_messages.strResetAll] = function() {
$(this).find('input[type="text"]').val('');
};
dlgButtons[PMA_messages.strReset] = function() {
$(this).find('input[type="text"]:visible').val('');
};
dlgButtons[PMA_messages.strSaveAndClose] = function() {
$(this).dialog("close");
// do not fillup form submission with empty values
$.each($(this).find('input[type="text"]'), function (i, e) {
if ($(e).val().trim().length == 0) {
$(e).prop('disabled', true);
}
});
$('#alias_modal').parent().appendTo($('form[name="dump"]'));
};
$('#alias_modal').find('input[type="text"]').prop('disabled', false);
$('#alias_modal').dialog({
width: Math.min($(window).width() - 100, 700),
maxHeight: $(window).height(),
@ -789,24 +778,79 @@ function createAliasModal(event) {
buttons: dlgButtons,
create: function() {
$(this).css('maxHeight', $(window).height() - 150);
$('.alias-dialog .ui-dialog-titlebar-close').remove();
var db = PMA_commonParams.get('db');
if (db) {
var option = $('<option></option>');
option.text(db);
option.attr('value', db);
$('#db_alias_select').append(option).val(db).change();
} else {
var params = {
ajax_request : true,
token : PMA_commonParams.get('token'),
server : PMA_commonParams.get('server'),
type: 'list-databases'
};
$.post('ajax.php', params, function (response) {
if (response.success === true) {
$.each(response.databases, function (idx, value) {
var option = $('<option></option>');
option.text(value);
option.attr('value', value);
$('#db_alias_select').append(option);
});
} else {
PMA_ajaxShowMessage(response.error, false);
}
});
}
},
close: function() {
var isEmpty = true;
$(this).find('input[type="text"]').each(function() {
// trim input fields on close
$(this).val($(this).val().trim());
// check if non empty field present
// trim empty input fields on close
if ($(this).val()) {
isEmpty = false;
} else {
$(this).parents('tr').remove();
}
});
// Toggle checkbox based on aliases
$('input#btn_alias_config').prop('checked', !isEmpty);
},
position: { my: "center top", at: "center top", of: window }
});
// Call change event of .table_alias_select
$('.table_alias_select:visible').trigger('change');
}
function aliasToggleRow(elm) {
var inputs = elm.parents('tr').find('input,button');
if (elm.val()) {
inputs.attr('disabled', false);
} else {
inputs.attr('disabled', true);
}
}
function addAlias(type, name, field, value) {
if (value === '') {
return;
}
var row = $('#alias_data tfoot tr').clone();
row.find('th').text(type);
row.find('td:first').text(name);
row.find('input').attr('name', field);
row.find('input').val(value);
row.find('.alias_remove').on('click', function () {
$(this).parents('tr').remove();
});
var matching = $('#alias_data [name="' + $.escapeSelector(field) + '"]');
if (matching.length > 0) {
matching.parents('tr').remove();
}
$('#alias_data tbody').append(row);
}
AJAX.registerOnload('export.js', function () {
@ -846,18 +890,100 @@ AJAX.registerOnload('export.js', function () {
// Open Alias Modal Dialog on click
$('#btn_alias_config').on('click', createAliasModal);
// Database alias select on change event
$('#db_alias_select').on(
'change',
{sel: 'span', type: '_tables'},
aliasSelectHandler
);
// Table alias select on change event
$('.table_alias_select').on(
'change',
{sel: 'table', type: '_cols'},
aliasSelectHandler
);
$('.alias_remove').on('click', function () {
$(this).parents('tr').remove();
});
$('#db_alias_select').on('change', function () {
aliasToggleRow($(this));
var db = $(this).val();
var table = PMA_commonParams.get('table');
if (table) {
var option = $('<option></option>');
option.text(table);
option.attr('value', table);
$('#table_alias_select').append(option).val(table).change();
} else {
var params = {
ajax_request : true,
token : PMA_commonParams.get('token'),
server : PMA_commonParams.get('server'),
db : $(this).val(),
type: 'list-tables'
};
$.post('ajax.php', params, function (response) {
if (response.success === true) {
$.each(response.tables, function (idx, value) {
var option = $('<option></option>');
option.text(value);
option.attr('value', value);
$('#table_alias_select').append(option);
});
} else {
PMA_ajaxShowMessage(response.error, false);
}
});
}
});
$('#table_alias_select').on('change', function () {
aliasToggleRow($(this));
var params = {
ajax_request : true,
token : PMA_commonParams.get('token'),
server : PMA_commonParams.get('server'),
db : $('#db_alias_select').val(),
table: $(this).val(),
type: 'list-columns'
};
$.post('ajax.php', params, function (response) {
if (response.success === true) {
$.each(response.columns, function (idx, value) {
var option = $('<option></option>');
option.text(value);
option.attr('value', value);
$('#column_alias_select').append(option);
});
} else {
PMA_ajaxShowMessage(response.error, false);
}
});
});
$('#column_alias_select').on('change', function () {
aliasToggleRow($(this));
});
$('#db_alias_button').on('click', function (e) {
e.preventDefault();
var db = $('#db_alias_select').val();
addAlias(
PMA_messages.strAliasDatabase,
db,
'aliases[' + db + '][alias]',
$('#db_alias_name').val()
);
$('#db_alias_name').val('');
});
$('#table_alias_button').on('click', function (e) {
e.preventDefault();
var db = $('#db_alias_select').val();
var table = $('#table_alias_select').val();
addAlias(
PMA_messages.strAliasTable,
db + '.' + table,
'aliases[' + db + '][tables][' + table + '][alias]',
$('#table_alias_name').val()
);
$('#table_alias_name').val('');
});
$('#column_alias_button').on('click', function (e) {
e.preventDefault();
var db = $('#db_alias_select').val();
var table = $('#table_alias_select').val();
var column = $('#column_alias_select').val();
addAlias(
PMA_messages.strAliasColumn,
db + '.' + table + '.' + column,
'aliases[' + db + '][tables][' + table + '][colums][' + column + ']',
$('#column_alias_name').val()
);
$('#column_alias_name').val('');
});
});

View File

@ -295,6 +295,10 @@ $js_messages['strProfilingResults'] = __('Profiling results');
$js_messages['strTable'] = _pgettext('Display format', 'Table');
$js_messages['strChart'] = __('Chart');
$js_messages['strAliasDatabase'] = _pgettext('Alias', 'Database');
$js_messages['strAliasTable'] = _pgettext('Alias', 'Table');
$js_messages['strAliasColumn'] = _pgettext('Alias', 'Column');
/* l10n: A collection of available filters */
$js_messages['strFiltersForLogTable'] = __('Log table filter options');
/* l10n: Filter as in "Start Filtering" */

View File

@ -572,10 +572,8 @@ class Charsets
$suffixes[] = _pgettext('Collation variant', 'accent-sensitive');
break;
case 'w2':
$suffixes[] = _pgettext('Collation variant', 'weight=2');
break;
case 'l2':
$suffixes[] = _pgettext('Collation variant', 'level=2');
$suffixes[] = _pgettext('Collation variant', 'multi-level');
break;
case 'bin':
$suffixes[] = _pgettext('Collation variant', 'binary');

View File

@ -103,7 +103,7 @@ class Config
*/
public function checkSystem()
{
$this->set('PMA_VERSION', '4.7.1');
$this->set('PMA_VERSION', '4.7.2');
/**
* @deprecated
*/
@ -1137,7 +1137,7 @@ class Config
public function checkPermissions()
{
// Check for permissions (on platforms that support it):
if ($this->get('CheckConfigurationPermissions')) {
if ($this->get('CheckConfigurationPermissions') && @file_exists($this->getSource())) {
$perms = @fileperms($this->getSource());
if (!($perms === false) && ($perms & 2)) {
// This check is normally done after loading configuration

View File

@ -327,7 +327,7 @@ class DatabaseInterface
self::QUERY_STORE
);
if ($GLOBALS['cfg']['NaturalOrder']) {
uksort($tables, 'strnatcasecmp');
natsort($tables);
}
return $tables;
}

View File

@ -1562,7 +1562,7 @@ class DbQbe
if (empty($from_clause)) {
// Create cartesian product
$from_clause = implode(
", ", array_map(array('Util', 'backquote'), $search_tables)
", ", array_map(array('PMA\libraries\Util', 'backquote'), $search_tables)
);
}
@ -1668,7 +1668,7 @@ class DbQbe
if (count($unfinalized) > 0) {
// Add these tables as cartesian product before joined tables
$join .= implode(
', ', array_map(array('Util', 'backquote'), $unfinalized)
', ', array_map(array('PMA\libraries\Util', 'backquote'), $unfinalized)
);
}
}

View File

@ -2128,7 +2128,7 @@ class DisplayResults
// Incase this is the current column save $single_sort_order
if ($current_name == $name_to_use_in_sort) {
if (mb_strpos($current_name, '(') !== false) {
$single_sort_order = "\n" . 'ORDER BY ' . $current_name . ' ';
$single_sort_order = "\n" . 'ORDER BY ' . Util::backquote($current_name) . ' ';
} else {
$single_sort_order = "\n" . 'ORDER BY ' . $sort_tbl
. Util::backquote(

View File

@ -325,4 +325,20 @@ class Encoding
. '</label><br />'
. '</li></ul>';
}
}
public static function listEncodings()
{
if (is_null(self::$_engine)) {
self::initEngine();
}
/* Most engines do not support listing */
if (self::$_engine != self::ENGINE_MB) {
return $GLOBALS['cfg']['AvailableCharsets'];
}
return array_intersect(
array_map('strtolower', mb_list_encodings()),
$GLOBALS['cfg']['AvailableCharsets']
);
}
}

View File

@ -148,15 +148,9 @@ class Header
private function _addDefaultScripts()
{
// Localised strings
$params = array('lang' => $GLOBALS['lang']);
if (isset($GLOBALS['db'])) {
$params['db'] = $GLOBALS['db'];
}
$this->_scripts->addFile('jquery/jquery.min.js');
$this->_scripts->addFile('jquery/jquery-migrate-3.0.0.js');
$this->_scripts->addFile(
'whitelist.php' . URL::getCommon($params), false, true
);
$this->_scripts->addFile('whitelist.php');
$this->_scripts->addFile('sprintf.js');
$this->_scripts->addFile('ajax.js');
$this->_scripts->addFile('keyhandler.js');
@ -183,7 +177,7 @@ class Header
// Here would not be a good place to add CodeMirror because
// the user preferences have not been merged at this point
$this->_scripts->addFile('messages.php' . URL::getCommon($params));
$this->_scripts->addFile('messages.php');
// Append the theme id to this url to invalidate
// the cache on a theme change. Though this might be
// unavailable for fatal errors.
@ -192,9 +186,7 @@ class Header
} else {
$theme_id = 'default';
}
$this->_scripts->addFile(
'get_image.js.php?theme=' . $theme_id
);
$this->_scripts->addFile('get_image.js.php', false, array('theme' => $theme_id));
$this->_scripts->addFile('config.js');
$this->_scripts->addFile('doclinks.js');
$this->_scripts->addFile('functions.js');

View File

@ -48,9 +48,8 @@ class Scripts
$scripts = array();
$separator = URL::getArgSeparator();
foreach ($files as $value) {
if (mb_strpos($value['filename'], "?") !== false) {
$file_name = $value['filename'] . $separator
. Header::getVersionParameter();
if (mb_strpos($value['filename'], ".php") !== false) {
$file_name = $value['filename'] . URL::getCommon($value['params'] + array('v' => PMA_VERSION));
if ($value['before_statics'] === true) {
$first_dynamic_scripts
.= "<script data-cfasync='false' type='text/javascript' "
@ -108,7 +107,8 @@ class Scripts
*/
public function addFile(
$filename,
$before_statics = false
$before_statics = false,
$params = array()
) {
$hash = md5($filename);
if (!empty($this->_files[$hash])) {
@ -119,6 +119,7 @@ class Scripts
$this->_files[$hash] = array(
'has_onload' => $has_onload,
'filename' => $filename,
'params' => $params,
'before_statics' => $before_statics
);
}

View File

@ -367,8 +367,9 @@ class ThemeManager
$select_box = '';
if ($form) {
$select_box .= '<form name="setTheme" method="get"';
$select_box .= '<form name="setTheme" method="post"';
$select_box .= ' action="index.php" class="disableAjax">';
$select_box .= URL::getHiddenInputs();
}
$theme_preview_path= './themes.php';

View File

@ -23,6 +23,11 @@ class Tracker
*/
static protected $enabled = false;
/**
* Cache to avoid quering tracking status multiple times.
*/
static protected $_tracking_cache = array();
/**
* Actually enables tracking. This needs to be done after all
* underlaying code is initialized.
@ -111,6 +116,10 @@ class Tracker
if (! self::$enabled) {
return false;
}
if (isset(self::$_tracking_cache[$dbname][$tablename])) {
return self::$_tracking_cache[$dbname][$tablename];
}
/* We need to avoid attempt to track any queries
* from PMA_getRelationsParam
*/
@ -127,9 +136,11 @@ class Tracker
" AND table_name = '" . $GLOBALS['dbi']->escapeString($tablename) . "' " .
" ORDER BY version DESC LIMIT 1";
$result = $GLOBALS['dbi']->fetchValue($sql_query, 0, 0, $GLOBALS['controllink']);
$result = $GLOBALS['dbi']->fetchValue($sql_query, 0, 0, $GLOBALS['controllink']) == 1;
return ($result == 1);
self::$_tracking_cache[$dbname][$tablename] = $result;
return $result;
}
/**
@ -779,13 +790,16 @@ class Tracker
// If we found a valid statement
if (isset($result['identifier'])) {
if (! self::isTracked($dbname, $result['tablename'])) {
return;
}
$version = self::getVersion(
$dbname, $result['tablename'], $result['identifier']
);
// If version not exists and auto-creation is enabled
if ($GLOBALS['cfg']['Server']['tracking_version_auto_create'] == true
&& self::isTracked($dbname, $result['tablename']) == false
&& $version == -1
) {
// Create the version
@ -806,7 +820,7 @@ class Tracker
}
// If version exists
if (self::isTracked($dbname, $result['tablename']) && $version != -1) {
if ($version != -1) {
if ($result['type'] == 'DDL') {
$save_to = 'schema_sql';
} elseif ($result['type'] == 'DML') {

View File

@ -1017,15 +1017,14 @@ class Util
if (! empty($GLOBALS['show_as_php'])) {
$new_line = '\\n"<br />' . "\n" . '&nbsp;&nbsp;&nbsp;&nbsp;. "';
$query_base = '$sql = \'' . $query_base;
$query_base = '<code class="php"><pre>' . "\n"
. htmlspecialchars(addslashes($query_base));
$query_base = htmlspecialchars(addslashes($query_base));
$query_base = preg_replace(
'/((\015\012)|(\015)|(\012))/',
$new_line,
$query_base
);
$query_base = '$sql = \'' . $query_base . '"';
$query_base = '<code class="php"><pre>' . "\n"
. '$sql = "' . $query_base;
} elseif ($query_too_big) {
$query_base = htmlspecialchars($query_base);
} else {
@ -1169,7 +1168,7 @@ class Util
//Clean up the end of the PHP
if (! empty($GLOBALS['show_as_php'])) {
$retval .= '\';' . "\n"
$retval .= '";' . "\n"
. '</pre></code>';
}
$retval .= '</div>';
@ -1839,9 +1838,9 @@ class Util
}
// no whitespace within an <a> else Safari will make it part of the link
$ret = "\n" . '<a href="' . $url . '" '
$ret = '&nbsp;<a href="' . $url . '" '
. implode(' ', $tag_params_strings) . '>'
. $message . $displayed_message . '</a>' . "\n";
. $message . $displayed_message . '</a>&nbsp;';
} else {
// no spaces (line breaks) at all
// or after the hidden fields
@ -4744,7 +4743,7 @@ class Util
*
* @return mixed
*/
public static function httprequestcurl($url, $method, $return_only_status = false, $content = null, $header = "", $ssl = 0)
public static function httpRequestCurl($url, $method, $return_only_status = false, $content = null, $header = "", $ssl = 0)
{
$curl_handle = curl_init($url);
if ($curl_handle === false) {
@ -4788,7 +4787,7 @@ class Util
if ($ssl == CURLOPT_CAPATH) {
$curl_status &= curl_setopt($curl_handle, CURLOPT_CAPATH, $certs_dir);
} elseif ($ssl == CURLOPT_CAINFO) {
$curl_status &= curl_setopt($curl_handle, CURLOPT_CAINFO, $certs_dir . 'isrgrootx1.pem');
$curl_status &= curl_setopt($curl_handle, CURLOPT_CAINFO, $certs_dir . 'cacert.pem');
}
$curl_status &= curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER,true);

View File

@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
-----END CERTIFICATE-----

View File

@ -0,0 +1,20 @@
-----BEGIN CERTIFICATE-----
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
-----END CERTIFICATE-----

View File

@ -0,0 +1,16 @@
phpMyAdmin SSL certificates
===========================
This directory contains copy of root certificates used to sign phpmyadmin.net
and reports.phpmyadmin.net websites. It is used to allow operation on systems
where the certificates are missing or wrongly configured (happens on Windows
with wrongly compiled CURL).
Currently included SSL certificates:
* ISRG Root X1
* DST Root CA X3
See https://letsencrypt.org/certificates/ for more info on them.
In case of update, the filenames can be generated using c_rehash tool.

View File

@ -29,3 +29,23 @@ oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq
mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d
emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
MIIDSjCCAjKgAwIBAgIQRK+wgNajJ7qJMDmGLvhAazANBgkqhkiG9w0BAQUFADA/
MSQwIgYDVQQKExtEaWdpdGFsIFNpZ25hdHVyZSBUcnVzdCBDby4xFzAVBgNVBAMT
DkRTVCBSb290IENBIFgzMB4XDTAwMDkzMDIxMTIxOVoXDTIxMDkzMDE0MDExNVow
PzEkMCIGA1UEChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMRcwFQYDVQQD
Ew5EU1QgUm9vdCBDQSBYMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AN+v6ZdQCINXtMxiZfaQguzH0yxrMMpb7NnDfcdAwRgUi+DoM3ZJKuM/IUmTrE4O
rz5Iy2Xu/NMhD2XSKtkyj4zl93ewEnu1lcCJo6m67XMuegwGMoOifooUMM0RoOEq
OLl5CjH9UL2AZd+3UWODyOKIYepLYYHsUmu5ouJLGiifSKOeDNoJjj4XLh7dIN9b
xiqKqy69cK3FCxolkHRyxXtqqzTWMIn/5WgTe1QLyNau7Fqckh49ZLOMxt+/yUFw
7BZy1SbsOFU5Q9D8/RhcQPGX69Wam40dutolucbY38EVAjqr2m7xPi71XAicPNaD
aeQQmxkqtilX4+U9m5/wAl0CAwEAAaNCMEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNV
HQ8BAf8EBAMCAQYwHQYDVR0OBBYEFMSnsaR7LHH62+FLkHX/xBVghYkQMA0GCSqG
SIb3DQEBBQUAA4IBAQCjGiybFwBcqR7uKGY3Or+Dxz9LwwmglSBd49lZRNI+DT69
ikugdB/OEIKcdBodfpga3csTS7MgROSR6cz8faXbauX+5v3gTt23ADq1cEmv8uXr
AvHRAosZy5Q6XkjEGB5YGV8eAlrwDPGxrancWYaLbumR9YbK+rlmM6pZW87ipxZz
R8srzJmwN0jP41ZL9c8PDHIyh8bwRLtTcm1D9SZImlJnt1ir/md2cXjbDaJWFBM5
JDGFoqgCWjBH4d1QB7wCCZAA62RjYJsWvIjJEubSfZGL+T0yjWW06XyxV3bqxbYo
Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
-----END CERTIFICATE-----

View File

@ -375,7 +375,7 @@ $token_provided = false;
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (PMA_isValid($_POST['token'])) {
$token_provided = true;
$token_mismatch = ! hash_equals($_SESSION[' PMA_token '], $_POST['token']);
$token_mismatch = ! @hash_equals($_SESSION[' PMA_token '], $_POST['token']);
}
if ($token_mismatch) {
@ -460,8 +460,11 @@ $GLOBALS['PMA_Config']->checkErrors();
/**
* As we try to handle charsets by ourself, mbstring overloads just
* break it, see bug 1063821.
*
* We specifically use empty here as we are looking for anything else than
* empty value or 0.
*/
if (@extension_loaded('mbstring') && @ini_get('mbstring.func_overload') != '0') {
if (@extension_loaded('mbstring') && !empty(@ini_get('mbstring.func_overload'))) {
PMA_fatalError(
__(
'You have enabled mbstring.func_overload in your PHP '

View File

@ -308,7 +308,7 @@ class TableRelationController extends TableController
$columns[] = htmlspecialchars($column);
}
if ($GLOBALS['cfg']['NaturalOrder']) {
uksort($columns, 'strnatcasecmp');
natsort($columns);
}
$this->response->addJSON('columns', $columns);
@ -361,7 +361,7 @@ class TableRelationController extends TableController
}
}
if ($GLOBALS['cfg']['NaturalOrder']) {
uksort($tables, 'strnatcasecmp');
natsort($tables);
}
$this->response->addJSON('tables', $tables);
}

View File

@ -222,17 +222,18 @@ function PMA_fatalError($error_message, $message_args = null) {
}
/*
* Avoid using Response if Config is not yet loaded
* Avoid using Response class as config does not have to be loaded yet
* (this can happen on early fatal error)
*/
if (isset($GLOBALS['Config'])) {
$response = Response::getInstance();
} else {
$response = null;
}
if (! is_null($response) && $response->isAjax()) {
$response->setRequestStatus(false);
$response->addJSON('message', PMA\libraries\Message::error($error_message));
if (! empty($_REQUEST['ajax_request'])) {
// Generate JSON manually
PMA_headerJSON();
echo json_encode(
array(
'success' => false,
'error' => Message::error($error_message)->getDisplay(),
)
);
} else {
$error_message = strtr($error_message, array('<br />' => '[br]'));

View File

@ -11,6 +11,7 @@ use PMA\libraries\Message;
use PMA\libraries\plugins\ExportPlugin;
use PMA\libraries\Response;
use PMA\libraries\Table;
use PMA\libraries\Template;
use PMA\libraries\URL;
/**
@ -638,7 +639,7 @@ function PMA_getHtmlForExportOptionsOutputCharset()
$html = ' <li><label for="select_charset" class="desc">'
. __('Character set of the file:') . '</label>' . "\n";
$html .= '<select id="select_charset" name="charset" size="1">';
foreach ($cfg['AvailableCharsets'] as $temp_charset) {
foreach (Encoding::listEncodings() as $temp_charset) {
$html .= '<option value="' . $temp_charset . '"';
if (isset($_GET['charset'])
&& ($_GET['charset'] != $temp_charset)
@ -877,25 +878,76 @@ function PMA_getHtmlForExportOptions(
$html .= PMA_getHtmlForExportOptionsQuickExport();
}
$html .= PMA_getHtmlForAliasModalDialog($db, $table);
$html .= PMA_getHtmlForAliasModalDialog();
$html .= PMA_getHtmlForExportOptionsOutput($export_type);
$html .= PMA_getHtmlForExportOptionsFormat($export_list);
return $html;
}
/**
* Prints Html For Alias Modal Dialog
*
* @param String $db Selected DB
* @param String $table Selected Table
* Generate Html For currently defined aliases
*
* @return string
*/
function PMA_getHtmlForAliasModalDialog($db = '', $table = '')
function PMA_getHtmlForCurrentAlias()
{
$result = '<table id="alias_data"><thead><tr><th colspan="4">'
. __('Defined aliases')
. '</th></tr></thead><tbody>';
$template = Template::get('export/alias_item');
if (isset($_SESSION['tmpval']['aliases'])) {
$aliases = $_SESSION['tmpval']['aliases'];
foreach ($_SESSION['tmpval']['aliases'] as $db => $db_data) {
if (isset($db_data['alias'])) {
$result .= $template->render(array(
'type' => _pgettext('Alias', 'Database'),
'name' => $db,
'field' => 'aliases[' . $db . '][alias]',
'value' => $db_data['alias'],
));
}
if (! isset($db_data['tables'])) {
continue;
}
foreach ($db_data['tables'] as $table => $table_data) {
if (isset($table_data['alias'])) {
$result .= $template->render(array(
'type' => _pgettext('Alias', 'Table'),
'name' => $db . '.' . $table,
'field' => 'aliases[' . $db . '][tables][' . $table . '][alias]',
'value' => $table_data['alias'],
));
}
if (! isset($table_data['columns'])) {
continue;
}
foreach ($table_data['columns'] as $column => $column_name) {
$result .= $template->render(array(
'type' => _pgettext('Alias', 'Column'),
'name' => $db . '.' . $table . '.'. $column,
'field' => 'aliases[' . $db . '][tables][' . $table . '][colums][' . $column . ']',
'value' => $column_name,
));
}
}
}
}
// Empty row for javascript manipulations
$result .= '</tbody><tfoot class="hide">' . $template->render(array(
'type' => '', 'name' => '', 'field' => 'aliases_new', 'value' => ''
)) . '</tfoot>';
return $result . '</table>';
}
/**
* Generate Html For Alias Modal Dialog
*
* @return string
*/
function PMA_getHtmlForAliasModalDialog()
{
// In case of server export, the following list of
// databases are not shown in the list.
$dbs_not_allowed = array(
@ -906,114 +958,10 @@ function PMA_getHtmlForAliasModalDialog($db = '', $table = '')
// Fetch Columns info
// Server export does not have db set.
$title = __('Rename exported databases/tables/columns');
if (empty($db)) {
$databases = $GLOBALS['dbi']->getColumnsFull(
null, null, null, $GLOBALS['userlink']
);
foreach ($dbs_not_allowed as $db) {
unset($databases[$db]);
}
// Database export does not have table set.
} elseif (empty($table)) {
$tables = $GLOBALS['dbi']->getColumnsFull(
$db, null, null, $GLOBALS['userlink']
);
$databases = array($db => $tables);
// Table export
} else {
$columns = $GLOBALS['dbi']->getColumnsFull(
$db, $table, null, $GLOBALS['userlink']