Change redirect to just return page
This commit is contained in:
+15
-2
@@ -626,8 +626,21 @@ module Precious
|
|||||||
def show_page_or_file(fullpath)
|
def show_page_or_file(fullpath)
|
||||||
wiki = wiki_new
|
wiki = wiki_new
|
||||||
if page = fullpath[-1] != '/' ? wiki.page("#{fullpath}/#{wiki.index_page}") : false
|
if page = fullpath[-1] != '/' ? wiki.page("#{fullpath}/#{wiki.index_page}") : false
|
||||||
redirect_path = "#{fullpath}/#{wiki.index_page}"
|
@page = page
|
||||||
redirect to("#{encodeURIComponent(redirect_path)}")
|
@name = page.filename_stripped
|
||||||
|
@content = page.formatted_data
|
||||||
|
@upload_dest = find_upload_dest(Pathname.new(fullpath).cleanpath.to_s)
|
||||||
|
|
||||||
|
# Extensions and layout data
|
||||||
|
@editable = true
|
||||||
|
@toc_content = wiki.universal_toc ? @page.toc_data : nil
|
||||||
|
@h1_title = wiki.h1_title
|
||||||
|
@bar_side = wiki.bar_side
|
||||||
|
@allow_uploads = wiki.allow_uploads
|
||||||
|
@navbar = true
|
||||||
|
mustache :page
|
||||||
|
#redirect_path = "#{fullpath}/#{wiki.index_page}"
|
||||||
|
#redirect to("#{encodeURIComponent(redirect_path)}")
|
||||||
elsif page = wiki.page(fullpath)
|
elsif page = wiki.page(fullpath)
|
||||||
@page = page
|
@page = page
|
||||||
@name = page.filename_stripped
|
@name = page.filename_stripped
|
||||||
|
|||||||
Reference in New Issue
Block a user