diff --git a/lib/gollum/frontend/app.rb b/lib/gollum/frontend/app.rb index 6c0621f4..6b5bf188 100644 --- a/lib/gollum/frontend/app.rb +++ b/lib/gollum/frontend/app.rb @@ -51,14 +51,15 @@ module Precious end post '/edit/:name' do - name = params[:name] - wiki = Gollum::Wiki.new($path) - page = wiki.page(name) + name = params[:name] + wiki = Gollum::Wiki.new($path) + page = wiki.page(name) format = params[:format].intern + name = params[:rename] if params[:rename] - wiki.update_page(page, page.name, format, params[:content], commit_message) + wiki.update_page(page, name, format, params[:content], commit_message) - redirect "/#{name}" + redirect "/#{Gollum::Page.cname name}" end post '/create/:name' do diff --git a/lib/gollum/frontend/templates/edit.mustache b/lib/gollum/frontend/templates/edit.mustache index b5a4a161..0d1ecdc7 100644 --- a/lib/gollum/frontend/templates/edit.mustache +++ b/lib/gollum/frontend/templates/edit.mustache @@ -2,28 +2,37 @@ « Back