]> git.joonet.de Git - adminer.git/commitdiff
Missing variable (thanks to juzna)
authorJakub Vrana <jakub@vrana.cz>
Fri, 22 Jul 2011 11:41:05 +0000 (13:41 +0200)
committerJakub Vrana <jakub@vrana.cz>
Fri, 22 Jul 2011 11:41:05 +0000 (13:41 +0200)
plugins/edit-calendar.php

index bb1d69e46781a139a889ee3685473b13b689f71a..68d302122d04964a1c430a1dd655a9ff126303b0 100644 (file)
@@ -36,7 +36,7 @@ class AdminerEditCalendar {
                if (ereg("date|time", $field["type"])) {
                        $dateFormat = "changeYear: true, dateFormat: 'yy-mm-dd'"; //! yy-mm-dd regional
                        $timeFormat = "showSecond: true, timeFormat: 'hh:mm:ss'";
-                       return "<input id='fields-" . h($field["field"]) . "' value='" . h($value) . "'" . ($maxlength ? " maxlength='$maxlength'" : "") . "$attrs><script type='text/javascript'>jQuery(function () { jQuery('#fields-" . js_escape($field["field"]) . "')."
+                       return "<input id='fields-" . h($field["field"]) . "' value='" . h($value) . "'" . (+$field["length"] ? " maxlength='" . (+$field["length"]) . "'" : "") . "$attrs><script type='text/javascript'>jQuery(function () { jQuery('#fields-" . js_escape($field["field"]) . "')."
                                . ($field["type"] == "time" ? "timepicker({ $timeFormat })"
                                : (ereg("time", $field["type"]) ? "datetimepicker({ $dateFormat, $timeFormat })"
                                : "datepicker({ $dateFormat })"