diff options
| author | Sylvie Greverend <sylvieg@users.sourceforge.net> | 2006-08-28 14:50:47 +0000 |
|---|---|---|
| committer | Sylvie Greverend <sylvieg@users.sourceforge.net> | 2006-08-28 14:50:47 +0000 |
| commit | b6e147ca62e00bbd8226174534ab5fccc997fde8 (patch) | |
| tree | 601d371c31e3c95f15a44b0ad32f9700080c1423 | |
| parent | a2620d589f75fc0b563d0163da3eb431cbadcdd3 (diff) | |
| download | quota-b6e147ca62e00bbd8226174534ab5fccc997fde8.tar.gz quota-b6e147ca62e00bbd8226174534ab5fccc997fde8.tar.bz2 quota-b6e147ca62e00bbd8226174534ab5fccc997fde8.zip | |
if there is no more disk quota for this user must return ok
| -rw-r--r-- | LibertyQuota.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/LibertyQuota.php b/LibertyQuota.php index adee10e..f2dfafb 100644 --- a/LibertyQuota.php +++ b/LibertyQuota.php @@ -1,6 +1,6 @@ <?php /** - * $Header: /cvsroot/bitweaver/_bit_quota/LibertyQuota.php,v 1.10 2006/07/06 23:58:24 spiderr Exp $ + * $Header: /cvsroot/bitweaver/_bit_quota/LibertyQuota.php,v 1.11 2006/08/28 14:50:47 sylvieg Exp $ * * Copyright (c) 2004 bitweaver.org * Copyright (c) 2003 tikwiki.org @@ -8,7 +8,7 @@ * All Rights Reserved. See copyright.txt for details and a complete list of authors. * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details * - * $Id: LibertyQuota.php,v 1.10 2006/07/06 23:58:24 spiderr Exp $ + * $Id: LibertyQuota.php,v 1.11 2006/08/28 14:50:47 sylvieg Exp $ * @package quota */ @@ -28,7 +28,7 @@ require_once( LIBERTY_PKG_PATH.'LibertyAttachable.php' ); * * @author spider <spider@steelsun.com> * - * @version $Revision: 1.10 $ $Date: 2006/07/06 23:58:24 $ $Author: spiderr $ + * @version $Revision: 1.11 $ $Date: 2006/08/28 14:50:47 $ $Author: sylvieg $ */ class LibertyQuota extends LibertyBase { /** @@ -173,6 +173,7 @@ class LibertyQuota extends LibertyBase { * returns the quota and consumption if a user is under usage level **/ function isUserUnderQuota( $pUserId ) { +bt(); $ret = FALSE; if( is_numeric( $pUserId ) ) { $query = 'SELECT MAX(qo.`disk_usage`) AS `disk_usage` @@ -184,7 +185,7 @@ class LibertyQuota extends LibertyBase { if( $rs = $this->mDb->query( $query, array( $pUserId ) ) ) { $diskQuota = $rs->fields['disk_usage']; $diskConsumed = $this->getUserUsage( $pUserId ); - if( $diskQuota > $diskConsumed ) { + if( $diskQuota == NULL || $diskQuota > $diskConsumed ) { $ret = array($diskQuota, $diskConsumed); } } |
