Index: nodelimit.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/nodelimit/nodelimit.module,v
retrieving revision 1.4
diff -u -r1.4 nodelimit.module
--- nodelimit.module	9 Oct 2006 20:11:36 -0000	1.4
+++ nodelimit.module	29 Oct 2006 12:21:00 -0000
@@ -228,7 +228,7 @@
     $uid = $user->uid;
   }
 
-  $query = "SELECT max(nl.maxnodes) as maxnodes, min(nl.maxnodes) as minnodes FROM {nodelimit_types} nl JOIN users_roles ur WHERE (nl.role=ur.rid OR nl.role=2) AND ur.uid=%d AND nl.nodetype='%s'";
+  $query = "SELECT max(nl.maxnodes) as maxnodes, min(nl.maxnodes) as minnodes FROM {nodelimit_types} nl JOIN users_roles ur WHERE ((nl.role=ur.rid AND ur.uid=%d) OR nl.role=2) AND nl.nodetype='%s'";
   $max = db_fetch_object(db_query($query, $uid, $type));
   if (!$max->maxnodes or !$max->minnodes) {
     return NULL; // in case in some future revision we want to differentiate between 0 and NULL for this value
