several fixes, mostly in the anti-abuse system
[mir.git] / source / mircoders / global / Abuse.java
index 41b31f8..b0e28d5 100755 (executable)
@@ -207,6 +207,7 @@ public class Abuse {
       MirAdminInterfaceLocalizer.MirSimpleEntityOperation operation = MirGlobal.localizer().adminInterface().simpleCommentOperationForName(commentBlockAction);
 
       if (checkCookie(Arrays.asList(cookies)) || checkIpFilter(address) || checkRegExpFilter(aComment)) {
+        logger.debug("performing operation " + operation.getName());
         operation.perform(null, MirGlobal.localizer().dataModel().adapterModel().makeEntityAdapter("comment", aComment));
         setCookie(aResponse);
       }
@@ -238,12 +239,15 @@ public class Abuse {
         address = request.getRemoteAddr();
         cookies = request.getCookies();
       }
+      else
+        logger.debug("no request available! " + aRequest.getClass().getName());
 
       logArticle(address, anArticle.getId(), new Date(), browser);
 
-      MirAdminInterfaceLocalizer.MirSimpleEntityOperation operation = MirGlobal.localizer().adminInterface().simpleCommentOperationForName(commentBlockAction);
+      MirAdminInterfaceLocalizer.MirSimpleEntityOperation operation = MirGlobal.localizer().adminInterface().simpleArticleOperationForName(commentBlockAction);
 
       if (checkCookie(Arrays.asList(cookies)) || checkIpFilter(address) || checkRegExpFilter(anArticle)) {
+        logger.debug("performing operation " + operation.getName());
         operation.perform(null, MirGlobal.localizer().dataModel().adapterModel().makeEntityAdapter("content", anArticle));
         setCookie(aResponse);
       }