diff --git a/components/editorControls/SettingControls/Pickers/Content.cs b/components/editorControls/SettingControls/Pickers/Content.cs
index 66df17812d..509dcf6cf1 100644
--- a/components/editorControls/SettingControls/Pickers/Content.cs
+++ b/components/editorControls/SettingControls/Pickers/Content.cs
@@ -159,7 +159,7 @@ namespace umbraco.editorControls.SettingControls.Pickers
if (_showXPath && tb.Text != string.Empty)
return tb.Text;
else
- return cc.Text;
+ return cc.Value;
}
set
{
@@ -170,7 +170,7 @@ namespace umbraco.editorControls.SettingControls.Pickers
int nodeId;
if (int.TryParse(_val, out nodeId))
- cc.Text = _val;
+ cc.Value = _val;
else if (ShowXPath)
tb.Text = _val;
}
diff --git a/components/editorControls/ultimatepicker/ultimatePickerDataEditor.cs b/components/editorControls/ultimatepicker/ultimatePickerDataEditor.cs
index 5792a0c1ea..865c7c3364 100644
--- a/components/editorControls/ultimatepicker/ultimatePickerDataEditor.cs
+++ b/components/editorControls/ultimatepicker/ultimatePickerDataEditor.cs
@@ -77,7 +77,6 @@ namespace umbraco.editorControls.ultimatepicker
break;
case "dropdownlist":
return dropdownlistNodes.SelectedValue;
- break;
case "listbox":
foreach (ListItem item in listboxNodes.Items)
{
diff --git a/components/editorControls/userControlWrapper/usercontrolDataEditor.cs b/components/editorControls/userControlWrapper/usercontrolDataEditor.cs
index 1174508fbb..fe088c1cca 100644
--- a/components/editorControls/userControlWrapper/usercontrolDataEditor.cs
+++ b/components/editorControls/userControlWrapper/usercontrolDataEditor.cs
@@ -78,7 +78,7 @@ namespace umbraco.editorControls.userControlGrapper
}
}
- catch (MissingMethodException ex) { }
+ catch (MissingMethodException) { }
}
}
diff --git a/components/macroRenderings/tabPicker.cs b/components/macroRenderings/tabPicker.cs
index 8ad2ac1465..2a9fa4140f 100644
--- a/components/macroRenderings/tabPicker.cs
+++ b/components/macroRenderings/tabPicker.cs
@@ -19,7 +19,6 @@ namespace umbraco.macroRenderings
{
string _value = "";
bool _multiple = false;
- private static ISqlHelper _sqlHelper;
public bool ShowCaption
{
diff --git a/components/umbraco.controls/TreePicker/BaseTreePicker.cs b/components/umbraco.controls/TreePicker/BaseTreePicker.cs
index b1718d952a..6fbfa3bac2 100644
--- a/components/umbraco.controls/TreePicker/BaseTreePicker.cs
+++ b/components/umbraco.controls/TreePicker/BaseTreePicker.cs
@@ -76,7 +76,7 @@ namespace umbraco.uicontrols.TreePicker
{
return new CMSNode(int.Parse(ItemIdValue.Value)).Text;
}
- catch (ArgumentException ex) { /*the node does not exist! we will ignore*/ }
+ catch (ArgumentException) { /*the node does not exist! we will ignore*/ }
}
return "";
}
diff --git a/umbraco.MacroEngines.Juno/RazorCore/UmbracoCultureDictionary.cs b/umbraco.MacroEngines.Juno/RazorCore/UmbracoCultureDictionary.cs
index 3089a27346..34954946d8 100644
--- a/umbraco.MacroEngines.Juno/RazorCore/UmbracoCultureDictionary.cs
+++ b/umbraco.MacroEngines.Juno/RazorCore/UmbracoCultureDictionary.cs
@@ -11,7 +11,7 @@ namespace umbraco.MacroEngines {
get {
try {
return new Dictionary.DictionaryItem(key).Value(Language.id);
- } catch (Exception errDictionary) { }
+ } catch (Exception) { }
return string.Empty;
}
}
diff --git a/umbraco/businesslogic/BasePages/UmbracoEnsuredPage.cs b/umbraco/businesslogic/BasePages/UmbracoEnsuredPage.cs
index 6ea1e06e2c..c5be92d7ab 100644
--- a/umbraco/businesslogic/BasePages/UmbracoEnsuredPage.cs
+++ b/umbraco/businesslogic/BasePages/UmbracoEnsuredPage.cs
@@ -94,7 +94,7 @@ namespace umbraco.BasePages
throw new UserAuthorizationException(String.Format("The current user doesn't have access to the section/app '{0}'", CurrentApp));
}
}
- catch (UserAuthorizationException ex)
+ catch (UserAuthorizationException)
{
Log.Add(LogTypes.Error, CurrentUser, -1, String.Format("Tried to access '{0}'", CurrentApp));
throw;
diff --git a/umbraco/businesslogic/UserType.cs b/umbraco/businesslogic/UserType.cs
index bec238a49f..4881b03029 100644
--- a/umbraco/businesslogic/UserType.cs
+++ b/umbraco/businesslogic/UserType.cs
@@ -151,7 +151,7 @@ namespace umbraco.BusinessLogic
public void Save()
{
//ensure that this object has an ID specified (it exists in the database)
- if (m_id == null || m_id <= 0)
+ if (m_id <= 0)
throw new Exception("The current UserType object does not exist in the database. New UserTypes should be created with the MakeNew method");
SqlHelper.ExecuteNonQuery(@"
@@ -173,7 +173,7 @@ namespace umbraco.BusinessLogic
public void Delete()
{
//ensure that this object has an ID specified (it exists in the database)
- if (m_id == null || m_id <= 0)
+ if (m_id <= 0)
throw new Exception("The current UserType object does not exist in the database. New UserTypes should be created with the MakeNew method");
SqlHelper.ExecuteNonQuery(@"
diff --git a/umbraco/cms/Actions/ActionAssignDomain.cs b/umbraco/cms/Actions/ActionAssignDomain.cs
index b8f472bf7f..934f6f9ced 100644
--- a/umbraco/cms/Actions/ActionAssignDomain.cs
+++ b/umbraco/cms/Actions/ActionAssignDomain.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionAssignDomain : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionAssignDomain m_instance = new ActionAssignDomain();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionAudit.cs b/umbraco/cms/Actions/ActionAudit.cs
index 5db17d8c5b..8d3809ef49 100644
--- a/umbraco/cms/Actions/ActionAudit.cs
+++ b/umbraco/cms/Actions/ActionAudit.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionAudit : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionAudit m_instance = new ActionAudit();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionCopy.cs b/umbraco/cms/Actions/ActionCopy.cs
index be9ee95074..0512775524 100644
--- a/umbraco/cms/Actions/ActionCopy.cs
+++ b/umbraco/cms/Actions/ActionCopy.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionCopy : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionCopy m_instance = new ActionCopy();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionDelete.cs b/umbraco/cms/Actions/ActionDelete.cs
index 467eca8096..3bd66285cf 100644
--- a/umbraco/cms/Actions/ActionDelete.cs
+++ b/umbraco/cms/Actions/ActionDelete.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionDelete : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionDelete m_instance = new ActionDelete();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionDisable.cs b/umbraco/cms/Actions/ActionDisable.cs
index 2c45629571..ca017a7d8b 100644
--- a/umbraco/cms/Actions/ActionDisable.cs
+++ b/umbraco/cms/Actions/ActionDisable.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionDisable : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionDisable m_instance = new ActionDisable();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionEmptyTranscan.cs b/umbraco/cms/Actions/ActionEmptyTranscan.cs
index 3f0ece0d86..c00f42cd62 100644
--- a/umbraco/cms/Actions/ActionEmptyTranscan.cs
+++ b/umbraco/cms/Actions/ActionEmptyTranscan.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionEmptyTranscan : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionEmptyTranscan m_instance = new ActionEmptyTranscan();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionExport.cs b/umbraco/cms/Actions/ActionExport.cs
index 7f7d3f9dbb..2abb37ae2a 100644
--- a/umbraco/cms/Actions/ActionExport.cs
+++ b/umbraco/cms/Actions/ActionExport.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionExport : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionExport m_instance = new ActionExport();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionImport.cs b/umbraco/cms/Actions/ActionImport.cs
index 618fad42f4..fb4391a2c7 100644
--- a/umbraco/cms/Actions/ActionImport.cs
+++ b/umbraco/cms/Actions/ActionImport.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionImport : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionImport m_instance = new ActionImport();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionMove.cs b/umbraco/cms/Actions/ActionMove.cs
index 820f90004e..959d30f9f7 100644
--- a/umbraco/cms/Actions/ActionMove.cs
+++ b/umbraco/cms/Actions/ActionMove.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionMove : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionMove m_instance = new ActionMove();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionNew.cs b/umbraco/cms/Actions/ActionNew.cs
index 51d8eae408..ec07d8096a 100644
--- a/umbraco/cms/Actions/ActionNew.cs
+++ b/umbraco/cms/Actions/ActionNew.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionNew : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionNew m_instance = new ActionNew();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionNewFolder.cs b/umbraco/cms/Actions/ActionNewFolder.cs
index c90072eb38..f758259e0b 100644
--- a/umbraco/cms/Actions/ActionNewFolder.cs
+++ b/umbraco/cms/Actions/ActionNewFolder.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionNewFolder : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionNewFolder m_instance = new ActionNewFolder();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionNotify.cs b/umbraco/cms/Actions/ActionNotify.cs
index 9d7efb3517..f31e1a6f26 100644
--- a/umbraco/cms/Actions/ActionNotify.cs
+++ b/umbraco/cms/Actions/ActionNotify.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionNotify : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionNotify m_instance = new ActionNotify();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionPackage.cs b/umbraco/cms/Actions/ActionPackage.cs
index a3be894ab6..2a3009a089 100644
--- a/umbraco/cms/Actions/ActionPackage.cs
+++ b/umbraco/cms/Actions/ActionPackage.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionPackage : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionPackage m_instance = new ActionPackage();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionPackageCreate.cs b/umbraco/cms/Actions/ActionPackageCreate.cs
index 91347680b7..5caa013cc4 100644
--- a/umbraco/cms/Actions/ActionPackageCreate.cs
+++ b/umbraco/cms/Actions/ActionPackageCreate.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionPackageCreate : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionPackageCreate m_instance = new ActionPackageCreate();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionProtect.cs b/umbraco/cms/Actions/ActionProtect.cs
index d7021afa5a..eff3ac225c 100644
--- a/umbraco/cms/Actions/ActionProtect.cs
+++ b/umbraco/cms/Actions/ActionProtect.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionProtect : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionProtect m_instance = new ActionProtect();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionPublish.cs b/umbraco/cms/Actions/ActionPublish.cs
index dfdccade7f..383ed035fb 100644
--- a/umbraco/cms/Actions/ActionPublish.cs
+++ b/umbraco/cms/Actions/ActionPublish.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionPublish : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionPublish m_instance = new ActionPublish();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionQuit.cs b/umbraco/cms/Actions/ActionQuit.cs
index 05f8ff7e89..e9213ed7b5 100644
--- a/umbraco/cms/Actions/ActionQuit.cs
+++ b/umbraco/cms/Actions/ActionQuit.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionQuit : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionQuit m_instance = new ActionQuit();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionRePublish.cs b/umbraco/cms/Actions/ActionRePublish.cs
index 93f55b3481..8e32ed2f4c 100644
--- a/umbraco/cms/Actions/ActionRePublish.cs
+++ b/umbraco/cms/Actions/ActionRePublish.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionRePublish : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionRePublish m_instance = new ActionRePublish();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionRefresh.cs b/umbraco/cms/Actions/ActionRefresh.cs
index 3bc2287b30..2db8e6d317 100644
--- a/umbraco/cms/Actions/ActionRefresh.cs
+++ b/umbraco/cms/Actions/ActionRefresh.cs
@@ -12,7 +12,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionRefresh : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionRefresh m_instance = new ActionRefresh();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionRights.cs b/umbraco/cms/Actions/ActionRights.cs
index c37cff2fa8..6ce84504fe 100644
--- a/umbraco/cms/Actions/ActionRights.cs
+++ b/umbraco/cms/Actions/ActionRights.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionRights : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionRights m_instance = new ActionRights();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionRollback.cs b/umbraco/cms/Actions/ActionRollback.cs
index a86c1a5229..69355ae306 100644
--- a/umbraco/cms/Actions/ActionRollback.cs
+++ b/umbraco/cms/Actions/ActionRollback.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionRollback : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionRollback m_instance = new ActionRollback();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionSave.cs b/umbraco/cms/Actions/ActionSave.cs
index 4ee7c5d1c0..888c3a2a5d 100644
--- a/umbraco/cms/Actions/ActionSave.cs
+++ b/umbraco/cms/Actions/ActionSave.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionSave : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionSave m_instance = new ActionSave();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionSendToTranslate.cs b/umbraco/cms/Actions/ActionSendToTranslate.cs
index bf3569fbf3..1421c865d0 100644
--- a/umbraco/cms/Actions/ActionSendToTranslate.cs
+++ b/umbraco/cms/Actions/ActionSendToTranslate.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionSendToTranslate : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionSendToTranslate m_instance = new ActionSendToTranslate();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionSort.cs b/umbraco/cms/Actions/ActionSort.cs
index f0eed4431d..de58c7d369 100644
--- a/umbraco/cms/Actions/ActionSort.cs
+++ b/umbraco/cms/Actions/ActionSort.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionSort : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionSort m_instance = new ActionSort();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionToPublish.cs b/umbraco/cms/Actions/ActionToPublish.cs
index 4d158b3a02..5d1fdd9324 100644
--- a/umbraco/cms/Actions/ActionToPublish.cs
+++ b/umbraco/cms/Actions/ActionToPublish.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionToPublish : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionToPublish m_instance = new ActionToPublish();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionTranslate.cs b/umbraco/cms/Actions/ActionTranslate.cs
index 759c729d84..cd56afdb8a 100644
--- a/umbraco/cms/Actions/ActionTranslate.cs
+++ b/umbraco/cms/Actions/ActionTranslate.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionTranslate : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionTranslate m_instance = new ActionTranslate();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionUnPublish.cs b/umbraco/cms/Actions/ActionUnPublish.cs
index 0722fe6cc6..fa45ffee91 100644
--- a/umbraco/cms/Actions/ActionUnPublish.cs
+++ b/umbraco/cms/Actions/ActionUnPublish.cs
@@ -13,7 +13,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionUnPublish : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionUnPublish m_instance = new ActionUnPublish();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/Actions/ActionUpdate.cs b/umbraco/cms/Actions/ActionUpdate.cs
index 32f7ef5e05..de6c0cebbb 100644
--- a/umbraco/cms/Actions/ActionUpdate.cs
+++ b/umbraco/cms/Actions/ActionUpdate.cs
@@ -10,7 +10,9 @@ namespace umbraco.BusinessLogic.Actions
public class ActionUpdate : IAction
{
//create singleton
+#pragma warning disable 612,618
private static readonly ActionUpdate m_instance = new ActionUpdate();
+#pragma warning restore 612,618
///
/// A public constructor exists ONLY for backwards compatibility in regards to 3rd party add-ons.
diff --git a/umbraco/cms/businesslogic/Packager/PackageActions/StandardPackageActions.cs b/umbraco/cms/businesslogic/Packager/PackageActions/StandardPackageActions.cs
index e213275b6f..46e8b85d31 100644
--- a/umbraco/cms/businesslogic/Packager/PackageActions/StandardPackageActions.cs
+++ b/umbraco/cms/businesslogic/Packager/PackageActions/StandardPackageActions.cs
@@ -6,859 +6,976 @@ using System.Xml;
using System.Linq;
using umbraco.IO;
-namespace umbraco.cms.businesslogic.packager.standardPackageActions {
- /*Build in standard actions */
-
- ///
- /// This class implements the IPackageAction Interface, used to execute code when packages are installed.
- /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode.
- ///
- public class addApplicationTree : umbraco.interfaces.IPackageAction {
-
- #region IPackageAction Members
-
- ///
- /// Executes the specified package action.
- ///
- /// Name of the package.
- /// The XML data.
- ///
- ///
- ///
- ///
- public bool Execute(string packageName, XmlNode xmlData) {
- bool silent = bool.Parse(xmlData.Attributes["silent"].Value);
- bool initialize = bool.Parse(xmlData.Attributes["initialize"].Value);
- byte sortOrder = byte.Parse(xmlData.Attributes["sortOrder"].Value);
-
- string applicationAlias = xmlData.Attributes["applicationAlias"].Value;
- string treeAlias = xmlData.Attributes["treeAlias"].Value;
- string treeTitle = xmlData.Attributes["treeTitle"].Value;
- string iconOpened = xmlData.Attributes["iconOpened"].Value;
- string iconClosed = xmlData.Attributes["iconClosed"].Value;
-
- string assemblyName = xmlData.Attributes["assemblyName"].Value;
- string type = xmlData.Attributes["treeHandlerType"].Value;
- string action = xmlData.Attributes["action"].Value;
-
-
- BusinessLogic.ApplicationTree.MakeNew(silent, initialize, sortOrder, applicationAlias, treeAlias, treeTitle, iconClosed, iconOpened, assemblyName, type, action);
-
- return true;
- }
-
- ///
- /// Undoes the action
- ///
- /// Name of the package.
- /// The XML data.
- ///
- public bool Undo(string packageName, XmlNode xmlData) {
- string treeAlias = xmlData.Attributes["treeAlias"].Value;
- BusinessLogic.ApplicationTree.getByAlias(treeAlias).Delete();
- return true;
- }
-
- ///
- /// Action alias.
- ///
- ///
- public string Alias() {
- return "addApplicationTree";
- }
-
- #endregion
-
-
- public XmlNode SampleXml() {
-
- string sample = "";
- return helper.parseStringToXmlNode(sample);
- }
- }
-
- ///
- /// This class implements the IPackageAction Interface, used to execute code when packages are installed.
- /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode.
- ///
- public class addApplication : umbraco.interfaces.IPackageAction {
-
- #region IPackageAction Members
-
- ///
- /// Installs a new application in umbraco.
- ///
- /// Name of the package.
- /// The XML data.
- ///
- ///
- ///
- /// true if successfull
- public bool Execute(string packageName, XmlNode xmlData) {
- string name = xmlData.Attributes["appName"].Value;
- string alias = xmlData.Attributes["appAlias"].Value;
- string icon = xmlData.Attributes["appIcon"].Value;
-
- BusinessLogic.Application.MakeNew(name, alias, icon);
-
- return true;
- }
-
- public bool Undo(string packageName, XmlNode xmlData) {
- string alias = xmlData.Attributes["appAlias"].Value;
- BusinessLogic.Application.getByAlias(alias).Delete();
- return true;
- }
- ///
- /// Action alias.
- ///
- ///
- public string Alias() {
- return "addApplication";
- }
-
- #endregion
-
- public XmlNode SampleXml() {
- throw new NotImplementedException();
- }
-
- }
-
- ///
- ///
- ///
- public class addDashboardSection : umbraco.interfaces.IPackageAction {
- #region IPackageAction Members
-
- ///
- /// Installs a dashboard section. This action reuses the action XML, so it has to be valid dashboard markup.
- ///
- /// Name of the package.
- /// The XML data.
- /// true if successfull
- ///
- ///
- ///
- ///
- ///
- /// default
- /// content
- ///
- ///
- /// /usercontrols/dashboard/latestEdits.ascx
- /// /usercontrols/umbracoBlog/dashboardBlogPostCreate.ascx
- ///
- ///
- /// /usercontrols/umbracoBlog/dashboardBlogPostCreate.ascx
- ///
- ///
- ///
- ///
- ///
- public bool Execute(string packageName, XmlNode xmlData) {
- //this will need a complete section node to work...
-
- if (xmlData.HasChildNodes) {
- string sectionAlias = xmlData.Attributes["dashboardAlias"].Value;
- string dbConfig = SystemFiles.DashboardConfig;
-
- XmlNode section = xmlData.SelectSingleNode("./section");
- XmlDocument dashboardFile = xmlHelper.OpenAsXmlDocument(dbConfig);
-
- XmlNode importedSection = dashboardFile.ImportNode(section, true);
-
- XmlAttribute alias = xmlHelper.addAttribute(dashboardFile, "alias", sectionAlias);
- importedSection.Attributes.Append(alias);
-
- dashboardFile.DocumentElement.AppendChild(importedSection);
-
- dashboardFile.Save(IOHelper.MapPath(dbConfig));
-
- return true;
- }
-
- return false;
- }
-
-
- public string Alias() {
- return "addDashboardSection";
- }
-
- public bool Undo(string packageName, XmlNode xmlData) {
-
- string sectionAlias = xmlData.Attributes["dashboardAlias"].Value;
- string dbConfig = SystemFiles.DashboardConfig;
- XmlDocument dashboardFile = xmlHelper.OpenAsXmlDocument(dbConfig);
-
- XmlNode section = dashboardFile.SelectSingleNode("//section [@alias = '" + sectionAlias + "']");
-
- if(section != null){
-
- dashboardFile.SelectSingleNode("/dashBoard").RemoveChild(section);
- dashboardFile.Save(IOHelper.MapPath(dbConfig));
- }
-
- return true;
- }
-
- #endregion
-
- public XmlNode SampleXml() {
- throw new NotImplementedException();
- }
-
- }
- ///
- /// This class implements the IPackageAction Interface, used to execute code when packages are installed.
- /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode.
- ///
- public class allowDoctype : umbraco.interfaces.IPackageAction {
-
- #region IPackageAction Members
-
- ///
- /// Allows a documentType to be created below another documentType.
- ///
- /// Name of the package.
- /// The XML data.
- ///
- ///
- ///
- /// Returns true on success
- public bool Execute(string packageName, XmlNode xmlData) {
- string doctypeName = xmlData.Attributes["documentTypeAlias"].Value;
- string parentDoctypeName = xmlData.Attributes["parentDocumentTypeAlias"].Value;
-
- cms.businesslogic.ContentType ct = cms.businesslogic.ContentType.GetByAlias(doctypeName);
- cms.businesslogic.ContentType parentct = cms.businesslogic.ContentType.GetByAlias(parentDoctypeName);
-
- if (ct != null && parentct != null) {
- bool containsId = false;
- ArrayList tmp = new ArrayList();
-
- foreach (int i in parentct.AllowedChildContentTypeIDs.ToList()) {
- tmp.Add(i);
- if (i == ct.Id)
- containsId = true;
- }
-
- if (!containsId) {
-
- int[] ids = new int[tmp.Count + 1];
- for (int i = 0; i < tmp.Count; i++) ids[i] = (int)tmp[i];
- ids[ids.Length - 1] = ct.Id;
-
- parentct.AllowedChildContentTypeIDs = ids;
- parentct.Save();
- return true;
- }
- }
- return false;
- }
-
- //this has no undo.
- ///
- /// This action has no undo.
- ///
- /// Name of the package.
- /// The XML data.
- ///
- public bool Undo(string packageName, XmlNode xmlData) {
- return true;
- }
-
- ///
- /// Action Alias.
- ///
- ///
- public string Alias() {
- return "allowDocumenttype";
- }
-
- #endregion
-
- public XmlNode SampleXml() {
- throw new NotImplementedException();
- }
-
- }
-
- public class addXsltExtension : umbraco.interfaces.IPackageAction {
- #region IPackageAction Members
-
- public bool Execute(string packageName, XmlNode xmlData) {
-
- string _assembly = xmlData.Attributes["assembly"].Value;
- string _type = xmlData.Attributes["type"].Value;
- string _alias = xmlData.Attributes["extensionAlias"].Value;
- string xeConfig = SystemFiles.XsltextensionsConfig;
-
- XmlDocument xdoc = new XmlDocument();
- xdoc.PreserveWhitespace = true;
- xdoc = xmlHelper.OpenAsXmlDocument(xeConfig);
-
- XmlNode xn = xdoc.SelectSingleNode("//XsltExtensions");
-
- if (xn != null) {
- bool insertExt = true;
- if (xn.HasChildNodes) {
- foreach (XmlNode ext in xn.SelectNodes("//ext")) {
- if (ext.Attributes["alias"] != null && ext.Attributes["alias"].Value == _alias)
- insertExt = false;
- }
- }
- if (insertExt) {
- XmlNode newExt = umbraco.xmlHelper.addTextNode(xdoc, "ext", "");
- newExt.Attributes.Append(umbraco.xmlHelper.addAttribute(xdoc, "assembly", _assembly.Replace("/bin/","")));
- newExt.Attributes.Append(umbraco.xmlHelper.addAttribute(xdoc, "type", _type));
- newExt.Attributes.Append(umbraco.xmlHelper.addAttribute(xdoc, "alias", _alias));
- xn.AppendChild(newExt);
-
-
- xdoc.Save(IOHelper.MapPath(xeConfig));
- return true;
- }
- }
- return false;
- }
-
- public string Alias() {
- return "addXsltExtension";
- }
-
- public bool Undo(string packageName, XmlNode xmlData) {
- string _assembly = xmlData.Attributes["assembly"].Value;
- string _type = xmlData.Attributes["type"].Value;
- string _alias = xmlData.Attributes["extensionAlias"].Value;
- string xeConfig = SystemFiles.XsltextensionsConfig;
-
- XmlDocument xdoc = new XmlDocument();
- xdoc.PreserveWhitespace = true;
- xdoc = xmlHelper.OpenAsXmlDocument(xeConfig);
-
- XmlNode xn = xdoc.SelectSingleNode("//XsltExtensions");
-
- if (xn != null) {
- bool inserted = false;
- if (xn.HasChildNodes) {
- foreach (XmlNode ext in xn.SelectNodes("//ext")) {
- if (ext.Attributes["alias"] != null && ext.Attributes["alias"].Value == _alias) {
- xn.RemoveChild(ext);
- inserted = true;
- }
- }
- }
-
- if (inserted) {
- xdoc.Save(IOHelper.MapPath(xeConfig));
- return true;
- }
- }
- return false;
- }
-
- #endregion
-
- public XmlNode SampleXml() {
- throw new NotImplementedException();
- }
-
- }
-
- public class addRestExtension : umbraco.interfaces.IPackageAction {
- #region IPackageAction Members
-
- public bool Execute(string packageName, XmlNode xmlData) {
-
- XmlNodeList _newExts = xmlData.SelectNodes("//ext");
-
- if (_newExts.Count > 0) {
-
- string reConfig = SystemFiles.RestextensionsConfig;
-
- XmlDocument xdoc = new XmlDocument();
- xdoc.PreserveWhitespace = true;
- xdoc = xmlHelper.OpenAsXmlDocument(reConfig);
-
-
- XmlNode xn = xdoc.SelectSingleNode("//RestExtensions");
-
- if (xn != null) {
- for (int i = 0; i < _newExts.Count; i++) {
- XmlNode newExt = _newExts[i];
- string _alias = newExt.Attributes["alias"].Value;
-
- bool insertExt = true;
- if (xn.HasChildNodes) {
- foreach (XmlNode ext in xn.SelectNodes("//ext")) {
- if (ext.Attributes["alias"] != null && ext.Attributes["alias"].Value == _alias)
- insertExt = false;
- }
- }
-
- if (insertExt) {
- xn.AppendChild(xdoc.ImportNode(newExt, true));
- }
- }
-
- xdoc.Save(IOHelper.MapPath(reConfig));
- return true;
- }
- }
- return false;
- }
-
- public string Alias() {
- return "addRestExtension";
- }
-
- public bool Undo(string packageName, XmlNode xmlData) {
-
- XmlNodeList _newExts = xmlData.SelectNodes("//ext");
-
- if (_newExts.Count > 0) {
- string reConfig = SystemFiles.RestextensionsConfig;
-
- XmlDocument xdoc = new XmlDocument();
- xdoc.PreserveWhitespace = true;
- xdoc.Load(reConfig);
-
- XmlNode xn = xdoc.SelectSingleNode("//RestExtensions");
-
- if (xn != null) {
- bool inserted = false;
-
- for (int i = 0; i < _newExts.Count; i++) {
- XmlNode newExt = _newExts[i];
- string _alias = newExt.Attributes["alias"].Value;
- if (xn.HasChildNodes) {
- foreach (XmlNode ext in xn.SelectNodes("//ext")) {
- if (ext.Attributes["alias"] != null && ext.Attributes["alias"].Value == _alias) {
- xn.RemoveChild(ext);
- inserted = true;
- }
- }
- }
- }
-
- if (inserted) {
- xdoc.Save(IOHelper.MapPath(reConfig));
- return true;
- }
- }
- }
- return false;
- }
-
- #endregion
-
- public XmlNode SampleXml() {
- throw new NotImplementedException();
- }
-
- }
-
- ///
- /// This class implements the IPackageAction Interface, used to execute code when packages are installed.
- /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode.
- ///
- public class moveRootDocument : umbraco.interfaces.IPackageAction {
- #region IPackageAction Members
-
- ///
- /// Executes the specified package action.
- ///
- /// Name of the package.
- /// The XML data.
- ///
- ///
- ///
- /// True if executed succesfully
- public bool Execute(string packageName, XmlNode xmlData) {
-
- string documentName = xmlData.Attributes["documentName"].Value;
- string parentDocumentType = xmlData.Attributes["parentDocumentType"].Value;
- string parentDocumentName = "";
-
- if (xmlData.Attributes["parentDocumentName"] != null)
- parentDocumentName = xmlData.Attributes["parentDocumentName"].Value;
-
- int parentDocid = 0;
-
- ContentType ct = ContentType.GetByAlias(parentDocumentType);
- Content[] docs = web.Document.getContentOfContentType(ct);
-
- if (docs.Length > 0) {
- if (String.IsNullOrEmpty(parentDocumentName))
- parentDocid = docs[0].Id;
- else {
- foreach (Content doc in docs) {
- if (doc.Text == parentDocumentName)
- parentDocid = doc.Id;
- }
- }
- }
-
- if (parentDocid > 0) {
- web.Document[] rootDocs = web.Document.GetRootDocuments();
-
- foreach (web.Document rootDoc in rootDocs) {
- if (rootDoc.Text == documentName) {
- rootDoc.Move(parentDocid);
- rootDoc.PublishWithSubs(new umbraco.BusinessLogic.User(0));
- }
- }
- }
-
-
- return true;
- }
-
- //this has no undo.
- ///
- /// This action has no undo.
- ///
- /// Name of the package.
- /// The XML data.
- ///
- public bool Undo(string packageName, XmlNode xmlData) {
- return true;
- }
-
- ///
- /// Action alias
- ///
- ///
- public string Alias() {
- return "moveRootDocument";
- }
-
- #endregion
-
- public XmlNode SampleXml() {
- throw new NotImplementedException();
- }
-
- }
-
- ///
- /// This class implements the IPackageAction Interface, used to execute code when packages are installed.
- /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode.
- ///
- public class publishRootDocument : umbraco.interfaces.IPackageAction {
- #region IPackageAction Members
-
- ///
- /// Executes the specified package action.
- ///
- /// Name of the package.
- /// The XML data.
- ///
- ///
- ///
- /// True if executed succesfully
- public bool Execute(string packageName, XmlNode xmlData) {
-
- string documentName = xmlData.Attributes["documentName"].Value;
-
- int parentDocid = 0;
-
- web.Document[] rootDocs = web.Document.GetRootDocuments();
-
- foreach (web.Document rootDoc in rootDocs) {
- if (rootDoc.Text.Trim() == documentName.Trim() && rootDoc != null && rootDoc.ContentType != null) {
-
- rootDoc.PublishWithChildrenWithResult(umbraco.BusinessLogic.User.GetUser(0));
-
-
- break;
- }
- }
- return true;
- }
-
- //this has no undo.
- ///
- /// This action has no undo.
- ///
- /// Name of the package.
- /// The XML data.
- ///
- public bool Undo(string packageName, XmlNode xmlData) {
- return true;
- }
-
- ///
- /// Action alias
- ///
- ///
- public string Alias() {
- return "publishRootDocument";
- }
- #endregion
-
- public XmlNode SampleXml() {
- throw new NotImplementedException();
- }
-
- }
-
- ///
- /// This class implements the IPackageAction Interface, used to execute code when packages are installed.
- /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode.
- /// addStringToHtmlElement adds a string to specific HTML element in a specific template, and can either append or prepend it.
- /// It uses the action xml node to do this, exemple action xml node:
- ///
- /// The above will add the string "hello world!" to the first html element with the id "newsSection" in the template "news"
- ///
- public class addStringToHtmlElement : umbraco.interfaces.IPackageAction {
- #region IPackageAction Members
-
- ///
- /// Executes the specified package action.
- ///
- /// Name of the package.
- /// The XML data.
- ///
- ///
- ///
- /// True if executed successfully
- public bool Execute(string packageName, XmlNode xmlData) {
-
- BusinessLogic.Log.Add(BusinessLogic.LogTypes.Error, BusinessLogic.User.GetUser(0), -1, "executing addStringToHtmlElement");
-
- string templateAlias = xmlData.Attributes["templateAlias"].Value;
- string htmlElementId = xmlData.Attributes["htmlElementId"].Value;
- string position = xmlData.Attributes["position"].Value;
- string value = xmlHelper.GetNodeValue(xmlData);
- template.Template tmp = template.Template.GetByAlias(templateAlias);
-
- if (UmbracoSettings.UseAspNetMasterPages)
- value = tmp.EnsureMasterPageSyntax(value);
-
- _addStringToHtmlElement(tmp, value, templateAlias, htmlElementId, position);
-
- return true;
- }
-
-
- ///
- /// Undoes the addStringToHtml Execute() method, by removing the same string from the same template.
- ///
- /// Name of the package.
- /// The XML data.
- ///
- public bool Undo(string packageName, XmlNode xmlData) {
- string templateAlias = xmlData.Attributes["templateAlias"].Value;
- string htmlElementId = xmlData.Attributes["htmlElementId"].Value;
- string value = xmlHelper.GetNodeValue(xmlData);
- template.Template tmp = template.Template.GetByAlias(templateAlias);
-
- if (UmbracoSettings.UseAspNetMasterPages)
- value = tmp.EnsureMasterPageSyntax(value);
-
- _removeStringFromHtmlElement(tmp, value, templateAlias, htmlElementId);
- return true;
- }
-
- ///
- /// Action alias.
- ///
- ///
- public string Alias() {
- return "addStringToHtmlElement";
- }
-
- private void _addStringToHtmlElement(template.Template tmp, string value, string templateAlias, string htmlElementId, string position) {
- bool hasAspNetContentBeginning = false;
- string design = "";
- string directive = "";
-
- if (tmp != null) {
- try {
- XmlDocument templateXml = new XmlDocument();
- templateXml.PreserveWhitespace = true;
-
- //Make sure that directive is remove before hacked non html4 compatiple replacement action...
- design = tmp.Design;
-
-
- splitDesignAndDirective(ref design, ref directive);
-
- //making sure that the template xml has a root node...
- if (tmp.MasterTemplate > 0)
- templateXml.LoadXml( helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, "" + design + "", true));
- else
- templateXml.LoadXml(helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, design, true));
-
- XmlNode xmlElement = templateXml.SelectSingleNode("//* [@id = '" + htmlElementId + "']");
-
- if (xmlElement != null) {
-
- if (position == "beginning") {
- xmlElement.InnerXml = "\n" + helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, value, true) + "\n" + xmlElement.InnerXml;
- } else {
- xmlElement.InnerXml = xmlElement.InnerXml + "\n" + helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, value, true) + "\n";
- }
- }
-
- tmp.Design = directive + "\n" + helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, templateXml.OuterXml, false);
- tmp.Save();
- } catch (Exception ex) {
- umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, ex.ToString());
- }
- } else {
- umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "template not found");
- }
- }
-
- private void _removeStringFromHtmlElement(template.Template tmp, string value, string templateAlias, string htmlElementId) {
- bool hasAspNetContentBeginning = false;
- string design = "";
- string directive = "";
-
-
- if (tmp != null) {
- try {
- XmlDocument templateXml = new XmlDocument();
- templateXml.PreserveWhitespace = true;
-
- //Make sure that directive is remove before hacked non html4 compatiple replacement action...
- design = tmp.Design;
- splitDesignAndDirective(ref design, ref directive);
-
- //making sure that the template xml has a root node...
- if (tmp.MasterTemplate > 0)
- templateXml.LoadXml( helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, "" + design + "", true));
- else
- templateXml.LoadXml( helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, design, true));
-
- XmlNode xmlElement = templateXml.SelectSingleNode("//* [@id = '" + htmlElementId + "']");
-
-
-
- if (xmlElement != null) {
- string repValue = helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, value, true);
- xmlElement.InnerXml = xmlElement.InnerXml.Replace(repValue , "");
- }
-
- tmp.Design = directive + "\n" + helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, templateXml.OuterXml, false);
- tmp.Save();
- } catch (Exception ex) {
- umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, ex.ToString() );
- }
- } else {
- umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "template not found");
- }
- }
-
-
-
- private void splitDesignAndDirective(ref string design, ref string directive) {
- if (design.StartsWith("<%@")) {
- directive = design.Substring(0, design.IndexOf("%>") + 2).Trim(Environment.NewLine.ToCharArray());
- design = design.Substring(design.IndexOf("%>") + 3).Trim(Environment.NewLine.ToCharArray());
- }
- }
-
- #endregion
-
- public XmlNode SampleXml() {
- throw new NotImplementedException();
- }
-
- }
-
- public class removeStringFromTemplate : umbraco.interfaces.IPackageAction {
- #region IPackageAction Members
-
- public bool Execute(string packageName, XmlNode xmlData) {
- addStringToHtmlElement ast = new addStringToHtmlElement();
- return ast.Undo(packageName, xmlData);
- }
-
- public string Alias() {
- return "removeStringFromHtmlElement";
- }
-
- public bool Undo(string packageName, XmlNode xmlData) {
- return true;
- }
-
- public XmlNode SampleXml() {
- throw new NotImplementedException();
- }
-
- #endregion
- }
-
-
- public class helper {
- //Helper method to replace umbraco tags that breaks the xml format..
- public static string parseToValidXml(template.Template templateObj, ref bool hasAspNetContentBeginning, string template, bool toValid) {
- string retVal = template;
- if (toValid) {
- // test for asp:content as the first part of the design
- if (retVal.StartsWith("") + 1);
- retVal = retVal.Substring(0, retVal.Length - 14);
- }
- //shorten empty macro tags..
- retVal = retVal.Replace(">", " />");
- retVal = retVal.Replace(">", " />");
-
- retVal = retVal.Replace("", "");
- retVal = retVal.Replace("", "");
- retVal = retVal.Replace("", "");
-
- // add asp content element
- if (hasAspNetContentBeginning) {
- retVal = templateObj.GetMasterContentElement(templateObj.MasterTemplate) + retVal + "";
- }
- }
-
- return retVal;
- }
-
- public static XmlNode parseStringToXmlNode(string value) {
- XmlDocument doc = new XmlDocument();
- XmlNode node = xmlHelper.addTextNode(doc, "error", "");
-
- try {
- doc.LoadXml(value);
- return doc.SelectSingleNode(".");
- } catch {
- return node;
- }
-
- return node;
- }
- }
+namespace umbraco.cms.businesslogic.packager.standardPackageActions
+{
+ /*Build in standard actions */
+
+ ///
+ /// This class implements the IPackageAction Interface, used to execute code when packages are installed.
+ /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode.
+ ///
+ public class addApplicationTree : umbraco.interfaces.IPackageAction
+ {
+
+ #region IPackageAction Members
+
+ ///
+ /// Executes the specified package action.
+ ///
+ /// Name of the package.
+ /// The XML data.
+ ///
+ ///
+ ///
+ ///
+ public bool Execute(string packageName, XmlNode xmlData)
+ {
+ bool silent = bool.Parse(xmlData.Attributes["silent"].Value);
+ bool initialize = bool.Parse(xmlData.Attributes["initialize"].Value);
+ byte sortOrder = byte.Parse(xmlData.Attributes["sortOrder"].Value);
+
+ string applicationAlias = xmlData.Attributes["applicationAlias"].Value;
+ string treeAlias = xmlData.Attributes["treeAlias"].Value;
+ string treeTitle = xmlData.Attributes["treeTitle"].Value;
+ string iconOpened = xmlData.Attributes["iconOpened"].Value;
+ string iconClosed = xmlData.Attributes["iconClosed"].Value;
+
+ string assemblyName = xmlData.Attributes["assemblyName"].Value;
+ string type = xmlData.Attributes["treeHandlerType"].Value;
+ string action = xmlData.Attributes["action"].Value;
+
+
+ BusinessLogic.ApplicationTree.MakeNew(silent, initialize, sortOrder, applicationAlias, treeAlias, treeTitle, iconClosed, iconOpened, assemblyName, type, action);
+
+ return true;
+ }
+
+ ///
+ /// Undoes the action
+ ///
+ /// Name of the package.
+ /// The XML data.
+ ///
+ public bool Undo(string packageName, XmlNode xmlData)
+ {
+ string treeAlias = xmlData.Attributes["treeAlias"].Value;
+ BusinessLogic.ApplicationTree.getByAlias(treeAlias).Delete();
+ return true;
+ }
+
+ ///
+ /// Action alias.
+ ///
+ ///
+ public string Alias()
+ {
+ return "addApplicationTree";
+ }
+
+ #endregion
+
+
+ public XmlNode SampleXml()
+ {
+
+ string sample = "";
+ return helper.parseStringToXmlNode(sample);
+ }
+ }
+
+ ///
+ /// This class implements the IPackageAction Interface, used to execute code when packages are installed.
+ /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode.
+ ///
+ public class addApplication : umbraco.interfaces.IPackageAction
+ {
+
+ #region IPackageAction Members
+
+ ///
+ /// Installs a new application in umbraco.
+ ///
+ /// Name of the package.
+ /// The XML data.
+ ///
+ ///
+ ///
+ /// true if successfull
+ public bool Execute(string packageName, XmlNode xmlData)
+ {
+ string name = xmlData.Attributes["appName"].Value;
+ string alias = xmlData.Attributes["appAlias"].Value;
+ string icon = xmlData.Attributes["appIcon"].Value;
+
+ BusinessLogic.Application.MakeNew(name, alias, icon);
+
+ return true;
+ }
+
+ public bool Undo(string packageName, XmlNode xmlData)
+ {
+ string alias = xmlData.Attributes["appAlias"].Value;
+ BusinessLogic.Application.getByAlias(alias).Delete();
+ return true;
+ }
+ ///
+ /// Action alias.
+ ///
+ ///
+ public string Alias()
+ {
+ return "addApplication";
+ }
+
+ #endregion
+
+ public XmlNode SampleXml()
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+
+ ///
+ ///
+ ///
+ public class addDashboardSection : umbraco.interfaces.IPackageAction
+ {
+ #region IPackageAction Members
+
+ ///
+ /// Installs a dashboard section. This action reuses the action XML, so it has to be valid dashboard markup.
+ ///
+ /// Name of the package.
+ /// The XML data.
+ /// true if successfull
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// default
+ /// content
+ ///
+ ///
+ /// /usercontrols/dashboard/latestEdits.ascx
+ /// /usercontrols/umbracoBlog/dashboardBlogPostCreate.ascx
+ ///
+ ///
+ /// /usercontrols/umbracoBlog/dashboardBlogPostCreate.ascx
+ ///
+ ///
+ ///
+ ///
+ ///
+ public bool Execute(string packageName, XmlNode xmlData)
+ {
+ //this will need a complete section node to work...
+
+ if (xmlData.HasChildNodes)
+ {
+ string sectionAlias = xmlData.Attributes["dashboardAlias"].Value;
+ string dbConfig = SystemFiles.DashboardConfig;
+
+ XmlNode section = xmlData.SelectSingleNode("./section");
+ XmlDocument dashboardFile = xmlHelper.OpenAsXmlDocument(dbConfig);
+
+ XmlNode importedSection = dashboardFile.ImportNode(section, true);
+
+ XmlAttribute alias = xmlHelper.addAttribute(dashboardFile, "alias", sectionAlias);
+ importedSection.Attributes.Append(alias);
+
+ dashboardFile.DocumentElement.AppendChild(importedSection);
+
+ dashboardFile.Save(IOHelper.MapPath(dbConfig));
+
+ return true;
+ }
+
+ return false;
+ }
+
+
+ public string Alias()
+ {
+ return "addDashboardSection";
+ }
+
+ public bool Undo(string packageName, XmlNode xmlData)
+ {
+
+ string sectionAlias = xmlData.Attributes["dashboardAlias"].Value;
+ string dbConfig = SystemFiles.DashboardConfig;
+ XmlDocument dashboardFile = xmlHelper.OpenAsXmlDocument(dbConfig);
+
+ XmlNode section = dashboardFile.SelectSingleNode("//section [@alias = '" + sectionAlias + "']");
+
+ if (section != null)
+ {
+
+ dashboardFile.SelectSingleNode("/dashBoard").RemoveChild(section);
+ dashboardFile.Save(IOHelper.MapPath(dbConfig));
+ }
+
+ return true;
+ }
+
+ #endregion
+
+ public XmlNode SampleXml()
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+ ///
+ /// This class implements the IPackageAction Interface, used to execute code when packages are installed.
+ /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode.
+ ///
+ public class allowDoctype : umbraco.interfaces.IPackageAction
+ {
+
+ #region IPackageAction Members
+
+ ///
+ /// Allows a documentType to be created below another documentType.
+ ///
+ /// Name of the package.
+ /// The XML data.
+ ///
+ ///
+ ///
+ /// Returns true on success
+ public bool Execute(string packageName, XmlNode xmlData)
+ {
+ string doctypeName = xmlData.Attributes["documentTypeAlias"].Value;
+ string parentDoctypeName = xmlData.Attributes["parentDocumentTypeAlias"].Value;
+
+ cms.businesslogic.ContentType ct = cms.businesslogic.ContentType.GetByAlias(doctypeName);
+ cms.businesslogic.ContentType parentct = cms.businesslogic.ContentType.GetByAlias(parentDoctypeName);
+
+ if (ct != null && parentct != null)
+ {
+ bool containsId = false;
+ ArrayList tmp = new ArrayList();
+
+ foreach (int i in parentct.AllowedChildContentTypeIDs.ToList())
+ {
+ tmp.Add(i);
+ if (i == ct.Id)
+ containsId = true;
+ }
+
+ if (!containsId)
+ {
+
+ int[] ids = new int[tmp.Count + 1];
+ for (int i = 0; i < tmp.Count; i++) ids[i] = (int)tmp[i];
+ ids[ids.Length - 1] = ct.Id;
+
+ parentct.AllowedChildContentTypeIDs = ids;
+ parentct.Save();
+ return true;
+ }
+ }
+ return false;
+ }
+
+ //this has no undo.
+ ///
+ /// This action has no undo.
+ ///
+ /// Name of the package.
+ /// The XML data.
+ ///
+ public bool Undo(string packageName, XmlNode xmlData)
+ {
+ return true;
+ }
+
+ ///
+ /// Action Alias.
+ ///
+ ///
+ public string Alias()
+ {
+ return "allowDocumenttype";
+ }
+
+ #endregion
+
+ public XmlNode SampleXml()
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+
+ public class addXsltExtension : umbraco.interfaces.IPackageAction
+ {
+ #region IPackageAction Members
+
+ public bool Execute(string packageName, XmlNode xmlData)
+ {
+
+ string _assembly = xmlData.Attributes["assembly"].Value;
+ string _type = xmlData.Attributes["type"].Value;
+ string _alias = xmlData.Attributes["extensionAlias"].Value;
+ string xeConfig = SystemFiles.XsltextensionsConfig;
+
+ XmlDocument xdoc = new XmlDocument();
+ xdoc.PreserveWhitespace = true;
+ xdoc = xmlHelper.OpenAsXmlDocument(xeConfig);
+
+ XmlNode xn = xdoc.SelectSingleNode("//XsltExtensions");
+
+ if (xn != null)
+ {
+ bool insertExt = true;
+ if (xn.HasChildNodes)
+ {
+ foreach (XmlNode ext in xn.SelectNodes("//ext"))
+ {
+ if (ext.Attributes["alias"] != null && ext.Attributes["alias"].Value == _alias)
+ insertExt = false;
+ }
+ }
+ if (insertExt)
+ {
+ XmlNode newExt = umbraco.xmlHelper.addTextNode(xdoc, "ext", "");
+ newExt.Attributes.Append(umbraco.xmlHelper.addAttribute(xdoc, "assembly", _assembly.Replace("/bin/", "")));
+ newExt.Attributes.Append(umbraco.xmlHelper.addAttribute(xdoc, "type", _type));
+ newExt.Attributes.Append(umbraco.xmlHelper.addAttribute(xdoc, "alias", _alias));
+ xn.AppendChild(newExt);
+
+
+ xdoc.Save(IOHelper.MapPath(xeConfig));
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public string Alias()
+ {
+ return "addXsltExtension";
+ }
+
+ public bool Undo(string packageName, XmlNode xmlData)
+ {
+ string _assembly = xmlData.Attributes["assembly"].Value;
+ string _type = xmlData.Attributes["type"].Value;
+ string _alias = xmlData.Attributes["extensionAlias"].Value;
+ string xeConfig = SystemFiles.XsltextensionsConfig;
+
+ XmlDocument xdoc = new XmlDocument();
+ xdoc.PreserveWhitespace = true;
+ xdoc = xmlHelper.OpenAsXmlDocument(xeConfig);
+
+ XmlNode xn = xdoc.SelectSingleNode("//XsltExtensions");
+
+ if (xn != null)
+ {
+ bool inserted = false;
+ if (xn.HasChildNodes)
+ {
+ foreach (XmlNode ext in xn.SelectNodes("//ext"))
+ {
+ if (ext.Attributes["alias"] != null && ext.Attributes["alias"].Value == _alias)
+ {
+ xn.RemoveChild(ext);
+ inserted = true;
+ }
+ }
+ }
+
+ if (inserted)
+ {
+ xdoc.Save(IOHelper.MapPath(xeConfig));
+ return true;
+ }
+ }
+ return false;
+ }
+
+ #endregion
+
+ public XmlNode SampleXml()
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+
+ public class addRestExtension : umbraco.interfaces.IPackageAction
+ {
+ #region IPackageAction Members
+
+ public bool Execute(string packageName, XmlNode xmlData)
+ {
+
+ XmlNodeList _newExts = xmlData.SelectNodes("//ext");
+
+ if (_newExts.Count > 0)
+ {
+
+ string reConfig = SystemFiles.RestextensionsConfig;
+
+ XmlDocument xdoc = new XmlDocument();
+ xdoc.PreserveWhitespace = true;
+ xdoc = xmlHelper.OpenAsXmlDocument(reConfig);
+
+
+ XmlNode xn = xdoc.SelectSingleNode("//RestExtensions");
+
+ if (xn != null)
+ {
+ for (int i = 0; i < _newExts.Count; i++)
+ {
+ XmlNode newExt = _newExts[i];
+ string _alias = newExt.Attributes["alias"].Value;
+
+ bool insertExt = true;
+ if (xn.HasChildNodes)
+ {
+ foreach (XmlNode ext in xn.SelectNodes("//ext"))
+ {
+ if (ext.Attributes["alias"] != null && ext.Attributes["alias"].Value == _alias)
+ insertExt = false;
+ }
+ }
+
+ if (insertExt)
+ {
+ xn.AppendChild(xdoc.ImportNode(newExt, true));
+ }
+ }
+
+ xdoc.Save(IOHelper.MapPath(reConfig));
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public string Alias()
+ {
+ return "addRestExtension";
+ }
+
+ public bool Undo(string packageName, XmlNode xmlData)
+ {
+
+ XmlNodeList _newExts = xmlData.SelectNodes("//ext");
+
+ if (_newExts.Count > 0)
+ {
+ string reConfig = SystemFiles.RestextensionsConfig;
+
+ XmlDocument xdoc = new XmlDocument();
+ xdoc.PreserveWhitespace = true;
+ xdoc.Load(reConfig);
+
+ XmlNode xn = xdoc.SelectSingleNode("//RestExtensions");
+
+ if (xn != null)
+ {
+ bool inserted = false;
+
+ for (int i = 0; i < _newExts.Count; i++)
+ {
+ XmlNode newExt = _newExts[i];
+ string _alias = newExt.Attributes["alias"].Value;
+ if (xn.HasChildNodes)
+ {
+ foreach (XmlNode ext in xn.SelectNodes("//ext"))
+ {
+ if (ext.Attributes["alias"] != null && ext.Attributes["alias"].Value == _alias)
+ {
+ xn.RemoveChild(ext);
+ inserted = true;
+ }
+ }
+ }
+ }
+
+ if (inserted)
+ {
+ xdoc.Save(IOHelper.MapPath(reConfig));
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ #endregion
+
+ public XmlNode SampleXml()
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+
+ ///
+ /// This class implements the IPackageAction Interface, used to execute code when packages are installed.
+ /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode.
+ ///
+ public class moveRootDocument : umbraco.interfaces.IPackageAction
+ {
+ #region IPackageAction Members
+
+ ///
+ /// Executes the specified package action.
+ ///
+ /// Name of the package.
+ /// The XML data.
+ ///
+ ///
+ ///
+ /// True if executed succesfully
+ public bool Execute(string packageName, XmlNode xmlData)
+ {
+
+ string documentName = xmlData.Attributes["documentName"].Value;
+ string parentDocumentType = xmlData.Attributes["parentDocumentType"].Value;
+ string parentDocumentName = "";
+
+ if (xmlData.Attributes["parentDocumentName"] != null)
+ parentDocumentName = xmlData.Attributes["parentDocumentName"].Value;
+
+ int parentDocid = 0;
+
+ ContentType ct = ContentType.GetByAlias(parentDocumentType);
+ Content[] docs = web.Document.getContentOfContentType(ct);
+
+ if (docs.Length > 0)
+ {
+ if (String.IsNullOrEmpty(parentDocumentName))
+ parentDocid = docs[0].Id;
+ else
+ {
+ foreach (Content doc in docs)
+ {
+ if (doc.Text == parentDocumentName)
+ parentDocid = doc.Id;
+ }
+ }
+ }
+
+ if (parentDocid > 0)
+ {
+ web.Document[] rootDocs = web.Document.GetRootDocuments();
+
+ foreach (web.Document rootDoc in rootDocs)
+ {
+ if (rootDoc.Text == documentName)
+ {
+ rootDoc.Move(parentDocid);
+ rootDoc.PublishWithSubs(new umbraco.BusinessLogic.User(0));
+ }
+ }
+ }
+
+
+ return true;
+ }
+
+ //this has no undo.
+ ///
+ /// This action has no undo.
+ ///
+ /// Name of the package.
+ /// The XML data.
+ ///
+ public bool Undo(string packageName, XmlNode xmlData)
+ {
+ return true;
+ }
+
+ ///
+ /// Action alias
+ ///
+ ///
+ public string Alias()
+ {
+ return "moveRootDocument";
+ }
+
+ #endregion
+
+ public XmlNode SampleXml()
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+
+ ///
+ /// This class implements the IPackageAction Interface, used to execute code when packages are installed.
+ /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode.
+ ///
+ public class publishRootDocument : umbraco.interfaces.IPackageAction
+ {
+ #region IPackageAction Members
+
+ ///
+ /// Executes the specified package action.
+ ///
+ /// Name of the package.
+ /// The XML data.
+ ///
+ ///
+ ///
+ /// True if executed succesfully
+ public bool Execute(string packageName, XmlNode xmlData)
+ {
+
+ string documentName = xmlData.Attributes["documentName"].Value;
+
+ int parentDocid = 0;
+
+ web.Document[] rootDocs = web.Document.GetRootDocuments();
+
+ foreach (web.Document rootDoc in rootDocs)
+ {
+ if (rootDoc.Text.Trim() == documentName.Trim() && rootDoc != null && rootDoc.ContentType != null)
+ {
+
+ rootDoc.PublishWithChildrenWithResult(umbraco.BusinessLogic.User.GetUser(0));
+
+
+ break;
+ }
+ }
+ return true;
+ }
+
+ //this has no undo.
+ ///
+ /// This action has no undo.
+ ///
+ /// Name of the package.
+ /// The XML data.
+ ///
+ public bool Undo(string packageName, XmlNode xmlData)
+ {
+ return true;
+ }
+
+ ///
+ /// Action alias
+ ///
+ ///
+ public string Alias()
+ {
+ return "publishRootDocument";
+ }
+ #endregion
+
+ public XmlNode SampleXml()
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+
+ ///
+ /// This class implements the IPackageAction Interface, used to execute code when packages are installed.
+ /// All IPackageActions only takes a PackageName and a XmlNode as input, and executes based on the data in the xmlnode.
+ /// addStringToHtmlElement adds a string to specific HTML element in a specific template, and can either append or prepend it.
+ /// It uses the action xml node to do this, exemple action xml node:
+ ///
+ /// The above will add the string "hello world!" to the first html element with the id "newsSection" in the template "news"
+ ///
+ public class addStringToHtmlElement : umbraco.interfaces.IPackageAction
+ {
+ #region IPackageAction Members
+
+ ///
+ /// Executes the specified package action.
+ ///
+ /// Name of the package.
+ /// The XML data.
+ ///
+ ///
+ ///
+ /// True if executed successfully
+ public bool Execute(string packageName, XmlNode xmlData)
+ {
+
+ BusinessLogic.Log.Add(BusinessLogic.LogTypes.Error, BusinessLogic.User.GetUser(0), -1, "executing addStringToHtmlElement");
+
+ string templateAlias = xmlData.Attributes["templateAlias"].Value;
+ string htmlElementId = xmlData.Attributes["htmlElementId"].Value;
+ string position = xmlData.Attributes["position"].Value;
+ string value = xmlHelper.GetNodeValue(xmlData);
+ template.Template tmp = template.Template.GetByAlias(templateAlias);
+
+ if (UmbracoSettings.UseAspNetMasterPages)
+ value = tmp.EnsureMasterPageSyntax(value);
+
+ _addStringToHtmlElement(tmp, value, templateAlias, htmlElementId, position);
+
+ return true;
+ }
+
+
+ ///
+ /// Undoes the addStringToHtml Execute() method, by removing the same string from the same template.
+ ///
+ /// Name of the package.
+ /// The XML data.
+ ///
+ public bool Undo(string packageName, XmlNode xmlData)
+ {
+ string templateAlias = xmlData.Attributes["templateAlias"].Value;
+ string htmlElementId = xmlData.Attributes["htmlElementId"].Value;
+ string value = xmlHelper.GetNodeValue(xmlData);
+ template.Template tmp = template.Template.GetByAlias(templateAlias);
+
+ if (UmbracoSettings.UseAspNetMasterPages)
+ value = tmp.EnsureMasterPageSyntax(value);
+
+ _removeStringFromHtmlElement(tmp, value, templateAlias, htmlElementId);
+ return true;
+ }
+
+ ///
+ /// Action alias.
+ ///
+ ///
+ public string Alias()
+ {
+ return "addStringToHtmlElement";
+ }
+
+ private void _addStringToHtmlElement(template.Template tmp, string value, string templateAlias, string htmlElementId, string position)
+ {
+ bool hasAspNetContentBeginning = false;
+ string design = "";
+ string directive = "";
+
+ if (tmp != null)
+ {
+ try
+ {
+ XmlDocument templateXml = new XmlDocument();
+ templateXml.PreserveWhitespace = true;
+
+ //Make sure that directive is remove before hacked non html4 compatiple replacement action...
+ design = tmp.Design;
+
+
+ splitDesignAndDirective(ref design, ref directive);
+
+ //making sure that the template xml has a root node...
+ if (tmp.MasterTemplate > 0)
+ templateXml.LoadXml(helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, "" + design + "", true));
+ else
+ templateXml.LoadXml(helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, design, true));
+
+ XmlNode xmlElement = templateXml.SelectSingleNode("//* [@id = '" + htmlElementId + "']");
+
+ if (xmlElement != null)
+ {
+
+ if (position == "beginning")
+ {
+ xmlElement.InnerXml = "\n" + helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, value, true) + "\n" + xmlElement.InnerXml;
+ }
+ else
+ {
+ xmlElement.InnerXml = xmlElement.InnerXml + "\n" + helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, value, true) + "\n";
+ }
+ }
+
+ tmp.Design = directive + "\n" + helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, templateXml.OuterXml, false);
+ tmp.Save();
+ }
+ catch (Exception ex)
+ {
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, ex.ToString());
+ }
+ }
+ else
+ {
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "template not found");
+ }
+ }
+
+ private void _removeStringFromHtmlElement(template.Template tmp, string value, string templateAlias, string htmlElementId)
+ {
+ bool hasAspNetContentBeginning = false;
+ string design = "";
+ string directive = "";
+
+
+ if (tmp != null)
+ {
+ try
+ {
+ XmlDocument templateXml = new XmlDocument();
+ templateXml.PreserveWhitespace = true;
+
+ //Make sure that directive is remove before hacked non html4 compatiple replacement action...
+ design = tmp.Design;
+ splitDesignAndDirective(ref design, ref directive);
+
+ //making sure that the template xml has a root node...
+ if (tmp.MasterTemplate > 0)
+ templateXml.LoadXml(helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, "" + design + "", true));
+ else
+ templateXml.LoadXml(helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, design, true));
+
+ XmlNode xmlElement = templateXml.SelectSingleNode("//* [@id = '" + htmlElementId + "']");
+
+
+
+ if (xmlElement != null)
+ {
+ string repValue = helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, value, true);
+ xmlElement.InnerXml = xmlElement.InnerXml.Replace(repValue, "");
+ }
+
+ tmp.Design = directive + "\n" + helper.parseToValidXml(tmp, ref hasAspNetContentBeginning, templateXml.OuterXml, false);
+ tmp.Save();
+ }
+ catch (Exception ex)
+ {
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, ex.ToString());
+ }
+ }
+ else
+ {
+ umbraco.BusinessLogic.Log.Add(umbraco.BusinessLogic.LogTypes.Debug, -1, "template not found");
+ }
+ }
+
+
+
+ private void splitDesignAndDirective(ref string design, ref string directive)
+ {
+ if (design.StartsWith("<%@"))
+ {
+ directive = design.Substring(0, design.IndexOf("%>") + 2).Trim(Environment.NewLine.ToCharArray());
+ design = design.Substring(design.IndexOf("%>") + 3).Trim(Environment.NewLine.ToCharArray());
+ }
+ }
+
+ #endregion
+
+ public XmlNode SampleXml()
+ {
+ throw new NotImplementedException();
+ }
+
+ }
+
+ public class removeStringFromTemplate : umbraco.interfaces.IPackageAction
+ {
+ #region IPackageAction Members
+
+ public bool Execute(string packageName, XmlNode xmlData)
+ {
+ addStringToHtmlElement ast = new addStringToHtmlElement();
+ return ast.Undo(packageName, xmlData);
+ }
+
+ public string Alias()
+ {
+ return "removeStringFromHtmlElement";
+ }
+
+ public bool Undo(string packageName, XmlNode xmlData)
+ {
+ return true;
+ }
+
+ public XmlNode SampleXml()
+ {
+ throw new NotImplementedException();
+ }
+
+ #endregion
+ }
+
+
+ public class helper
+ {
+ //Helper method to replace umbraco tags that breaks the xml format..
+ public static string parseToValidXml(template.Template templateObj, ref bool hasAspNetContentBeginning, string template, bool toValid)
+ {
+ string retVal = template;
+ if (toValid)
+ {
+ // test for asp:content as the first part of the design
+ if (retVal.StartsWith("") + 1);
+ retVal = retVal.Substring(0, retVal.Length - 14);
+ }
+ //shorten empty macro tags..
+ retVal = retVal.Replace(">", " />");
+ retVal = retVal.Replace(">", " />");
+
+ retVal = retVal.Replace("", "");
+ retVal = retVal.Replace("", "");
+ retVal = retVal.Replace("", "");
+
+ // add asp content element
+ if (hasAspNetContentBeginning)
+ {
+ retVal = templateObj.GetMasterContentElement(templateObj.MasterTemplate) + retVal + "";
+ }
+ }
+
+ return retVal;
+ }
+
+ public static XmlNode parseStringToXmlNode(string value)
+ {
+ XmlDocument doc = new XmlDocument();
+ XmlNode node = xmlHelper.addTextNode(doc, "error", "");
+
+ try
+ {
+ doc.LoadXml(value);
+ return doc.SelectSingleNode(".");
+ }
+ catch
+ {
+ return node;
+ }
+
+ }
+ }
}
diff --git a/umbraco/cms/businesslogic/datatype/BaseDataType.cs b/umbraco/cms/businesslogic/datatype/BaseDataType.cs
index 58efadb850..ae92b0d646 100644
--- a/umbraco/cms/businesslogic/datatype/BaseDataType.cs
+++ b/umbraco/cms/businesslogic/datatype/BaseDataType.cs
@@ -157,7 +157,7 @@ namespace umbraco.cms.businesslogic.datatype
this.GetType().InvokeMember(setting.Key, System.Reflection.BindingFlags.SetProperty, null, this, new object[] { setting.Value });
}
- catch (MissingMethodException ex) { }
+ catch (MissingMethodException) { }
}
}
diff --git a/umbraco/cms/businesslogic/macro/Macro.cs b/umbraco/cms/businesslogic/macro/Macro.cs
index 95c98fd4a1..4f2e71ae00 100644
--- a/umbraco/cms/businesslogic/macro/Macro.cs
+++ b/umbraco/cms/businesslogic/macro/Macro.cs
@@ -486,7 +486,6 @@ namespace umbraco.cms.businesslogic.macro
///
/// The alias of the macro
/// If the macro with the given alias exists, it returns the macro, else null
- [Obsolete("Use the alias constructor")]
public static Macro GetByAlias(string Alias)
{
try
diff --git a/umbraco/cms/businesslogic/member/MemberGroup.cs b/umbraco/cms/businesslogic/member/MemberGroup.cs
index 83c7a39caf..d7f22456ec 100644
--- a/umbraco/cms/businesslogic/member/MemberGroup.cs
+++ b/umbraco/cms/businesslogic/member/MemberGroup.cs
@@ -209,14 +209,14 @@ namespace umbraco.cms.businesslogic.member
///
/// Occurs when a language is saved.
///
- public static event SaveEventHandler BeforeSave;
+ public new static event SaveEventHandler BeforeSave;
protected virtual void FireBeforeSave(SaveEventArgs e) {
if (BeforeSave != null)
BeforeSave(this, e);
}
- public static event SaveEventHandler AfterSave;
- protected virtual void FireAfterSave(SaveEventArgs e) {
+ public new static event SaveEventHandler AfterSave;
+ protected new virtual void FireAfterSave(SaveEventArgs e) {
if (AfterSave != null)
AfterSave(this, e);
}
diff --git a/umbraco/cms/businesslogic/web/StylesheetProperty.cs b/umbraco/cms/businesslogic/web/StylesheetProperty.cs
index 118b89b7c5..05d5b15d13 100644
--- a/umbraco/cms/businesslogic/web/StylesheetProperty.cs
+++ b/umbraco/cms/businesslogic/web/StylesheetProperty.cs
@@ -184,12 +184,12 @@ namespace umbraco.cms.businesslogic.web
///
/// Occurs when [new].
///
- new public static event NewEventHandler New;
+ public static event NewEventHandler New;
///
/// Raises the event.
///
/// The instance containing the event data.
- new protected virtual void OnNew(NewEventArgs e) {
+ protected virtual void OnNew(NewEventArgs e) {
if (New != null)
New(this, e);
}
diff --git a/umbraco/presentation/UmbracoContext.cs b/umbraco/presentation/UmbracoContext.cs
index 629c460255..9a42041f50 100644
--- a/umbraco/presentation/UmbracoContext.cs
+++ b/umbraco/presentation/UmbracoContext.cs
@@ -21,7 +21,6 @@ namespace umbraco.presentation
private UmbracoRequest m_Request;
private UmbracoResponse m_Response;
private HttpContext m_HttpContext;
- private XmlDocument previewDocument;
private PreviewContent _previewContent;
///
diff --git a/umbraco/presentation/config/Dashboard.config b/umbraco/presentation/config/Dashboard.config
index 8121bfda4c..a6127b3b83 100644
--- a/umbraco/presentation/config/Dashboard.config
+++ b/umbraco/presentation/config/Dashboard.config
@@ -83,4 +83,12 @@
+
+
+ courier
+
+
+ /umbraco/plugins/courier/dashboard/CourierDashboard.ascx
+
+
\ No newline at end of file
diff --git a/umbraco/presentation/config/tinyMceConfig.config b/umbraco/presentation/config/tinyMceConfig.config
index 6c06a243a3..2438825b51 100644
--- a/umbraco/presentation/config/tinyMceConfig.config
+++ b/umbraco/presentation/config/tinyMceConfig.config
@@ -2,226 +2,227 @@
-
-
- code
- images/editor/code.gif
- code
- 1
-
-
- removeformat
- images/editor/removeformat.gif
- removeformat
- 2
-
+
+
+ code
+ images/editor/code.gif
+ code
+ 1
+
+
+ removeformat
+ images/editor/removeformat.gif
+ removeformat
+ 2
+
-
- Undo
- images/editor/undo.gif
- undo
- 11
-
-
- Redo
- images/editor/redo.gif
- redo
- 12
-
-
- Cut
- images/editor/cut.gif
- cut
- 13
-
-
- Copy
- images/editor/copy.gif
- copy
- 14
-
-
- mcePasteWord
- images/editor/paste.gif
- pasteword
- 15
-
+
+ Undo
+ images/editor/undo.gif
+ undo
+ 11
+
+
+ Redo
+ images/editor/redo.gif
+ redo
+ 12
+
+
+ Cut
+ images/editor/cut.gif
+ cut
+ 13
+
+
+ Copy
+ images/editor/copy.gif
+ copy
+ 14
+
+
+ mcePasteWord
+ images/editor/paste.gif
+ pasteword
+ 15
+
-
- stylePicker
- images/editor/showStyles.png
- umbracocss
- 20
-
-
- bold
- images/editor/bold.gif
- bold
- 21
-
-
- italic
- images/editor/italic.gif
- italic
- 22
-
-
- Underline
- images/editor/underline.gif
- underline
- 23
-
-
- Strikethrough
- images/editor/strikethrough.gif
- strikethrough
- 24
-
+
+ stylePicker
+ images/editor/showStyles.png
+ umbracocss
+ 20
+
+
+ bold
+ images/editor/bold.gif
+ bold
+ 21
+
+
+ italic
+ images/editor/italic.gif
+ italic
+ 22
+
+
+ Underline
+ images/editor/underline.gif
+ underline
+ 23
+
+
+ Strikethrough
+ images/editor/strikethrough.gif
+ strikethrough
+ 24
+
-
- JustifyLeft
- images/editor/justifyleft.gif
- justifyleft
- 31
-
-
- JustifyCenter
- images/editor/justifycenter.gif
- justifycenter
- 32
-
-
- JustifyRight
- images/editor/justifyright.gif
- justifyright
- 33
-
-
- JustifyFull
- images/editor/justifyfull.gif
- justifyfull
- 34
-
+
+ JustifyLeft
+ images/editor/justifyleft.gif
+ justifyleft
+ 31
+
+
+ JustifyCenter
+ images/editor/justifycenter.gif
+ justifycenter
+ 32
+
+
+ JustifyRight
+ images/editor/justifyright.gif
+ justifyright
+ 33
+
+
+ JustifyFull
+ images/editor/justifyfull.gif
+ justifyfull
+ 34
+
-
- bullist
- images/editor/bullist.gif
- bullist
- 41
-
-
- numlist
- images/editor/numlist.gif
- numlist
- 42
-
-
- Outdent
- images/editor/outdent.gif
- outdent
- 43
-
-
- Indent
- images/editor/indent.gif
- indent
- 44
-
+
+ bullist
+ images/editor/bullist.gif
+ bullist
+ 41
+
+
+ numlist
+ images/editor/numlist.gif
+ numlist
+ 42
+
+
+ Outdent
+ images/editor/outdent.gif
+ outdent
+ 43
+
+
+ Indent
+ images/editor/indent.gif
+ indent
+ 44
+
-
- mceLink
- images/editor/link.gif
- link
- 51
-
-
- unlink
- images/editor/unLink.gif
- unlink
- 52
-
-
- mceInsertAnchor
- images/editor/anchor.gif
- anchor
- 53
-
+
+ mceLink
+ images/editor/link.gif
+ link
+ 51
+
+
+ unlink
+ images/editor/unLink.gif
+ unlink
+ 52
+
+
+ mceInsertAnchor
+ images/editor/anchor.gif
+ anchor
+ 53
+
-
- mceImage
- images/editor/image.gif
- image
- 61
-
-
-
- umbracomacro
- images/editor/insMacro.gif
- umbracomacro
- 62
-
-
- mceInsertTable
- images/editor/table.gif
- table
- 63
-
-
- media
- images/editor/media.gif
- media
- 65
-
+
+ mceImage
+ images/editor/image.gif
+ image
+ 61
+
-
- inserthorizontalrule
- images/editor/hr.gif
- hr
- 71
-
-
- subscript
- images/editor/sub.gif
- sub
- 72
-
-
-
- superscript
- images/editor/sup.gif
- sup
- 73
-
-
-
- mceCharMap
- images/editor/charmap.gif
- charmap
- 74
-
-
-
- mceSpellCheck
- images/editor/spellchecker.gif
- spellchecker
- 75
-
-
-
- paste
- inlinepopups
- noneditable
- table
- umbracomacro
-
- advlink
- umbracocss
- media
- umbracoimg
- spellchecker
-
-
-
+ umbracomacro
+ images/editor/insMacro.gif
+ umbracomacro
+ 62
+
+
+ mceInsertTable
+ images/editor/table.gif
+ table
+ 63
+
+
+ media
+ images/editor/media.gif
+ media
+ 65
+
+
+
+ inserthorizontalrule
+ images/editor/hr.gif
+ hr
+ 71
+
+
+ subscript
+ images/editor/sub.gif
+ sub
+ 72
+
+
+
+ superscript
+ images/editor/sup.gif
+ sup
+ 73
+
+
+
+ mceCharMap
+ images/editor/charmap.gif
+ charmap
+ 74
+
+
+
+ mceSpellCheck
+ images/editor/spellchecker.gif
+ spellchecker
+ 75
+
+
+
+ paste
+ inlinepopups
+ noneditable
+ table
+ umbracomacro
+
+ advlink
+ umbracocss
+ media
+ umbracoimg
+ spellchecker
+ umbracoshortcut
+
+
+
- font
-
-
-
-
- raw
- GoogleSpellChecker.ashx
-
+param[name|value|_value],embed[type|width|height|src|*],map[name],area[shape|coords|href|alt|target],bdo,button]]>
+
+ font
+
+
+
+
+ raw
+ GoogleSpellChecker.ashx
+
\ No newline at end of file
diff --git a/umbraco/presentation/default.aspx.cs b/umbraco/presentation/default.aspx.cs
index 71f42ee330..dd70c09918 100644
--- a/umbraco/presentation/default.aspx.cs
+++ b/umbraco/presentation/default.aspx.cs
@@ -237,7 +237,7 @@ namespace umbraco
System.Web.HttpContext.Current.Items.Add("pageElements", m_umbPage.Elements);
}
- catch (ArgumentException aex)
+ catch (ArgumentException)
{
System.Web.HttpContext.Current.Items.Remove("pageElements");
diff --git a/umbraco/presentation/helper.cs b/umbraco/presentation/helper.cs
index 01adff021f..6cd4cbc824 100644
--- a/umbraco/presentation/helper.cs
+++ b/umbraco/presentation/helper.cs
@@ -6,6 +6,7 @@ using System.Web;
using umbraco.BusinessLogic;
using System.Xml;
using System.Web.UI;
+using umbraco.presentation;
namespace umbraco
{
@@ -25,14 +26,14 @@ namespace umbraco
return umbraco.BasePages.UmbracoEnsuredPage.CurrentUser;
}
- [Obsolete("Use umbraco.Presentation.UmbracoContext.Current.Request[key]", false)]
public static string Request(string text)
{
- string temp = string.Empty;
- if (HttpContext.Current.Request[text.ToLower()] != null)
- if (HttpContext.Current.Request[text] != string.Empty)
- temp = HttpContext.Current.Request[text];
- return temp;
+
+ if (UmbracoContext.Current.Request[text.ToLower()] != null)
+ if (UmbracoContext.Current.Request[text] != string.Empty)
+ return UmbracoContext.Current.Request[text];
+
+ return String.Empty;
}
public static Hashtable ReturnAttributes(String tag)
diff --git a/umbraco/presentation/install/steps/theend.ascx.cs b/umbraco/presentation/install/steps/theend.ascx.cs
index 760e71bc1c..5bea489744 100644
--- a/umbraco/presentation/install/steps/theend.ascx.cs
+++ b/umbraco/presentation/install/steps/theend.ascx.cs
@@ -22,7 +22,7 @@ namespace umbraco.presentation.install.steps
GlobalSettings.ConfigurationStatus = GlobalSettings.CurrentVersion;
Application["umbracoNeedConfiguration"] = false;
}
- catch (Exception ex)
+ catch (Exception)
{
//errorLiteral.Text = ex.ToString();
}
diff --git a/umbraco/presentation/macro.cs b/umbraco/presentation/macro.cs
index e75659b7ea..6cf0b3afa4 100644
--- a/umbraco/presentation/macro.cs
+++ b/umbraco/presentation/macro.cs
@@ -1475,7 +1475,7 @@ namespace umbraco
// Release the HttpWebResponse Resource.
myHttpWebResponse.Close();
}
- catch (Exception ee)
+ catch (Exception)
{
retVal = showNoMacroContent(currentMacro);
}
diff --git a/umbraco/presentation/publishingService.cs b/umbraco/presentation/publishingService.cs
index 5f0644884c..444c1139f6 100644
--- a/umbraco/presentation/publishingService.cs
+++ b/umbraco/presentation/publishingService.cs
@@ -38,7 +38,7 @@ namespace umbraco.presentation
d.ReleaseDate = DateTime.MinValue; //new DateTime(1, 1, 1); // Causes release date to be null
d.Publish(d.User);
- library.PublishSingleNode(d.Id);
+ library.UpdateDocumentCache(d.Id);
}
catch(Exception ee)
diff --git a/umbraco/presentation/umbraco.presentation.csproj b/umbraco/presentation/umbraco.presentation.csproj
index 6e63c710f4..21baeee5f7 100644
--- a/umbraco/presentation/umbraco.presentation.csproj
+++ b/umbraco/presentation/umbraco.presentation.csproj
@@ -1662,6 +1662,7 @@
+
@@ -1909,6 +1910,7 @@
+
diff --git a/umbraco/presentation/umbraco/LiveEditing/Modules/CreateModule/CreateModule.cs b/umbraco/presentation/umbraco/LiveEditing/Modules/CreateModule/CreateModule.cs
index 19d34dc7a3..18b0e22a72 100644
--- a/umbraco/presentation/umbraco/LiveEditing/Modules/CreateModule/CreateModule.cs
+++ b/umbraco/presentation/umbraco/LiveEditing/Modules/CreateModule/CreateModule.cs
@@ -132,7 +132,7 @@ namespace umbraco.presentation.LiveEditing.Modules.CreateModule
DocumentType typeToCreate = new DocumentType(Convert.ToInt32(m_AllowedDocTypesDropdown.SelectedValue));
Document newDoc = Document.MakeNew(m_NameTextBox.Text, typeToCreate, new global::umbraco.BusinessLogic.User(userid), (int)UmbracoContext.Current.PageId);
newDoc.Publish(new global::umbraco.BusinessLogic.User(userid));
- library.PublishSingleNode(newDoc.Id);
+ library.UpdateDocumentCache(newDoc.Id);
Page.Response.Redirect(library.NiceUrl(newDoc.Id), false);
break;
}
diff --git a/umbraco/presentation/umbraco/LiveEditing/Modules/ItemEditing/ItemUpdate.cs b/umbraco/presentation/umbraco/LiveEditing/Modules/ItemEditing/ItemUpdate.cs
index a0f30a3e7c..390ec99040 100644
--- a/umbraco/presentation/umbraco/LiveEditing/Modules/ItemEditing/ItemUpdate.cs
+++ b/umbraco/presentation/umbraco/LiveEditing/Modules/ItemEditing/ItemUpdate.cs
@@ -97,7 +97,7 @@ namespace umbraco.presentation.LiveEditing.Modules.ItemEditing
{
Document document = new Document(NodeId.Value);
document.Publish(UmbracoEnsuredPage.CurrentUser);
- library.PublishSingleNode(NodeId.Value);
+ library.UpdateDocumentCache(NodeId.Value);
publishedDocuments.Add(NodeId.Value);
}
diff --git a/umbraco/presentation/umbraco/LiveEditing/Modules/SkinModule/ImageUploader.aspx.cs b/umbraco/presentation/umbraco/LiveEditing/Modules/SkinModule/ImageUploader.aspx.cs
index eae6e8b5ec..c44814b571 100644
--- a/umbraco/presentation/umbraco/LiveEditing/Modules/SkinModule/ImageUploader.aspx.cs
+++ b/umbraco/presentation/umbraco/LiveEditing/Modules/SkinModule/ImageUploader.aspx.cs
@@ -163,7 +163,7 @@ namespace umbraco.presentation.umbraco.LiveEditing.Modules.SkinModule
{
System.Drawing.Image newImage = System.Drawing.Image.FromFile(filename);
}
- catch (OutOfMemoryException ex)
+ catch (OutOfMemoryException)
{
// Image.FromFile will throw this if file is invalid.
diff --git a/umbraco/presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs b/umbraco/presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs
index 0ed902b697..532cf9e639 100644
--- a/umbraco/presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs
+++ b/umbraco/presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs
@@ -76,7 +76,7 @@ namespace umbraco.presentation.channels
if (publish)
{
doc.Publish(new User(username));
- library.PublishSingleNode(doc.Id);
+ library.UpdateDocumentCache(doc.Id);
}
return true;
}
@@ -381,7 +381,7 @@ namespace umbraco.presentation.channels
if (publish)
{
doc.Publish(new User(username));
- library.PublishSingleNode(doc.Id);
+ library.UpdateDocumentCache(doc.Id);
}
return doc.Id.ToString();
}
diff --git a/umbraco/presentation/umbraco/config/create/UI.xml b/umbraco/presentation/umbraco/config/create/UI.xml
index 2e26746d75..3f14b18051 100644
--- a/umbraco/presentation/umbraco/config/create/UI.xml
+++ b/umbraco/presentation/umbraco/config/create/UI.xml
@@ -16,7 +16,6 @@
-
Template/create/simple.ascx
@@ -369,7 +368,6 @@
-
Xslt/create/xslt.ascx
@@ -377,4 +375,12 @@
+
+ Revisions
+ /create/simple.ascx
+
+
+
+
+
\ No newline at end of file
diff --git a/umbraco/presentation/umbraco/config/lang/en.xml b/umbraco/presentation/umbraco/config/lang/en.xml
index d84df094bd..252bdf9af7 100644
--- a/umbraco/presentation/umbraco/config/lang/en.xml
+++ b/umbraco/presentation/umbraco/config/lang/en.xml
@@ -1,4 +1,4 @@
-
+
umbraco
@@ -50,21 +50,13 @@
Remove MacroClick to add a MacroMacro Settings
-
- Set a placeholder id by setting an ID on your placeholder you can inject content into this template from child templates,
- by refering this ID using a <asp:content /> element.]]>
-
-
-
- Select a placeholder id from the list below. You can only
- choose Id's from the current template's master.]]>
-
+ Set a placeholder id by setting an ID on your placeholder you can inject content into this template from child templates,
+ by refering this ID using a <asp:content /> element.]]>
+ Select a placeholder id from the list below. You can only
+ choose Id's from the current template's master.]]>Search for a regular expression to add validation to a form field. Exemple: 'email, 'zip-code' 'url'regexlib.com's webservice is currently experiencing some problems, which we have no control over. We are very sorry for this inconvenience.]]>
-
-
-
-
+ Properties
@@ -156,14 +148,14 @@
RetryNextPrevious
- Search
- Renew
- Locked
+ Search
+ Renew
+ Locked
+
+
+ You've been idle and logout will automatically occur in
+ Renew now to save your work
-
- You've been idle and logout will automatically occur in
- Renew now to save your work
-
Welcomehas opened in a new window
@@ -282,11 +274,9 @@
UsernameLoginPassword
-
User typeUser permissionsUser types
-
LanguageStart Node in ContentStart Node in Media Library
@@ -298,18 +288,14 @@
Disable UserRedirect to canvas on loginSearch all children
-
Description fieldCategory fieldExcerpt fieldDocument TypeContent Channel
-
Select pages to modify their permissionsReplace child node permssions
-
-
Change Your PasswordYou can change your password for accessing the Umbraco Back Office by filling out the form below and click the 'Change Password' buttonEnter your new password
@@ -400,26 +386,21 @@
Xslt not savedXslt could not be saved, check file permissionsXslt contained an error
-
Python script savedNo errors in python scriptPython script not savedPython script could not be saved due to error
-
Template savedTemplate saved without any errors!Template not savedPlease make sure that you do not have 2 templates with the same alias
-
Stylesheet savedStylesheet saved without any errorsStylesheet not saved
-
File not savedfile could not be saved. Please check file permissionsFile savedFile saved without any errors
-
Document Type savedTab createdTab deleted
@@ -443,7 +424,6 @@
Error saving user (check log)Sent For ApprovalChanges have been sent for approval
-
Dictionary item savedLanguage saved
@@ -471,9 +451,7 @@
Rollback toViewRed text will not be shown in the selected version. , green means added]]>
-
-
-
+ Select versionDocument has been rolled back
@@ -489,11 +467,9 @@
Publishing in progress - please wait...%0% out of %1% pages have been published...Include unpublished child pages
-
- ok to publish %0% and thereby making it's content publicly available.
+ ok to publish %0% and thereby making it's content publicly available.
You can publish this page and all it's sub-pages by checking publish all children below.
- ]]>
-
+ ]]>
%0% could not be published, due to a 3rd party extension cancelling the action.
@@ -559,11 +535,9 @@
Insert umbraco page field
-
- %0%' below You can add additional languages under the 'languages' in the menu on the left
- ]]>
-
+ ]]>
Culture Name
@@ -617,24 +591,18 @@
Choose how to restict access to this page
-
Single user protectionIf you just want to setup simple protection using a single login and password
-
Role based protection using umbraco's member groups.]]>role-based authentication.]]>
-
Login PageError Page
-
Select the pages that contain login form and error messagesChoose the page that has the login formularUsed when people are logged on, but do not have access
-
Pick the roles who have access to this pageSet the login and password for this page
-
%0% is now protectedProtection removed from %0%Remove Protection
@@ -659,8 +627,7 @@
Cheers from the umbraco robot
-
- Hi %0%
+ Hi %0%
This is an automated mail to inform you that the task '%1%'
has been performed on the page '%2%'
@@ -690,8 +657,7 @@
Have a nice day!
Cheers from the umbraco robot
-
]]>
-
+ ]]>
The page '%0%' has been send to translation
@@ -717,27 +683,20 @@
Cheers from the umbraco robot
Tasks assigned to you
-
- assigned to you. To see a detailed view including comments, click on "Details" or just the page name.
+ assigned to you. To see a detailed view including comments, click on "Details" or just the page name.
You can also download the page as XML directly by clicking the "Download Xml" link.
To close a translation task, please go to the Details view and click the "Close" button.
- ]]>
-
+ ]]>Tasks created by you
-
- created by you. To see a detailed view including comments,
+ created by you. To see a detailed view including comments,
click on "Details" or just the page name. You can also download the page as XML directly by clicking the "Download Xml" link.
To close a translation task, please go to the Details view and click the "Close" button.
- ]]>
-
-
+ ]]>Download xmlDownload all translation tasks as xml
-
Download xml DTDclose taskUpload translation xml
-
Task openedAssigned byTotal words
@@ -753,41 +712,31 @@
Package namePackage versionAuthor
-
DocumentationDemonstrationPackage repository
-
Package readmePackage optionsView package websiteUninstall package
-
-
+ Notice: any documents, media etc depending on the items you remove, will stop working, and could lead to system instability,
- so uninstall with caution. If in doubt, contact the package author.]]>
-
+ so uninstall with caution. If in doubt, contact the package author.]]>Confirm uninstallPackage was uninstalledThe package was successfully uninstalled
-
Package doesn't contain any items
-
-
- You can safely remove this from the system by clicking "uninstall package" below.]]>
-
-
+
+ You can safely remove this from the system by clicking "uninstall package" below.]]>Upgrade package There's an upgrade available for this package. You can download it directly from the umbraco package repository.No upgrades availableUpgrade instructionsDownload update from the repository
-
-
button and locating the package. umbraco packages usually have a ".umb" or ".zip" extension.
- ]]>
-
+ ]]>
Thank you for choosing umbraco
@@ -795,95 +744,67 @@
Press "next" to start the wizard.]]>
Get a great start, watch our introduction videos
-
Watch
-
Step 1/5 Accept licenseBy clicking the next button (or modifying the umbracoConfigurationStatus in web.config), you accept the license for this software as specified in the box below. Notice that this umbraco distribution consists of two different licenses, the open source MIT license for the framework and the umbraco freeware license that covers the UI.
-
Step 2/5: Database configurationDatabase configuration
-
-
+
Please contact your ISP if necessary.
- If you're installing on a local machine or server you might need information from your system administrator.]]>
-
+ If you're installing on a local machine or server you might need information from your system administrator.]]>Your database has been found and is identified asnext to continue the configuration wizard]]>
-
-
Press the upgrade button to upgrade your database to Umbraco %0%
Don't worry - no content will be deleted and everything will continue working afterwards!
- ]]>
-
-
-
+ install button to install the Umbraco %0% database
- ]]>
-
-
- Database not found! Please check that the information in the "connection string" of the “web.config” file is correct.
+ ]]>
+ Database not found! Please check that the information in the "connection string" of the “web.config” file is correct.
To proceed, please edit the "web.config" file (using Visual Studio or your favourite text editor), scroll to the bottom, add the connection string for your database in the key named "umbracoDbDSN" and save the file.
]]>
-
+ More information on editing web.config here.]]>
Next to proceed.]]>
-
- Press Next to
- proceed. ]]>
-
+ Press Next to
+ proceed. ]]>The installer cannot connect to the database.Could not save the web.config file. Please modify the connection string manually.Connection to database failed.Not installed yet.Umbraco Version 3Umbraco Version 4
-
Step 3/5: Validating File Permissions
umbraco needs write/modify access to certain directories in order to store files like pictures and PDF's.
It also stores temporary data (aka: cache) for enhancing the performance of your website.
-
- Your permission settings are perfect!
- You are ready to run umbraco and install packages!]]>
-
-
- Your permission settings are almost perfect!
- You can run umbraco without problems, but you will not be able to install packages which are recommended to take full advantage of umbraco.]]>
-
-
- Your permission settings are not ready for umbraco!
+ Your permission settings are perfect!
+ You are ready to run umbraco and install packages!]]>
+ Your permission settings are almost perfect!
+ You can run umbraco without problems, but you will not be able to install packages which are recommended to take full advantage of umbraco.]]>
+ Your permission settings are not ready for umbraco!
- In order to run umbraco, you'll need to update your permission settings.]]>
-
-
- Your permission settings might be an issue!
+ In order to run umbraco, you'll need to update your permission settings.]]>
+ Your permission settings might be an issue!
- You can run umbraco without problems, but you will not be able to create folders or install packages which are recommended to take full advantage of umbraco.]]>
-
-
+ You can run umbraco without problems, but you will not be able to create folders or install packages which are recommended to take full advantage of umbraco.]]>How to Resolvevideo tutorial on setting up folder permissions for umbraco or read the text version.]]>Click here to read the text version
-
Setting up folder permissionsAffected files and foldersYou need to grant ASP.NET modify permissions to the following files/foldersMore information on setting up permissions for umbraco here
-
Resolving folder issueFollow this link for more information on problems with ASP.NET and creating folders
-
-
Step 4/5: Check umbraco security
-
-
umbraco creates a default user with a login ('admin') and password ('default'). It's important that the password is
changed to something unique.
@@ -891,19 +812,16 @@
This step will check the default user's password and suggest if it needs to be changed.
- ]]>
-
+ ]]>
The password is changed!The Default user has been disabled or has no access to umbraco!
No further actions needs to be taken. Click Next to proceed.]]>
The Default user's password has been successfully changed since the installation!
No further actions needs to be taken. Click Next to proceed.]]>
The Default users’ password needs to be changed!]]>
-
Step 5/5: Umbraco is ready to get you startedYou’ve just set up a clean Umbraco platform. What do you want to do next?I want to start with a simple websiteI want to start from scratch
-
-
"Runway" is a simple website providing some basic document types and templates. The installer can set up Runway for you automatically,
but you can easily edit, extend or remove it. It’s not necessary and you can perfectly use Umbraco without it. However,
@@ -914,74 +832,43 @@
Included with Runway: Home page, Getting Started page, Installing Modules page. Optional Modules: Top Navigation, Sitemap, Contact, Gallery.
- ]]>
-
-
-
+ learn how)
You can still choose to install Runway later on. Please go to the Developer section and choose Packages.
- ]]>
-
-
+ ]]>
What is RunwayRunway is installed
-
-
This is our list of recommended modules, check off the ones you would like to install, or view the full list of modules
- ]]>
-
+ ]]>
Only recommended for experienced users
-
Umbraco %0% is installed and ready for use
-
- /web.config file and update the AppSetting key umbracoConfigurationStatus in the bottom to the value of '%0%'.]]>
-
- started instantly by clicking the "Launch Umbraco" button below. If you are new to umbraco,
+ started instantly by clicking the "Launch Umbraco" button below. If you are new to umbraco,
you can find plenty of resources on our getting started pages.]]>
-
- Browse your new site
+ Browse your new site
You installed Runway, so why not see how your new website looks.]]>
-
- Further help and information
+ Further help and information
Get help from our award winning community, browse the documentation or watch some free videos on how to build a simple site, how to use packages and a quick guide to the umbraco terminology]]>
-
- Launch Umbraco
-To manage your website, simply open the umbraco back office and start adding content, updating the templates and stylesheets or add new functionality]]>
-
+ Launch Umbraco
+To manage your website, simply open the umbraco back office and start adding content, updating the templates and stylesheets or add new functionality]]>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
+ Transfer
+ Transfer
+
\ No newline at end of file
diff --git a/umbraco/presentation/umbraco/controls/ContentPicker.cs b/umbraco/presentation/umbraco/controls/ContentPicker.cs
index 6edbe3f3ae..a8d032f5db 100644
--- a/umbraco/presentation/umbraco/controls/ContentPicker.cs
+++ b/umbraco/presentation/umbraco/controls/ContentPicker.cs
@@ -60,9 +60,9 @@ namespace umbraco.controls
string tempTitle = "";
try
{
- if (this.Text != "" && this.Text != "-1")
+ if (Value != "" && Value != "-1")
{
- tempTitle = new cms.businesslogic.CMSNode(int.Parse(this.Text)).Text;
+ tempTitle = new cms.businesslogic.CMSNode(int.Parse(Value)).Text;
}
else
{
diff --git a/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs b/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs
index f707aa5bd7..96518a9272 100644
--- a/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs
+++ b/umbraco/presentation/umbraco/controls/ContentTypeControlNew.ascx.cs
@@ -181,6 +181,7 @@ namespace umbraco.controls
Save.ImageUrl = UmbracoPath + "/images/editor/save.gif";
Save.AlternateText = ui.Text("save");
+ Save.ID = "save";
var listOfIcons = new List();
// Get icons
// nh css file update, add support for css sprites
diff --git a/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs b/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs
index 5936ed8da9..aefb42e50b 100644
--- a/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs
+++ b/umbraco/presentation/umbraco/controls/Images/UploadMediaImage.ascx.cs
@@ -66,11 +66,11 @@ namespace umbraco.controls.Images
protected void SubmitButton_Click(object sender, EventArgs e)
{
- int parent = int.Parse(MediaPickerControl.Text);
+ int parent = int.Parse(MediaPickerControl.Value);
if (BusinessLogic.User.GetCurrent().StartMediaId != -1 && parent == -1)
parent = BusinessLogic.User.GetCurrent().StartNodeId;
- Media m = Media.MakeNew(TextBoxTitle.Text, cms.businesslogic.media.MediaType.GetByAlias("image"), BasePage.Current.getUser(), int.Parse(MediaPickerControl.Text));
+ Media m = Media.MakeNew(TextBoxTitle.Text, cms.businesslogic.media.MediaType.GetByAlias("image"), BasePage.Current.getUser(), int.Parse(MediaPickerControl.Value));
var props = m.getProperties;
foreach (cms.businesslogic.property.Property p in props)
{
diff --git a/umbraco/presentation/umbraco/controls/macroParameterControl.cs b/umbraco/presentation/umbraco/controls/macroParameterControl.cs
index 5325f77482..1ad137fde9 100644
--- a/umbraco/presentation/umbraco/controls/macroParameterControl.cs
+++ b/umbraco/presentation/umbraco/controls/macroParameterControl.cs
@@ -154,7 +154,7 @@ namespace umbraco.controls
Controls.Add(new LiteralControl(""));
}
}
- catch (Exception fieldException)
+ catch (Exception)
{
}
}
diff --git a/umbraco/presentation/umbraco/create/memberTasks.cs b/umbraco/presentation/umbraco/create/memberTasks.cs
index 9c8cf96def..7570bee69a 100644
--- a/umbraco/presentation/umbraco/create/memberTasks.cs
+++ b/umbraco/presentation/umbraco/create/memberTasks.cs
@@ -14,7 +14,7 @@ namespace umbraco
///
/// The new event handler
///
- new public delegate void NewUIMemberEventHandler(Member sender, string unencryptedPassword, NewMemberUIEventArgs e);
+ public delegate void NewUIMemberEventHandler(Member sender, string unencryptedPassword, NewMemberUIEventArgs e);
public static event NewUIMemberEventHandler NewMember;
new protected virtual void OnNewMember(NewMemberUIEventArgs e, string unencryptedPassword, Member m)
diff --git a/umbraco/presentation/umbraco/create/nodeType.ascx.cs b/umbraco/presentation/umbraco/create/nodeType.ascx.cs
index 2d0eaf5a7a..0eabddaae2 100644
--- a/umbraco/presentation/umbraco/create/nodeType.ascx.cs
+++ b/umbraco/presentation/umbraco/create/nodeType.ascx.cs
@@ -54,8 +54,7 @@ namespace umbraco.cms.presentation.create.controls
if (Page.IsValid)
{
int createTemplateVal = 0;
- int nodeId = -1;
- if (createTemplate.Checked)
+ if (createTemplate.Checked)
createTemplateVal = 1;
// check master type
diff --git a/umbraco/presentation/umbraco/dashboard.aspx.cs b/umbraco/presentation/umbraco/dashboard.aspx.cs
index 4ed26aa200..6bff08325f 100644
--- a/umbraco/presentation/umbraco/dashboard.aspx.cs
+++ b/umbraco/presentation/umbraco/dashboard.aspx.cs
@@ -183,13 +183,10 @@ namespace umbraco.cms.presentation
return BusinessLogic.User.GetCurrent().LoginName;
case "usercontentstartnode":
return BusinessLogic.User.GetCurrent().StartNodeId;
- break;
case "usermediastartnode":
return BusinessLogic.User.GetCurrent().StartMediaId;
- break;
default:
return value;
- break;
}
}
}
diff --git a/umbraco/presentation/umbraco/developer/DataTypes/editDatatype.aspx b/umbraco/presentation/umbraco/developer/DataTypes/editDatatype.aspx
index 650ec6fee9..86066a5c63 100644
--- a/umbraco/presentation/umbraco/developer/DataTypes/editDatatype.aspx
+++ b/umbraco/presentation/umbraco/developer/DataTypes/editDatatype.aspx
@@ -1,23 +1,27 @@
-<%@ Page Language="c#" MasterPageFile="../../masterpages/umbracoPage.Master" Title="Edit data type" Codebehind="editDatatype.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.developer.editDatatype" %>
-<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
+<%@ Page Language="c#" MasterPageFile="../../masterpages/umbracoPage.Master" Title="Edit data type"
+ CodeBehind="editDatatype.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.developer.editDatatype" %>
+<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
+
diff --git a/umbraco/presentation/umbraco/developer/DataTypes/editDatatype.aspx.designer.cs b/umbraco/presentation/umbraco/developer/DataTypes/editDatatype.aspx.designer.cs
index afcf0ac1bb..9d1d8fc550 100644
--- a/umbraco/presentation/umbraco/developer/DataTypes/editDatatype.aspx.designer.cs
+++ b/umbraco/presentation/umbraco/developer/DataTypes/editDatatype.aspx.designer.cs
@@ -1,10 +1,9 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:2.0.50727.4927
//
// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// the code is regenerated.
//
//------------------------------------------------------------------------------
diff --git a/umbraco/presentation/umbraco/developer/Macros/editMacro.aspx b/umbraco/presentation/umbraco/developer/Macros/editMacro.aspx
index a746cf8537..46b066cbf1 100644
--- a/umbraco/presentation/umbraco/developer/Macros/editMacro.aspx
+++ b/umbraco/presentation/umbraco/developer/Macros/editMacro.aspx
@@ -1,190 +1,208 @@
-<%@ Page Language="c#" MasterPageFile="../../masterpages/umbracoPage.Master" Title="Edit macro" Codebehind="editMacro.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.developer.editMacro" %>
+<%@ Page Language="c#" MasterPageFile="../../masterpages/umbracoPage.Master" Title="Edit macro"
+ CodeBehind="editMacro.aspx.cs" AutoEventWireup="True" Inherits="umbraco.cms.presentation.developer.editMacro" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
-
-
+
-
-
+
-
+
+
+
+
+
diff --git a/umbraco/presentation/umbraco/developer/Macros/editMacro.aspx.cs b/umbraco/presentation/umbraco/developer/Macros/editMacro.aspx.cs
index 853c288b79..41e3bd9f50 100644
--- a/umbraco/presentation/umbraco/developer/Macros/editMacro.aspx.cs
+++ b/umbraco/presentation/umbraco/developer/Macros/editMacro.aspx.cs
@@ -345,6 +345,7 @@ namespace umbraco.cms.presentation.developer
ImageButton save = InfoTabPage.Menu.NewImageButton();
save.ImageUrl = SystemDirectories.Umbraco + "/images/editor/save.gif";
+ save.ID = "save";
ImageButton save2 = Parameters.Menu.NewImageButton();
save2.ImageUrl = SystemDirectories.Umbraco + "/images/editor/save.gif";
diff --git a/umbraco/presentation/umbraco/developer/Macros/editMacro.aspx.designer.cs b/umbraco/presentation/umbraco/developer/Macros/editMacro.aspx.designer.cs
index 79713b2c45..efb1c16c2f 100644
--- a/umbraco/presentation/umbraco/developer/Macros/editMacro.aspx.designer.cs
+++ b/umbraco/presentation/umbraco/developer/Macros/editMacro.aspx.designer.cs
@@ -1,10 +1,9 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:2.0.50727.3603
//
// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// the code is regenerated.
//
//------------------------------------------------------------------------------
diff --git a/umbraco/presentation/umbraco/developer/Packages/editPackage.aspx b/umbraco/presentation/umbraco/developer/Packages/editPackage.aspx
index 118f070660..04d4f23748 100644
--- a/umbraco/presentation/umbraco/developer/Packages/editPackage.aspx
+++ b/umbraco/presentation/umbraco/developer/Packages/editPackage.aspx
@@ -1,215 +1,215 @@
-<%@ Page Language="C#" ValidateRequest="false" AutoEventWireup="true" MasterPageFile="../../masterpages/umbracoPage.Master" Title="Package and export content" Codebehind="editPackage.aspx.cs"
- Inherits="umbraco.presentation.developer.packages._Default" %>
+<%@ Page Language="C#" ValidateRequest="false" AutoEventWireup="true" MasterPageFile="../../masterpages/umbracoPage.Master"
+ Title="Package and export content" CodeBehind="editPackage.aspx.cs" Inherits="umbraco.presentation.developer.packages._Default" %>
<%@ Register TagPrefix="cc2" Namespace="umbraco.uicontrols" Assembly="controls" %>
-
-
+
-
- *
-
-
-
+ *
+
+
- *
-
-
-
+ *
+
+
- *
-
-
+ *
+
-
-
+
+
-
+
- *
+ *
- *
+ *
-
+
- *
-
-
+ *
+
+
- *
-
+ *
+
-
-
-
-
-
+
+
+
+
-
+
- Include all child nodes
-
+
+ Include all child nodes
+
-
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
-
+
-
-
+
-
+
-
-
-
-
+
+
+
-
-
-
-
- Remember: .xslt and .ascx files for your macros
- will be added automaticly, but you will still need to add assemblies,
- images and script files manually to the list below.
-
-
-
-
-
-
-
-
-
- Absolute path to file (ie: /bin/umbraco.bin)
-
-
-
-
-
+
-
-
-
-
-
-
+
+ Remember: .xslt and .ascx files for your macros
+ will be added automaticly, but you will still need to add assemblies,
+ images and script files manually to the list below.
+
- Here you can add custom installer / uninstaller events to perform certain tasks during installation and uninstallation.
-
- All actions are formed as a xml node, containing data for the action to be performed.
+
+
+
+
+ Here you can add custom installer / uninstaller events to perform certain tasks
+ during installation and uninstallation.
+
+ All actions are formed as a xml node, containing data for the action to be performed.
+ Package actions documentation
-
-
-
-
-
-
-
-
- Actions:
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ Actions:
+
+
+
+
+
+
+
+
-
\ No newline at end of file
+
+
diff --git a/umbraco/presentation/umbraco/developer/Packages/editPackage.aspx.cs b/umbraco/presentation/umbraco/developer/Packages/editPackage.aspx.cs
index 17fe767fc5..5a9a9ae43c 100644
--- a/umbraco/presentation/umbraco/developer/Packages/editPackage.aspx.cs
+++ b/umbraco/presentation/umbraco/developer/Packages/editPackage.aspx.cs
@@ -381,12 +381,14 @@ namespace umbraco.presentation.developer.packages
packageActions = TabView1.NewTabPage("Package Actions");
packageActions.Controls.Add(Pane4);
+ int count = 1;
foreach (uicontrols.TabPage tp in TabView1.GetPanels()) {
ImageButton saves = tp.Menu.NewImageButton();
saves.ImageUrl = SystemDirectories.Umbraco + "/images/editor/save.gif";
saves.CommandName = "save";
saves.AlternateText = "Save package";
saves.Command += new CommandEventHandler(saveOrPublish);
+ saves.ID = "save_" + count;
tp.BorderStyle = BorderStyle.None;
tp.Style["background"] = "none !Important";
@@ -396,6 +398,7 @@ namespace umbraco.presentation.developer.packages
publishes.CommandName = "publish";
publishes.Command += new CommandEventHandler(saveOrPublish);
publishes.AlternateText = "Save and publish the package as a .umb file";
+ count++;
}
diff --git a/umbraco/presentation/umbraco/developer/Python/editPython.aspx b/umbraco/presentation/umbraco/developer/Python/editPython.aspx
index 9ecdbea606..1c30cd2645 100644
--- a/umbraco/presentation/umbraco/developer/Python/editPython.aspx
+++ b/umbraco/presentation/umbraco/developer/Python/editPython.aspx
@@ -3,8 +3,6 @@
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
-
-
-
-
+
@@ -58,13 +56,17 @@
-
-
-
+
+ -
-
-
-
+
-
\ No newline at end of file
+
+
diff --git a/umbraco/presentation/umbraco/developer/Python/editPython.aspx.cs b/umbraco/presentation/umbraco/developer/Python/editPython.aspx.cs
index 9d7287022f..b50e3da7c3 100644
--- a/umbraco/presentation/umbraco/developer/Python/editPython.aspx.cs
+++ b/umbraco/presentation/umbraco/developer/Python/editPython.aspx.cs
@@ -66,6 +66,7 @@ namespace umbraco.cms.presentation.developer
save.ImageURL = SystemDirectories.Umbraco + "/images/editor/save.gif";
save.OnClickCommand = "doSubmit()";
save.AltText = "Save scripting File";
+ save.ID = "save";
// Add source and filename
String file = IOHelper.MapPath(SystemDirectories.MacroScripts + "/" + Request.QueryString["file"]);
diff --git a/umbraco/presentation/umbraco/developer/Python/editPython.aspx.designer.cs b/umbraco/presentation/umbraco/developer/Python/editPython.aspx.designer.cs
index 31d6df87ff..253bfa28fd 100644
--- a/umbraco/presentation/umbraco/developer/Python/editPython.aspx.designer.cs
+++ b/umbraco/presentation/umbraco/developer/Python/editPython.aspx.designer.cs
@@ -1,10 +1,9 @@
//------------------------------------------------------------------------------
//
// This code was generated by a tool.
-// Runtime Version:2.0.50727.3603
//
// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
+// the code is regenerated.
//
//------------------------------------------------------------------------------
diff --git a/umbraco/presentation/umbraco/developer/Xslt/editXslt.aspx b/umbraco/presentation/umbraco/developer/Xslt/editXslt.aspx
index 8562bc846a..9942fe9498 100644
--- a/umbraco/presentation/umbraco/developer/Xslt/editXslt.aspx
+++ b/umbraco/presentation/umbraco/developer/Xslt/editXslt.aspx
@@ -93,6 +93,11 @@
AutoResize="true" OffSetX="47" OffSetY="55" />
+
diff --git a/umbraco/presentation/umbraco/developer/Xslt/editXslt.aspx.cs b/umbraco/presentation/umbraco/developer/Xslt/editXslt.aspx.cs
index f9edf29f62..80b6e55f12 100644
--- a/umbraco/presentation/umbraco/developer/Xslt/editXslt.aspx.cs
+++ b/umbraco/presentation/umbraco/developer/Xslt/editXslt.aspx.cs
@@ -57,6 +57,7 @@ namespace umbraco.cms.presentation.developer
save.ImageURL = SystemDirectories.Umbraco + "/images/editor/save.gif";
save.OnClickCommand = "doSubmit()";
save.AltText = "Save Xslt File";
+ save.ID = "save";
UmbracoPanel1.Menu.InsertSplitter();
diff --git a/umbraco/presentation/umbraco/developer/Xslt/xsltVisualize.aspx.cs b/umbraco/presentation/umbraco/developer/Xslt/xsltVisualize.aspx.cs
index e8b790445e..6ed994eb94 100644
--- a/umbraco/presentation/umbraco/developer/Xslt/xsltVisualize.aspx.cs
+++ b/umbraco/presentation/umbraco/developer/Xslt/xsltVisualize.aspx.cs
@@ -29,7 +29,7 @@ namespace umbraco.presentation.umbraco.developer.Xslt
// Check if cookie exists in the current request.
// zb-00004 #29956 : refactor cookies names & handling
if (cookie.HasValue)
- contentPicker.Text = cookie.GetValue();
+ contentPicker.Value = cookie.GetValue();
}
}
@@ -62,7 +62,7 @@ namespace umbraco.presentation.umbraco.developer.Xslt
}
Dictionary parameters = new Dictionary(1);
- parameters.Add("currentPage", library.GetXmlNodeById(contentPicker.Text));
+ parameters.Add("currentPage", library.GetXmlNodeById(contentPicker.Value));
// apply the XSLT transformation
@@ -92,7 +92,7 @@ namespace umbraco.presentation.umbraco.developer.Xslt
// add cookie with current page
// zb-00004 #29956 : refactor cookies names & handling
- cookie.SetValue(contentPicker.Text);
+ cookie.SetValue(contentPicker.Value);
}
}
diff --git a/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx.cs b/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx.cs
index 29344d9189..489f226ce8 100644
--- a/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx.cs
+++ b/umbraco/presentation/umbraco/dialogs/moveOrCopy.aspx.cs
@@ -148,7 +148,7 @@ namespace umbraco.dialogs
if (cd.Published) {
cd.Publish(new umbraco.BusinessLogic.User(0));
//using library.publish to support load balancing.
- umbraco.library.PublishSingleNode(cd.Id);
+ umbraco.library.UpdateDocumentCache(cd.Id);
if (cd.HasChildren) {
diff --git a/umbraco/presentation/umbraco/dialogs/protectPage.aspx.cs b/umbraco/presentation/umbraco/dialogs/protectPage.aspx.cs
index 0075616741..fb3c51faf7 100644
--- a/umbraco/presentation/umbraco/dialogs/protectPage.aspx.cs
+++ b/umbraco/presentation/umbraco/dialogs/protectPage.aspx.cs
@@ -79,13 +79,10 @@ namespace umbraco.presentation.umbraco.dialogs
Document loginPageObj = new Document(loginPage);
if (loginPageObj != null)
{
- loginPagePicker.Text = loginPage.ToString();
+ loginPagePicker.Value = loginPage.ToString();
}
Document errorPageObj = new Document(errorPage);
- if (errorPageObj != null)
- {
- errorPagePicker.Text = errorPage.ToString();
- }
+ errorPagePicker.Value = errorPage.ToString();
}
catch
{
@@ -168,10 +165,10 @@ namespace umbraco.presentation.umbraco.dialogs
protected void protect_Click(object sender, CommandEventArgs e)
{
- if (string.IsNullOrEmpty(errorPagePicker.Text))
+ if (string.IsNullOrEmpty(errorPagePicker.Value))
cv_errorPage.IsValid = false;
- if (string.IsNullOrEmpty(loginPagePicker.Text))
+ if (string.IsNullOrEmpty(loginPagePicker.Value))
cv_loginPage.IsValid = false;
@@ -224,13 +221,13 @@ namespace umbraco.presentation.umbraco.dialogs
Roles.AddUserToRole(member.UserName, simpleRoleName);
}
- Access.ProtectPage(true, pageId, int.Parse(loginPagePicker.Text), int.Parse(errorPagePicker.Text));
+ Access.ProtectPage(true, pageId, int.Parse(loginPagePicker.Value), int.Parse(errorPagePicker.Value));
Access.AddMembershipRoleToDocument(pageId, simpleRoleName);
Access.AddMembershipUserToDocument(pageId, member.UserName);
}
else if (e.CommandName == "advanced")
{
- cms.businesslogic.web.Access.ProtectPage(false, pageId, int.Parse(loginPagePicker.Text), int.Parse(errorPagePicker.Text));
+ cms.businesslogic.web.Access.ProtectPage(false, pageId, int.Parse(loginPagePicker.Value), int.Parse(errorPagePicker.Value));
foreach (ListItem li in _memberGroups.Items)
if (("," + _memberGroups.Value + ",").IndexOf("," + li.Value + ",") > -1)
@@ -241,7 +238,7 @@ namespace umbraco.presentation.umbraco.dialogs
feedback.Text = ui.Text("publicAccess", "paIsProtected", new cms.businesslogic.CMSNode(pageId).Text, null) + "