forked from forgejo/forgejo
parent
a1b2a11812
commit
f91dbbba98
90 changed files with 434 additions and 464 deletions
|
@ -1412,7 +1412,7 @@ func ViewIssue(ctx *context.Context) {
|
|||
if ctx.Doer != nil {
|
||||
iw.UserID = ctx.Doer.ID
|
||||
iw.IssueID = issue.ID
|
||||
iw.IsWatching, err = issues_model.CheckIssueWatch(ctx.Doer, issue)
|
||||
iw.IsWatching, err = issues_model.CheckIssueWatch(ctx, ctx.Doer, issue)
|
||||
if err != nil {
|
||||
ctx.ServerError("CheckIssueWatch", err)
|
||||
return
|
||||
|
@ -1530,7 +1530,7 @@ func ViewIssue(ctx *context.Context) {
|
|||
if ctx.Repo.Repository.IsTimetrackerEnabled(ctx) {
|
||||
if ctx.IsSigned {
|
||||
// Deal with the stopwatch
|
||||
ctx.Data["IsStopwatchRunning"] = issues_model.StopwatchExists(ctx.Doer.ID, issue.ID)
|
||||
ctx.Data["IsStopwatchRunning"] = issues_model.StopwatchExists(ctx, ctx.Doer.ID, issue.ID)
|
||||
if !ctx.Data["IsStopwatchRunning"].(bool) {
|
||||
var exists bool
|
||||
var swIssue *issues_model.Issue
|
||||
|
@ -2708,7 +2708,7 @@ func ListIssues(ctx *context.Context) {
|
|||
|
||||
var labelIDs []int64
|
||||
if splitted := strings.Split(ctx.FormString("labels"), ","); len(splitted) > 0 {
|
||||
labelIDs, err = issues_model.GetLabelIDsInRepoByNames(ctx.Repo.Repository.ID, splitted)
|
||||
labelIDs, err = issues_model.GetLabelIDsInRepoByNames(ctx, ctx.Repo.Repository.ID, splitted)
|
||||
if err != nil {
|
||||
ctx.Error(http.StatusInternalServerError, err.Error())
|
||||
return
|
||||
|
@ -2720,7 +2720,7 @@ func ListIssues(ctx *context.Context) {
|
|||
for i := range part {
|
||||
// uses names and fall back to ids
|
||||
// non existent milestones are discarded
|
||||
mile, err := issues_model.GetMilestoneByRepoIDANDName(ctx.Repo.Repository.ID, part[i])
|
||||
mile, err := issues_model.GetMilestoneByRepoIDANDName(ctx, ctx.Repo.Repository.ID, part[i])
|
||||
if err == nil {
|
||||
mileIDs = append(mileIDs, mile.ID)
|
||||
continue
|
||||
|
@ -3037,7 +3037,7 @@ func NewComment(ctx *context.Context) {
|
|||
return
|
||||
}
|
||||
} else {
|
||||
if err := stopTimerIfAvailable(ctx.Doer, issue); err != nil {
|
||||
if err := stopTimerIfAvailable(ctx, ctx.Doer, issue); err != nil {
|
||||
ctx.ServerError("CreateOrStopIssueStopwatch", err)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue