]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - index.php
Use raw bytes for upload size hidden input
[github/shaarli/Shaarli.git] / index.php
index 8f26c3903d154e418c2eb57e2db570e3f45c2725..1e255583823a69626d469750b13640dee268e7f5 100644 (file)
--- a/index.php
+++ b/index.php
@@ -1489,7 +1489,22 @@ function renderPage($conf, $pluginManager, $LINKSDB)
 
         if (! isset($_POST['token']) || ! isset($_FILES['filetoupload'])) {
             // Show import dialog
-            $PAGE->assign('maxfilesize', get_max_upload_size(ini_get('post_max_size'), ini_get('upload_max_filesize')));
+            $PAGE->assign(
+                'maxfilesize',
+                get_max_upload_size(
+                    ini_get('post_max_size'),
+                    ini_get('upload_max_filesize'),
+                    false
+                )
+            );
+            $PAGE->assign(
+                'maxfilesizeHuman',
+                get_max_upload_size(
+                    ini_get('post_max_size'),
+                    ini_get('upload_max_filesize'),
+                    true
+                )
+            );
             $PAGE->renderPage('import');
             exit;
         }