[FIX] Website pager - Be sure that page in get param is a digit else use page 1.

Need to find which controller add ?page= instead of &page= because google find some url with '?page=1?page=2' --> page = '1?page=2'. According to google, the referrer is the old website.
This commit is contained in:
Jeremy Kersten 2014-06-30 12:10:49 +02:00
parent 4d74d9ef53
commit 7ba41e75e2
1 changed files with 1 additions and 1 deletions

View File

@ -250,7 +250,7 @@ class website(osv.osv):
# Compute Pager
page_count = int(math.ceil(float(total) / step))
page = max(1, min(int(page), page_count))
page = max(1, min(int(page if page.isdigit() else 1), page_count))
scope -= 1
pmin = max(page - int(math.floor(scope/2)), 1)