Fixes: U4-6915 Txt Starter Kit install fails on 7.3.0 beta3

This commit is contained in:
Shannon
2015-08-05 17:17:49 +02:00
parent edfe1e6d54
commit 4c20441c4e
3 changed files with 8 additions and 3 deletions

View File

@@ -17,7 +17,7 @@ namespace Umbraco.Core.Models
public class Stylesheet : File
{
public Stylesheet(string path)
: base(path)
: base(path.EnsureEndsWith(".css"))
{
InitializeProperties();
}

View File

@@ -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())
{