diff --git a/adminer/static/functions.js b/adminer/static/functions.js index 687d6664..85253a7a 100644 --- a/adminer/static/functions.js +++ b/adminer/static/functions.js @@ -190,16 +190,21 @@ function textareaKeydown(target, event) { return true; } -/** Send form by Enter on and
\n"; //! Ctrl+Enter for this.form.email - echo html_select("email_addition", $columns, $_POST["email_addition"]) . "\n"; //! JavaScript + echo "

\n"; //! Ctrl+Enter for this.form.email + echo "

" . html_select("email_addition", $columns, $_POST["email_addition"]) . "\n"; //! JavaScript echo "

" . lang('Attachments') . ": "; echo "

" . (count($emailFields) == 1 ? '' : html_select("email_field", $emailFields)); echo "\n"; + echo "\n"; echo "\n"; } } diff --git a/editor/include/editing.inc.php b/editor/include/editing.inc.php index 5699ed84..c3810833 100644 --- a/editor/include/editing.inc.php +++ b/editor/include/editing.inc.php @@ -16,12 +16,12 @@ function email_header($header) { * @param array * @return bool */ -function send_mail($email, $subject, $message, $from = "", $files = array("error" => array())) { +function send_mail($email, $subject, $message, $from = "", $files = array()) { $eol = (strncasecmp(PHP_OS, "win", 3) ? "\n" : "\r\n"); // PHP_EOL available since PHP 4.3.10 and 5.0.2 $message = str_replace("\n", $eol, wordwrap(str_replace("\r", "", "$message\n"))); $boundary = uniqid("boundary"); $attachments = ""; - foreach ($files["error"] as $key => $val) { + foreach ((array) $files["error"] as $key => $val) { if (!$val) { $attachments .= "--$boundary$eol" . "Content-Type: " . str_replace("\n", "", $files["type"][$key]) . $eol