mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
catch weird pages, set to 1
This commit is contained in:
parent
3e6422bb24
commit
7d43dbae19
1 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,12 @@
|
||||||
get '/browse/?' do
|
get '/browse/?' do
|
||||||
@surfmode = false
|
@surfmode = false
|
||||||
|
|
||||||
|
begin
|
||||||
@page = params[:page].to_i
|
@page = params[:page].to_i
|
||||||
|
rescue
|
||||||
|
@page = 1
|
||||||
|
end
|
||||||
|
|
||||||
@page = 1 if @page == 0
|
@page = 1 if @page == 0
|
||||||
|
|
||||||
params.delete 'tag' if params[:tag].nil? || params[:tag].strip.empty?
|
params.delete 'tag' if params[:tag].nil? || params[:tag].strip.empty?
|
||||||
|
|
Loading…
Add table
Reference in a new issue