Minor speed improvements.
This commit is contained in:
+2
-2
@@ -196,7 +196,7 @@ module Precious
|
|||||||
format = ext.split('.').last || 'txt'
|
format = ext.split('.').last || 'txt'
|
||||||
filename = ::File.basename(fullname, ext)
|
filename = ::File.basename(fullname, ext)
|
||||||
contents = ::File.read(tempfile)
|
contents = ::File.read(tempfile)
|
||||||
reponame = filename + '.' + format
|
reponame = "#{filename}.#{format}"
|
||||||
|
|
||||||
head = wiki.repo.head
|
head = wiki.repo.head
|
||||||
|
|
||||||
@@ -274,7 +274,7 @@ module Precious
|
|||||||
end
|
end
|
||||||
|
|
||||||
post '/edit/*' do
|
post '/edit/*' do
|
||||||
path = '/' + clean_url(sanitize_empty_params(params[:path])).to_s
|
path = "/#{clean_url(sanitize_empty_params(params[:path]))}"
|
||||||
page_name = CGI.unescape(params[:page])
|
page_name = CGI.unescape(params[:page])
|
||||||
wiki = wiki_new
|
wiki = wiki_new
|
||||||
page = wiki.paged(page_name, path, exact = true)
|
page = wiki.paged(page_name, path, exact = true)
|
||||||
|
|||||||
Reference in New Issue
Block a user