fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [7120] filemanager: fix upload


From: Sigurd Nes
Subject: [Fmsystem-commits] [7120] filemanager: fix upload
Date: Tue, 15 Mar 2011 08:50:40 +0000

Revision: 7120
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=7120
Author:   sigurdne
Date:     2011-03-15 08:50:40 +0000 (Tue, 15 Mar 2011)
Log Message:
-----------
filemanager: fix upload

Modified Paths:
--------------
    trunk/filemanager/inc/class.bofilemanager.inc.php

Modified: trunk/filemanager/inc/class.bofilemanager.inc.php
===================================================================
--- trunk/filemanager/inc/class.bofilemanager.inc.php   2011-03-15 08:49:59 UTC 
(rev 7119)
+++ trunk/filemanager/inc/class.bofilemanager.inc.php   2011-03-15 08:50:40 UTC 
(rev 7120)
@@ -327,13 +327,15 @@
                                $this->access_add = true;
                        }
 
-                       if ( $GLOBALS['phpgw']->accounts->data['quota'] == -1 )
+                       $account = 
$GLOBALS['phpgw']->accounts->get($this->userinfo['account_id']);
+
+                       if ( $account->quota == -1 )
                        {
                                $this->quota = -1;
                        }
                        else
                        {
-                               $this->quota = 
$GLOBALS['phpgw']->accounts->data['quota'] * 1024 * 1024;
+                               $this->quota = $account->quota * 1024 * 1024;
                        }
                }
 
@@ -1262,11 +1264,11 @@
                        return $size;
                }
 
-               function check_quota($file)
+               function check_quota($file,$size = 0)
                {
                        $size_homedir   = $this->get_size($this->homedir, True);
-                       $size_file      = $this->get_size(array('directory' => 
$this->path, 'name' => $file),False);
-
+                       $size_file      = $size ? (int)$size : 
$this->get_size(array('directory' => $this->path, 'name' => $file),False);
+_debug_Array($this->quota);
                        if($this->quota == -1)
                        {
                                return true;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]