\\d{1,2})', preg_quote(lang('$1-$3-$5')))) . '(.*))', $value, $match)) {
+ if (preg_match('~date|timestamp~', $field["type"]) && preg_match('(^' . str_replace('\$1', '(?P \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));
diff --git a/editor/include/editing.inc.php b/editor/include/editing.inc.php
index 32d3f4ef..f11a9162 100644
--- a/editor/include/editing.inc.php
+++ b/editor/include/editing.inc.php
@@ -25,7 +25,7 @@ function send_mail($email, $subject, $message, $from = "", $files = array()) {
if (!$val) {
$attachments .= "--$boundary$eol"
. "Content-Type: " . str_replace("\n", "", $files["type"][$key]) . $eol
- . "Content-Disposition: attachment; filename=\"" . preg_replace('~["\\n]~', '', $files["name"][$key]) . "\"$eol"
+ . "Content-Disposition: attachment; filename=\"" . preg_replace('~["\n]~', '', $files["name"][$key]) . "\"$eol"
. "Content-Transfer-Encoding: base64$eol$eol"
. chunk_split(base64_encode(file_get_contents($files["tmp_name"][$key])), 76, $eol) . $eol
;
diff --git a/plugins/dump-alter.php b/plugins/dump-alter.php
index 7fc020f6..a4c80f2e 100644
--- a/plugins/dump-alter.php
+++ b/plugins/dump-alter.php
@@ -30,7 +30,7 @@ CREATE PROCEDURE adminer_alter (INOUT alter_command text) BEGIN
IF NOT done THEN
CASE _table_name";
foreach (get_rows($query) as $row) {
- $comment = q($row["ENGINE"] == "InnoDB" ? preg_replace('~(?:(.+); )?InnoDB free: .*~', '\\1', $row["TABLE_COMMENT"]) : $row["TABLE_COMMENT"]);
+ $comment = q($row["ENGINE"] == "InnoDB" ? preg_replace('~(?:(.+); )?InnoDB free: .*~', '\1', $row["TABLE_COMMENT"]) : $row["TABLE_COMMENT"]);
echo "
WHEN " . q($row["TABLE_NAME"]) . " THEN
" . (isset($row["ENGINE"]) ? "IF _engine != '$row[ENGINE]' OR _table_collation != '$row[TABLE_COLLATION]' OR _table_comment != $comment THEN
diff --git a/plugins/tinymce.php b/plugins/tinymce.php
index f5f169c8..51f1216e 100644
--- a/plugins/tinymce.php
+++ b/plugins/tinymce.php
@@ -52,7 +52,7 @@ tinyMCE.init({
if (class_exists('DOMDocument')) { // close all opened tags
$dom = new DOMDocument;
if (@$dom->loadHTML("$val")) { // @ - $val can contain errors
- $val = preg_replace('~.*