summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--models/action.go6
-rw-r--r--templates/user/dashboard/feeds.tmpl1
2 files changed, 3 insertions, 4 deletions
diff --git a/models/action.go b/models/action.go
index 11a2de0339..106f2c2eb5 100644
--- a/models/action.go
+++ b/models/action.go
@@ -10,12 +10,12 @@ import (
"fmt"
"path"
"regexp"
- "strconv"
"strings"
"time"
"unicode"
"github.com/go-xorm/xorm"
+ "github.com/Unknwon/com"
api "github.com/gogits/go-gogs-client"
@@ -138,8 +138,8 @@ func (a Action) GetIssueInfos() []string {
}
func (a Action) GetIssueTitle() string {
- issueID, _ := strconv.Atoi(strings.SplitN(a.Content, "|", 2)[0])
- issue, _ := GetIssueByID(int64(issueID))
+ issueID := com.StrTo(a.GetIssueInfos()[0]).MustInt64()
+ issue, _ := GetIssueByID(issueID)
return issue.Name
}
diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl
index dcd856f6d7..bff44f06bb 100644
--- a/templates/user/dashboard/feeds.tmpl
+++ b/templates/user/dashboard/feeds.tmpl
@@ -48,7 +48,6 @@
{{else if eq .GetOpType 7}}
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
{{else if eq .GetOpType 10}}
- <p class="news-content comment-news">{{.GetIssueTitle}}</p>
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>
{{else if eq .GetOpType 11}}
<p class="news-content comment-news">{{index .GetIssueInfos 1}}</p>