/// Returns the current User. This ensures that we don't instantiate a new User object
@@ -45,7 +45,7 @@ namespace umbraco.cms.presentation.Trees
{
get
{
- return (m_user == null ? (m_user = UmbracoEnsuredPage.CurrentUser) : m_user);
+ return (_user == null ? (_user = UmbracoEnsuredPage.CurrentUser) : _user);
}
}
@@ -113,7 +113,7 @@ function openContent(id) {
node.OpenIcon = dd.ContentTypeIcon;
}
- if (dd.HasPublishedVersion() == false)
+ if (!dd.Published)
node.Style.DimNode();
if (dd.HasPendingChanges())
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/actions/publish.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/actions/publish.aspx.cs
index 94c88425ac..d58e002785 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/actions/publish.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/actions/publish.aspx.cs
@@ -39,7 +39,7 @@ namespace umbraco.presentation.actions
confirm.Visible = false;
d.Publish(getUser());
- library.UpdateDocumentCache(d.Id);
+ library.UpdateDocumentCache(d);
deleted.Text = ui.Text("editContentPublishedHeader") + " ('" + d.Text + "') " + ui.Text("editContentPublishedText") + " " + ui.Text("view") + " " + d.Text + "";
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs
index afe99ac4d2..c1089d77be 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/channels/UmbracoMetaWeblogAPI.cs
@@ -84,7 +84,7 @@ namespace umbraco.presentation.channels
if (publish)
{
doc.Publish(new User(username));
- library.UpdateDocumentCache(doc.Id);
+ library.UpdateDocumentCache(doc);
}
return true;
}
@@ -403,7 +403,7 @@ namespace umbraco.presentation.channels
if (publish)
{
doc.Publish(new User(username));
- library.UpdateDocumentCache(doc.Id);
+ library.UpdateDocumentCache(doc);
}
return doc.Id.ToString();
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs
index 549ce2657c..f6a54a1d0e 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentTypeControlNew.ascx.cs
@@ -545,10 +545,14 @@ jQuery(document).ready(function() {{ refreshDropDowns(); }});
var gpw = (GenericProperties.GenericPropertyWrapper)sender;
var alias = gpw.PropertyType.Alias;
- gpw.GenricPropertyControl.PropertyType.delete();
//We have to ensure that the property type is removed from the underlying IContentType object
- cType.ContentTypeItem.RemovePropertyType(alias);
- cType.Save();
+ if (cType.ContentTypeItem != null)
+ {
+ cType.ContentTypeItem.RemovePropertyType(alias);
+ cType.Save();
+ }
+
+ gpw.GenricPropertyControl.PropertyType.delete();
cType = ContentType.GetContentType(cType.Id);
this.bindDataGenericProperties(true);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx.cs
index d8b99c6bba..bfe92ef3c6 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx.cs
@@ -93,7 +93,7 @@ namespace umbraco.dialogs
{
if (doc.Published)
{
- library.UpdateDocumentCache(doc.Id);
+ library.UpdateDocumentCache(doc);
}
}
@@ -117,7 +117,7 @@ namespace umbraco.dialogs
{
if (d.PublishWithResult(base.getUser()))
{
- library.UpdateDocumentCache(d.Id);
+ library.UpdateDocumentCache(d);
feedbackMsg.type = umbraco.uicontrols.Feedback.feedbacktype.success;
feedbackMsg.Text = ui.Text("publish", "nodePublish", d.Text, base.getUser()) + "
" + ui.Text("closeThisWindow") + "";
}
@@ -142,7 +142,7 @@ namespace umbraco.dialogs
{
// Needed for supporting distributed calls
if (UmbracoSettings.UseDistributedCalls)
- library.UpdateDocumentCache(d.Id);
+ library.UpdateDocumentCache(d);
else
documents.Add(d);
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs
index 08fa0f6ed8..d6ef34ee67 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/editContent.aspx.cs
@@ -4,6 +4,7 @@ using System.Web.UI.WebControls;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Core.Persistence.Caching;
+using Umbraco.Core.Services;
using umbraco.BusinessLogic.Actions;
using umbraco.IO;
using umbraco.uicontrols.DatePicker;
@@ -316,6 +317,8 @@ namespace umbraco.cms.presentation
{
if (_document.Level == 1 || _document.PathPublished)
{
+ var previouslyPublished = _document.HasPublishedVersion();
+
Trace.Warn("before d.publish");
if (_document.PublishWithResult(base.getUser()))
@@ -330,15 +333,19 @@ namespace umbraco.cms.presentation
_documentHasPublishedVersion = _document.HasPublishedVersion();
- var descendants = ApplicationContext.Current.Services.ContentService.GetDescendants(_document.Id);
- var publishableDescendants = descendants.Where(descendant => descendant.HasPublishedVersion()).ToList();
- if(publishableDescendants.Any())
+ if (previouslyPublished == false)
{
- foreach (var descendant in publishableDescendants)
+ var descendants = ((ContentService) ApplicationContext.Current.Services.ContentService)
+ .GetPublishedDescendants(_document.Content).ToList();
+
+ if (descendants.Any())
{
- library.UpdateDocumentCache(descendant.Id);
+ foreach (var descendant in descendants)
+ {
+ library.UpdateDocumentCache(descendant.Id);
+ }
+ library.RefreshContent();
}
- library.RefreshContent();
}
}
else
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/preview/PreviewContent.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/preview/PreviewContent.cs
index 7deebd1613..8600c84c2d 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/preview/PreviewContent.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/preview/PreviewContent.cs
@@ -1,6 +1,8 @@
using System;
+using System.Collections.Generic;
using System.Data;
using System.Configuration;
+using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.Security;
@@ -53,13 +55,30 @@ namespace umbraco.presentation.preview
// clone xml
XmlContent = (XmlDocument)content.Instance.XmlContent.Clone();
- // inject current document xml
- int parentId = documentObject.Level == 1 ? -1 : documentObject.Parent.Id;
- XmlContent = content.AppendDocumentXml(documentObject.Id, documentObject.Level, parentId, documentObject.ToPreviewXml(XmlContent), XmlContent);
+ var previewNodes = new List();
+
+ var parentId = documentObject.Level == 1 ? -1 : documentObject.Parent.Id;
+
+ while (parentId > 0 && XmlContent.GetElementById(parentId.ToString(CultureInfo.InvariantCulture)) == null)
+ {
+ var document = new Document(parentId);
+ previewNodes.Insert(0, document);
+ parentId = document.ParentId;
+ }
+
+ previewNodes.Add(documentObject);
+
+ foreach (var document in previewNodes)
+ {
+ //Inject preview xml
+ parentId = document.Level == 1 ? -1 : document.Parent.Id;
+ var previewXml = document.ToPreviewXml(XmlContent);
+ content.AppendDocumentXml(document.Id, document.Level, parentId, previewXml, XmlContent);
+ }
if (includeSubs)
{
- foreach (CMSPreviewNode prevNode in documentObject.GetNodesForPreview(true))
+ foreach (var prevNode in documentObject.GetNodesForPreview(true))
{
XmlContent = content.AppendDocumentXml(prevNode.NodeId, prevNode.Level, prevNode.ParentId, XmlContent.ReadNode(XmlReader.Create(new StringReader(prevNode.Xml))), XmlContent);
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/DocumentExtensions.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/DocumentExtensions.cs
index 7c7b17c3a2..de897b6209 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/DocumentExtensions.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/DocumentExtensions.cs
@@ -250,7 +250,7 @@ namespace umbraco
}
}
- library.UpdateDocumentCache(document.Id);
+ library.UpdateDocumentCache(document);
return document;
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserPermissions.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserPermissions.cs
index e2ee304244..018e6d9ff5 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserPermissions.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/users/UserPermissions.cs
@@ -102,11 +102,11 @@ namespace umbraco.cms.presentation.user
///
/// Returns the current user permissions for the node specified
///
- ///
+ ///
///
- public List GetExistingNodePermission(int nodeID)
+ public List GetExistingNodePermission(int nodeId)
{
- string path = GetNodePath(nodeID);
+ var path = GetNodePath(nodeId);
if (path != "")
{
//get the user and their permissions
@@ -119,13 +119,13 @@ namespace umbraco.cms.presentation.user
///
/// gets path attribute for node id passed
///
- ///
+ ///
///
- private string GetNodePath(int iNodeID)
+ private static string GetNodePath(int iNodeId)
{
- if (Document.IsDocument(iNodeID))
+ if (Document.IsDocument(iNodeId))
{
- Document doc = new Document(iNodeID);
+ var doc = new Document(iNodeId);
return doc.Path;
}
@@ -135,14 +135,13 @@ namespace umbraco.cms.presentation.user
///
/// Finds all child node IDs
///
- ///
- ///
+ ///
///
- private List FindChildNodes(int nodeID)
+ private static IEnumerable FindChildNodes(int nodeId)
{
- Document[] docs = Document.GetChildrenForTree(nodeID);
- List nodeIds = new List();
- foreach (Document doc in docs)
+ var docs = Document.GetChildrenForTree(nodeId);
+ var nodeIds = new List();
+ foreach (var doc in docs)
{
nodeIds.Add(doc.Id);
if (doc.HasChildren)
@@ -153,16 +152,16 @@ namespace umbraco.cms.presentation.user
return nodeIds;
}
- private void InsertPermissions(int[] nodeIDs, IAction permission)
+ private void InsertPermissions(IEnumerable nodeIDs, IAction permission)
{
foreach (int i in nodeIDs)
InsertPermission(i, permission);
}
- private void InsertPermission(int nodeID, IAction permission)
+ private void InsertPermission(int nodeId, IAction permission)
{
//create a new CMSNode object but don't initialize (this prevents a db query)
- CMSNode node = new CMSNode(nodeID, false);
+ var node = new CMSNode(nodeId, false);
Permission.MakeNew(m_user, node, permission.Letter);
}
diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/CheckForUpgrade.asmx.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/CheckForUpgrade.asmx.cs
index f06a7e43c7..f6aa1f337b 100644
--- a/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/CheckForUpgrade.asmx.cs
+++ b/src/Umbraco.Web/umbraco.presentation/umbraco/webservices/CheckForUpgrade.asmx.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Web;
using System.Web.Services;
using System.Web.Script.Services;
+using Umbraco.Core;
using Umbraco.Core.Configuration;
@@ -32,7 +33,54 @@ namespace umbraco.presentation.webservices
return new UpgradeResult(result.UpgradeType.ToString(), result.Comment, result.UpgradeUrl);
}
+ [WebMethod]
+ [ScriptMethod]
+ public void InstallStatus(bool isCompleted, string userAgent, string errorMsg)
+ {
+ bool isUpgrade = false;
+ // if it's an upgrade, you'll need to be logged in before we allow this call
+ if (!String.IsNullOrEmpty(Umbraco.Core.Configuration.GlobalSettings.ConfigurationStatus))
+ {
+ isUpgrade = true;
+ legacyAjaxCalls.Authorize();
+ }
+
+ // Check for current install Id
+ Guid installId = Guid.NewGuid();
+ BusinessLogic.StateHelper.Cookies.Cookie installCookie =
+ new BusinessLogic.StateHelper.Cookies.Cookie("umb_installId", 1);
+ if (!String.IsNullOrEmpty(installCookie.GetValue()))
+ {
+ if (Guid.TryParse(installCookie.GetValue(), out installId))
+ {
+ // check that it's a valid Guid
+ if (installId == Guid.Empty)
+ installId = Guid.NewGuid();
+
+ }
+ }
+ installCookie.SetValue(installId.ToString());
+
+ string dbProvider = String.Empty;
+ if (!String.IsNullOrEmpty(Umbraco.Core.Configuration.GlobalSettings.ConfigurationStatus))
+ dbProvider = ApplicationContext.Current.DatabaseContext.DatabaseProvider.ToString();
+
+ org.umbraco.update.CheckForUpgrade check = new global::umbraco.presentation.org.umbraco.update.CheckForUpgrade();
+ check.Install(installId,
+ isUpgrade,
+ isCompleted,
+ DateTime.Now,
+ UmbracoVersion.Current.Major,
+ UmbracoVersion.Current.Minor,
+ UmbracoVersion.Current.Build,
+ UmbracoVersion.CurrentComment,
+ errorMsg,
+ userAgent,
+ dbProvider);
+ }
}
+
+
public class UpgradeResult
{
public string UpgradeType { get; set; }
diff --git a/src/WebPi/parameters.xml b/src/WebPi/parameters.xml
index 8efe1e9506..ae1b4135e9 100644
--- a/src/WebPi/parameters.xml
+++ b/src/WebPi/parameters.xml
@@ -105,7 +105,9 @@
-
+
+
diff --git a/src/umbraco.cms/businesslogic/media/Media.cs b/src/umbraco.cms/businesslogic/media/Media.cs
index 076fc37a3e..5a698c9a4f 100644
--- a/src/umbraco.cms/businesslogic/media/Media.cs
+++ b/src/umbraco.cms/businesslogic/media/Media.cs
@@ -232,9 +232,6 @@ namespace umbraco.cms.businesslogic.media
foreach (var property in GenericProperties)
{
- if (property.Value == null)
- continue;
-
MediaItem.SetValue(property.PropertyType.Alias, property.Value);
}
diff --git a/src/umbraco.cms/businesslogic/member/Member.cs b/src/umbraco.cms/businesslogic/member/Member.cs
index b30a664991..94bebaf74a 100644
--- a/src/umbraco.cms/businesslogic/member/Member.cs
+++ b/src/umbraco.cms/businesslogic/member/Member.cs
@@ -598,7 +598,10 @@ namespace umbraco.cms.businesslogic.member
}
else if (dbType.Equals("Date"))
{
- poco.Date = DateTime.Parse(property.Value.ToString());
+ DateTime date;
+
+ if(DateTime.TryParse(property.Value.ToString(), out date))
+ poco.Date = date;
}
else if (dbType.Equals("Nvarchar"))
{
diff --git a/src/umbraco.cms/businesslogic/propertytype/propertytype.cs b/src/umbraco.cms/businesslogic/propertytype/propertytype.cs
index d72a1d3eb3..97563546b9 100644
--- a/src/umbraco.cms/businesslogic/propertytype/propertytype.cs
+++ b/src/umbraco.cms/businesslogic/propertytype/propertytype.cs
@@ -378,10 +378,6 @@ namespace umbraco.cms.businesslogic.propertytype
// flush cache
FlushCache();
- // clean all properties on inherited document types (if this propertytype is removed from a master)
- CleanPropertiesOnDeletion(_contenttypeid);
- // DocumentType.GetAllAsList().FindAll(dt => dt.MasterContentType == _contenttypeid).ForEach(dt => cleanPropertiesOnDeletion(dt.Id));
-
// Delete all properties of propertytype
CleanPropertiesOnDeletion(_contenttypeid);
@@ -413,15 +409,15 @@ namespace umbraco.cms.businesslogic.propertytype
DocumentType.GetAllAsList().FindAll(dt => dt.MasterContentTypes.Contains(contentTypeId)).ForEach(
dt => CleanPropertiesOnDeletion(dt.Id));
- // then remove from the current doc type
- Content[] objs = Content.getContentOfContentType(new ContentType(contentTypeId));
- foreach (Content c in objs.ToList())
+ //Initially Content.getContentOfContentType() was called, but because this doesn't include members we resort to sql lookups and deletes
+ var tmp = new List();
+ IRecordsReader dr = SqlHelper.ExecuteReader("SELECT nodeId FROM cmsContent INNER JOIN umbracoNode ON cmsContent.nodeId = umbracoNode.id WHERE ContentType = " + contentTypeId + " ORDER BY umbracoNode.text ");
+ while (dr.Read()) tmp.Add(dr.GetInt("nodeId"));
+ dr.Close();
+
+ foreach (var contentId in tmp)
{
- Property prop = c.getProperty(this);
- if (prop != null)
- {
- prop.delete();
- }
+ SqlHelper.ExecuteNonQuery("DELETE FROM cmsPropertyData WHERE PropertyTypeId =" + this.Id + " AND contentNodeId = " + contentId);
}
// invalidate content type cache
diff --git a/src/umbraco.cms/businesslogic/web/Document.cs b/src/umbraco.cms/businesslogic/web/Document.cs
index 3855363702..c80264b0df 100644
--- a/src/umbraco.cms/businesslogic/web/Document.cs
+++ b/src/umbraco.cms/businesslogic/web/Document.cs
@@ -892,9 +892,6 @@ namespace umbraco.cms.businesslogic.web
foreach (var property in GenericProperties)
{
- if (property.Value == null)
- continue;
-
Content.SetValue(property.PropertyType.Alias, property.Value);
}
@@ -905,8 +902,6 @@ namespace umbraco.cms.businesslogic.web
ApplicationContext.Current.Services.ContentService.Save(Content, userId);
base.Save();
- // update preview xml
- SaveXmlPreview(new XmlDocument());
FireAfterSave(e);
}
@@ -935,8 +930,6 @@ namespace umbraco.cms.businesslogic.web
var result = ((ContentService)ApplicationContext.Current.Services.ContentService).SaveAndPublish(Content, true, u.Id);
base.Save();
- // update preview xml
- SaveXmlPreview(new XmlDocument());
FireAfterSave(e);
diff --git a/src/umbraco.controls/UmbracoClientDependencyLoader.cs b/src/umbraco.controls/UmbracoClientDependencyLoader.cs
index 54536fb9e2..06c369a5a1 100644
--- a/src/umbraco.controls/UmbracoClientDependencyLoader.cs
+++ b/src/umbraco.controls/UmbracoClientDependencyLoader.cs
@@ -5,7 +5,7 @@ using System.Text;
using System.Web.UI;
using ClientDependency.Core.Controls;
using ClientDependency.Core.FileRegistration.Providers;
-using umbraco.IO;
+using Umbraco.Core.IO;
namespace umbraco.uicontrols
{
@@ -22,7 +22,7 @@ namespace umbraco.uicontrols
public UmbracoClientDependencyLoader()
: base()
{
- this.AddPath("UmbracoClient", IOHelper.ResolveUrl( SystemDirectories.Umbraco_client ));
+ this.AddPath("UmbracoClient", IOHelper.ResolveUrl( SystemDirectories.UmbracoClient ));
this.AddPath("UmbracoRoot", IOHelper.ResolveUrl( SystemDirectories.Umbraco ));
this.ProviderName = LoaderControlProvider.DefaultName;
@@ -32,7 +32,7 @@ namespace umbraco.uicontrols
{
if (ClientDependencyLoader.Instance == null)
{
- UmbracoClientDependencyLoader loader = new UmbracoClientDependencyLoader();
+ var loader = new UmbracoClientDependencyLoader();
parent.Controls.Add(loader);
isNew = true;
return loader;
diff --git a/src/umbraco.datalayer/Utility/Installer/DefaultInstallerUtility.cs b/src/umbraco.datalayer/Utility/Installer/DefaultInstallerUtility.cs
index ad34baec5e..307af3cf60 100644
--- a/src/umbraco.datalayer/Utility/Installer/DefaultInstallerUtility.cs
+++ b/src/umbraco.datalayer/Utility/Installer/DefaultInstallerUtility.cs
@@ -259,45 +259,5 @@ namespace umbraco.DataLayer.Utility.Installer
#endregion
}
- ///
- /// A triple (Field, Table, Version) meaning:
- /// if a SELECT statement of Field FROM Table succeeds,
- /// the database version is at least Version.
- ///
- ///
- /// This also supports checking for a value in a table.
- ///
- public struct VersionSpecs
- {
- /// The SQL statament to execute in order to test for the specified version
- public readonly string Sql;
-
- /// An integer identifying the expected row count from the Sql statement
- public readonly int ExpectedRows;
-
- /// The minimum version number of a database that contains the specified field.
- public readonly DatabaseVersion Version;
-
- ///
- /// Initializes a new instance of the struct.
- ///
- /// The sql statement to execute.
- /// The version.
- public VersionSpecs(string sql, DatabaseVersion version)
- : this(sql, -1, version)
- { }
-
- ///
- /// Initializes a new instance of the struct.
- ///
- /// The sql statement to execute.
- /// The expected row count.
- /// The version.
- public VersionSpecs(string sql, int expectedRows, DatabaseVersion version)
- {
- Sql = sql;
- ExpectedRows = expectedRows;
- Version = version;
- }
- }
+
}
diff --git a/src/umbraco.datalayer/Utility/Installer/VersionSpecs.cs b/src/umbraco.datalayer/Utility/Installer/VersionSpecs.cs
new file mode 100644
index 0000000000..c1237e1e97
--- /dev/null
+++ b/src/umbraco.datalayer/Utility/Installer/VersionSpecs.cs
@@ -0,0 +1,44 @@
+namespace umbraco.DataLayer.Utility.Installer
+{
+ ///
+ /// A triple (Field, Table, Version) meaning:
+ /// if a SELECT statement of Field FROM Table succeeds,
+ /// the database version is at least Version.
+ ///
+ ///
+ /// This also supports checking for a value in a table.
+ ///
+ public struct VersionSpecs
+ {
+ /// The SQL statament to execute in order to test for the specified version
+ public readonly string Sql;
+
+ /// An integer identifying the expected row count from the Sql statement
+ public readonly int ExpectedRows;
+
+ /// The minimum version number of a database that contains the specified field.
+ public readonly DatabaseVersion Version;
+
+ ///
+ /// Initializes a new instance of the struct.
+ ///
+ /// The sql statement to execute.
+ /// The version.
+ public VersionSpecs(string sql, DatabaseVersion version)
+ : this(sql, -1, version)
+ { }
+
+ ///
+ /// Initializes a new instance of the struct.
+ ///
+ /// The sql statement to execute.
+ /// The expected row count.
+ /// The version.
+ public VersionSpecs(string sql, int expectedRows, DatabaseVersion version)
+ {
+ Sql = sql;
+ ExpectedRows = expectedRows;
+ Version = version;
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/umbraco.datalayer/umbraco.datalayer.csproj b/src/umbraco.datalayer/umbraco.datalayer.csproj
index c16bf518ae..9f91f604bd 100644
--- a/src/umbraco.datalayer/umbraco.datalayer.csproj
+++ b/src/umbraco.datalayer/umbraco.datalayer.csproj
@@ -124,6 +124,7 @@
+
diff --git a/src/umbraco.editorControls/datepicker/DateData.cs b/src/umbraco.editorControls/datepicker/DateData.cs
index ca34f5b343..fe1edc7be4 100644
--- a/src/umbraco.editorControls/datepicker/DateData.cs
+++ b/src/umbraco.editorControls/datepicker/DateData.cs
@@ -11,7 +11,7 @@ namespace umbraco.editorControls.datepicker
public override System.Xml.XmlNode ToXMl(System.Xml.XmlDocument d)
{
- if (Value.ToString() != "")
+ if (Value != null && Value.ToString() != "")
return d.CreateTextNode(((DateTime) Value).ToString("s"));
else
return d.CreateTextNode("");
diff --git a/src/umbraco.webservices/documents/documentService.cs b/src/umbraco.webservices/documents/documentService.cs
index 6292c02d6b..634033cffd 100644
--- a/src/umbraco.webservices/documents/documentService.cs
+++ b/src/umbraco.webservices/documents/documentService.cs
@@ -246,13 +246,13 @@ namespace umbraco.webservices.documents
case documentCarrier.EPublishAction.Publish:
if (doc.PublishWithResult(user))
{
- umbraco.library.UpdateDocumentCache(doc.Id);
+ umbraco.library.UpdateDocumentCache(doc);
}
break;
case documentCarrier.EPublishAction.Unpublish:
if (doc.PublishWithResult(user))
{
- umbraco.library.UnPublishSingleNode(doc.Id);
+ umbraco.library.UnPublishSingleNode(doc);
}
break;
case documentCarrier.EPublishAction.Ignore:
@@ -260,14 +260,14 @@ namespace umbraco.webservices.documents
{
if (doc.PublishWithResult(user))
{
- umbraco.library.UpdateDocumentCache(doc.Id);
+ umbraco.library.UpdateDocumentCache(doc);
}
}
else
{
if (doc.PublishWithResult(user))
{
- umbraco.library.UpdateDocumentCache(doc.Id);
+ umbraco.library.UpdateDocumentCache(doc);
}
}
break;