There is a bug when you search in All in Computers. The problem is that
it matches too many items.

The problem is with the this part of the query:
OR glpi_contracts.renewal=0

I have attached a patch to fix the problem.

Ryan

--- inc/search.function.php.old	2009-09-08 10:16:19.000000000 -0700
+++ inc/search.function.php	2009-09-08 10:16:28.000000000 -0700
@@ -2120,7 +2120,11 @@
 			return $link." (glpi_auth_mail.name $SEARCH OR glpi_auth_ldap.name $SEARCH ) ";
 		break;
 		case "glpi_contracts.renewal":
-			return $link." ".$table.".".$field."=".getContractRenewalIDByName($val);
+			$val=getContractRenewalIDByName($val);
+			if($val > 0)
+				return $link." ".$table.".".$field."=".getContractRenewalIDByName($val);
+			else
+				return "";
 		break;
 	}
 
_______________________________________________
Glpi-dev mailing list
Glpi-dev@gna.org
https://mail.gna.org/listinfo/glpi-dev

Reply via email to