]> andersk Git - sql-web.git/commitdiff
Use nDatabasesHard instead of MAXDBS
authorJoe Presbrey <presbrey@mit.edu>
Tue, 24 Apr 2007 21:54:39 +0000 (21:54 +0000)
committerJoe Presbrey <presbrey@mit.edu>
Tue, 24 Apr 2007 21:54:39 +0000 (21:54 +0000)
git-svn-id: svn://presbrey.mit.edu/sql/web/dev@126 a142d4bd-2cfb-0310-9673-cb33a7e74f58

lib/proc.lib.php
lib/security.lib.php

index adf8252858526148ef4176df1ad06dbf914bdc19..865d49805ed95cb059a75f9911015cb1d4e6f4ee 100644 (file)
@@ -16,7 +16,7 @@ class proc {
                $dbname = $uname.DELIMETER.$i_newdb;
                if ($User->isOverQuota() && !isAdmin()) {
                        $err1[] = 'You are over your quota. You may not add more databases.';
-               } elseif (count($User->getDBList())>MAXDBS && !isAdmin()) {
+               } elseif (count($User->getDBList())>=$User->getDBQuotaHard() && !isAdmin()) {
                        $err1[] = 'You have too many databases. You may not add more databases.';
                } elseif (empty($i_newdb)) {
                        $err1[] = 'Your database name may not be empty.';
index 98fdd51bb855ebea983fd7c42ca1320753f3d630..ee5cf37fa0ccefddb7257956c1c08509c0832f3c 100644 (file)
@@ -126,6 +126,9 @@ class User {
     function isOverQuota() {
         return $this->exists()?($this->info['bOverQuota']>0?true:false):'';
     }
+    function getDBQuotaHard() {
+        return $this->exists()?$this->info['nDatabasesHard']:0;
+    }
     function getBytes() {
         if($this->exists()) {
                        $arr['nBytes'] = $this->info['nBytes'];
This page took 0.057821 seconds and 5 git commands to generate.