diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-04-25 19:03:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-25 19:03:29 +0200 |
commit | 504c9df4e7ed126678f146d4c349c798b8338407 (patch) | |
tree | ad886ea19ba4d38cea43ad52faf264da0383db58 /index.php | |
parent | c8cb5c282402e3f19497ba9e57ac967a4bdefa1b (diff) | |
parent | 6a19124a0970dfd5744c4a193b5d907ba85b323e (diff) | |
download | Shaarli-504c9df4e7ed126678f146d4c349c798b8338407.tar.gz Shaarli-504c9df4e7ed126678f146d4c349c798b8338407.tar.zst Shaarli-504c9df4e7ed126678f146d4c349c798b8338407.zip |
Merge pull request #848 from ArthurHoaro/hotfix/upload-maxsize
Use raw bytes for upload size hidden input
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -1489,7 +1489,22 @@ function renderPage($conf, $pluginManager, $LINKSDB) | |||
1489 | 1489 | ||
1490 | if (! isset($_POST['token']) || ! isset($_FILES['filetoupload'])) { | 1490 | if (! isset($_POST['token']) || ! isset($_FILES['filetoupload'])) { |
1491 | // Show import dialog | 1491 | // Show import dialog |
1492 | $PAGE->assign('maxfilesize', get_max_upload_size(ini_get('post_max_size'), ini_get('upload_max_filesize'))); | 1492 | $PAGE->assign( |
1493 | 'maxfilesize', | ||
1494 | get_max_upload_size( | ||
1495 | ini_get('post_max_size'), | ||
1496 | ini_get('upload_max_filesize'), | ||
1497 | false | ||
1498 | ) | ||
1499 | ); | ||
1500 | $PAGE->assign( | ||
1501 | 'maxfilesizeHuman', | ||
1502 | get_max_upload_size( | ||
1503 | ini_get('post_max_size'), | ||
1504 | ini_get('upload_max_filesize'), | ||
1505 | true | ||
1506 | ) | ||
1507 | ); | ||
1493 | $PAGE->renderPage('import'); | 1508 | $PAGE->renderPage('import'); |
1494 | exit; | 1509 | exit; |
1495 | } | 1510 | } |