Skip to content

Commit 516ae5f

Browse files
committed
Merge branch 'dev-v7' into dev-v7-centralizedloadbalancing
2 parents eea90e7 + dae66ad commit 516ae5f

File tree

4 files changed

+31
-4
lines changed

4 files changed

+31
-4
lines changed

src/Umbraco.Core/IO/PhysicalFileSystem.cs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,19 @@ public void AddFile(string path, Stream stream, bool overrideIfExists)
100100
if (stream.CanSeek)
101101
stream.Seek(0, 0);
102102

103-
using (var destination = (Stream)File.Create(GetFullPath(fsRelativePath)))
104-
stream.CopyTo(destination);
103+
using (var memoryStream = new MemoryStream())
104+
{
105+
//Add the BOM
106+
var bom = new byte[] { 0xEF, 0xBB, 0xBF };
107+
memoryStream.Write(bom, 0, bom.Length);
108+
stream.CopyTo(memoryStream);
109+
110+
if (memoryStream.CanSeek)
111+
memoryStream.Seek(0, 0);
112+
113+
using (var destination = (Stream)File.Create(GetFullPath(fsRelativePath)))
114+
memoryStream.CopyTo(destination);
115+
}
105116
}
106117

107118
public IEnumerable<string> GetFiles(string path)

src/Umbraco.Web.UI.Client/src/views/propertyeditors/grid/grid.controller.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ angular.module("umbraco")
389389
};
390390

391391
$scope.percentage = function(spans){
392-
return ((spans/12)*100).toFixed(1);
392+
return (( spans/ $scope.model.config.items.columns ) *100).toFixed(1);
393393
};
394394

395395

@@ -399,6 +399,7 @@ angular.module("umbraco")
399399

400400

401401

402+
402403
// *********************************************
403404
// INITIALISATION
404405
// these methods are called from ng-init on the template
@@ -419,6 +420,13 @@ angular.module("umbraco")
419420
$scope.hasSettings = true;
420421
}
421422

423+
//ensure the grid has a column value set, if nothing is found, set it to 12
424+
if($scope.model.config.items.columns && angular.isString($scope.model.config.items.columns)){
425+
$scope.model.config.items.columns = parseInt($scope.model.config.items.columns);
426+
}else{
427+
$scope.model.config.items.columns = 12;
428+
}
429+
422430
if ($scope.model.value && $scope.model.value.sections && $scope.model.value.sections.length > 0) {
423431
_.forEach($scope.model.value.sections, function(section, index){
424432

src/umbraco.cms/businesslogic/web/Access.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,14 @@ public static bool HasAccess(int DocumentId, member.Member Member)
494494
return hasAccess;
495495
}
496496

497+
[Obsolete("This method has been replaced because of a spelling mistake. Use the HasAccess method instead.", false)]
497498
public static bool HasAccces(int documentId, object memberId)
499+
{
500+
// Call the correctly named version of this method
501+
return HasAccess(documentId, memberId);
502+
}
503+
504+
public static bool HasAccess(int documentId, object memberId)
498505
{
499506
bool hasAccess = false;
500507
var node = new CMSNode(documentId);
@@ -511,7 +518,7 @@ public static bool HasAccces(int documentId, object memberId)
511518

512519
if (member != null)
513520
{
514-
foreach (string role in Roles.GetRolesForUser())
521+
foreach (string role in Roles.GetRolesForUser(member.UserName))
515522
{
516523
if (currentNode.SelectSingleNode("./group [@id='" + role + "']") != null)
517524
{

src/umbraco.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Umbraco.Web.UI.Client", "ht
5555
Release.AspNetCompiler.Debug = "False"
5656
SlnRelativePath = "Umbraco.Web.UI.Client\"
5757
DefaultWebSiteLanguage = "Visual C#"
58+
StartServerOnDebug = "false"
5859
EndProjectSection
5960
EndProject
6061
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Umbraco.Web", "Umbraco.Web\Umbraco.Web.csproj", "{651E1350-91B6-44B7-BD60-7207006D7003}"

0 commit comments

Comments
 (0)