]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
changed max file size parsing code in upload form
authorCash Costello <cash.costello@gmail.com>
Tue, 16 Jun 2009 10:53:40 +0000 (10:53 +0000)
committerCash Costello <cash.costello@gmail.com>
Tue, 16 Jun 2009 10:53:40 +0000 (10:53 +0000)
views/default/tidypics/forms/upload.php

index db162e4e9d28037d9c69cfb1916a608b8044ce35..ec33ca9332bf6ff0f2441f0b1107da9983fd30ba 100644 (file)
@@ -6,15 +6,9 @@
        $container_guid = get_input('container_guid');
        $access_id = get_entity($vars['album'])->access_id;
 
-       if (get_plugin_setting('maxfilesize','tidypics')) {
-               if (((int) get_plugin_setting('maxfilesize','tidypics')) < 1 || ((int) get_plugin_setting('maxfilesize','tidypics')) > 1048576) {
-                       $maxfilesize = 10240; //if file size is less than 1KB or greater than 1GB, default to 10MB
-               } else {
-                       $maxfilesize = (int) get_plugin_setting('maxfilesize','tidypics');
-               }
-       } else {
-               $maxfilesize = 10240; //if the file size limit is not set, default to 10MB
-       }
+       $maxfilesize = (int) get_plugin_setting('maxfilesize','tidypics');
+       if (!$maxfilesize)
+               $maxfilesize = 5;
 
 ?>
 <script language="javascript">