loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Project links should use parent link methods (#22587)

Instead of re-creating, these should use the available `Link` methods
from the "parent" of the project, which also take sub-urls into account.

Signed-off-by: jolheiser <john.olheiser@gmail.com>

authored by

John Olheiser and committed by
GitHub
9cc15d18 519b91ad

+2 -2
+2 -2
models/project/project.go
··· 123 123 log.Error("LoadOwner: %v", err) 124 124 return "" 125 125 } 126 - return fmt.Sprintf("/%s/-/projects/%d", p.Owner.Name, p.ID) 126 + return fmt.Sprintf("%s/-/projects/%d", p.Owner.HomeLink(), p.ID) 127 127 } 128 128 if p.RepoID > 0 { 129 129 err := p.LoadRepo(db.DefaultContext) ··· 131 131 log.Error("LoadRepo: %v", err) 132 132 return "" 133 133 } 134 - return fmt.Sprintf("/%s/projects/%d", p.Repo.RepoPath(), p.ID) 134 + return fmt.Sprintf("%s/projects/%d", p.Repo.Link(), p.ID) 135 135 } 136 136 return "" 137 137 }