diff --git a/adminer/lang/cs.inc.php b/adminer/lang/cs.inc.php index fce0cb56..6760815b 100644 --- a/adminer/lang/cs.inc.php +++ b/adminer/lang/cs.inc.php @@ -204,7 +204,7 @@ $translations = array( '(anywhere)' => '(kdekoliv)', '%.3f s' => '%.3f s', '$1-$3-$5' => '$6.$4.$1', - 'yyyy-mm-dd' => 'd.m.yyyy', + '[yyyy]-mm-dd' => 'd.m.[rrrr]', 'History' => 'Historie', 'Variables' => 'Proměnné', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Zdrojové a cílové sloupce musí mít stejný datový typ, nad cílovými sloupci musí být definován index a odkazovaná data musí existovat.', diff --git a/adminer/lang/de.inc.php b/adminer/lang/de.inc.php index 3504bdc6..2ea05782 100644 --- a/adminer/lang/de.inc.php +++ b/adminer/lang/de.inc.php @@ -204,7 +204,7 @@ $translations = array( 'Select table' => 'Tabelle auswählen', '%.3f s' => '%.3f s', '$1-$3-$5' => '$6.$4.$1', - 'yyyy-mm-dd' => 'd.m.yyyy', + '[yyyy]-mm-dd' => 't.m.[jjjj]', 'History' => 'History', 'Variables' => 'Variablen', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Spalten des Ursprungs und des Zieles müssen vom gleichen Datentyp sein, es muss unter den Zielspalten ein Index existieren und die referenzierten Daten müssen existieren.', diff --git a/adminer/lang/es.inc.php b/adminer/lang/es.inc.php index 6e83356e..ec83bcd6 100644 --- a/adminer/lang/es.inc.php +++ b/adminer/lang/es.inc.php @@ -204,7 +204,7 @@ $translations = array( 'Select table' => 'Seleccionar tabla', '%.3f s' => '%.3f s', '$1-$3-$5' => '$5/$3/$1', - 'yyyy-mm-dd' => 'dd/mm/yyyy', + '[yyyy]-mm-dd' => 'dd/mm/[aaaa]', 'History' => 'History', 'Variables' => 'Variables', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Las columnas de origen y destino deben ser del mismo tipo, debe existir un índice entre las columnas del destino y el registro referenciado debe existir.', diff --git a/adminer/lang/et.inc.php b/adminer/lang/et.inc.php index 81cb0f60..00e7e097 100644 --- a/adminer/lang/et.inc.php +++ b/adminer/lang/et.inc.php @@ -204,7 +204,7 @@ $translations = array( 'Select table' => 'Vali tabel', '%.3f s' => '%.3f s', '$1-$3-$5' => '$6.$4.$1', - 'yyyy-mm-dd' => 'd.m.yyyy', + '[yyyy]-mm-dd' => 'd.m.[yyyy]', 'History' => 'Ajalugu', 'Variables' => 'Muutujad', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Lähte- ja sihtveerud peavad eksisteerima ja omama sama andmetüüpi, sihtveergudel peab olema määratud indeks ning viidatud andmed peavad eksisteerima.', diff --git a/adminer/lang/fr.inc.php b/adminer/lang/fr.inc.php index 73cdcb54..a5c68460 100644 --- a/adminer/lang/fr.inc.php +++ b/adminer/lang/fr.inc.php @@ -204,7 +204,7 @@ $translations = array( 'Select table' => 'Selectionner la table', '%.3f s' => '%.3f s', '$1-$3-$5' => '$5/$3/$1', - 'yyyy-mm-dd' => 'dd/mm/yyyy', + '[yyyy]-mm-dd' => 'jj/mm/[aaaa]', 'History' => 'Historique', 'Variables' => 'Variables', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Les colonnes selectionnées et les colonnes de destination doivent être du même type, il doit y avoir un index sur les colonnes de destination et les données de référence doivent exister.', diff --git a/adminer/lang/it.inc.php b/adminer/lang/it.inc.php index 05b1d548..2788f3cb 100644 --- a/adminer/lang/it.inc.php +++ b/adminer/lang/it.inc.php @@ -204,7 +204,7 @@ $translations = array( 'Select table' => 'Scegli tabella', '%.3f s' => '%.3f s', '$1-$3-$5' => '$5/$3/$1', - 'yyyy-mm-dd' => 'dd/mm/yyyy', + '[yyyy]-mm-dd' => 'dd/mm/[yyyy]', 'History' => 'Storico', 'Variables' => 'Variabili', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Le colonne sorgente e destinazione devono essere dello stesso tipo e ci deve essere un indice sulla colonna di destinazione e sui dati referenziati.', diff --git a/adminer/lang/nl.inc.php b/adminer/lang/nl.inc.php index aa1d31a9..8ae51a21 100644 --- a/adminer/lang/nl.inc.php +++ b/adminer/lang/nl.inc.php @@ -204,7 +204,7 @@ $translations = array( 'Select table' => 'Selecteer tabel', '%.3f s' => '%.3f s', '$1-$3-$5' => '$5-$3-$1', - 'yyyy-mm-dd' => 'dd-mm-yyyy', + '[yyyy]-mm-dd' => 'dd-mm-[jjjj]', 'History' => 'Geschiedenis', 'Variables' => 'Variabelen', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Bron- en doelkolommen moeten van hetzelfde data type zijn, er moet een index bestaan op de gekozen kolommen en er moet gerelateerde data bestaan.', diff --git a/adminer/lang/ru.inc.php b/adminer/lang/ru.inc.php index 14f90785..3f794bd5 100644 --- a/adminer/lang/ru.inc.php +++ b/adminer/lang/ru.inc.php @@ -204,7 +204,7 @@ $translations = array( '(anywhere)' => '(в любом месте)', '%.3f s' => '%.3f s', '$1-$3-$5' => '$5.$3.$1', - 'yyyy-mm-dd' => 'dd.mm.yyyy', + '[yyyy]-mm-dd' => 'дд.мм.[гггг]', 'History' => 'История', 'Variables' => 'Переменные', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Колонки должны иметь одинаковые типы данных, в результирующей колонке должен быть индекс, данные для импорта должны существовать.', diff --git a/adminer/lang/sk.inc.php b/adminer/lang/sk.inc.php index 8533dd23..4b7ba2d0 100644 --- a/adminer/lang/sk.inc.php +++ b/adminer/lang/sk.inc.php @@ -204,7 +204,7 @@ $translations = array( '(anywhere)' => '(kdekoľvek)', '%.3f s' => '%.3f s', '$1-$3-$5' => '$6.$4.$1', - 'yyyy-mm-dd' => 'd.m.yyyy', + '[yyyy]-mm-dd' => 'd.m.[rrrr]', 'History' => 'História', 'Variables' => 'Premenné', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => 'Zdrojové a cieľové stĺpce musia mať rovnaký datový typ, nad cieľovými stĺpcami musí byť definovaný index a odkazované dáta musia existovať.', diff --git a/adminer/lang/zh-tw.inc.php b/adminer/lang/zh-tw.inc.php index 69e8dc6d..c00584cb 100644 --- a/adminer/lang/zh-tw.inc.php +++ b/adminer/lang/zh-tw.inc.php @@ -204,7 +204,7 @@ $translations = array( 'Select table' => '選擇資料表', '%.3f s' => '%.3f秒', '$1-$3-$5' => '$1.$3.$5', - 'yyyy-mm-dd' => 'dd.mm.yyyy', + '[yyyy]-mm-dd' => '[yyyy].mm.dd', 'History' => '歷史', 'Variables' => '變數', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => '源列和目標列必須具有相同的數據類型,在目標列上必須有一個索引並且引用的數據必須存在。', diff --git a/adminer/lang/zh.inc.php b/adminer/lang/zh.inc.php index 4a35ccdb..b9eb03a2 100644 --- a/adminer/lang/zh.inc.php +++ b/adminer/lang/zh.inc.php @@ -204,7 +204,7 @@ $translations = array( 'Select table' => '选择表', '%.3f s' => '%.3f 秒', '$1-$3-$5' => '$1.$3.$5', - 'yyyy-mm-dd' => 'dd.mm.yyyy', + '[yyyy]-mm-dd' => '[yyyy].mm.dd', 'History' => '历史', 'Variables' => '变量', 'Source and target columns must have the same data type, there must be an index on the target columns and referenced data must exist.' => '源列和目标列必须具有相同的数据类型,在目标列上必须有一个索引并且引用的数据必须存在。', diff --git a/changes.txt b/changes.txt index ee1dbca8..1bffc86d 100644 --- a/changes.txt +++ b/changes.txt @@ -4,6 +4,7 @@ Fix removed default in ALTER Display whitespace in texts (bug #2858042) Display number of manipulated rows in JS confirm E-mail attachments (Editor) +Optional year in date (Editor) Move

to $adminer->navigation (customization) Rename get_dbh to connection (customization) diff --git a/editor/include/adminer.inc.php b/editor/include/adminer.inc.php index 97fc74da..7f38923d 100644 --- a/editor/include/adminer.inc.php +++ b/editor/include/adminer.inc.php @@ -377,7 +377,7 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5 return '"; } if (ereg('date|timestamp', $field["type"])) { - return " (" . lang('yyyy-mm-dd') . ")"; //! maxlength + return " (" . lang('[yyyy]-mm-dd') . ")"; //! maxlength } return ''; } @@ -387,8 +387,8 @@ ORDER BY ORDINAL_POSITION"); //! requires MySQL 5 if ($function == "now") { return "$function()"; } - $return = $connection->quote(ereg('date|timestamp', $field["type"]) && preg_match('(^' . str_replace('\\$1', '(?P[0-9]+)', preg_replace('~(\\\\\\$([2-6]))~', '(?P[0-9]{1,2})', preg_quote(lang('$1-$3-$5')))) . '(.*))', $value, $match) - ? ($match["p1"] ? $match["p1"] : ($match["p2"] < 70 ? 20 : 19) . $match["p2"]) . "-$match[p3]$match[p4]-$match[p5]$match[p6]" . end($match) + $return = $connection->quote(ereg('date|timestamp', $field["type"]) && preg_match('(^' . str_replace('\\$1', '(?P[0-9]*)', preg_replace('~(\\\\\\$([2-6]))~', '(?P[0-9]{1,2})', preg_quote(lang('$1-$3-$5')))) . '(.*))', $value, $match) + ? (strlen($match["p1"]) ? $match["p1"] : (strlen($match["p2"]) ? ($match["p2"] < 70 ? 20 : 19) . $match["p2"] : gmdate("Y"))) . "-$match[p3]$match[p4]-$match[p5]$match[p6]" . end($match) : $value ); if (!ereg('varchar|text', $field["type"]) && $field["full_type"] != "tinyint(1)" && !strlen($value)) {