]> git.joonet.de Git - adminer.git/commitdiff
Time format hint (Editor)
authorJakub Vrana <jakub@vrana.cz>
Fri, 18 Mar 2011 13:29:36 +0000 (14:29 +0100)
committerJakub Vrana <jakub@vrana.cz>
Fri, 18 Mar 2011 13:29:36 +0000 (14:29 +0100)
adminer/lang/cs.inc.php
changes.txt
editor/include/adminer.inc.php

index ffdf20cbd32a787212d97cb7d492fcc5d99902e9..62ecfb5902bf7940e968ffcb4f18479d2e46cf44 100644 (file)
@@ -281,6 +281,8 @@ $translations = array(
        '$1-$3-$5' => '$6.$4.$1',
        // hint for date format - use language equivalents for day, month and year shortcuts
        '[yyyy]-mm-dd' => 'd.m.[rrrr]',
+       // hint for time format - use language equivalents for hour, minute and second shortcuts
+       'HH:MM:SS' => 'HH:MM:SS',
        'now' => 'teď',
        
        // general SQLite error in create, drop or rename database
index 801b45119fca05822e93406024fd0c610573078f..3b39e6a30d5de0062bbc51bf6928c5bdadad3a9a 100644 (file)
@@ -12,6 +12,7 @@ Set MySQL time zone by PHP setting
 Disable maxlength with functions in edit
 Better placement of AJAX icon
 Table header in CSV export (Editor)
+Time format hint (Editor)
 Polish translation
 
 Adminer 3.2.0 (released 2011-02-24):
index 775725c6196a95e99e0936e576aba131bd885a6a..39c7d0394abf2a19de5caf888578d88f571f1ea1 100644 (file)
@@ -420,8 +420,15 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
                if (ereg("(tinyint|bit)\\(1\\)", $field["full_type"])) { // bool
                        return '<input type="checkbox" value="' . h($value ? $value : 1) . '"' . ($value ? ' checked' : '') . "$attrs>";
                }
+               $hint = "";
+               if (ereg('time', $field["type"])) {
+                       $hint = lang('HH:MM:SS');
+               }
                if (ereg('date|timestamp', $field["type"])) {
-                       return "<input value='" . h($value) . "'$attrs> (" . lang('[yyyy]-mm-dd') . ")"; //! maxlength
+                       $hint = lang('[yyyy]-mm-dd') . ($hint ? " [$hint]" : "");
+               }
+               if ($hint) {
+                       return "<input value='" . h($value) . "'$attrs> ($hint)"; //! maxlength
                }
                if (eregi('_(md5|sha1)$', $field["field"])) {
                        return "<input type='password' value='" . h($value) . "'$attrs>";