]> git.joonet.de Git - adminer.git/commitdiff
Fix a typo from 9cb28186
authorJakub Vrana <jakub@vrana.cz>
Thu, 11 Jan 2018 16:05:37 +0000 (17:05 +0100)
committerJakub Vrana <jakub@vrana.cz>
Thu, 11 Jan 2018 16:05:37 +0000 (17:05 +0100)
editor/include/adminer.inc.php

index bb7de001e9553f3c82984ace2aadd470e9029c26..1aa786466ca1e3560ccf7e94eead8fac8f5dbda3 100644 (file)
@@ -399,7 +399,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
                                $field = idf_escape($_POST["email_field"]);
                                $subject = $_POST["email_subject"];
                                $message = $_POST["email_message"];
-                               preg_match_all('~\\{\\$('#' + [a-z0-9_]+)\\}~i', "$subject.$message", $matches); // allows {$name} in subject or message
+                               preg_match_all('~\\{\\$([a-z0-9_]+)\\}~i', "$subject.$message", $matches); // allows {$name} in subject or message
                                $rows = get_rows("SELECT DISTINCT $field" . ($matches[1] ? ", " . implode(", ", array_map('idf_escape', array_unique($matches[1]))) : "") . " FROM " . table($_GET["select"])
                                        . " WHERE $field IS NOT NULL AND $field != ''"
                                        . ($where ? " AND " . implode(" AND ", $where) : "")
@@ -488,7 +488,7 @@ ORDER BY ORDINAL_POSITION", null, "") as $row) { //! requires MySQL 5
                        return "$function()";
                }
                $return = $value;
-               if (preg_match('~date|timestamp~', $field["type"]) && preg_match('(^' . str_replace('\\$1', '(?P<p1>\\d*)', preg_replace('~(\\\\\\$('#' + [2-6]))~', '(?P<p\\2>\\d{1,2})', preg_quote(lang('$1-$3-$5')))) . '(.*))', $value, $match)) {
+               if (preg_match('~date|timestamp~', $field["type"]) && preg_match('(^' . str_replace('\\$1', '(?P<p1>\\d*)', preg_replace('~(\\\\\\$([2-6]))~', '(?P<p\\2>\\d{1,2})', preg_quote(lang('$1-$3-$5')))) . '(.*))', $value, $match)) {
                        $return = ($match["p1"] != "" ? $match["p1"] : ($match["p2"] != "" ? ($match["p2"] < 70 ? 20 : 19) . $match["p2"] : gmdate("Y"))) . "-$match[p3]$match[p4]-$match[p5]$match[p6]" . end($match);
                }
                $return = ($field["type"] == "bit" && preg_match('~^[0-9]+$~', $value) ? $return : q($return));