From 9edbaf2ec77ec64ec8132db32de506a4162a2125 Mon Sep 17 00:00:00 2001 From: HungryFeline Date: Sun, 7 Jul 2013 09:08:50 +0200 Subject: [PATCH 1/2] Let the user define how much space should be free --- core/sys_config.inc.php | 1 + 1 file changed, 1 insertion(+) diff --git a/core/sys_config.inc.php b/core/sys_config.inc.php index 4190358f..c70acb93 100644 --- a/core/sys_config.inc.php +++ b/core/sys_config.inc.php @@ -35,6 +35,7 @@ _d("NICE_URLS", false); // boolean force niceurl mode _d("WH_SPLITS", 1); // int how many levels of subfolders to put in the warehouse _d("VERSION", 'trunk'); // string shimmie version _d("TIMEZONE", null); // string timezone +_d("MIN_FREE_SPACE",100*1024*1024); // int disable uploading if there's less than MIN_FREE_SPACE bytes free space _d("CORE_EXTS", "bbcode,user,mail,upload,image,view,handle_pixel,ext_manager,setup,upgrade,handle_404,comment,tag_list,index,tag_edit,alias_editor"); // extensions to always enable _d("EXTRA_EXTS", ""); // optional extra extensions From 17efb92b4e33257c6a4e9e09dce68fb287602c75 Mon Sep 17 00:00:00 2001 From: HungryFeline Date: Sun, 7 Jul 2013 09:13:14 +0200 Subject: [PATCH 2/2] Update main.php --- ext/upload/main.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ext/upload/main.php b/ext/upload/main.php index 9c92cb19..2e7a073e 100644 --- a/ext/upload/main.php +++ b/ext/upload/main.php @@ -56,9 +56,7 @@ class Upload extends Extension { $this->is_full = false; } else { - // TODO: This size limit should be configureable by the admin... - // currently set to 100 MB - $this->is_full = $free_num < 100*1024*1024; + $this->is_full = $free_num < MIN_FREE_SPACE; } }