~ubuntu-branches/ubuntu/utopic/tdiary/utopic

« back to all changes in this revision

Viewing changes to contrib2/filter/commentsize.rb

  • Committer: Bazaar Package Importer
  • Author(s): Daigo Moriwaki
  • Date: 2011-04-11 21:53:16 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110411215316-ih4gt4q8p29d2wf8
Tags: 3.0.1-1
* New upstream release (Closes: #542801, #594947)
* debian/control:
 - Bumped up Standards-Version to 3.9.1.
 - Updated version dependency.
* debian/tdiary-setup.rb: Followed the upstream changes, incorporating js and
  index.fcgi

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# comment_size.rb: included TDiary::Filter::CommentSizeFilter class
 
3
#
 
4
 
 
5
module TDiary
 
6
   module Filter
 
7
      class CommentsizeFilter < Filter
 
8
         def comment_filter( diary, comment )
 
9
            return false if comment.body.size > @conf['comment.size']
 
10
            true
 
11
         end
 
12
         
 
13
         def referer_filter( referer )
 
14
            true
 
15
         end
 
16
      end
 
17
   end
 
18
end