public
Description: This contains various plugins for Feather
Clone URL: git://github.com/eldiablo/feather-plugins.git
Search Repo:
Click here to lend your support to: feather-plugins and make a donation at www.pledgie.com !
Set tagging to expire all cached pages to hit up archives.
mleung (author)
Thu May 08 14:12:32 -0700 2008
commit  7269bd92e41c45f3655555dce9fadc101e039a34
tree    c27b5b36071094a630f5eb313b141447ee0eea5c
parent  47db466e0dab3c38e216ec614ee8a82ffb567be2
...
6
7
8
9
10
11
 
12
13
14
...
6
7
8
 
 
 
9
10
11
12
0
@@ -6,9 +6,7 @@
0
       @comment.published = !CommentSetting.current.moderation
0
       session[:comment_error] = @comment.errors if !@comment.save
0
       article = Article[@comment.article_id]
0
- # Expire the main article index, and the article page itself
0
- expire_index
0
- expire_article(article)
0
+ expire_all_pages
0
       # Send e-mail notification if that setting is enabled
0
       if CommentSetting.current.email_notification
0
         email_params = { :from => CommentSetting.current.from_email, :to => CommentSetting.current.to_email, :subject => "New comment - RE: #{article.title}" }
...
4
5
6
 
 
 
 
 
 
 
 
7
...
4
5
6
7
8
9
10
11
12
13
14
15
0
@@ -4,5 +4,13 @@
0
 
0
   belongs_to :article
0
   belongs_to :tag
0
+
0
+ before_destroy do |tagging|
0
+ # If this is the last relevant tagging, reap tag.
0
+ unless tagging.tag.taggings.count > 0
0
+ tagging.tag.destroy!
0
+ end
0
+ end
0
+
0
 end

Comments

    No one has commented yet.