Fixes: U4-6915 Txt Starter Kit install fails on 7.3.0 beta3
This commit is contained in:
@@ -17,7 +17,7 @@ namespace Umbraco.Core.Models
|
||||
public class Stylesheet : File
|
||||
{
|
||||
public Stylesheet(string path)
|
||||
: base(path)
|
||||
: base(path.EnsureEndsWith(".css"))
|
||||
{
|
||||
InitializeProperties();
|
||||
}
|
||||
|
||||
@@ -25,6 +25,8 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
|
||||
public override Stylesheet Get(string id)
|
||||
{
|
||||
id = id.EnsureEndsWith(".css");
|
||||
|
||||
if (FileSystem.FileExists(id) == false)
|
||||
{
|
||||
return null;
|
||||
@@ -63,7 +65,10 @@ namespace Umbraco.Core.Persistence.Repositories
|
||||
public override IEnumerable<Stylesheet> GetAll(params string[] ids)
|
||||
{
|
||||
//ensure they are de-duplicated, easy win if people don't do this as this can cause many excess queries
|
||||
ids = ids.Distinct().ToArray();
|
||||
ids = ids
|
||||
.Select(x => x.EnsureEndsWith(".css"))
|
||||
.Distinct()
|
||||
.ToArray();
|
||||
|
||||
if (ids.Any())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user