log fixed
[mir.git] / source / mircoders / global / Abuse.java
index 1b54afe..4b802de 100755 (executable)
@@ -149,6 +149,7 @@ public class Abuse {
 \r
     return false;\r
   }\r
+\r
   FilterRule findMatchingFilter(Entity anEntity, Request aRequest) {\r
     Iterator iterator = filterRules.iterator();\r
 \r
@@ -163,6 +164,8 @@ public class Abuse {
   }\r
 \r
   public void checkComment(EntityComment aComment, Request aRequest, HttpServletResponse aResponse) {\r
+    logComment(aComment, aRequest);\r
+\r
     try {\r
       long time = System.currentTimeMillis();\r
 \r
@@ -184,6 +187,8 @@ public class Abuse {
   }\r
 \r
   public void checkArticle(EntityContent anArticle, Request aRequest, HttpServletResponse aResponse) {\r
+    logArticle(anArticle, aRequest);\r
+\r
     try {\r
       long time = System.currentTimeMillis();\r
 \r
@@ -293,6 +298,22 @@ public class Abuse {
     }\r
   }\r
 \r
+  public void logComment(Entity aComment, Request aRequest) {\r
+    String ipAddress = aRequest.getHeader("ip");\r
+    String id = aComment.getId();\r
+    String browser = aRequest.getHeader("User-Agent");\r
+\r
+    logComment(ipAddress, id, new Date(), browser);\r
+  }\r
+\r
+  public void logArticle(Entity anArticle, Request aRequest) {\r
+    String ipAddress = aRequest.getHeader("ip");\r
+    String id = anArticle.getId();\r
+    String browser = aRequest.getHeader("User-Agent");\r
+\r
+    logArticle(ipAddress, id, new Date(), browser);\r
+  }\r
+\r
   public void logComment(String anIp, String anId, Date aTimeStamp, String aBrowser) {\r
     appendLog(new LogEntry(aTimeStamp, anIp, aBrowser, anId, false));\r
   }\r