From c367f93aa8655f9a4be9874f74f7ff8a306f810f Mon Sep 17 00:00:00 2001 From: Deven Bansod Date: Thu, 20 Oct 2016 14:13:00 +0530 Subject: [PATCH 1/2] Allow for all MySQL values of TIME data type We show slider only for occasionally used times from 00:00:00 to 23:59:59, but allow for other times when entered by inputting directly in the textbox. Fix #12637 Signed-off-by: Deven Bansod --- js/functions.js | 7 +++++++ js/messages.php | 6 ++++++ js/tbl_change.js | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/js/functions.js b/js/functions.js index a6587bbad1..7285d2c054 100644 --- a/js/functions.js +++ b/js/functions.js @@ -152,6 +152,8 @@ function PMA_addDatepicker($this_element, type, options) } else if (type == "time") { $this_element.timepicker($.extend(defaultOptions, options)); + // Add a tip regarding entering MySQL allowed-values for TIME data-type + PMA_tooltip($this_element, 'input', PMA_messages.strMysqlAllowedValuesTip); } } @@ -185,6 +187,11 @@ function addDateTimePicker() { showMicrosec: showMicrosec, timeFormat: timeFormat }); + + // Add a tip regarding entering MySQL allowed-values for TIME data-type + if ($(this).hasClass('timefield')) { + PMA_tooltip($(this), 'input', PMA_messages.strMysqlAllowedValuesTip); + } }); } } diff --git a/js/messages.php b/js/messages.php index c79629dd1c..ce8fac8297 100644 --- a/js/messages.php +++ b/js/messages.php @@ -517,6 +517,12 @@ $js_messages['strYes'] = __('Yes'); $js_messages['strCopyEncryptionKey'] = __('Do you want to copy encryption key?'); $js_messages['strEncryptionKey'] = __('Encryption key'); +/* For Tip to be shown on Time field */ +$js_messages['strMysqlAllowedValuesTip'] = __( + 'MySQL accepts additional values not selectable by the slider;' + . ' key in those values directly if desired' +); + /* For Lock symbol Tooltip */ $js_messages['strLockToolTip'] = __( 'Indicates that you have made changes to this page;' diff --git a/js/tbl_change.js b/js/tbl_change.js index 5c0b9c9de6..30e7964522 100644 --- a/js/tbl_change.js +++ b/js/tbl_change.js @@ -143,7 +143,7 @@ function isTime(val) } } val = arrayVal.join(":"); - var tmexp = new RegExp(/^(([0-1][0-9])|(2[0-3])):((0[0-9])|([1-5][0-9])):((0[0-9])|([1-5][0-9]))(\.[0-9]{1,6}){0,1}$/); + var tmexp = new RegExp(/^(-)?(([0-7]?[0-9][0-9])|(8[0-2][0-9])|(83[0-8])):((0[0-9])|([1-5][0-9])):((0[0-9])|([1-5][0-9]))(\.[0-9]{1,6}){0,1}$/); return tmexp.test(val); } From cefb072fea955b56e492c55fec673460e01cc21a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Tue, 25 Oct 2016 10:25:14 +0200 Subject: [PATCH 2/2] Changelog entry for #12654 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michal Čihař --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index ad8f99b965..4a69d4a9ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -72,6 +72,7 @@ phpMyAdmin - ChangeLog - issue #12454 Query history not updated in console until page refresh - issue #12344 Fixed parsing of labels in loop - issue #12228 Fixed parsing of BEGIN labels +- issue #12637 Fixed editing some timestamp values 4.6.4 (2016-08-16) - issue [security] Weaknesses with cookie encryption, see PMASA-2016-29