Merge with 4.9.0

This commit is contained in:
Shannon Deminick
2012-09-07 06:24:51 +07:00
29 changed files with 1877 additions and 172 deletions

3
build/Build.NuGet.bat Normal file
View File

@@ -0,0 +1,3 @@
NuGet.exe pack NuSpecs\UmbracoCms.Core.nuspec
NuGet.exe pack NuSpecs\UmbracoCms.nuspec
REM pause

View File

@@ -834,14 +834,17 @@ namespace Umbraco.Core.Configuration
public int Compare(string part, string whole)
{
// let the default string comparer deal with null or when part is not smaller then whole
if (part == null || whole == null)
if (part == null || whole == null || part.Length >= whole.Length)
return _stringComparer.Compare(part, whole);
//trim the end '/' of each
part = part.TrimEnd('/');
whole = whole.TrimEnd('/');
if (part.Length >= whole.Length)
return _stringComparer.Compare(part, whole);
// Reverted changeset 4d5a20d6124d because it will match with
// anything starting with install and umbraco see issue U4-741
////trim the end '/' of each
//part = part.TrimEnd('/');
//whole = whole.TrimEnd('/');
//if (part.Length >= whole.Length)
// return _stringComparer.Compare(part, whole);
// loop through all characters that part and whole have in common
int pos = 0;

View File

@@ -1,13 +0,0 @@
using System;
namespace Umbraco.Core.Embed
{
public interface IEmbedProvider
{
bool SupportsDimensions { get; }
string GetMarkup(string url, int maxWidth = 0, int maxHeight = 0);
//string GetPreview(string url, int maxWidth = 0, int maxHeight = 0);
}
}

View File

@@ -1,11 +0,0 @@
using System;
using System.Xml;
namespace Umbraco.Core.Embed
{
public interface IEmbedSettingProvider
{
object GetSetting(XmlNode settingNode);
}
}

View File

@@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Umbraco.Core.Embed
{
public class ProviderSetting: System.Attribute
{
}
}

View File

@@ -0,0 +1,9 @@
namespace Umbraco.Core.Media
{
internal interface IEmbedProvider
{
bool SupportsDimensions { get; }
string GetMarkup(string url, int maxWidth = 0, int maxHeight = 0);
}
}

View File

@@ -0,0 +1,9 @@
using System.Xml;
namespace Umbraco.Core.Media
{
internal interface IEmbedSettingProvider
{
object GetSetting(XmlNode settingNode);
}
}

View File

@@ -0,0 +1,8 @@
using System;
namespace Umbraco.Core.Media
{
internal class ProviderSetting : Attribute
{
}
}

View File

@@ -1,15 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Umbraco.Core.Embed
namespace Umbraco.Core.Media
{
public class Result
{
public Status Status { get; set; }
public bool SupportsDimensions { get; set; }
public string Markup { get; set; }
}
}

View File

@@ -1,6 +1,4 @@

namespace Umbraco.Core.Embed
namespace Umbraco.Core.Media
{
public enum Status
{

View File

@@ -138,11 +138,11 @@
<Compile Include="TypeHelper.cs" />
<Compile Include="UpgradeableReadLock.cs" />
<Compile Include="DelegateEqualityComparer.cs" />
<Compile Include="Embed\IEmbedProvider.cs" />
<Compile Include="Embed\IEmbedSettingProvider.cs" />
<Compile Include="Embed\ProviderSetting.cs" />
<Compile Include="Embed\Result.cs" />
<Compile Include="Embed\Status.cs" />
<Compile Include="Media\IEmbedProvider.cs" />
<Compile Include="Media\IEmbedSettingProvider.cs" />
<Compile Include="Media\ProviderSetting.cs" />
<Compile Include="Media\Result.cs" />
<Compile Include="Media\Status.cs" />
<Compile Include="EnumerableExtensions.cs" />
<Compile Include="IfExtensions.cs" />
<Compile Include="PluginManager.cs" />

View File

@@ -33,8 +33,8 @@
<FileSystemProviders configSource="config\FileSystemProviders.config" />
<appSettings>
<add key="umbracoDbDSN" value="server=.\sqlexpress;database=v4;user id=sa;password=test;Application Name=Umbraco41"/>
<add key="umbracoConfigurationStatus" value="4.9.0"/>
<add key="umbracoDbDSN" value="" />
<add key="umbracoConfigurationStatus" value="" />
<add key="umbracoReservedUrls" value="~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd" />
<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
<add key="umbracoContentXML" value="~/App_Data/umbraco.config"/>

View File

@@ -0,0 +1,341 @@
// Umbraco Live Editing - ItemEditing: Item Editing
var ItemEditing = null;
Type.registerNamespace("umbraco.presentation.LiveEditing");
/************************ ItemEditing class ************************/
// Creates a new instance of the ItemEditing class.
umbraco.presentation.LiveEditing.ItemEditing = function() {
umbraco.presentation.LiveEditing.ItemEditing.initializeBase(this);
this._inited = false;
this._items = new Array();
this._activeItem = null;
this._editControl = null;
this._submitControl = null;
var _this = this;
Sys.Debug.trace("Constructor, before init load");
if (!this._inited) {
_this.init();
}
Sys.Application.add_load(function() {
_this.init();
});
Sys.Debug.trace("Constructor, after init load");
}
umbraco.presentation.LiveEditing.ItemEditing.prototype = {
// Initializes this instance.
init: function() {
Sys.Debug.trace("In init...");
if (!this._inited) {
this._inited = true;
Sys.Debug.trace("Live Editing - ItemEditing: Initialization.");
Sys.Debug.assert(typeof (jQuery) == 'function', "jQuery is not loaded.");
this.itemsEnable();
var _this = this;
LiveEditingToolbar.add_save(function(sender, args) { _this.delaySaveWhenEditing(args, "save"); });
LiveEditingToolbar.add_saveAndPublish(function(sender, args) { _this.delaySaveWhenEditing(args, "saveAndPublish"); });
this._inited = true;
Sys.Debug.trace("Live Editing - ItemEditing: Ready.");
}
else {
this.updateItems();
this.updateControls();
}
},
// Starts Live Editing the specified item.
// This method is triggered by the server.
startEdit: function(itemId) {
Sys.Debug.trace("Live Editing - ItemEditing: Start editing of Item " + itemId + ".");
this._activeItem = this._items[itemId];
Sys.Debug.assert(this._activeItem != null, "Live Editing - ItemEditing: Could not find item with ID " + itemId + ".");
this._editControl = this.getElementsByTagName("umbraco:control");
Sys.Debug.assert(this._editControl.length > 0, "Live Editing - ItemEditing: Could not find the editor control.");
//this._activeItem.jItem.fadeIn();
this.moveChildControls(this._editControl, this._activeItem.jItem);
// Only elements that are currently present, can cause item editing to stop.
// This enables transparent use of dynamically created elements (such as context/dropdown menus)
// as clicks on those elements will not trigger the stop edit signal.
jQuery("*").each(function () { jQuery(this).data("canStopEditing", true); });
// raise event
var handler = this.get_events().getHandler("startEdit");
if (handler)
handler(this, Sys.EventArgs.Empty);
this.ignoreChildClicks(this._activeItem.jItem);
LiveEditingToolbar.setDirty(true);
},
// Stops the editing of a specified item, and raises the stopEdit event.
stopEdit: function() {
if (this._activeItem != null) {
Sys.Debug.trace("Live Editing - ItemEditing: Stop editing of " + this._activeItem.toString() + ".");
// raise event
var handler = this.get_events().getHandler("stopEdit");
if (handler)
handler(this, Sys.EventArgs.Empty);
// submit changes
Sys.Debug.assert(this._submitControl != null, "Live Editing - ItemEditing: Submit button not set.");
this._submitControl.click();
// hide control
//this._activeItem.jItem.fadeOut();
this._activeItem = null;
this._submitControl = null;
this._editControl = null;
}
},
// Adds an event handler to the startEdit event.
add_startEdit: function(handler) {
this.get_events().addHandler("startEdit", handler);
},
// Removes an event handler from the startEdit event.
remove_startEdit: function(handler) {
this.get_events().removeHandler("startEdit", handler);
},
// Adds an event handler to the stopEdit event.
add_stopEdit: function(handler) {
this.get_events().addHandler("stopEdit", handler);
},
// Removes an event handler from the stopEdit event.
remove_stopEdit: function(handler) {
this.get_events().removeHandler("stopEdit", handler);
},
// Cancels the save method when an item is active, and postpones it to the next postback.
delaySaveWhenEditing: function(args, type) {
if (this._activeItem != null) {
this.stopEdit();
args.cancel = true;
(function() {
var f = function() {
Sys.Application.remove_load(f);
setTimeout(function() {
Sys.Debug.trace("Live Editing - Delayed Saving Changes to server");
UmbracoCommunicator.SendClientMessage(type, "");
}, 100);
}
Sys.Application.add_load(f);
})();
}
else {
Sys.Debug.trace("Live Editing - Saving Changes to server");
if (!Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()) {
UmbracoCommunicator.SendClientMessage(type, "");
}
else {
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function() {
UmbracoCommunicator.SendClientMessage(type, "");
});
}
}
},
// Enables Live Editing of items.
itemsEnable: function() {
var items = this.getElementsByTagName("umbraco:iteminfo");
Sys.Debug.trace(" Found " + items.length + " editable Umbraco item(s).");
// enhance items with edit functionality
var _this = this;
var i = 0;
items.each(function() {
var item = new umbraco.presentation.LiveEditing.activeItem(jQuery(this));
_this._items[item.itemId] = item;
Sys.Debug.trace(" " + (++i) + ". " + item.toString() + " is Live Editing enabled.");
});
// disable hyperlinks to make them clickable for Live Editing
this.disableHyperlinks();
// add "stop editing" handler when clicking outside the item
var _this = this;
jQuery(document).mousedown(function(event) {
Sys.Debug.trace("DOCUMENT CLICKED");
// the canStopEditing property is set in startEdit
if (_this._activeItem != null && jQuery(event.target).data("canStopEditing")) {
if (!_this._activeItem.clicked)
_this.stopEdit();
else
_this._activeItem.clicked = false;
}
});
jQuery("#LiveEditingToolbar").mousedown(function() {
Sys.Debug.trace("TOOLBAR CLICKED");
if (_this._activeItem != null)
_this._activeItem.clicked = true;
});
},
// Update items that have changed.
updateItems: function() {
var itemUpdates = this.getElementsByTagName("umbraco:itemupdate");
Sys.Debug.trace("Live Editing - ItemEditing: " + itemUpdates.length + " item update(s).");
var _this = this;
itemUpdates.each(function() {
var itemUpdate = jQuery(this);
var itemId = itemUpdate.attr("itemId");
var item = _this._items[itemId];
if (item != null) {
Sys.Debug.trace(" Updating " + item.toString() + ".");
// remove old children and add updates ones
_this.moveChildControls(itemUpdate, item.jItem);
//item.jItem.fadeIn();
// disable hyperlinks to make them clickable for Live Editing
_this.disableHyperlinks();
}
else {
itemUpdate.html("");
}
});
},
// Update controls that have changed.
updateControls: function() {
Sys.Debug.trace("Live Editing - ItemEditing: In updatecontrols");
var controlUpdates = this.getElementsByTagName("umbraco:control");
Sys.Debug.trace("Live Editing - ItemEditing: " + controlUpdates.length + " control update(s).");
if (controlUpdates.length == 1) {
if (this._activeItem != null && controlUpdates.children().length > 0) {
Sys.Debug.trace("Live Editing - ItemEditing: updating edit control.");
this.moveChildControls(controlUpdates, this._activeItem.jItem);
this.ignoreChildClicks();
}
this._submitControl = controlUpdates.next();
Sys.Debug.assert(this._submitControl.length > 0, "Live Editing - ItemEditing: Submit button not found.");
}
},
// ignores clicks on child elements of the control
ignoreChildClicks: function() {
var _this = this;
this._activeItem.jItem.children().mousedown(function(e) {
_this._activeItem.clicked = true;
});
},
// Moves the child controls from source into destination, overwriting existing elements.
moveChildControls: function(source, dest) {
Sys.Debug.trace("Live Editing - Moving Child Controls");
//remove contents in the destination
dest.html("");
//add the source to the destination
dest.append(source.html());
//remove teh contents from the source
source.html("");
},
// Gets a list of elements with the specified tagname including namespaced ones
getElementsByTagName: function(tagname) {
var found = jQuery("body").find("*").filter(function(index) {
if (this.nodeType != 3) {
var nn = this.nodeName.toLowerCase();
var ftn = tagname.toLowerCase();
var ln = (ftn.indexOf(":") > 0 ? ftn.substr(ftn.indexOf(":") + 1) : ftn);
return (nn == ftn
|| (typeof this.scopeName != "undefined" && nn == ln && this.scopeName.toLowerCase() == ftn.substr(0, ftn.indexOf(":"))));
}
return false;
});
Sys.Debug.trace("found " + found.length + " elements with selector: " + tagname);
return found;
},
// Disables hyperlinks inside the specified element.
disableHyperlinks: function() {
jQuery("a").click(function() {
return false;
});
}
}
umbraco.presentation.LiveEditing.ItemEditing.registerClass("umbraco.presentation.LiveEditing.ItemEditing", Sys.Component);
//an object to store the information for the active item
umbraco.presentation.LiveEditing.activeItem = function(item) {
//error checking
if (item != null && item.length != 1) {
return null;
}
//create the object with values, wire up events and return it
var obj = {
jItem: item,
nodeId: item.attr("nodeId"),
fieldName: item.attr("name"),
itemId: item.attr("itemId"),
clicked: false,
toString: function() {
return "Item " + this.itemId + " (node " + this.nodeId + ": " + this.fieldName + ")";
},
// Activates an item for editing.
activate: function() {
ItemEditing._items[this.itemId] = this;
if (this != ItemEditing._activeItem) {
Sys.Debug.trace("Live Editing - ItemEditing: " + this.toString() + " was activated.");
if (!Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()) {
UmbracoCommunicator.SendClientMessage("edititem", this.itemId);
}
else {
var itemId = this.itemId;
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(function() {
if (itemId != 0) {
UmbracoCommunicator.SendClientMessage("edititem", itemId);
itemId = 0;
}
});
}
//this.jItem.fadeOut();
}
},
// Item click handler.
onClick: function(e) {
if (ItemEditing._activeItem != null && ItemEditing._activeItem.itemId == this.itemId) {
Sys.Debug.trace("Live Editing - ItemEditing: " + this.toString() + " click ignored because it is already active.");
}
else {
Sys.Debug.trace("Live Editing - ItemEditing: " + this.toString() + " was clicked.");
e.stopPropagation(); // disable click event propagation to parent elements
this.activate();
}
}
}
//keep the scope on the click event method call
obj.jItem.click(function(e) {
obj.onClick.call(obj, e);
});
return obj;
}
// global instance of the ItemEditing class
function initializeGlobalItemEditing() {
ItemEditing = new umbraco.presentation.LiveEditing.ItemEditing();
}

View File

@@ -0,0 +1,3 @@
//this is simply used for live editing in order to invoke a method from a previously lazy loaded script;
//alert("ItemEditingInvoke: " + initializeGlobalItemEditing);
initializeGlobalItemEditing();

View File

@@ -61,7 +61,7 @@
.propertypane div.propertyItem .propertyItemContent #body_NameTxt
{
width: 220px;
width: 400px;
}
h2.propertypaneTitel{font-size: 14px; color: #999;margin: 7px 0px 0px 0px; padding-bottom: 0px; line-height: 14px;}

View File

@@ -1,8 +1,7 @@
using System;
using Umbraco.Core.Embed;
using System.Text;
using System.Text;
using System.Xml;
using System.Collections.Generic;
using Umbraco.Core.Media;
namespace Umbraco.Web.Media.EmbedProviders
{
@@ -21,11 +20,6 @@ namespace Umbraco.Web.Media.EmbedProviders
public abstract string GetMarkup(string url, int maxWidth, int maxHeight);
//public virtual string GetPreview(string url, int maxWidth, int maxHeight)
//{
// return GetMarkup(url, maxWidth, maxHeight);
//}
public virtual string BuildFullUrl(string url, int maxWidth, int maxHeight)
{
var fullUrl = new StringBuilder();

View File

@@ -1,4 +1,4 @@
using Umbraco.Core.Embed;
using Umbraco.Core.Media;
namespace Umbraco.Web.Media.EmbedProviders
{
@@ -10,10 +10,5 @@ namespace Umbraco.Web.Media.EmbedProviders
}
public abstract string GetMarkup(string url, int maxWidth, int maxHeight);
//public virtual string GetPreview(string url, int maxWidth, int maxHeight)
//{
// return GetMarkup(url, maxWidth, maxHeight);
//}
}
}

View File

@@ -2,7 +2,6 @@
namespace Umbraco.Web.Media.EmbedProviders
{
public class Flickr : AbstractOEmbedProvider
{
public override string GetMarkup(string url, int maxWidth, int maxHeight)
@@ -18,6 +17,5 @@ namespace Umbraco.Web.Media.EmbedProviders
return string.Format("<img src=\"{0}\" width\"{1}\" height=\"{2}\" alt=\"{3}\" />",
imageUrl, imageWidth, imageHeight, HttpUtility.HtmlEncode(imageTitle));
}
}
}

View File

@@ -1,7 +1,6 @@
namespace Umbraco.Web.Media.EmbedProviders
namespace Umbraco.Web.Media.EmbedProviders
{
public class OEmbedRich: OEmbedVideo
public class OEmbedRich : OEmbedVideo
{
}
}

View File

@@ -11,7 +11,6 @@ namespace Umbraco.Web.Media.EmbedProviders
XmlDocument doc = GetXmlResponse(videoUrl);
// add xslt transformation to return markup
return doc.SelectSingleNode("/oembed/html").InnerText;
}
}

