Changeset 1685

Show
Ignore:
Timestamp:
04/12/08 23:01:07 (1 month ago)
Author:
neuro
Message:

Fixes a very old bug affecting pages and allowing unpublished pages to be displayed on the blog. I actually wonder why no one told us about this before.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/controllers/articles_controller.rb

    r1665 r1685  
    8686 
    8787  def view_page 
    88     if(@page = Page.find_by_name(params[:name].to_a.join('/'))) 
     88    if(@page = Page.find_by_name(params[:name].to_a.join('/'), :conditions => "published = 1")) 
    8989      @page_title = @page.title 
    9090    else