Author: jvelociter
Date: 2007-11-14 08:48:30 +0100 (Wed, 14 Nov 2007)
New Revision: 5860

Modified:
   
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/data/DataManager.java
Log:
XWATCH-78 Changed hql query for filtering keywords + groups.
Patch submitted by Anca Paula Luca.



Modified: 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/data/DataManager.java
===================================================================
--- 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/data/DataManager.java
 2007-11-13 23:25:28 UTC (rev 5859)
+++ 
xwiki-products/xwiki-watch/trunk/web/src/main/java/com/xpn/xwiki/watch/client/data/DataManager.java
 2007-11-14 07:48:30 UTC (rev 5860)
@@ -316,8 +316,10 @@
         if ((feedurl !=null)&&(!feedurl.trim().equals(""))) {
             wheresql += " and feedentry.feedurl='" + 
feedurl.replaceAll("'","''") + "'";
         } else if ((filterStatus.getGroup() 
!=null)&&(!filterStatus.getGroup().trim().equals(""))) {
-            wheresql += " and feedentry.feedurl in ("
-                    + "select feed.url from XWiki.AggregatorURLClass as feed 
where '" + filterStatus.getGroup().replaceAll("'","''") + "' in 
elements(feed.group))";
+            wheresql += "and feedentry.feedurl in (" 
+                + "select feed.url from XWiki.AggregatorURLClass as feed, 
BaseObject as obj, " 
+                + "XWiki.AggregatorGroupClass as groupProp where obj.name in 
elements(feed.group) " 
+                + "and obj.id = groupProp.id and groupProp.name='" + 
filterStatus.getGroup().replaceAll("'", "''") + "')";            
         }
 
         if (filterStatus.getDate() !=null) {

_______________________________________________
notifications mailing list
notifications@xwiki.org
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to