diff --git a/media/media_box.go b/media/media_box.go index f9937d33f..89640c8cb 100644 --- a/media/media_box.go +++ b/media/media_box.go @@ -558,9 +558,10 @@ func thumbName(name string, size *base.Size, fileSize int, f *media_library.Medi } if size != nil { title = name - base.SaleUpDown(f.Width, f.Height, size) - if size.Width != 0 && size.Height != 0 { - text = fmt.Sprintf("%d X %d", size.Width, size.Height) + sizeCopy := *size + base.SaleUpDown(f.Width, f.Height, &sizeCopy) + if sizeCopy.Width != 0 && sizeCopy.Height != 0 { + text = fmt.Sprintf("%d X %d", sizeCopy.Width, sizeCopy.Height) } } // if fileSize != 0 { diff --git a/publish/builder.go b/publish/builder.go index bb515121b..02bf4c13b 100644 --- a/publish/builder.go +++ b/publish/builder.go @@ -692,3 +692,15 @@ func (b *Builder) defaultDisableByStatus(_ *web.EventContext, obj any) *Disablem DisabledDelete: disabled, } } + +func (b *Builder) GetVersionPublishModels() map[string]any { + return b.versionPublishModels +} + +func (b *Builder) GetNonVersionPublishModels() map[string]any { + return b.nonVersionPublishModels +} + +func (b *Builder) GetListPublishModels() map[string]any { + return b.listPublishModels +}