1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-29 22:21:29 +00:00

Merge pull request #977 from athurg/patch-1

Fix RequestURI nil caused template parse failed
This commit is contained in:
astaxie 2014-12-25 11:40:26 +08:00
commit 5d8187d005

View File

@ -114,7 +114,7 @@ func (p *Paginator) Pages() []int {
// Returns URL for a given page index. // Returns URL for a given page index.
func (p *Paginator) PageLink(page int) string { func (p *Paginator) PageLink(page int) string {
link, _ := url.ParseRequestURI(p.Request.RequestURI) link, _ := url.ParseRequestURI(p.Request.URL.String())
values := link.Query() values := link.Query()
if page == 1 { if page == 1 {
values.Del("p") values.Del("p")