|
|
|
@@ -45,7 +45,7 @@ type ImageStar struct { |
|
|
|
} |
|
|
|
|
|
|
|
type ImageTopic struct { |
|
|
|
ID int64 |
|
|
|
ID int64 `xorm:"pk autoincr"` |
|
|
|
Name string `xorm:"UNIQUE VARCHAR(105)"` |
|
|
|
ImageCount int |
|
|
|
CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` |
|
|
|
@@ -468,8 +468,13 @@ func (images ImageList) loadAttributes(e Engine, uid int64) error { |
|
|
|
} |
|
|
|
|
|
|
|
for i := range images { |
|
|
|
images[i].UserName = users[images[i].UID].Name |
|
|
|
images[i].RelAvatarLink = users[images[i].UID].RelAvatarLink() |
|
|
|
if users[images[i].UID] != nil { |
|
|
|
images[i].UserName = users[images[i].UID].Name |
|
|
|
images[i].RelAvatarLink = users[images[i].UID].RelAvatarLink() |
|
|
|
} else { |
|
|
|
images[i].UserName = "" |
|
|
|
images[i].RelAvatarLink = "" |
|
|
|
} |
|
|
|
if uid == -1 { |
|
|
|
images[i].IsStar = false |
|
|
|
} else { |
|
|
|
|