mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 10:51:30 +00:00
Merge pull request #977 from athurg/patch-1
Fix RequestURI nil caused template parse failed
This commit is contained in:
commit
5d8187d005
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user