summaryrefslogtreecommitdiffstats
path: root/routers/web
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web')
-rw-r--r--routers/web/admin/packages.go8
-rw-r--r--routers/web/repo/packages.go10
-rw-r--r--routers/web/user/package.go17
3 files changed, 22 insertions, 13 deletions
diff --git a/routers/web/admin/packages.go b/routers/web/admin/packages.go
index 79bf025dd2..5de8922e6f 100644
--- a/routers/web/admin/packages.go
+++ b/routers/web/admin/packages.go
@@ -13,6 +13,7 @@ import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
+ "code.gitea.io/gitea/modules/util"
packages_service "code.gitea.io/gitea/services/packages"
)
@@ -31,9 +32,10 @@ func Packages(ctx *context.Context) {
sort := ctx.FormTrim("sort")
pvs, total, err := packages_model.SearchVersions(ctx, &packages_model.PackageSearchOptions{
- Type: packages_model.Type(packageType),
- Name: packages_model.SearchValue{Value: query},
- Sort: sort,
+ Type: packages_model.Type(packageType),
+ Name: packages_model.SearchValue{Value: query},
+ Sort: sort,
+ IsInternal: util.OptionalBoolFalse,
Paginator: &db.ListOptions{
PageSize: setting.UI.PackagesPagingNum,
Page: page,
diff --git a/routers/web/repo/packages.go b/routers/web/repo/packages.go
index 03ea4fc5f4..d2d31ad57c 100644
--- a/routers/web/repo/packages.go
+++ b/routers/web/repo/packages.go
@@ -12,6 +12,7 @@ import (
"code.gitea.io/gitea/modules/base"
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/setting"
+ "code.gitea.io/gitea/modules/util"
)
const (
@@ -32,10 +33,11 @@ func Packages(ctx *context.Context) {
PageSize: setting.UI.PackagesPagingNum,
Page: page,
},
- OwnerID: ctx.ContextUser.ID,
- RepoID: ctx.Repo.Repository.ID,
- Type: packages.Type(packageType),
- Name: packages.SearchValue{Value: query},
+ OwnerID: ctx.ContextUser.ID,
+ RepoID: ctx.Repo.Repository.ID,
+ Type: packages.Type(packageType),
+ Name: packages.SearchValue{Value: query},
+ IsInternal: util.OptionalBoolFalse,
})
if err != nil {
ctx.ServerError("SearchLatestVersions", err)
diff --git a/routers/web/user/package.go b/routers/web/user/package.go
index b2b550cb73..aa379152b3 100644
--- a/routers/web/user/package.go
+++ b/routers/web/user/package.go
@@ -17,6 +17,7 @@ import (
"code.gitea.io/gitea/modules/context"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
+ "code.gitea.io/gitea/modules/util"
"code.gitea.io/gitea/modules/web"
"code.gitea.io/gitea/services/forms"
packages_service "code.gitea.io/gitea/services/packages"
@@ -43,9 +44,10 @@ func ListPackages(ctx *context.Context) {
PageSize: setting.UI.PackagesPagingNum,
Page: page,
},
- OwnerID: ctx.ContextUser.ID,
- Type: packages_model.Type(packageType),
- Name: packages_model.SearchValue{Value: query},
+ OwnerID: ctx.ContextUser.ID,
+ Type: packages_model.Type(packageType),
+ Name: packages_model.SearchValue{Value: query},
+ IsInternal: util.OptionalBoolFalse,
})
if err != nil {
ctx.ServerError("SearchLatestVersions", err)
@@ -112,7 +114,8 @@ func RedirectToLastVersion(ctx *context.Context) {
}
pvs, _, err := packages_model.SearchLatestVersions(ctx, &packages_model.PackageSearchOptions{
- PackageID: p.ID,
+ PackageID: p.ID,
+ IsInternal: util.OptionalBoolFalse,
})
if err != nil {
ctx.ServerError("GetPackageByName", err)
@@ -157,8 +160,9 @@ func ViewPackageVersion(ctx *context.Context) {
})
default:
pvs, total, err = packages_model.SearchVersions(ctx, &packages_model.PackageSearchOptions{
- Paginator: db.NewAbsoluteListOptions(0, 5),
- PackageID: pd.Package.ID,
+ Paginator: db.NewAbsoluteListOptions(0, 5),
+ PackageID: pd.Package.ID,
+ IsInternal: util.OptionalBoolFalse,
})
if err != nil {
ctx.ServerError("SearchVersions", err)
@@ -254,6 +258,7 @@ func ListPackageVersions(ctx *context.Context) {
ExactMatch: false,
Value: query,
},
+ IsInternal: util.OptionalBoolFalse,
})
if err != nil {
ctx.ServerError("SearchVersions", err)