Show only errors with file upload by default
This commit is contained in:
parent
869193fa18
commit
63f197213e
|
@ -175,7 +175,10 @@ if ($_POST) {
|
|||
}
|
||||
textarea("query", $q, 20);
|
||||
echo ($_POST ? "" : "<script type='text/javascript'>document.getElementsByTagName('textarea')[0].focus();</script>\n");
|
||||
echo "<p>" . (ini_bool("file_uploads") ? lang('File upload') . ': <input type="file" name="sql_file"> (< ' . ini_get("upload_max_filesize") . 'B)' : lang('File uploads are disabled.')); // ignore post_max_size because it is for all form fields together and bytes computing would be necessary
|
||||
echo "<p>" . (ini_bool("file_uploads")
|
||||
? lang('File upload') . ': <input type="file" name="sql_file"' . ($_FILES && $_FILES["sql_file"]["error"] != 4 ? '' : ' onchange="this.form[\'only_errors\'].checked = true;"') . '> (< ' . ini_get("upload_max_filesize") . 'B)' // ignore post_max_size because it is for all form fields together and bytes computing would be necessary
|
||||
: lang('File uploads are disabled.')
|
||||
);
|
||||
|
||||
?>
|
||||
<p>
|
||||
|
|
Loading…
Reference in a new issue