You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vcl.apache.org by jf...@apache.org on 2014/12/16 18:21:12 UTC

svn commit: r1646015 - /vcl/trunk/web/.ht-inc/computer.php

Author: jfthomps
Date: Tue Dec 16 17:21:12 2014
New Revision: 1646015

URL: http://svn.apache.org/r1646015
Log:
VCL-174 - NAT - support for sites that have small IP address ranges

computer.php: modified AJcompNATchange: modified query checking for reservations of selected computers to ignore reload reservations

Modified:
    vcl/trunk/web/.ht-inc/computer.php

Modified: vcl/trunk/web/.ht-inc/computer.php
URL: http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/computer.php?rev=1646015&r1=1646014&r2=1646015&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/computer.php (original)
+++ vcl/trunk/web/.ht-inc/computer.php Tue Dec 16 17:21:12 2014
@@ -4313,6 +4313,7 @@ class Computer extends Resource {
 
 		$allids = implode(',', $compids);
 		$inusecompids = array();
+		$vclreloadid = getUserlistID('vclreload@Local');
 		$query = "SELECT rs.computerid "
 		       . "FROM request rq, "
 		       .      "reservation rs "
@@ -4320,7 +4321,8 @@ class Computer extends Resource {
 		       .       "rs.computerid IN ($allids) AND "
 		       .       "rq.start <= NOW() AND "
 		       .       "rq.end > NOW() AND "
-		       .       "rq.stateid NOT IN (1,5,11,12)";
+		       .       "rq.stateid NOT IN (1,5,11,12) AND "
+		       .       "rq.userid != $vclreloadid";
 		$qh = doQuery($query);
 		while($row = mysql_fetch_assoc($qh))
 			$inusecompids[] = $row['computerid'];