Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
b77c1d8db5
2 changed files with 5 additions and 2 deletions
|
@ -235,7 +235,7 @@ class WikiController < ApplicationController
|
|||
real_page = WikiReference.page_that_redirects_for(@web, @page_name)
|
||||
if real_page
|
||||
flash[:info] = "Redirected from \"#{@page_name}\"."
|
||||
redirect_to :web => @web_name, :action => 'published', :id => real_page
|
||||
redirect_to :web => @web_name, :action => 'published', :id => real_page, :status => 301
|
||||
else
|
||||
render(:text => "Page '#{@page_name}' not found", :status => 404, :layout => 'error')
|
||||
end
|
||||
|
@ -324,8 +324,10 @@ class WikiController < ApplicationController
|
|||
real_page = WikiReference.page_that_redirects_for(@web, @page_name)
|
||||
if real_page
|
||||
flash[:info] = "Redirected from \"#{@page_name}\"."
|
||||
redirect_to :web => @web_name, :action => 'show', :id => real_page
|
||||
redirect_to :web => @web_name, :action => 'show', :id => real_page, :status => 301
|
||||
else
|
||||
flash[:info] = "Page \"#{@page_name}\" does not exist.\n" +
|
||||
"Please create it now, or hit the \"back\" button in your browser."
|
||||
redirect_to :web => @web_name, :action => 'new', :id => @page_name
|
||||
end
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue