File: commentsize.rb

package info (click to toggle)
tdiary-contrib 5.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,772 kB
  • sloc: ruby: 17,305; javascript: 8,263; lisp: 562; xml: 451; php: 61; sql: 40; makefile: 18
file content (18 lines) | stat: -rw-r--r-- 380 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#
# comment_size.rb: included TDiary::Filter::CommentSizeFilter class
#

module TDiary
   module Filter
      class CommentsizeFilter < Filter
         def comment_filter( diary, comment )
            return false if comment.body.size > @conf['comment.size']
            true
         end

         def referer_filter( referer )
            true
         end
      end
   end
end