AlexeyUna 5 лет назад
Родитель
Сommit
410b860a8e
2 измененных файлов с 10 добавлено и 8 удалено
  1. 9 7
      inc/classes/BxDolLanguages.php
  2. 1 1
      install/sql/system.sql

+ 9 - 7
inc/classes/BxDolLanguages.php

@@ -243,15 +243,17 @@ class BxDolLanguages extends BxDolFactory implements iBxDolSingleton
     function _t_format_size ($iSize)
     {
         $a = array (
-            1024 => '_sys_format_size_b',
-            1024*1024 => '_sys_format_size_kb',
-            1024*1024*1024 => '_sys_format_size_mb',
-            1024*1024*1024*1024 => '_sys_format_size_gb',
-            1024*1024*1024*1024*1024 => '_sys_format_size_tb',
+            '_sys_format_size_b'  => 1024,
+            '_sys_format_size_kb' => 1024*1024,
+            '_sys_format_size_mb' => 1024*1024*1024,
+            '_sys_format_size_gb' => 1024*1024*1024*1024,
+            '_sys_format_size_tb' => 1024*1024*1024*1024*1024,
         );
-        foreach($a as $i => $sKey)
-            if($iSize < $i)
+
+        foreach($a as $sKey => $i)
+            if ($iSize < $i)
                 return $this->_t($sKey, round($iSize / ($i / 1024), 1));
+
         return $this->_t('_sys_format_size_b', 0);
     }
 

+ 1 - 1
install/sql/system.sql

@@ -1066,7 +1066,7 @@ CREATE TABLE `sys_acl_levels` (
   `Removable` enum('yes','no') NOT NULL default 'yes',
   `QuotaSize` bigint(20) NOT NULL,
   `QuotaNumber` int(11) NOT NULL,
-  `QuotaMaxFileSize` int(11) NOT NULL,
+  `QuotaMaxFileSize` bigint(20) NOT NULL,
   `Order` int(11) NOT NULL default '0',
   PRIMARY KEY  (`ID`),
   UNIQUE KEY `Name` (`Name`),