Package org.apache.roller.util

Examples of org.apache.roller.util.SpamChecker


                    comment.setWeblogEntry(entry);
                    comment.setNotify(Boolean.FALSE);
                    comment.setPostTime(new Timestamp(new Date().getTime()));
                   
                    // If comment contains blacklisted text, mark as spam
                    SpamChecker checker = new SpamChecker();
                    if (checker.checkTrackback(comment)) {
                       comment.setSpam(Boolean.TRUE);
                       logger.debug("Trackback blacklisted: "+comment.getUrl());
                       error = "REJECTED: trackback contains spam words";
                    }
                    // Else, if trackback verification is on...
View Full Code Here


           
            if (preview) {
                message = "This is a comment preview only";
               
                // If comment contains blacklisted text, warn commenter
                SpamChecker checker = new SpamChecker();
                if (checker.checkComment(comment)) {
                   error = bundle.getString("commentServlet.previewMarkedAsSpam");
                   mLogger.debug("Comment marked as spam");
                }
                request.setAttribute("previewComments", "dummy");
                mLogger.debug("Comment is a preview");
               
            } else {
                if (this.authenticator.authenticate(comment, request)) {
                    mLogger.debug("Comment passed authentication");
                   
                    // If comment contains blacklisted text, mark as spam
                    SpamChecker checker = new SpamChecker();
                    if (checker.checkComment(comment)) {
                       comment.setSpam(Boolean.TRUE);
                       error = bundle.getString("commentServlet.commentMarkedAsSpam");
                       mLogger.debug("Comment marked as spam");
                    }
                    
View Full Code Here

            // TODO: i18n
            message = "This is a comment preview only";
            cf.setPreview(comment);
           
            // If comment contains blacklisted text, warn commenter
            SpamChecker checker = new SpamChecker();
            if (checker.checkComment(comment)) {
                error = bundle.getString("commentServlet.previewMarkedAsSpam");
                log.debug("Comment marked as spam");
            }
            log.debug("Comment is a preview");
           
        } else {
            // If comment contains blacklisted text, mark as spam
            SpamChecker checker = new SpamChecker();
            if (checker.checkComment(comment)) {
                comment.setSpam(Boolean.TRUE);
                error = bundle.getString("commentServlet.commentMarkedAsSpam");
                log.debug("Comment marked as spam");
            }
           
View Full Code Here

                comment.setWeblogEntry(entry);
                comment.setNotify(Boolean.FALSE);
                comment.setPostTime(new Timestamp(new Date().getTime()));
               
                // If comment contains blacklisted text, mark as spam
                SpamChecker checker = new SpamChecker();
                if (checker.checkTrackback(comment)) {
                    comment.setSpam(Boolean.TRUE);
                    logger.debug("Trackback blacklisted: "+comment.getUrl());
                    error = "REJECTED: trackback contains spam words";
                }
                // Else, if trackback verification is on...
View Full Code Here

                comment.setWeblogEntry(entry);
                comment.setNotify(Boolean.FALSE);
                comment.setPostTime(new Timestamp(new Date().getTime()));
               
                // If comment contains blacklisted text, mark as spam
                SpamChecker checker = new SpamChecker();
                if (checker.checkTrackback(comment)) {
                    comment.setSpam(Boolean.TRUE);
                    logger.debug("Trackback blacklisted: "+comment.getUrl());
                    error = "REJECTED: trackback contains spam words";
                }
                // Else, if trackback verification is on...
View Full Code Here

            // TODO: i18n
            message = "This is a comment preview only";
            cf.setPreview(comment);
           
            // If comment contains blacklisted text, warn commenter
            SpamChecker checker = new SpamChecker();
            if (checker.checkComment(comment)) {
                error = bundle.getString("commentServlet.previewMarkedAsSpam");
                log.debug("Comment marked as spam");
            }
            log.debug("Comment is a preview");
           
        } else {
            // If comment contains blacklisted text, mark as spam
            SpamChecker checker = new SpamChecker();
            if (checker.checkComment(comment)) {
                comment.setSpam(Boolean.TRUE);
                error = bundle.getString("commentServlet.commentMarkedAsSpam");
                log.debug("Comment marked as spam");
            }
           
View Full Code Here

TOP

Related Classes of org.apache.roller.util.SpamChecker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.