diff options
author | Mario <mario@mariovavti.com> | 2018-12-17 10:55:29 +0100 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2018-12-17 10:55:29 +0100 |
commit | a6f82300639f62a0404830719d8a258105e15fc1 (patch) | |
tree | d1b11f978f21ced1295aa674008a92f2126b2ae3 /Zotlabs/Module | |
parent | e4c60d70b010c6f860213a33580a7819e83e2f92 (diff) | |
parent | 14735e0a48c3df8aef4817dcdee1e5e64de4ccaa (diff) | |
download | volse-hubzilla-a6f82300639f62a0404830719d8a258105e15fc1.tar.gz volse-hubzilla-a6f82300639f62a0404830719d8a258105e15fc1.tar.bz2 volse-hubzilla-a6f82300639f62a0404830719d8a258105e15fc1.zip |
Merge branch 'memory-warn2' into 'dev'
add warning if upload_filesize < 4MB.
See merge request hubzilla/core!1438
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r-- | Zotlabs/Module/Setup.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Zotlabs/Module/Setup.php b/Zotlabs/Module/Setup.php index c0716ca7c..370b7b9f8 100644 --- a/Zotlabs/Module/Setup.php +++ b/Zotlabs/Module/Setup.php @@ -441,13 +441,18 @@ class Setup extends \Zotlabs\Web\Controller { require_once 'include/environment.php'; $help = ''; + $mem_warning = ''; $result = getPhpiniUploadLimits(); + if($result['post_max_size'] < 4194304 || $result['max_upload_filesize'] < 4194304) { + $mem_warning = '<strong>' .t('This is not sufficient to upload larger images or files. You should be able to upload at least 4 MB at once.') . '</strong>'; + } $help = sprintf(t('Your max allowed total upload size is set to %s. Maximum size of one file to upload is set to %s. You are allowed to upload up to %d files at once.'), userReadableSize($result['post_max_size']), userReadableSize($result['max_upload_filesize']), $result['max_file_uploads'] ); + $help .= $mem_warning; $help .= '<br><br>' . t('You can adjust these settings in the server php.ini file.'); $this->check_add($checks, t('PHP upload limits'), true, false, $help); |