@@ -111,7 +111,7 @@ func home(ctx *context.Context, viewRepositories bool) {
111
111
ctx .Data ["DisableNewPullMirrors" ] = setting .Mirror .DisableNewPull
112
112
ctx .Data ["ShowMemberAndTeamTab" ] = ctx .Org .IsMember || len (members ) > 0
113
113
114
- if ! prepareOrgProfileReadme (ctx , viewRepositories ) {
114
+ if ! prepareOrgProfileRepo (ctx , viewRepositories ) {
115
115
ctx .Data ["PageIsViewRepositories" ] = true
116
116
}
117
117
@@ -168,15 +168,18 @@ func home(ctx *context.Context, viewRepositories bool) {
168
168
ctx .HTML (http .StatusOK , tplOrgHome )
169
169
}
170
170
171
- func prepareOrgProfileReadme (ctx * context.Context , viewRepositories bool ) bool {
171
+ func prepareOrgProfileRepo (ctx * context.Context , viewRepositories bool ) bool {
172
172
profileDbRepo , profileGitRepo , profileReadme , profileClose := shared_user .FindUserProfileReadme (ctx , ctx .Doer )
173
173
defer profileClose ()
174
- ctx .Data ["HasProfileReadme" ] = profileReadme != nil
175
174
176
175
if profileGitRepo == nil || profileReadme == nil || viewRepositories {
177
176
return false
178
177
}
179
178
179
+ ctx .Data ["OrgProfileRepo" ] = profileDbRepo
180
+ ctx .Data ["HasProfileWiki" ] = profileDbRepo .HasWiki ()
181
+ ctx .Data ["HasProfileReadme" ] = true
182
+
180
183
if bytes , err := profileReadme .GetBlobContent (setting .UI .MaxDisplayFileSize ); err != nil {
181
184
log .Error ("failed to GetBlobContent: %v" , err )
182
185
} else {
0 commit comments