Răsfoiți Sursa

[asp.net] Fix for bug #636475. A typo caused ads not to be matched in ChooseAd

The second loop over the ads hashtable must not reject an app if the keyword filter is empty.
Marek Habersack 15 ani în urmă
părinte
comite
b7643fc22d

+ 1 - 1
mcs/class/System.Web/System.Web.UI.WebControls/AdRotator.cs

@@ -143,7 +143,7 @@ namespace System.Web.UI.WebControls
 			int r = new Random ().Next (total_imp);
 
 			foreach (Hashtable a in ads) {
-				if (keywordFilterEmpty && KeywordFilter != (string) a ["Keyword"])
+				if (!keywordFilterEmpty && KeywordFilter != (string) a ["Keyword"])
 					continue;
 				cur_imp += a ["Impressions"] != null ? int.Parse ((string) a ["Impressions"]) : 1;