From: Renato De G. <rd...@us...> - 2004-06-09 12:13:35
|
Update of /cvsroot/digir/DiGIRprov/www In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22935 Modified Files: DiGIR_scan.php Log Message: Fixed bug related to inventory requests combined with local filters (the SQL produced was incorret) Index: DiGIR_scan.php =================================================================== RCS file: /cvsroot/digir/DiGIRprov/www/DiGIR_scan.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** DiGIR_scan.php 14 May 2004 23:57:34 -0000 1.6 --- DiGIR_scan.php 9 Jun 2004 12:13:26 -0000 1.7 *************** *** 162,166 **** $sqlWHERE = ' '; if ($flt->validQuery()) ! $sqlWHERE = ' WHERE '.$flt->toSQL($Config); $sqlSELECT = "SELECT ".$colSource.", count(".$colSource.") as cnt"; --- 162,170 ---- $sqlWHERE = ' '; if ($flt->validQuery()) ! { ! $requestFilter = $flt->toSQL($Config); ! $sqlWHERE = ' WHERE '.$requestFilter; ! } ! $sqlSELECT = "SELECT ".$colSource.", count(".$colSource.") as cnt"; *************** *** 169,173 **** if ($localFilter) { ! $sqlWHERE .= ' AND '.$localFilter; } --- 173,182 ---- if ($localFilter) { ! if ($requestFilter) ! { ! $sqlWHERE .= ' AND '; ! } ! ! $sqlWHERE .= $localFilter; } |