Skip to content

Commit e56633e

Browse files
committed
Merge branch 'QA_5_2'
Signed-off-by: William Desportes <williamdes@wdes.fr>
2 parents b62062b + 663e7a0 commit e56633e

11 files changed

Lines changed: 55 additions & 23 deletions

File tree

ChangeLog

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ phpMyAdmin - ChangeLog
6060
- issue #16042 Exported gzip file of database has first ~73 kB uncompressed and rest is gzip compressed in Firefox
6161
- issue #17705 Fix inline SQL query edit FK checkbox preventing submit buttons from working
6262
- issue #17777 Fix Uncaught TypeError: Cannot read properties of null (reading 'inline') on datepickers when re-opened
63+
- issue Fix Original theme buttons style and login form width
6364

6465
5.2.0 (2022-05-10)
6566
- issue #16521 Upgrade Bootstrap to version 5

js/src/modules/console.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ var ConsoleInput = {
517517
if (ConsoleInput.codeMirror) {
518518
// eslint-disable-next-line new-cap
519519
ConsoleInput.inputs.console = CodeMirror($('#pma_console').find('.console_query_input')[0], {
520+
// style: cm-s-pma
520521
theme: 'pma',
521522
mode: 'text/x-sql',
522523
lineWrapping: true,
@@ -535,6 +536,7 @@ var ConsoleInput = {
535536
if ($('#pma_bookmarks').length !== 0) {
536537
// eslint-disable-next-line new-cap
537538
ConsoleInput.inputs.bookmark = CodeMirror($('#pma_console').find('.bookmark_add_input')[0], {
539+
// style: cm-s-pma
538540
theme: 'pma',
539541
mode: 'text/x-sql',
540542
lineWrapping: true,

libraries/classes/Controllers/Import/ImportController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,9 @@ public function __invoke(ServerRequest $request): void
140140
// apply values for parameters
141141
if (! empty($_POST['parameterized']) && ! empty($_POST['parameters']) && is_array($_POST['parameters'])) {
142142
$parameters = $_POST['parameters'];
143-
foreach ($parameters as $parameter => $replacement) {
144-
$replacementValue = $this->dbi->escapeString($replacement);
143+
foreach ($parameters as $parameter => $replacementValue) {
145144
if (! is_numeric($replacementValue)) {
146-
$replacementValue = '\'' . $replacementValue . '\'';
145+
$replacementValue = '\'' . $this->dbi->escapeString($replacementValue) . '\'';
147146
}
148147

149148
$quoted = preg_quote($parameter, '/');

libraries/classes/Plugins/Export/ExportSql.php

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2349,23 +2349,20 @@ public function exportData(
23492349
}
23502350
} elseif ($metaInfo->isMappedTypeBit) {
23512351
// detection of 'bit' works only on mysqli extension
2352-
$values[] = "b'" . $GLOBALS['dbi']->escapeString(
2353-
Util::printableBitValue(
2354-
(int) $row[$j],
2355-
$metaInfo->length
2356-
)
2357-
)
2358-
. "'";
2352+
$values[] = "b'" . Util::printableBitValue(
2353+
(int) $row[$j],
2354+
$metaInfo->length
2355+
) . "'";
23592356
} elseif ($metaInfo->isMappedTypeGeometry) {
23602357
// export GIS types as hex
23612358
$values[] = '0x' . bin2hex($row[$j]);
23622359
} elseif (! empty($GLOBALS['exporting_metadata']) && $row[$j] === '@LAST_PAGE') {
23632360
$values[] = '@LAST_PAGE';
2361+
} elseif ($row[$j] === '') {
2362+
$values[] = "''";
23642363
} else {
23652364
// something else -> treat as a string
2366-
$values[] = '\''
2367-
. $GLOBALS['dbi']->escapeString($row[$j])
2368-
. '\'';
2365+
$values[] = '\'' . $GLOBALS['dbi']->escapeString($row[$j]) . '\'';
23692366
}
23702367
}
23712368

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"autoprefixer": "^10.4.7",
2020
"babel-loader": "^8.2.3",
2121
"bootstrap": "5.2.0",
22-
"codemirror": "5.65.3",
22+
"codemirror": "5.65.9",
2323
"copy-webpack-plugin": "^10.2.4",
2424
"css-loader": "^6.6.0",
2525
"jquery": "3.6.0",

themes/bootstrap/scss/_codemirror.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ $textarea-rows: 15;
77
border: $card-border-width solid $card-border-color;
88

99
@include border-radius($card-border-radius);
10+
}
1011

12+
// Code mirror default style (do not affect the console style)
13+
.CodeMirror.cm-s-default {
1114
// @see: issue #17705
1215
div.CodeMirror-scroll {
1316
margin-right: 0;
1417
padding-bottom: 0;
15-
overflow: hidden !important;
1618
}
1719
}
1820

themes/metro/scss/_codemirror.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ $textarea-rows: 15 !default;
88
height: 20rem;
99
border: 1px solid #ccc;
1010
direction: ltr;
11+
}
1112

13+
// Code mirror default style (do not affect the console style)
14+
.CodeMirror.cm-s-default {
1215
// @see: issue #17705
1316
div.CodeMirror-scroll {
1417
margin-right: 0;
1518
padding-bottom: 0;
16-
overflow: hidden !important;
1719
}
1820
}
1921

themes/original/scss/_common.scss

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,6 @@ div#modalOverlay {
436436
}
437437

438438
#login_form label {
439-
width: 10em;
440439
font-weight: bolder;
441440
}
442441

@@ -1788,9 +1787,32 @@ input#auto_increment_opt {
17881787
}
17891788
}
17901789

1791-
input.btn {
1790+
input.btn,
1791+
button.btn {
1792+
border-color: $btn-border-color;
17921793
color: #333;
17931794
background-color: #d0dce0;
1795+
1796+
&:hover,
1797+
&:focus,
1798+
&:active {
1799+
background-color: #8b9aa0;
1800+
border-color: $btn-border-color;
1801+
}
1802+
}
1803+
1804+
button.jsPrintButton {
1805+
background-color: unset;
1806+
border-color: unset;
1807+
border: unset;
1808+
1809+
&:hover,
1810+
&:focus,
1811+
&:active {
1812+
background-color: unset;
1813+
border-color: unset;
1814+
border: unset;
1815+
}
17941816
}
17951817

17961818
body .ui-widget {

themes/original/scss/_variables.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ $bg-two: #d5d5d5;
5555

5656
$body-bg: #f5f5f5;
5757
$body-color: $main-color;
58+
$primary: $navi-pointer-background;
5859

5960
// Links
6061

@@ -63,6 +64,10 @@ $link-decoration: none;
6364
$link-hover-color: #f00;
6465
$link-hover-decoration: underline;
6566

67+
// Buttons
68+
69+
$btn-border-color: black;
70+
6671
// Components
6772

6873
$border-radius: 0;

themes/pmahomme/scss/_codemirror.scss

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ $textarea-rows: 15;
44
.CodeMirror {
55
height: 20rem;
66
direction: ltr;
7+
}
78

9+
// Code mirror default style (do not affect the console style)
10+
.CodeMirror.cm-s-default {
811
// @see: issue #17705
912
div.CodeMirror-scroll {
1013
margin-right: 0;
1114
padding-bottom: 0;
12-
overflow: hidden !important;
1315
}
1416
}
1517

0 commit comments

Comments
 (0)