Fixes U4-2686 Error when trying to delete member group with ampersand in name.

This commit is contained in:
Sebastiaan Janssen
2013-08-26 10:29:30 +02:00
parent c9942d7ca5
commit dd59038369

View File

@@ -68,20 +68,23 @@ namespace umbraco.presentation.webservices
public void Delete(string nodeId, string alias, string nodeType)
{
AuthorizeRequest(true);
//U4-2686 - alias is html encoded, make sure to decode
alias = HttpUtility.HtmlDecode(alias);
//check which parameters to pass depending on the types passed in
int intNodeID;
if (nodeType == "memberGroup")
{
presentation.create.dialogHandler_temp.Delete(nodeType, 0, alias);
create.dialogHandler_temp.Delete(nodeType, 0, alias);
}
else if (int.TryParse(nodeId, out intNodeID) && nodeType != "member") // Fix for #26965 - numeric member login gets parsed as nodeId
{
presentation.create.dialogHandler_temp.Delete(nodeType, intNodeID, alias);
create.dialogHandler_temp.Delete(nodeType, intNodeID, alias);
}
else
{
presentation.create.dialogHandler_temp.Delete(nodeType, 0, nodeId);
create.dialogHandler_temp.Delete(nodeType, 0, nodeId);
}
}