Skip to content

Commit

Permalink
Fix undefined max_input_vars.
Browse files Browse the repository at this point in the history
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
  • Loading branch information
Tithugues committed Apr 5, 2014
1 parent eac47b0 commit 9632ea4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion js/functions.js
Expand Up @@ -4117,6 +4117,9 @@ function checkNumberOfFields() {
if (typeof maxInputVars === 'undefined') {
return false;
}
if (false === maxInputVars) {
return false;
}
$('form').each(function() {
var nbInputs = $(this).find(':input').length;
if (nbInputs > maxInputVars) {
Expand All @@ -4128,4 +4131,4 @@ function checkNumberOfFields() {
});

return true;
}
}
4 changes: 3 additions & 1 deletion js/messages.php
Expand Up @@ -424,7 +424,9 @@
echo "var mysql_doc_template = '" . PMA_Util::getMySQLDocuURL('%s') . "';\n";

//Max input vars allowed by PHP.
echo 'var maxInputVars = ' . ini_get('max_input_vars') . ';';
$maxInputVars = ini_get('max_input_vars');
echo 'var maxInputVars = ' . (false === $maxInputVars ? 'false' : $maxInputVars)
. ';';

echo "if ($.datepicker) {\n";
/* l10n: Display text for calendar close link */
Expand Down

0 comments on commit 9632ea4

Please sign in to comment.