Merge branch 'QA_5_2'
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
commit
79d447be16
@ -57,6 +57,7 @@ phpMyAdmin - ChangeLog
|
||||
- issue #17553 Fix Metro theme unreadable links above navigation tree
|
||||
- issue #17553 Metro theme UI fixes and improvements
|
||||
- issue #17553 Fix Metro theme login form with
|
||||
- issue #16042 Exported gzip file of database has first ~73 kB uncompressed and rest is gzip compressed in Firefox
|
||||
|
||||
5.2.0 (2022-05-10)
|
||||
- issue #16521 Upgrade Bootstrap to version 5
|
||||
|
||||
@ -2978,6 +2978,9 @@ Functions.onloadEnumSetEditor = function () {
|
||||
}
|
||||
var buttonOptions = {};
|
||||
var $centralColumnsDialog = $(centralColumnsDialog).dialog({
|
||||
classes: {
|
||||
'ui-dialog-titlebar-close': 'btn-close'
|
||||
},
|
||||
minWidth: width,
|
||||
maxHeight: 450,
|
||||
modal: true,
|
||||
|
||||
@ -42,7 +42,6 @@ use function preg_match;
|
||||
use function preg_replace;
|
||||
use function session_write_close;
|
||||
use function sprintf;
|
||||
use function str_contains;
|
||||
use function str_replace;
|
||||
use function strlen;
|
||||
use function strpos;
|
||||
@ -467,24 +466,10 @@ class Core
|
||||
|
||||
$headers['Content-Type'] = $mimetype;
|
||||
|
||||
/** @var string $browserAgent */
|
||||
$browserAgent = $GLOBALS['config']->get('PMA_USR_BROWSER_AGENT');
|
||||
|
||||
// inform the server that compression has been done,
|
||||
// to avoid a double compression (for example with Apache + mod_deflate)
|
||||
if (str_contains($mimetype, 'gzip')) {
|
||||
/**
|
||||
* @see https://github.com/phpmyadmin/phpmyadmin/issues/11283
|
||||
*/
|
||||
if ($browserAgent !== 'CHROME') {
|
||||
$headers['Content-Encoding'] = 'gzip';
|
||||
}
|
||||
} else {
|
||||
// The default output in PMA uses gzip,
|
||||
// so if we want to output uncompressed file, we should reset the encoding.
|
||||
// See PHP bug https://github.com/php/php-src/issues/8218
|
||||
header_remove('Content-Encoding');
|
||||
}
|
||||
// The default output in PMA uses gzip,
|
||||
// so if we want to output uncompressed file, we should reset the encoding.
|
||||
// See PHP bug https://github.com/php/php-src/issues/8218
|
||||
header_remove('Content-Encoding');
|
||||
|
||||
$headers['Content-Transfer-Encoding'] = 'binary';
|
||||
|
||||
|
||||
@ -1036,7 +1036,7 @@ class CoreTest extends AbstractNetworkTestCase
|
||||
$this->assertContains('Content-Description: File Transfer', $headersList);
|
||||
$this->assertContains('Content-Disposition: attachment; filename="test.sql.gz"', $headersList);
|
||||
$this->assertContains('Content-Type: application/x-gzip', $headersList);
|
||||
$this->assertContains('Content-Encoding: gzip', $headersList);
|
||||
$this->assertNotContains('Content-Encoding: gzip', $headersList);
|
||||
$this->assertContains('Content-Transfer-Encoding: binary', $headersList);
|
||||
$this->assertNotContains('Content-Length: 0', $headersList);
|
||||
}
|
||||
|
||||
@ -362,6 +362,34 @@ class SqlTest extends AbstractTestCase
|
||||
// result
|
||||
// just browsing
|
||||
return [
|
||||
'join on SELECT results with *' => [
|
||||
// -- Showing rows 0 - 49 (164056 total, 0 in query, Query took 0.1498 seconds.)
|
||||
'select * from game_auth_logs l join ('
|
||||
. ' select al.user_id, max(al.id) as id from game_auth_logs al '
|
||||
. 'where al.successfull = 1 group by al.user_id ) last_log on last_log.id = l.id;',
|
||||
['max_rows' => 50, 'pos' => 0],
|
||||
164056,
|
||||
50,
|
||||
false,
|
||||
'SELECT COUNT(*) FROM (select * from game_auth_logs l join ('
|
||||
. ' select al.user_id, max(al.id) as id from game_auth_logs al '
|
||||
. 'where al.successfull = 1 group by al.user_id ) last_log on last_log.id = l.id'
|
||||
. ' ) as cnt',
|
||||
],
|
||||
'join on SELECT results with alias.*' => [
|
||||
// -- Showing rows 0 - 24 (267 total, Query took 0.1533 seconds.)
|
||||
'select l.* from game_auth_logs l join ('
|
||||
. ' select al.user_id, max(al.id) as id from game_auth_logs al '
|
||||
. 'where al.successfull = 1 group by al.user_id ) last_log on last_log.id = l.id;',
|
||||
['max_rows' => 50, 'pos' => 0],
|
||||
267,
|
||||
50,
|
||||
false,
|
||||
'SELECT COUNT(*) FROM (select l.* from game_auth_logs l join ('
|
||||
. ' select al.user_id, max(al.id) as id from game_auth_logs al '
|
||||
. 'where al.successfull = 1 group by al.user_id ) last_log on last_log.id = l.id'
|
||||
. ' ) as cnt',
|
||||
],
|
||||
[
|
||||
'SELECT * FROM company_users WHERE id != 0 LIMIT 0, 10',
|
||||
['max_rows' => 250],
|
||||
@ -546,7 +574,8 @@ class SqlTest extends AbstractTestCase
|
||||
array $sessionTmpVal,
|
||||
int $numRows,
|
||||
int $expectedNumRows,
|
||||
bool $justBrowsing = false
|
||||
bool $justBrowsing = false,
|
||||
?string $expectedCountQuery = null
|
||||
): void {
|
||||
if ($justBrowsing) {
|
||||
$GLOBALS['cfg']['Server']['DisableIS'] = true;
|
||||
@ -554,6 +583,15 @@ class SqlTest extends AbstractTestCase
|
||||
|
||||
$_SESSION['tmpval'] = $sessionTmpVal;
|
||||
|
||||
if ($expectedCountQuery !== null) {
|
||||
$this->dummyDbi->addResult(
|
||||
$expectedCountQuery,
|
||||
[[$expectedNumRows]],
|
||||
[],
|
||||
[]
|
||||
);
|
||||
}
|
||||
|
||||
$result = $this->callFunction(
|
||||
$this->sql,
|
||||
Sql::class,
|
||||
@ -567,6 +605,7 @@ class SqlTest extends AbstractTestCase
|
||||
]
|
||||
);
|
||||
$this->assertSame($expectedNumRows, $result);
|
||||
$this->dummyDbi->assertAllQueriesConsumed();
|
||||
}
|
||||
|
||||
public function testExecuteQueryAndSendQueryResponse(): void
|
||||
|
||||
Loading…
Reference in New Issue
Block a user