Skip to content

Commit

Permalink
Dont index revision pages on the wiki, and some other listing pages
Browse files Browse the repository at this point in the history
  • Loading branch information
nono committed Nov 8, 2011
1 parent 27eea70 commit 52db803
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def seo_filter
@last_comments = Comment.footer
@popular_tags = Tag.footer
@friend_sites = FriendSite.select([:url, :title])
@dont_index = request.headers["User-Agent"] =~ /AppEngine-Google/i
@dont_index = params.has_key?(:order) || (request.headers["User-Agent"] =~ /AppEngine-Google/i)
end

def dont_index?
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/wiki_pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,15 @@ def destroy
end

def revision
@dont_index = true
enforce_view_permission(@wiki_page)
@version = @wiki_page.versions.find_by_version!(params[:revision])
previous = @version.higher_item
@was = previous ? previous.body : ''
end

def changes
@dont_index = true
@versions = WikiVersion.order("created_at DESC").joins(:wiki_page).page(params[:page])
respond_to do |wants|
wants.html
Expand Down

0 comments on commit 52db803

Please sign in to comment.