Fix undefined max_input_vars.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
This commit is contained in:
Hugues Peccatte 2014-04-05 21:21:38 +02:00
parent eac47b0775
commit 9632ea441b
2 changed files with 7 additions and 2 deletions

View File

@ -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) {
@ -4128,4 +4131,4 @@ function checkNumberOfFields() {
});
return true;
}
}

View File

@ -424,7 +424,9 @@ echo "var pmaversion = '" . PMA_VERSION . "';\n";
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 */