From b6e147ca62e00bbd8226174534ab5fccc997fde8 Mon Sep 17 00:00:00 2001 From: Sylvie Greverend Date: Mon, 28 Aug 2006 14:50:47 +0000 Subject: if there is no more disk quota for this user must return ok --- LibertyQuota.php | 9 +++++---- 1 file 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 @@ * - * @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); } } -- cgit v1.3