mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 06:37:33 +02:00
Warn about exceeded max_file_uploads in import
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
## Adminer dev
|
## Adminer dev
|
||||||
- Allow specifying operator in search anywhere
|
- Allow specifying operator in search anywhere
|
||||||
|
- Warn about exceeded max_file_uploads in import
|
||||||
- MySQL 5.0-: Do not load partitioning info in alter table (bug #1099)
|
- MySQL 5.0-: Do not load partitioning info in alter table (bug #1099)
|
||||||
- PostgreSQL: Show structure of inherited tables
|
- PostgreSQL: Show structure of inherited tables
|
||||||
- PostgreSQL: Hide only partitions, not all inherited tables from menu
|
- PostgreSQL: Hide only partitions, not all inherited tables from menu
|
||||||
|
@@ -76,6 +76,7 @@ Lang::$translations = array(
|
|||||||
'Webserver file %s' => 'Soubor %s na webovém serveru',
|
'Webserver file %s' => 'Soubor %s na webovém serveru',
|
||||||
'Run file' => 'Spustit soubor',
|
'Run file' => 'Spustit soubor',
|
||||||
'File does not exist.' => 'Soubor neexistuje.',
|
'File does not exist.' => 'Soubor neexistuje.',
|
||||||
|
'Increase %s.' => 'Zvyšte %s.',
|
||||||
'File uploads are disabled.' => 'Nahrávání souborů není povoleno.',
|
'File uploads are disabled.' => 'Nahrávání souborů není povoleno.',
|
||||||
'Unable to upload a file.' => 'Nepodařilo se nahrát soubor.',
|
'Unable to upload a file.' => 'Nepodařilo se nahrát soubor.',
|
||||||
'Maximum allowed file size is %sB.' => 'Maximální povolená velikost souboru je %sB.',
|
'Maximum allowed file size is %sB.' => 'Maximální povolená velikost souboru je %sB.',
|
||||||
|
@@ -77,6 +77,7 @@ Lang::$translations = array(
|
|||||||
'Webserver file %s' => 'Xx %s',
|
'Webserver file %s' => 'Xx %s',
|
||||||
'Run file' => 'Xx',
|
'Run file' => 'Xx',
|
||||||
'File does not exist.' => 'Xx.',
|
'File does not exist.' => 'Xx.',
|
||||||
|
'Increase %s.' => 'Xx %s.',
|
||||||
'File uploads are disabled.' => 'Xx.',
|
'File uploads are disabled.' => 'Xx.',
|
||||||
'Unable to upload a file.' => 'Xx.',
|
'Unable to upload a file.' => 'Xx.',
|
||||||
'Maximum allowed file size is %sB.' => 'Xx %sB.',
|
'Maximum allowed file size is %sB.' => 'Xx %sB.',
|
||||||
|
@@ -250,8 +250,11 @@ if (!isset($_GET["import"])) {
|
|||||||
} else {
|
} else {
|
||||||
echo "<fieldset><legend>" . lang('File upload') . "</legend><div>";
|
echo "<fieldset><legend>" . lang('File upload') . "</legend><div>";
|
||||||
$gz = (extension_loaded("zlib") ? "[.gz]" : "");
|
$gz = (extension_loaded("zlib") ? "[.gz]" : "");
|
||||||
|
$max_file_uploads = "max_file_uploads";
|
||||||
|
$max_file_uploads_value = ini_get($max_file_uploads);
|
||||||
echo (ini_bool("file_uploads")
|
echo (ini_bool("file_uploads")
|
||||||
? "SQL$gz (< " . ini_get("upload_max_filesize") . "B): <input type='file' name='sql_file[]' multiple>\n$execute" // ignore post_max_size because it is for all form fields together and bytes computing would be necessary
|
? "SQL$gz (< " . ini_get("upload_max_filesize") . "B): <input type='file' name='sql_file[]' multiple>\n" // ignore post_max_size because it is for all form fields together and bytes computing would be necessary
|
||||||
|
. script("qsl('input').onchange = partialArg(fileChange, $max_file_uploads_value, '" . lang('Increase %s.', "$max_file_uploads = $max_file_uploads_value") . "')") . $execute
|
||||||
: lang('File uploads are disabled.')
|
: lang('File uploads are disabled.')
|
||||||
);
|
);
|
||||||
echo "</div></fieldset>\n";
|
echo "</div></fieldset>\n";
|
||||||
|
@@ -665,6 +665,17 @@ function sqlSubmit(form, root) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Check if PHP can handle the uploaded files
|
||||||
|
* @param number
|
||||||
|
* @param string
|
||||||
|
* @param Event
|
||||||
|
*/
|
||||||
|
function fileChange(event, maxFileUploads, message) {
|
||||||
|
if (event.target.files.length > maxFileUploads) {
|
||||||
|
alert(message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Handle changing trigger time or event
|
/** Handle changing trigger time or event
|
||||||
|
Reference in New Issue
Block a user