File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ func Home(ctx *context.Context) {
73
73
// RepoSearchOptions when calling search repositories
74
74
type RepoSearchOptions struct {
75
75
OwnerID int64
76
+ HideMirror util.OptionalBool
76
77
Private bool
77
78
Restricted bool
78
79
PageSize int
@@ -136,6 +137,12 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
136
137
topicOnly := ctx .QueryBool ("topic" )
137
138
ctx .Data ["TopicOnly" ] = topicOnly
138
139
140
+ var show_mirror util.OptionalBool = util .OptionalBoolNone ;
141
+
142
+ if ((opts .HideMirror == util .OptionalBoolTrue ) && (keyword == "" )) {
143
+ show_mirror = util .OptionalBoolFalse ;
144
+ }
145
+
139
146
repos , count , err = models .SearchRepository (& models.SearchRepoOptions {
140
147
ListOptions : models.ListOptions {
141
148
Page : page ,
@@ -144,6 +151,7 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
144
151
Actor : ctx .User ,
145
152
OrderBy : orderBy ,
146
153
Private : opts .Private ,
154
+ Mirror : show_mirror ,
147
155
Keyword : keyword ,
148
156
OwnerID : opts .OwnerID ,
149
157
AllPublic : true ,
@@ -181,6 +189,7 @@ func ExploreRepos(ctx *context.Context) {
181
189
}
182
190
183
191
RenderRepoSearch (ctx , & RepoSearchOptions {
192
+ HideMirror : util .OptionalBoolTrue ,
184
193
PageSize : setting .UI .ExplorePagingNum ,
185
194
OwnerID : ownerID ,
186
195
Private : ctx .User != nil ,
You can’t perform that action at this time.
0 commit comments