| @@ -106,7 +106,9 @@ func searchRepoByLabel(ctx *context.Context, Key string, Page int, PageSize int) | |||||
| log.Info("WebTotal=" + fmt.Sprint(WebTotal)) | log.Info("WebTotal=" + fmt.Sprint(WebTotal)) | ||||
| log.Info("PrivateTotal=" + fmt.Sprint(PrivateTotal)) | log.Info("PrivateTotal=" + fmt.Sprint(PrivateTotal)) | ||||
| resultObj.Result = make([]map[string]interface{}, 0) | resultObj.Result = make([]map[string]interface{}, 0) | ||||
| if from == 0 { | |||||
| WebTotal = 0 | |||||
| } | |||||
| if ctx.User != nil && (from < PrivateTotal || from == 0) { | if ctx.User != nil && (from < PrivateTotal || from == 0) { | ||||
| orderBy := models.SearchOrderByRecentUpdated | orderBy := models.SearchOrderByRecentUpdated | ||||
| switch SortBy { | switch SortBy { | ||||
| @@ -214,7 +216,9 @@ func searchRepo(ctx *context.Context, TableName string, Key string, Page int, Pa | |||||
| log.Info("WebTotal=" + fmt.Sprint(WebTotal)) | log.Info("WebTotal=" + fmt.Sprint(WebTotal)) | ||||
| log.Info("PrivateTotal=" + fmt.Sprint(PrivateTotal)) | log.Info("PrivateTotal=" + fmt.Sprint(PrivateTotal)) | ||||
| resultObj.Result = make([]map[string]interface{}, 0) | resultObj.Result = make([]map[string]interface{}, 0) | ||||
| if from == 0 { | |||||
| WebTotal = 0 | |||||
| } | |||||
| if ctx.User != nil && (from < PrivateTotal || from == 0) { | if ctx.User != nil && (from < PrivateTotal || from == 0) { | ||||
| orderBy := models.SearchOrderByRecentUpdated | orderBy := models.SearchOrderByRecentUpdated | ||||
| switch SortBy { | switch SortBy { | ||||
| @@ -749,6 +753,9 @@ func searchIssue(ctx *context.Context, TableName string, Key string, Page int, P | |||||
| WebTotal := ctx.QueryInt("WebTotal") | WebTotal := ctx.QueryInt("WebTotal") | ||||
| from := (Page - 1) * PageSize | from := (Page - 1) * PageSize | ||||
| if from == 0 { | |||||
| WebTotal = 0 | |||||
| } | |||||
| resultObj := &SearchRes{} | resultObj := &SearchRes{} | ||||
| log.Info("WebTotal=" + fmt.Sprint(WebTotal)) | log.Info("WebTotal=" + fmt.Sprint(WebTotal)) | ||||
| log.Info("PrivateTotal=" + fmt.Sprint(PrivateTotal)) | log.Info("PrivateTotal=" + fmt.Sprint(PrivateTotal)) | ||||