mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
remove monkeypatch that was causing file upload issues
This commit is contained in:
parent
82c473351f
commit
3f7f90c9e7
6 changed files with 9 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
get '/browse/?' do
|
||||
params.delete 'tag' if params[:tag].nil? || params[:tag].empty?
|
||||
params.delete 'tag' if params[:tag].nil? || params[:tag].strip.empty?
|
||||
site_dataset = browse_sites_dataset
|
||||
site_dataset = site_dataset.paginate @current_page, Site::BROWSE_PAGINATION_LENGTH
|
||||
@page_count = site_dataset.page_count || 1
|
||||
|
|
|
@ -41,7 +41,7 @@ the Neocities Cat
|
|||
end
|
||||
|
||||
get '/password_reset_confirm' do
|
||||
if params[:token].nil? || params[:token].empty?
|
||||
if params[:token].nil? || params[:token].strip.empty?
|
||||
flash[:error] = 'Could not find a site with this token.'
|
||||
redirect '/'
|
||||
end
|
||||
|
|
|
@ -16,7 +16,7 @@ post '/site_files/create_page' do
|
|||
params[:pagefilename].gsub!(/[^a-zA-Z0-9_\-.]/, '')
|
||||
params[:pagefilename].gsub!(/\.html$/i, '')
|
||||
|
||||
if params[:pagefilename].nil? || params[:pagefilename].empty?
|
||||
if params[:pagefilename].nil? || params[:pagefilename].strip.empty?
|
||||
@errors << 'You must provide a file name.'
|
||||
halt erb(:'site_files/new_page')
|
||||
end
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
get '/surf/?' do
|
||||
params.delete 'tag' if params[:tag].nil? || params[:tag].empty?
|
||||
params.delete 'tag' if params[:tag].nil? || params[:tag].strip.empty?
|
||||
site_dataset = browse_sites_dataset
|
||||
site_dataset = site_dataset.paginate @current_page, 1
|
||||
@page_count = site_dataset.page_count || 1
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
class String
|
||||
def empty?
|
||||
strip == '' ? true : false
|
||||
end
|
||||
|
||||
def shorten(length, usedots=true)
|
||||
if usedots
|
||||
return self if self.length < length
|
||||
|
|
Loading…
Add table
Reference in a new issue