1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-17 20:01:25 +02:00

Show upload_max_filesize

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@841 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-07-16 13:46:49 +00:00
parent 04a3f5b30a
commit e2a03c08c3
4 changed files with 10 additions and 3 deletions

View File

@@ -151,6 +151,11 @@ function get_file($key) {
return (!$_FILES[$key] || $_FILES[$key]["error"] ? $_FILES[$key]["error"] : file_get_contents($_FILES[$key]["tmp_name"]));
}
function upload_error($error) {
$max_size = ($error == UPLOAD_ERR_INI_SIZE ? ini_get("upload_max_filesize") : null); // post_max_size is checked in index.php
return lang('Unable to upload a file.') . ($max_size ? " " . lang('Maximum allowed file size is %sB.', $max_size) : "");
}
function odd($s = ' class="odd"') {
static $i = 0;
if (!$s) { // reset counter