View File

@@ -1,6 +1,6 @@
using System.Linq;
using System.Xml;
using Umbraco.Core.Embed;
using Umbraco.Core.Media;
namespace Umbraco.Web.Media.EmbedProviders.Settings
{

View File

@@ -1,5 +1,5 @@
using System.Xml;
using Umbraco.Core.Embed;
using Umbraco.Core.Media;
namespace Umbraco.Web.Media.EmbedProviders.Settings
{

View File

@@ -1,13 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using HtmlAgilityPack;
using HtmlAgilityPack;
namespace Umbraco.Web.Media.EmbedProviders
{
public class Twitgoo: AbstractProvider
public class Twitgoo : AbstractProvider
{
public override bool SupportsDimensions
{
@@ -16,6 +11,7 @@ namespace Umbraco.Web.Media.EmbedProviders
return false;
}
}
public override string GetMarkup(string url, int maxWidth, int maxHeight)
{
var web = new HtmlWeb();
@@ -26,6 +22,5 @@ namespace Umbraco.Web.Media.EmbedProviders
return string.Format("<img src=\"{0}\"/>",
img.Value);
}
}
}

View File

@@ -65,7 +65,9 @@ namespace umbraco.presentation.umbraco.webservices
{
case "json":
// Format as JSON
context.Response.ContentType = @"application/json";
// Weirdly, this should be set to text/html to make it respond as json according to:
// http://stackoverflow.com/questions/6934393/resource-interpreted-as-document-but-transferred-with-mime-type-application-jso
context.Response.ContentType = @"text/html";
context.Response.Write(new JavaScriptSerializer().Serialize(response));

View File

@@ -86,7 +86,7 @@ namespace umbraco.uicontrols
ClientDependencyLoader.Instance.RegisterDependency(2, "CodeMirror/js/lib/codemirror.css", "UmbracoClient", ClientDependencyType.Css);
ClientDependencyLoader.Instance.RegisterDependency(3, "CodeArea/styles.css", "UmbracoClient", ClientDependencyType.Css);
if (AutoSuggest)
if (AutoSuggest && HttpContext.Current.Request.Browser.Browser != "IE")
{
ClientDependencyLoader.Instance.RegisterDependency(3, "CodeMirror/js/lib/util/simple-hint-customized.js", "UmbracoClient", ClientDependencyType.Javascript);

File diff suppressed because it is too large Load Diff

View File

@@ -43,7 +43,7 @@ CREATE TABLE [umbracoRelation]
[childId] [int] NOT NULL,
[relType] [int] NOT NULL,
[datetime] [datetime] NOT NULL CONSTRAINT [DF_umbracoRelation_datetime] DEFAULT (getdate()),
[comment] [nvarchar] (1000) COLLATE Danish_Norwegian_CI_AS NOT NULL
[comment] [nvarchar] (1000) NOT NULL
)
;
@@ -55,12 +55,12 @@ CREATE TABLE [cmsDocument]
[published] [bit] NOT NULL,
[documentUser] [int] NOT NULL,
[versionId] [uniqueidentifier] NOT NULL,
[text] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[text] [nvarchar] (255) NOT NULL,
[releaseDate] [datetime] NULL,
[expireDate] [datetime] NULL,
[updateDate] [datetime] NOT NULL CONSTRAINT [DF_cmsDocument_updateDate] DEFAULT (getdate()),
[templateId] [int] NULL,
[alias] [nvarchar] (255) COLLATE Danish_Norwegian_CI_AS NULL ,
[alias] [nvarchar] (255) NULL ,
[newest] [bit] NOT NULL CONSTRAINT [DF_cmsDocument_newest] DEFAULT (0)
)
@@ -73,8 +73,8 @@ CREATE TABLE [umbracoLog]
[userId] [int] NOT NULL,
[NodeId] [int] NOT NULL,
[Datestamp] [datetime] NOT NULL CONSTRAINT [DF_umbracoLog_Datestamp] DEFAULT (getdate()),
[logHeader] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[logComment] [nvarchar] (1000) COLLATE Danish_Norwegian_CI_AS NULL
[logHeader] [nvarchar] (50) NOT NULL,
[logComment] [nvarchar] (1000) NULL
)
;
@@ -86,7 +86,7 @@ ALTER TABLE [umbracoLog] ADD CONSTRAINT [PK_umbracoLog] PRIMARY KEY CLUSTERED (
CREATE TABLE [umbracoUserGroup]
(
[id] [smallint] NOT NULL IDENTITY(1, 1),
[userGroupName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
[userGroupName] [nvarchar] (255)S NOT NULL
)
;
ALTER TABLE [umbracoUserGroup] ADD CONSTRAINT [PK_userGroup] PRIMARY KEY CLUSTERED ([id])
@@ -105,10 +105,10 @@ ALTER TABLE [umbracoUser2userGroup] ADD CONSTRAINT [PK_user2userGroup] PRIMARY K
CREATE TABLE [umbracoApp]
(
[sortOrder] [tinyint] NOT NULL CONSTRAINT [DF_app_sortOrder] DEFAULT (0),
[appAlias] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[appIcon] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[appName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[appInitWithTreeAlias] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
[appAlias] [nvarchar] (50) NOT NULL,
[appIcon] [nvarchar] (255) NOT NULL,
[appName] [nvarchar] (255) NOT NULL,
[appInitWithTreeAlias] [nvarchar] (255) NULL
)
;
@@ -122,8 +122,8 @@ CREATE TABLE [cmsPropertyData]
[propertytypeid] [int] NOT NULL,
[dataInt] [int] NULL,
[dataDate] [datetime] NULL,
[dataNvarchar] [nvarchar] (500) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[dataNtext] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL
[dataNvarchar] [nvarchar] (500) NULL,
[dataNtext] [ntext] NULL
)
;
@@ -151,8 +151,8 @@ CREATE TABLE [cmsContentType]
(
[pk] [int] NOT NULL IDENTITY(1, 1),
[nodeId] [int] NOT NULL,
[alias] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[icon] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
[alias] [nvarchar] (255) NULL,
[icon] [nvarchar] (255) NULL
)
;
@@ -161,10 +161,10 @@ ALTER TABLE [cmsContentType] ADD CONSTRAINT [PK_cmsContentType] PRIMARY KEY CLUS
CREATE TABLE [cmsMacroPropertyType]
(
[id] [smallint] NOT NULL IDENTITY(1, 1),
[macroPropertyTypeAlias] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[macroPropertyTypeRenderAssembly] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[macroPropertyTypeRenderType] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[macroPropertyTypeBaseType] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
[macroPropertyTypeAlias] [nvarchar] (50) NULL,
[macroPropertyTypeRenderAssembly] [nvarchar] (255) NULL,
[macroPropertyTypeRenderType] [nvarchar] (255) NULL,
[macroPropertyTypeBaseType] [nvarchar] (255) NULL
)
;
@@ -178,9 +178,9 @@ CREATE TABLE [umbracoStylesheetProperty]
[id] [smallint] NOT NULL IDENTITY(1, 1),
[stylesheetPropertyEditor] [bit] NOT NULL CONSTRAINT [DF_stylesheetProperty_stylesheetPropertyEditor] DEFAULT (0),
[stylesheet] [tinyint] NOT NULL,
[stylesheetPropertyAlias] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[stylesheetPropertyName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[stylesheetPropertyValue] [nvarchar] (400) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
[stylesheetPropertyAlias] [nvarchar] (50) NULL,
[stylesheetPropertyName] [nvarchar] (255) NULL,
[stylesheetPropertyValue] [nvarchar] (400) NULL
)
;
@@ -193,7 +193,7 @@ CREATE TABLE [cmsTab]
(
[id] [int] NOT NULL IDENTITY(1, 1),
[contenttypeNodeId] [int] NOT NULL,
[text] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[text] [nvarchar] (255) NOT NULL,
[sortorder] [int] NOT NULL
)
@@ -205,8 +205,8 @@ CREATE TABLE [cmsTemplate]
[pk] [int] NOT NULL IDENTITY(1, 1),
[nodeId] [int] NOT NULL,
[master] [int] NULL,
[alias] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[design] [ntext] COLLATE Danish_Norwegian_CI_AS NOT NULL
[alias] [nvarchar] (100) NULL,
[design] [ntext] NOT NULL
)
;
@@ -215,7 +215,7 @@ ALTER TABLE [cmsTemplate] ADD CONSTRAINT [PK_templates] PRIMARY KEY CLUSTERED (
CREATE TABLE [umbracoUser2app]
(
[user] [int] NOT NULL,
[app] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
[app] [nvarchar] (50) NOT NULL
)
;
@@ -224,9 +224,9 @@ ALTER TABLE [umbracoUser2app] ADD CONSTRAINT [PK_user2app] PRIMARY KEY CLUSTERED
CREATE TABLE [umbracoUserType]
(
[id] [smallint] NOT NULL IDENTITY(1, 1),
[userTypeAlias] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[userTypeName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[userTypeDefaultPermissions] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
[userTypeAlias] [nvarchar] (50) NULL,
[userTypeName] [nvarchar] (255) NOT NULL,
[userTypeDefaultPermissions] [nvarchar] (50) NULL
)
;
@@ -240,12 +240,12 @@ CREATE TABLE [umbracoUser]
[userType] [smallint] NOT NULL,
[startStructureID] [int] NOT NULL,
[startMediaID] [int] NULL,
[userName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[userLogin] [nvarchar] (125) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[userPassword] [nvarchar] (125) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[userEmail] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[userDefaultPermissions] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[userLanguage] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
[userName] [nvarchar] (255) NOT NULL,
[userLogin] [nvarchar] (125) NOT NULL,
[userPassword] [nvarchar] (125) NOT NULL,
[userEmail] [nvarchar] (255) NOT NULL,
[userDefaultPermissions] [nvarchar] (50) NULL,
[userLanguage] [nvarchar] (10) NULL
)
;
@@ -276,9 +276,9 @@ ALTER TABLE [cmsMemberType] ADD CONSTRAINT [PK_cmsMemberType] PRIMARY KEY CLUSTE
CREATE TABLE [cmsMember]
(
[nodeId] [int] NOT NULL,
[Email] [nvarchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_cmsMember_Email] DEFAULT (''),
[LoginName] [nvarchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_cmsMember_LoginName] DEFAULT (''),
[Password] [nvarchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL CONSTRAINT [DF_cmsMember_Password] DEFAULT ('')
[Email] [nvarchar] (1000) NOT NULL CONSTRAINT [DF_cmsMember_Email] DEFAULT (''),
[LoginName] [nvarchar] (1000) NOT NULL CONSTRAINT [DF_cmsMember_LoginName] DEFAULT (''),
[Password] [nvarchar] (1000) NOT NULL CONSTRAINT [DF_cmsMember_Password] DEFAULT ('')
)
;
@@ -289,10 +289,10 @@ CREATE TABLE [umbracoNode]
[parentID] [int] NOT NULL,
[nodeUser] [int] NULL,
[level] [smallint] NOT NULL,
[path] [nvarchar] (150) COLLATE Danish_Norwegian_CI_AS NOT NULL,
[path] [nvarchar] (150) NOT NULL,
[sortOrder] [int] NOT NULL,
[uniqueID] [uniqueidentifier] NULL,
[text] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[text] [nvarchar] (255) NULL,
[nodeObjectType] [uniqueidentifier] NULL,
[createDate] [datetime] NOT NULL CONSTRAINT [DF_umbracoNode_createDate] DEFAULT (getdate())
)
@@ -310,13 +310,13 @@ CREATE TABLE [cmsPropertyType]
[dataTypeId] [int] NOT NULL,
[contentTypeId] [int] NOT NULL,
[tabId] [int] NULL,
[Alias] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Name] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[helpText] [nvarchar] (1000) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Alias] [nvarchar] (255) NOT NULL,
[Name] [nvarchar] (255) NULL,
[helpText] [nvarchar] (1000) NULL,
[sortOrder] [int] NOT NULL CONSTRAINT [DF__cmsProper__sortO__1EA48E88] DEFAULT (0),
[mandatory] [bit] NOT NULL CONSTRAINT [DF__cmsProper__manda__2180FB33] DEFAULT (0),
[validationRegExp] [nvarchar] (255) COLLATE Danish_Norwegian_CI_AS NULL,
[Description] [nvarchar] (2000) COLLATE Danish_Norwegian_CI_AS NULL
[validationRegExp] [nvarchar] (255) NULL,
[Description] [nvarchar] (2000) NULL
)
;
@@ -330,8 +330,8 @@ CREATE TABLE [cmsMacroProperty]
[macroPropertyType] [smallint] NOT NULL,
[macro] [int] NOT NULL,
[macroPropertySortOrder] [tinyint] NOT NULL CONSTRAINT [DF_macroProperty_macroPropertySortOrder] DEFAULT (0),
[macroPropertyAlias] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[macroPropertyName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
[macroPropertyAlias] [nvarchar] (50) NOT NULL,
[macroPropertyName] [nvarchar] (255) NOT NULL
)
;
@@ -342,11 +342,11 @@ CREATE TABLE [cmsMacro]
[id] [int] NOT NULL IDENTITY(1, 1),
[macroUseInEditor] [bit] NOT NULL CONSTRAINT [DF_macro_macroUseInEditor] DEFAULT (0),
[macroRefreshRate] [int] NOT NULL CONSTRAINT [DF_macro_macroRefreshRate] DEFAULT (0),
[macroAlias] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[macroName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[macroScriptType] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[macroScriptAssembly] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[macroXSLT] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[macroAlias] [nvarchar] (255) NOT NULL,
[macroName] [nvarchar] (255) NULL,
[macroScriptType] [nvarchar] (255) NULL,
[macroScriptAssembly] [nvarchar] (255) NULL,
[macroXSLT] [nvarchar] (255) NULL,
[macroCacheByPage] [bit] NOT NULL CONSTRAINT [DF_cmsMacro_macroCacheByPage] DEFAULT (1),
[macroCachePersonalized] [bit] NOT NULL CONSTRAINT [DF_cmsMacro_macroCachePersonalized] DEFAULT (0),
[macroDontRender] [bit] NOT NULL CONSTRAINT [DF_cmsMacro_macroDontRender] DEFAULT (0)
@@ -369,14 +369,14 @@ CREATE TABLE [umbracoAppTree]
[treeSilent] [bit] NOT NULL CONSTRAINT [DF_umbracoAppTree_treeSilent] DEFAULT (0),
[treeInitialize] [bit] NOT NULL CONSTRAINT [DF_umbracoAppTree_treeInitialize] DEFAULT (1),
[treeSortOrder] [tinyint] NOT NULL,
[appAlias] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[treeAlias] [nvarchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[treeTitle] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[treeIconClosed] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[treeIconOpen] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[treeHandlerAssembly] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[treeHandlerType] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[action] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
[appAlias] [nvarchar] (50) NOT NULL,
[treeAlias] [nvarchar] (150) NOT NULL,
[treeTitle] [nvarchar] (255) NOT NULL,
[treeIconClosed] [nvarchar] (255) NOT NULL,
[treeIconOpen] [nvarchar] (255) NOT NULL,
[treeHandlerAssembly] [nvarchar] (255) NOT NULL,
[treeHandlerType] [nvarchar] (255) NOT NULL,
[action] [nvarchar] (255) NULL
)
;
@@ -395,7 +395,7 @@ ALTER TABLE [cmsContentTypeAllowedContentType] ADD CONSTRAINT [PK_cmsContentType
CREATE TABLE [cmsContentXml]
(
[nodeId] [int] NOT NULL,
[xml] [ntext] COLLATE Danish_Norwegian_CI_AS NOT NULL
[xml] [ntext] NOT NULL
)
;
@@ -406,7 +406,7 @@ CREATE TABLE [cmsDataType]
[pk] [int] NOT NULL IDENTITY(1, 1),
[nodeId] [int] NOT NULL,
[controlId] [uniqueidentifier] NOT NULL,
[dbType] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
[dbType] [varchar] (50) NOT NULL
)
;
@@ -416,9 +416,9 @@ CREATE TABLE [cmsDataTypePreValues]
(
[id] [int] NOT NULL IDENTITY(1, 1),
[datatypeNodeId] [int] NOT NULL,
[value] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[value] [nvarchar] (255) NULL,
[sortorder] [int] NOT NULL,
[alias] [nvarchar] (50) COLLATE Danish_Norwegian_CI_AS NULL
[alias] [nvarchar] (50) NULL
)
;
@@ -429,7 +429,7 @@ CREATE TABLE [cmsDictionary]
[pk] [int] NOT NULL IDENTITY(1, 1),
[id] [uniqueidentifier] NOT NULL,
[parent] [uniqueidentifier] NOT NULL,
[key] [nvarchar] (1000) COLLATE Danish_Norwegian_CI_AS NOT NULL
[key] [nvarchar] (1000) NOT NULL
)
;
@@ -440,7 +440,7 @@ CREATE TABLE [cmsLanguageText]
[pk] [int] NOT NULL IDENTITY(1, 1),
[languageId] [int] NOT NULL,
[UniqueId] [uniqueidentifier] NOT NULL,
[value] [nvarchar] (1000) COLLATE Danish_Norwegian_CI_AS NOT NULL
[value] [nvarchar] (1000) NOT NULL
)
;
@@ -458,8 +458,8 @@ ALTER TABLE [cmsMember2MemberGroup] ADD CONSTRAINT [PK_cmsMember2MemberGroup] PR
CREATE TABLE [cmsStylesheet]
(
[nodeId] [int] NOT NULL,
[filename] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[content] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL
[filename] [nvarchar] (100) NOT NULL,
[content] [ntext] NULL
)
;
@@ -467,8 +467,8 @@ CREATE TABLE [cmsStylesheetProperty]
(
[nodeId] [int] NOT NULL,
[stylesheetPropertyEditor] [bit] NULL,
[stylesheetPropertyAlias] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[stylesheetPropertyValue] [nvarchar] (400) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
[stylesheetPropertyAlias] [nvarchar] (50) NULL,
[stylesheetPropertyValue] [nvarchar] (400) NULL
)
;
@@ -477,7 +477,7 @@ CREATE TABLE [umbracoDomains]
[id] [int] NOT NULL IDENTITY(1, 1),
[domainDefaultLanguage] [int] NULL,
[domainRootStructureID] [int] NULL,
[domainName] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
[domainName] [nvarchar] (255) NOT NULL
)
;
@@ -486,8 +486,8 @@ ALTER TABLE [umbracoDomains] ADD CONSTRAINT [PK_domains] PRIMARY KEY CLUSTERED
CREATE TABLE [umbracoLanguage]
(
[id] [smallint] NOT NULL IDENTITY(1, 1),
[languageISOCode] [nvarchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[languageCultureName] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
[languageISOCode] [nvarchar] (10) NULL,
[languageCultureName] [nvarchar] (100) NULL
)
;
@@ -499,8 +499,8 @@ CREATE TABLE [umbracoRelationType]
[dual] [bit] NOT NULL,
[parentObjectType] [uniqueidentifier] NOT NULL,
[childObjectType] [uniqueidentifier] NOT NULL,
[name] [nvarchar] (255) COLLATE Danish_Norwegian_CI_AS NOT NULL,
[alias] [nvarchar] (100) COLLATE Danish_Norwegian_CI_AS NULL
[name] [nvarchar] (255) NOT NULL,
[alias] [nvarchar] (100) NULL
)
;
@@ -512,8 +512,8 @@ ALTER TABLE [umbracoRelationType] ADD CONSTRAINT [PK_umbracoRelationType] PRIMAR
CREATE TABLE [umbracoStylesheet]
(
[nodeId] [int] NOT NULL,
[filename] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[content] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL
[filename] [nvarchar] (100) NOT NULL,
[content] [ntext] NULL
)
;
@@ -526,7 +526,7 @@ CREATE TABLE [umbracoUser2NodeNotify]
(
[userId] [int] NOT NULL,
[nodeId] [int] NOT NULL,
[action] [char] (1) COLLATE Danish_Norwegian_CI_AS NOT NULL
[action] [char] (1) NOT NULL
)
;
@@ -536,7 +536,7 @@ CREATE TABLE [umbracoUser2NodePermission]
(
[userId] [int] NOT NULL,
[nodeId] [int] NOT NULL,
[permission] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
[permission] [char] (1) NOT NULL
)
;

View File

@@ -186,6 +186,9 @@
<ItemGroup>
<None Include="SqlHelpers\MySql\Sql\Version4_1_Upgrade.sql" />
</ItemGroup>
<ItemGroup>
<Content Include="SqlHelpers\SqlAzure\Sql\InstallSqlAzure.sql" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.

View File

@@ -4,11 +4,11 @@ using System.ComponentModel;
using System.IO;
using System.Reflection;
using System.Web.Services;
using Umbraco.Core.Media;
using umbraco.IO;
using umbraco.cms.businesslogic.media;
using umbraco.cms.businesslogic.property;
using Umbraco.Core.IO;
using Umbraco.Core.Embed;
using System.Xml;
using System.Web;
using System.Text.RegularExpressions;
@@ -193,7 +193,7 @@ namespace umbraco.webservices.media
[WebMethod]
[ScriptMethod(ResponseFormat = ResponseFormat.Json)]
public Umbraco.Core.Embed.Result Embed(string url, int width, int height)
public Result Embed(string url, int width, int height)
{
Result r = new Result();