From: zapata Date: Sat, 9 Aug 2003 23:02:24 +0000 (+0000) Subject: log fixed X-Git-Tag: LATEST_MERGED_1_1~314 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=e6e10ad2d757df38f93426206e58e075470006f6;p=mir.git log fixed --- diff --git a/source/mircoders/global/Abuse.java b/source/mircoders/global/Abuse.java index 1b54afee..4b802de0 100755 --- a/source/mircoders/global/Abuse.java +++ b/source/mircoders/global/Abuse.java @@ -149,6 +149,7 @@ public class Abuse { return false; } + FilterRule findMatchingFilter(Entity anEntity, Request aRequest) { Iterator iterator = filterRules.iterator(); @@ -163,6 +164,8 @@ public class Abuse { } public void checkComment(EntityComment aComment, Request aRequest, HttpServletResponse aResponse) { + logComment(aComment, aRequest); + try { long time = System.currentTimeMillis(); @@ -184,6 +187,8 @@ public class Abuse { } public void checkArticle(EntityContent anArticle, Request aRequest, HttpServletResponse aResponse) { + logArticle(anArticle, aRequest); + try { long time = System.currentTimeMillis(); @@ -293,6 +298,22 @@ public class Abuse { } } + public void logComment(Entity aComment, Request aRequest) { + String ipAddress = aRequest.getHeader("ip"); + String id = aComment.getId(); + String browser = aRequest.getHeader("User-Agent"); + + logComment(ipAddress, id, new Date(), browser); + } + + public void logArticle(Entity anArticle, Request aRequest) { + String ipAddress = aRequest.getHeader("ip"); + String id = anArticle.getId(); + String browser = aRequest.getHeader("User-Agent"); + + logArticle(ipAddress, id, new Date(), browser); + } + public void logComment(String anIp, String anId, Date aTimeStamp, String aBrowser) { appendLog(new LogEntry(aTimeStamp, anIp, aBrowser, anId, false)); }