diff --git a/UMBRACOELISE.testrunconfig b/UMBRACOELISE.testrunconfig
new file mode 100644
index 0000000000..d0841f9f09
--- /dev/null
+++ b/UMBRACOELISE.testrunconfig
@@ -0,0 +1,31 @@
+
+
+ These are default test settings for a local test run.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/umbraco.sln b/umbraco.sln
index 3691d776c0..01a8675932 100644
--- a/umbraco.sln
+++ b/umbraco.sln
@@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
umbraco weekly.build = umbraco weekly.build
umbraco.build = umbraco.build
umbraco.vsmdi = umbraco.vsmdi
+ UMBRACOELISE.testrunconfig = UMBRACOELISE.testrunconfig
UMBRACOHUMMER.testrunconfig = UMBRACOHUMMER.testrunconfig
EndProjectSection
EndProject
diff --git a/umbraco/cms/businesslogic/web/Document.cs b/umbraco/cms/businesslogic/web/Document.cs
index 039504db93..845751eb55 100644
--- a/umbraco/cms/businesslogic/web/Document.cs
+++ b/umbraco/cms/businesslogic/web/Document.cs
@@ -377,6 +377,26 @@ namespace umbraco.cms.businesslogic.web
}
///
+ /// Check if a node is a document
+ ///
+ ///
+ ///
+ public static bool IsDocument(int nodeId)
+ {
+ bool isDoc = false;
+ using (IRecordsReader dr =
+ SqlHelper.ExecuteReader(string.Format("select nodeId from cmsDocument where nodeId = @id"),
+ SqlHelper.CreateParameter("@id", nodeId))) {
+
+ if (dr.Read())
+ {
+ isDoc = true;
+ }
+ }
+
+ return isDoc;
+ }
+
/// Used to get the firstlevel/root documents of the hierachy
///
/// Root documents
diff --git a/umbraco/presentation/umbraco.presentation.csproj b/umbraco/presentation/umbraco.presentation.csproj
index 7efba1617d..db672d05bd 100644
--- a/umbraco/presentation/umbraco.presentation.csproj
+++ b/umbraco/presentation/umbraco.presentation.csproj
@@ -1539,7 +1539,7 @@
-
+
diff --git a/umbraco/presentation/umbraco/users/UserPermissions.cs b/umbraco/presentation/umbraco/users/UserPermissions.cs
index ea01d064a5..729944bc94 100644
--- a/umbraco/presentation/umbraco/users/UserPermissions.cs
+++ b/umbraco/presentation/umbraco/users/UserPermissions.cs
@@ -60,7 +60,7 @@ namespace umbraco.cms.presentation.user
);
//ensure that only the nodes that the user has permissions to update are updated
- List lstNoPermissions = new List();
+ List lstNoPermissions = new List();
foreach (int nodeID in nodeIDs)
{
string nodeActions = UmbracoEnsuredPage.CurrentUser.GetPermissions(GetNodePath(nodeID));
@@ -78,11 +78,11 @@ namespace umbraco.cms.presentation.user
//get the complete list of node ids that this change will affect
List allNodes = new List();
if (replaceChildren)
- foreach (int nodeID in nodeIDs)
- {
- allNodes.Add(nodeID);
- allNodes.AddRange(FindChildNodes(nodeID));
- }
+ foreach (int nodeID in nodeIDs)
+ {
+ allNodes.Add(nodeID);
+ allNodes.AddRange(FindChildNodes(nodeID));
+ }
else
allNodes.AddRange(nodeIDs);
@@ -98,7 +98,7 @@ namespace umbraco.cms.presentation.user
//If there are NO permissions for this node, we need to assign the ActionNull permission otherwise
//the node will inherit from it's parent.
InsertPermissions(nodeIDs, ActionNull.Instance);
- }
+ }
//clear umbraco cache (this is the exact syntax umbraco uses... which should be a public method).
HttpRuntime.Cache.Remove(string.Format("UmbracoUser{0}", m_user.Id.ToString()));
@@ -129,8 +129,13 @@ namespace umbraco.cms.presentation.user
///
private string GetNodePath(int iNodeID)
{
- Document doc = new Document(iNodeID);
- return doc.Path;
+ if (Document.IsDocument(iNodeID))
+ {
+ Document doc = new Document(iNodeID);
+ return doc.Path;
+ }
+
+ return "";
}
///
@@ -141,18 +146,18 @@ namespace umbraco.cms.presentation.user
///
private List FindChildNodes(int nodeID)
{
- Document[] docs = Document.GetChildrenForTree(nodeID);
- List nodeIds = new List();
- foreach (Document doc in docs)
- {
- nodeIds.Add(doc.Id);
- if (doc.HasChildren)
- {
- nodeIds.AddRange(FindChildNodes(doc.Id));
- }
- }
- return nodeIds;
- }
+ Document[] docs = Document.GetChildrenForTree(nodeID);
+ List nodeIds = new List();
+ foreach (Document doc in docs)
+ {
+ nodeIds.Add(doc.Id);
+ if (doc.HasChildren)
+ {
+ nodeIds.AddRange(FindChildNodes(doc.Id));
+ }
+ }
+ return nodeIds;
+ }
private void InsertPermissions(int[] nodeIDs, IAction permission)
{
@@ -161,12 +166,12 @@ namespace umbraco.cms.presentation.user
}
private void InsertPermission(int nodeID, IAction permission)
- {
+ {
//create a new CMSNode object but don't initialize (this prevents a db query)
CMSNode node = new CMSNode(nodeID, false);
- Permission.MakeNew(m_user, node, permission.Letter);
+ Permission.MakeNew(m_user, node, permission.Letter);
}
-
+
private static void DeletePermissions(int iUserID, int iNodeID)
{
DeletePermissions(iUserID, new int[] { iNodeID });
@@ -185,6 +190,6 @@ namespace umbraco.cms.presentation.user
{
return from.ToString();
}
-
+
}
}
\ No newline at end of file
diff --git a/umbraco/presentation/web.config.UMBRACO-MIURA.xslt b/umbraco/presentation/web.config.UMBRACOELISE.xslt
similarity index 79%
rename from umbraco/presentation/web.config.UMBRACO-MIURA.xslt
rename to umbraco/presentation/web.config.UMBRACOELISE.xslt
index b44b018243..e203564fa6 100644
--- a/umbraco/presentation/web.config.UMBRACO-MIURA.xslt
+++ b/umbraco/presentation/web.config.UMBRACOELISE.xslt
@@ -4,11 +4,11 @@
- server=.\sqlexpress;database=niels;user id=DBUSER;password=DBPASSWORD
+ server=.\sqlexpress;database=41RC;user id=DBUSER;password=DBPASSWORD
- 4.1.0.beta
+