diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/NewRelationType.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/NewRelationType.aspx.cs
index 4090798362..af7a4e7658 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/NewRelationType.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/developer/RelationTypes/NewRelationType.aspx.cs
@@ -1,6 +1,7 @@
using System;
using System.Web.UI.WebControls;
using umbraco.BasePages;
+using umbraco.BusinessLogic;
using umbraco.cms.businesslogic.relation;
namespace umbraco.cms.presentation.developer.RelationTypes
@@ -10,6 +11,11 @@ namespace umbraco.cms.presentation.developer.RelationTypes
///
public partial class NewRelationType : UmbracoEnsuredPage
{
+ public NewRelationType()
+ {
+ CurrentApp = DefaultApps.developer.ToString();
+ }
+
///
/// On Load event
///
@@ -44,9 +50,9 @@ namespace umbraco.cms.presentation.developer.RelationTypes
/// expects EventArgs for addButton
protected void AddButton_Click(object sender, EventArgs e)
{
- if (this.Page.IsValid)
+ if (Page.IsValid)
{
- string newRelationTypeAlias = this.aliasTextBox.Text.Trim();
+ var newRelationTypeAlias = this.aliasTextBox.Text.Trim();
uQuery.SqlHelper.ExecuteNonQuery(
string.Format("INSERT INTO umbracoRelationType ([dual], parentObjectType, childObjectType, name, alias) VALUES ({0}, '{1}', '{2}', '{3}', '{4}')",
@@ -56,11 +62,11 @@ namespace umbraco.cms.presentation.developer.RelationTypes
this.descriptionTextBox.Text,
newRelationTypeAlias));
- int newRelationTypeId = uQuery.SqlHelper.ExecuteScalar("SELECT id FROM umbracoRelationType WHERE alias = '" + newRelationTypeAlias + "'");
+ var newRelationTypeId = uQuery.SqlHelper.ExecuteScalar("SELECT id FROM umbracoRelationType WHERE alias = '" + newRelationTypeAlias + "'");
// base.speechBubble(BasePage.speechBubbleIcon.success, "New Relation Type", "relation type created");
- BasePage.Current.ClientTools.ChangeContentFrameUrl("/umbraco/developer/RelationTypes/EditRelationType.aspx?id=" + newRelationTypeId.ToString()).CloseModalWindow().ChildNodeCreated();
+ ClientTools.ChangeContentFrameUrl("/umbraco/developer/RelationTypes/EditRelationType.aspx?id=" + newRelationTypeId.ToString()).CloseModalWindow().ChildNodeCreated();
}
}