r951 - in xwiki/trunk/src/main/java/com/xpn/xwiki: api stats/impl
Jeremi Joslin
jeremi at users.forge.objectweb.org
Wed Mar 1 10:29:47 CET 2006
Author: jeremi
Date: 2006-03-01 10:29:41 +0100 (Wed, 01 Mar 2006)
New Revision: 951
Modified:
xwiki/trunk/src/main/java/com/xpn/xwiki/api/Document.java
xwiki/trunk/src/main/java/com/xpn/xwiki/api/XWiki.java
xwiki/trunk/src/main/java/com/xpn/xwiki/stats/impl/XWikiStatsServiceImpl.java
Log:
XWIKI-221 fix download stats
Modified: xwiki/trunk/src/main/java/com/xpn/xwiki/api/Document.java
===================================================================
--- xwiki/trunk/src/main/java/com/xpn/xwiki/api/Document.java 2006-03-01 09:25:50 UTC (rev 950)
+++ xwiki/trunk/src/main/java/com/xpn/xwiki/api/Document.java 2006-03-01 09:29:41 UTC (rev 951)
@@ -1,29 +1,29 @@
-/*
- * Copyright 2006, XpertNet SARL, and individual contributors as indicated
- * by the contributors.txt.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * @author ludovic
- * @author torcq
- * @author amelentev
- * @author sdumitriu
- * @author thomas
- * @author tepich
- */
+/*
+ * Copyright 2006, XpertNet SARL, and individual contributors as indicated
+ * by the contributors.txt.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+ * @author ludovic
+ * @author torcq
+ * @author amelentev
+ * @author sdumitriu
+ * @author thomas
+ * @author tepich
+ */
package com.xpn.xwiki.api;
@@ -652,11 +652,11 @@
}
public DocumentStats getCurrentMonthPageStats(String action) {
- return context.getWiki().getStatsService(context).getDocMonthStats(doc.getFullName(), "view", new Date(), context);
+ return context.getWiki().getStatsService(context).getDocMonthStats(doc.getFullName(), action, new Date(), context);
}
public DocumentStats getCurrentMonthWebStats(String action) {
- return context.getWiki().getStatsService(context).getDocMonthStats(doc.getWeb(), "view", new Date(), context);
+ return context.getWiki().getStatsService(context).getDocMonthStats(doc.getWeb(), action, new Date(), context);
}
public List getCurrentMonthRefStats() throws XWikiException {
Modified: xwiki/trunk/src/main/java/com/xpn/xwiki/api/XWiki.java
===================================================================
--- xwiki/trunk/src/main/java/com/xpn/xwiki/api/XWiki.java 2006-03-01 09:25:50 UTC (rev 950)
+++ xwiki/trunk/src/main/java/com/xpn/xwiki/api/XWiki.java 2006-03-01 09:29:41 UTC (rev 951)
@@ -633,7 +633,7 @@
}
public DocumentStats getCurrentMonthXWikiStats(String action) {
- return context.getWiki().getStatsService(context).getDocMonthStats("", "view", new Date(), context);
+ return context.getWiki().getStatsService(context).getDocMonthStats("", action, new Date(), context);
}
public String getRefererText(String referer) {
Modified: xwiki/trunk/src/main/java/com/xpn/xwiki/stats/impl/XWikiStatsServiceImpl.java
===================================================================
--- xwiki/trunk/src/main/java/com/xpn/xwiki/stats/impl/XWikiStatsServiceImpl.java 2006-03-01 09:25:50 UTC (rev 950)
+++ xwiki/trunk/src/main/java/com/xpn/xwiki/stats/impl/XWikiStatsServiceImpl.java 2006-03-01 09:29:41 UTC (rev 951)
@@ -1,25 +1,25 @@
-/*
- * Copyright 2006, XpertNet SARL, and individual contributors as indicated
- * by the contributors.txt.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- *
- * @author erwan
- * @author sdumitriu
- */
+/*
+ * Copyright 2006, XpertNet SARL, and individual contributors as indicated
+ * by the contributors.txt.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ *
+ * @author erwan
+ * @author sdumitriu
+ */
package com.xpn.xwiki.stats.impl;
@@ -160,7 +160,7 @@
return;
}
// Unless this is a "view", "save" or "download" action, we are not interested
- if (!(action.equals("view")||action.equals("save")))
+ if (!(action.equals("view")||action.equals("save")||action.equals("download")))
return;
// Let's save in the session the last elements view, saved
More information about the Xwiki-notifications
mailing list