francois / mephisto forked from halorgium/mephisto

A refactored Mephisto that has multiple spam detection engines.

This URL has Read+Write access

francois (author)
Mon Mar 17 19:02:47 -0700 2008
commit  cf11753a6d59fbbfcbd0e063706395ff31600059
tree    99cad4a4e7cbdd79c3c9781008d0ee9d0cbc4451
parent  f1068ff008b7da9263fd9037d1a37b3813e70991
mephisto / lib / mephisto / spam_detection_engines / null_engine.rb
100644 43 lines (33 sloc) 0.832 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
module Mephisto
  module SpamDetectionEngines
    class NullEngine < Mephisto::SpamDetectionEngine::Base
      Site.register_spam_detection_engine "None", self
 
      class << self
        def settings_template(site)
          load_template(File.join(File.dirname(__FILE__), "null_settings.html.erb")).render(:site => site, :options => site.spam_engine_options)
        end
      end
 
      def null?
        true
      end
 
      def statistics_template
        ""
      end
 
      def announce_article(permalink_url, article)
      end
 
      def ham?(permalink_url, comment, options={})
        true
      end
 
      def mark_as_ham(permalink_url, comment)
      end
 
      def mark_as_spam(permalink_url, comment)
      end
 
      def valid?
        true
      end
 
      def valid_key?
        true
      end
    end
  end
end