Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Leshchenko <me@gramotei.net>2012-10-11 21:37:47 +0400
committerSergey Leshchenko <me@gramotei.net>2012-10-11 21:37:47 +0400
commitb4386b0e48d83faf064cde9c8cb253426178c1d6 (patch)
tree7a9dce251ffd016642d51bcfd04147c2d888cff0 /js/tbl_select.js
parent8aa158c656321338059befd7259a2704be2148d8 (diff)
Fixes bug #3575799
Unary operators doesn't work without criteria values
Diffstat (limited to 'js/tbl_select.js')
-rw-r--r--js/tbl_select.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/js/tbl_select.js b/js/tbl_select.js
index f04b4e3553..ec274dc5aa 100644
--- a/js/tbl_select.js
+++ b/js/tbl_select.js
@@ -42,6 +42,12 @@ $(function() {
* (see $GLOBALS['cfg']['AjaxEnable'])
*/
$("#tbl_search_form.ajax").live('submit', function(event) {
+ var unaryFunctions = [
+ 'IS NULL',
+ 'IS NOT NULL',
+ "= ''",
+ "!= ''"];
+
// jQuery object to reuse
$search_form = $(this);
event.preventDefault();
@@ -64,8 +70,12 @@ $(function() {
}
});
var columnCount = $('select[name="columnsToDisplay[]"] option').length;
- // Submit values only for the columns that have a search criteria
+ // Submit values only for the columns that have unary column operator or a search criteria
for (var a = 0; a < columnCount; a++) {
+ if ($.inArray(values['criteriaColumnOperators[' + a + ']'], unaryFunctions) >= 0) {
+ continue;
+ }
+
if (values['criteriaValues[' + a + ']'] == '') {
delete values['criteriaValues[' + a + ']'];
delete values['criteriaColumnOperators[' + a + ']'];