Skip to content

Commit

Permalink
fix beego#87
Browse files Browse the repository at this point in the history
  • Loading branch information
astaxie committed Jul 2, 2013
1 parent 8807c32 commit 189df12
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,15 @@ func (c *Controller) GetString(key string) string {
}

func (c *Controller) GetStrings(key string) []string {
r := c.Ctx.Request;
if r.Form == nil {
r := c.Ctx.Request
if r.Form == nil {
return []string{}
}
vs := r.Form[key]
if len(vs) > 0 {
return vs
}
return []string{}
vs := r.Form[key]
if len(vs) > 0 {
return vs
}
return []string{}
}

func (c *Controller) GetInt(key string) (int64, error) {
Expand Down Expand Up @@ -327,3 +327,7 @@ func (c *Controller) DelSession(name interface{}) {
}
c.CruSession.Delete(name)
}

func (c *Controller) IsAjax() bool {
return (c.Ctx.Request.Header.Get("HTTP_X_REQUESTED_WITH") == "XMLHttpRequest")
}

0 comments on commit 189df12

Please sign in to comment.