diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2023-09-16 18:03:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-16 18:03:02 +0200 |
commit | c766140dad3408048ad843d0e7b4ab5d9f5777c6 (patch) | |
tree | 49cd37606ae0cb252cd16264c111c3cf5b00088d /templates/repo/header.tmpl | |
parent | Upgrading the actions/checkout@4 (#27096) (diff) | |
download | forgejo-c766140dad3408048ad843d0e7b4ab5d9f5777c6.tar.xz forgejo-c766140dad3408048ad843d0e7b4ab5d9f5777c6.zip |
Add `RemoteAddress` to mirrors (#26952)
This PR adds a new field `RemoteAddress` to both mirror types which
contains the sanitized remote address for easier (database) access to
that information. Will be used in the audit PR if merged.
Diffstat (limited to 'templates/repo/header.tmpl')
-rw-r--r-- | templates/repo/header.tmpl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 984e9f044e..935060816c 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -37,8 +37,7 @@ {{end}} </div> {{if $.PullMirror}} - {{$address := MirrorRemoteAddress $.Context . $.PullMirror.GetRemoteName false}} - <div class="fork-flag">{{$.locale.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$address.Address}}">{{$address.Address}}</a></div> + <div class="fork-flag">{{$.locale.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$.PullMirror.RemoteAddress}}">{{$.PullMirror.RemoteAddress}}</a></div> {{end}} {{if .IsFork}}<div class="fork-flag">{{$.locale.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{.BaseRepo.FullName}}</a></div>{{end}} {{if .IsGenerated}}<div class="fork-flag">{{$.locale.Tr "repo.generated_from"}} <a href="{{.TemplateRepo.Link}}">{{.TemplateRepo.FullName}}</a></div>{{end}} |