Commit a994559a authored by Robert Ricci's avatar Robert Ricci
Browse files

In the free node count, don't include nodes that are listed in the

nodetypeXpid_permissions table, since most users will be confused
to see free PCs that they cannot actually use.

This query is starting to become a bit complicated to be doing on
every page.
parent 88a8f388
......@@ -1415,8 +1415,10 @@ function TBFreePCs()
DBQueryFatal("select a.node_id from nodes as a ".
"left join reserved as b on a.node_id=b.node_id ".
"left join node_types as nt on a.type=nt.type ".
"left join nodetypeXpid_permissions as p ".
" on a.type=p.type ".
"where b.node_id is null and a.role='testnode' ".
" and a.type like 'pc%'");
" and a.type like 'pc%' and is null");
return mysql_num_rows($query_result);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment