Compare commits

..

658 Commits

Author SHA1 Message Date
Sebastiaan Janssen 10a4eb3ddc Fix Duplicate attribute YSOD (key was already added in the base class) 2014-01-20 12:02:52 +01:00
Morten Christensen 51f46cf871 Not raising export events for content/media ToXml extension for the time being 2014-01-20 10:37:46 +01:00
Shannon 697548d1c7 Fixes: U4-3897 Copy contents relations not created 2014-01-20 18:01:19 +11:00
Shannon f717628322 Ensures username is escaped in user service 2014-01-20 16:13:41 +11:00
Shannon e91b297cc2 updates user task creation for release 2014-01-20 16:04:49 +11:00
Shannon c92441e544 Ensures user name is escaped in member service query. 2014-01-20 14:37:26 +11:00
Shannon f0573fc68c Fixes: U4-4084 Macro's with non alphanumeric chars in their aliases cannot render in the rich text editor 2014-01-20 13:59:25 +11:00
Shannon eb44480fdf fixes package installer path redirect when installing from the repo 2014-01-20 11:58:52 +11:00
Shannon 1ad05fbfc9 Clears the auth cookie after install if there is one which forces the login screen to display so that the csrf tokens are created - this is required if you are upgrading from a previous version and are logged in but don't have a version with csrf tokens. 2014-01-20 10:53:14 +11:00
Shannon 673e24a2ea Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2014-01-20 10:37:36 +11:00
Shannon 4842be01cd Ensures app domain restarted after db upgrade to clear PetaPoco's mapping cache. 2014-01-20 10:36:37 +11:00
Morten Christensen dddb38d4ee Adding comment to private method for clarity 2014-01-19 15:23:05 +01:00
Morten Christensen 727ce0f795 Additional tests for Macro import and export 2014-01-19 15:23:04 +01:00
Morten Christensen ba27acead9 Adding unique key to xml for contentbase exports 2014-01-19 15:23:04 +01:00
Morten Christensen a026a81a8a Adding test for import of Macros from uBlogsy package xml 2014-01-19 15:23:03 +01:00
Morten Christensen 5e7ee0c236 Adding ImportMacros to PackagingService interface 2014-01-19 15:23:03 +01:00
Morten Christensen bb30d5ebd2 Refactoring Macro import method in PackagingService 2014-01-19 15:23:02 +01:00
Morten Christensen 2ae3b09b8c Updating PackagingService to use the newly added event args 2014-01-19 15:23:02 +01:00
Morten Christensen 473d76f1b7 Adding Event Args for import and export 2014-01-19 15:23:01 +01:00
Sebastiaan Janssen 918e454c42 Make sure the build does a complete rebuild so that the Belle build gets triggered 2014-01-19 15:21:47 +01:00
Shannon 7e32fdb682 changed buildbelle to do a grunt build instead of running the default grunt build. 2014-01-19 13:11:23 +11:00
Sebastiaan Janssen 171a472966 Split out the Belle build and integrate it in the build of the Web.UI project 2014-01-17 18:56:04 +01:00
Sebastiaan Janssen 8194655ad1 Update the readme file with a pointer to the build.bat file to get started quickly 2014-01-17 16:07:29 +01:00
Sebastiaan Janssen 80c1812bc8 Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2014-01-17 15:51:01 +01:00
Morten Christensen 6c37b33509 Adding export method for macros in the PackagingService and changing the ctor to accept the MacroService, so we can also add an import method. 2014-01-17 15:29:51 +01:00
Morten Christensen 509bcee540 Changing the name of the private field to be more inline with the Property 2014-01-17 15:28:53 +01:00
Morten Christensen 3dec881848 Removing extra line spaces 2014-01-17 15:28:12 +01:00
Sebastiaan Janssen 65b522a0a0 Automatically build Belle from build.bat without having to install Node.js on local machine 2014-01-17 14:52:42 +01:00
Morten Christensen 9164567abe Adding export of templates to PackagingService 2014-01-17 13:55:34 +01:00
Stephan 12314f16a2 U4-4056 - fixing 2014-01-17 10:27:09 +01:00
Shannon 1621d01992 fixes some unit tests 2014-01-17 13:18:49 +11:00
Shannon ae05bfd350 Fixes: U4-4055 List View document types still display children in content tree 2014-01-17 13:00:11 +11:00
Shannon 79567d4e8f Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2014-01-17 12:26:02 +11:00
Shannon 334a56ce5c Fixes: U4-3765 v7 MultiNode Treepicker Sort not working 2014-01-17 12:25:34 +11:00
Sebastiaan Janssen c2ee3303a5 U4-4059 Update MNTP snippets for string of id's rather than old xml fragment 2014-01-16 19:49:57 +01:00
Stephan bfc89a7247 merge branch 'origin/6.2.0' into 7.0.2 + fix 2014-01-16 19:40:29 +01:00
Stephan 326309e61e U4-4056 - better unicode/ascii support for urls 2014-01-16 17:09:21 +01:00
Shannon 8926e8c7d9 ensures preview cookie is gone on logout. 2014-01-16 20:56:34 +11:00
Shannon ee7ee81098 fixes merge issue 2014-01-16 20:51:23 +11:00
Shannon f4b707e928 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Configuration/UmbracoSettings.cs
	src/Umbraco.Core/Security/AuthenticationExtensions.cs
	src/umbraco.businesslogic/StateHelper.cs
2014-01-16 20:49:19 +11:00
Shannon c38030def2 Fixes: U4-3855 Preview cookie should be a session cookie not persisted 2014-01-16 20:47:13 +11:00
Shannon 43a61d8a06 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/umbraco.providers/members/UmbracoMembershipProvider.cs
2014-01-16 20:15:35 +11:00
Shannon 4fd3725c51 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
	src/Umbraco.Web.UI/Umbraco/create/PartialView.ascx.cs
	src/Umbraco.Web.UI/umbraco/create/PartialViewMacro.ascx
	src/Umbraco.Web.UI/umbraco/create/PartialViewMacro.ascx.cs
2014-01-16 20:09:18 +11:00
Shannon 949861a890 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2014-01-16 20:03:52 +11:00
Shannon 122069752a fixes legacy validate member logic 2014-01-16 20:03:29 +11:00
Shannon c288734877 Fixes: U4-4054 Multinode Treepicker datatype - selecting a start node sends to content section 2014-01-16 19:47:27 +11:00
Shannon 4b22ff3a75 Completes: U4-4011 Package installation will require either a full app refresh or we will need to re-lazy load in all of the assets 2014-01-16 19:11:03 +11:00
Shannon 2b1a43b40a Finally got somewhere with U4-4011 Package installation will require either a full app refresh or we will need to re-lazy load in all of the assets - took ages to get this going, now to get it working when packages have custom screens. 2014-01-16 18:33:31 +11:00
Shannon 076d90ddc4 Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2014-01-16 12:31:54 +11:00
Shannon 1e2e26d898 publicizes server vars parser and event 2014-01-16 12:31:29 +11:00
Sebastiaan Janssen f56cb2c3ac Hardcoded empty snippets need to be updated as well.. 2014-01-15 21:11:35 +01:00
Sebastiaan Janssen ae83b0fbaf Hardcoded empty snippets need to be updated as well.. 2014-01-15 21:07:24 +01:00
Sebastiaan Janssen fb7b65cf3b Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2014-01-15 20:57:42 +01:00
Sebastiaan Janssen 168abddacf U4-2737 Snippets that are available when creating new MacroScripts should also be available for Partial Views 2014-01-15 20:57:27 +01:00
Sebastiaan Janssen 99e91a1053 U4-2737 Snippets that are available when creating new MacroScripts should also be available for Partial Views 2014-01-15 20:55:17 +01:00
Sebastiaan Janssen bad118ac6b U4-4046 Rename "empty template" to "empty" 2014-01-15 10:17:46 +01:00
Shannon f334c3d74a playing a bit more with re-initializing the app, but think we're def gonna have to do a full browser refresh. To do that we'll have to figure out how to gen a deep link url to the installer complete screen which could include a custom screen from a package. 2014-01-15 17:47:46 +11:00
Shannon 0e6c199a7e working on U4-4011 Package installation will require either a full app refresh or we will need to re-lazy load in all of the assets but unfortunately we cannot lazy load in things like directives as angular doesn't like that, we have to re-load the browser. 2014-01-15 17:18:23 +11:00
Shannon 0bc39afdab fixes language drop down styles - was too big to fit 2014-01-15 15:39:35 +11:00
Shannon cf3de52249 removes the old language.ascx webforms files 2014-01-15 15:36:28 +11:00
Shandem 3f0569af41 Merge pull request #285 from mrdrbob/U4-3831
Fix for U4-3831.
2014-01-14 20:17:32 -08:00
Shannon 9f078357a7 Fixes: U4-4030 RelatedLinksEditorValueConvertor can't be overruled and internal links are wrong 2014-01-15 15:17:03 +11:00
Shannon bb837232ba Allows DefaultPropertyValueConverters to shadow other default converters, this allows us to have a hierarchy of default converters. This also fixes part of this issue: U4-4030 RelatedLinksEditorValueConvertor can't be overruled and internal links are wrong 2014-01-15 14:45:33 +11:00
Shannon 6d57afc71a ensures auth controller has IsBackOffice specified 2014-01-15 13:49:37 +11:00
Shannon fd682efdb1 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2014-01-15 13:37:46 +11:00
Shannon 5c614a88a2 ensures webapi plugincontrollers are routed to /backoffice if [IsBackOffice] is specified 2014-01-15 13:29:17 +11:00
Shannon f27a0c0461 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Web.UI/Umbraco/PartialViews/Templates/EmptyTemplate.cshtml
	src/Umbraco.Web.UI/umbraco/dialogs/protectPage.aspx
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/UmbracoModule.cs
	src/Umbraco.Web/WebApi/UmbracoAuthorizedApiController.cs
2014-01-15 13:28:41 +11:00
Shannon 3ef9635406 Fixes: U4-4010 Member and user session gets mixed - fixes how we detect a back office request + unit tests and added new IsBackOffice attribute 2014-01-15 13:17:38 +11:00
Shannon c527833081 Revert "adds editing function to media picker controller"
This reverts commit 7d051dffbb.
This will only be contained in 7.1
2014-01-15 10:59:05 +11:00
Shannon 5caf091406 Revert "WIP: adds cropper directive"
This reverts commit c5a7eab1d5.
new cropper is only contained in 7.1 branch
2014-01-15 10:55:22 +11:00
Shannon 5a29441640 Reverts GetByQuery and MNTP Xpath query WIP - is contained only in 7.1 2014-01-15 10:53:14 +11:00
Shannon 75a42fd0d6 fixes the protect page logic 2014-01-15 10:42:01 +11:00
Shannon 84da5f43a2 U4-4045 The "Empty" partial view snippet should have @inherits 2014-01-15 10:41:37 +11:00
Bob Davidson 0da7ed8d93 Fix for U4-3831. Removes form, adds ng-click with $event.preventDefault() to prevent premature saving. 2014-01-14 15:40:22 -06:00
Sebastiaan Janssen 0aa72e5026 Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2014-01-14 15:21:38 +01:00
Sebastiaan Janssen 14cfd2a8df D'oh .. now properly renamed, in the csproj as well - U4-4046 Rename "empty template" to "empty" 2014-01-14 15:21:20 +01:00
Morten Christensen d6b3d115b0 Correcting the naming of events in the PackagingService 2014-01-14 15:09:21 +01:00
Morten Christensen 7b1fd5378f Correcting the naming of events in the RelationService 2014-01-14 15:09:20 +01:00
Morten Christensen 9e9b94b1d5 Correcting raiseEvents parameter for dictionary items 2014-01-14 15:09:20 +01:00
perploug cf837d783d Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2014-01-14 15:00:05 +01:00
perploug 3df44e2990 treesource editor changes to remove the search field 2014-01-14 14:59:55 +01:00
perploug 0c5ebb2674 Fixes umbPhotoGrid Filtering 2014-01-14 14:40:00 +01:00
perploug ba2fa2bff4 Legacy dialogs missing conversion, language + partial view 2014-01-14 14:33:11 +01:00
Sebastiaan Janssen 03090e85fd U4-4046 Rename "empty template" to "empty" 2014-01-14 13:51:08 +01:00
Sebastiaan Janssen 5c55d6a6e3 U4-4045 The "Empty" partial view snippet should have @inherits 2014-01-14 13:49:20 +01:00
Shannon 0632d73e32 fixes view state and err styling for protect page 2014-01-14 16:56:38 +11:00
Shannon 000c2637d6 fixes view state and err msg 2014-01-14 16:54:32 +11:00
Shannon bf24e101d3 fixes some logic with the protect page if it's already protected 2014-01-14 16:53:32 +11:00
Shannon 08c837602f Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Models/MemberType.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/create/memberTasks.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/members/EditMember.aspx.cs
2014-01-14 16:28:48 +11:00
Shannon 563867cd8b Temp fix for: U4-3968 Umbraco 7.01 - Membership - Public Access - Add Single User protection - crash, fixes protectPage so that it uses the membership provider to make changes, updates the UI logic so that if you choose an existing user it will you about it, fixes it so you cannot arbitrarily change a member's password. 2014-01-14 16:21:00 +11:00
Shannon 86c66511dd changes all calls from Member.InUmbracoMemberMode() to Membership.Provider.IsUmbracoMembershipProvider() and obsoletes the InUmbracoMemberMode 2014-01-14 14:17:28 +11:00
Shannon eedd109332 Temp fix for: U4-3968 Umbraco 7.01 - Membership - Public Access - Add Single User protection - crash 2014-01-14 12:38:48 +11:00
Shannon 7d57521ad8 Fixes some thread safety issues with old membership API 2014-01-14 11:53:41 +11:00
Shannon d5fc18dc95 Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2014-01-14 11:44:11 +11:00
Shannon e36b3d46e8 Fixes: U4-4039 @Umbraco.Field("writerName") etc. don't work any more 2014-01-14 11:43:56 +11:00
Sebastiaan Janssen d8aa98e60c Temporary workaround for the ClientDependency dependency 2014-01-13 11:50:13 +01:00
perploug 8a8899397e Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2014-01-13 10:17:27 +01:00
perploug dc69b5a825 WIP: cropper and gravity editors 2014-01-13 10:17:16 +01:00
perploug df7691ada3 Adds missing mocks 2014-01-13 10:14:30 +01:00
perploug 1048df7e63 Fixes broken assembly browser for usercontrols 2014-01-13 10:14:09 +01:00
Shannon 457560920d Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs
2014-01-13 19:15:16 +11:00
Shannon e79c0ae2b5 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Services/NotificationService.cs
2014-01-13 19:11:39 +11:00
Shannon e74e8f9d73 Fixes: U4-4005 Member custom properties not saving from code, only from backend, wraps more of the getter functions in legacy member class with new member service methods, fixes paged result method when there are no results. 2014-01-13 18:36:08 +11:00
Shannon 23b0c89848 ensures the mail usage is disposed. 2014-01-13 17:28:49 +11:00
Shannon 285989e737 updated notification email links to only have edit since we currently don't support deep linking to dialogs. 2014-01-13 16:34:42 +11:00
Shannon 2c580d0b20 updates email notification link address 2014-01-13 16:21:46 +11:00
Shannon 3c1f6abd0d Fixes: U4-3830 Unable to get email notifications working in version 7 2014-01-13 16:13:53 +11:00
Shannon 4eb1ef3444 fixed up merge issues 2014-01-13 14:54:15 +11:00
Shannon 0f503fc320 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Services/PackagingService.cs
	src/Umbraco.Tests/Services/Importing/ImportResources.Designer.cs
	src/Umbraco.Tests/Services/Importing/ImportResources.resx
	src/Umbraco.Tests/Services/Importing/PackageImportTests.cs
	src/Umbraco.Tests/Services/PackagingServiceTests.cs
	src/Umbraco.Tests/Umbraco.Tests.csproj
	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
	src/Umbraco.Web.UI/config/ClientDependency.config
	src/Umbraco.Web/Umbraco.Web.csproj
	src/umbraco.cms/businesslogic/Packager/Installer.cs
	src/umbraco.cms/businesslogic/workflow/Notification.cs
	src/umbraco.macroRenderings/umbraco.macroRenderings.csproj
2014-01-13 14:08:23 +11:00
Shannon aebc30c7a3 Removes the version specific info from the CDF and Examine references in all proj files. 2014-01-13 14:02:50 +11:00
Shannon 44bc365fdd Moves all notification sending logic to the notification service, improves performance during any action when notifications are to be sent, ensures emails are sent out async to not block up the current request. 2014-01-13 13:50:30 +11:00
Shannon 06defee410 Completed new NotificationService, moved Diff to Core 2014-01-13 13:05:25 +11:00
Morten Christensen d5d4dc9561 Adding event handlers to new import and export methods in the PackagingService 2014-01-10 16:24:20 +01:00
Morten Christensen be2c72f8b4 Adding new methods to the IPackagingService interface 2014-01-10 16:05:19 +01:00
Morten Christensen 62f46d531f Fixing merge issue 2014-01-10 16:04:50 +01:00
Morten Christensen 6bfdbe3e8a Updating the legacy Installer class to use the new methods in the PackagingService
Conflicts:
	src/Umbraco.Core/Services/PackagingService.cs
	src/umbraco.cms/businesslogic/Packager/Installer.cs
2014-01-10 15:42:43 +01:00
Morten Christensen 7095b21eb4 Removing some internal experimental stuff that isnt used 2014-01-10 15:40:41 +01:00
Morten Christensen efce912332 Adds import and export of languages along with tests
Conflicts:
	src/Umbraco.Tests/Services/PackagingServiceTests.cs
2014-01-10 15:40:28 +01:00
Morten Christensen b33a265ea4 Moving events out of the repository scope.
Adding Get Language by Iso Code method
2014-01-10 15:39:15 +01:00
Morten Christensen db849c1e36 Adding languages xml to existing xml file for testing purposes 2014-01-10 15:38:57 +01:00
Morten Christensen b01721c2a9 Adding Export of DictionaryItems including test
Conflicts:
	src/Umbraco.Core/Services/PackagingService.cs
	src/Umbraco.Tests/Services/PackagingServiceTests.cs
2014-01-10 15:38:43 +01:00
Morten Christensen 4f2a807327 Updates from PR#127 from Lars-Erik. Had to manually copy in the changes because the PR was closed.
Adds Import of Dictionary Items to the PackagingService along with tests and a fix for the DictionaryRepository.

Conflicts:
	src/Umbraco.Tests/Services/Importing/ImportResources.resx
	src/Umbraco.Tests/Services/Importing/PackageImportTests.cs
	src/umbraco.cms/businesslogic/Packager/Installer.cs
2014-01-10 15:37:44 +01:00
Morten Christensen 955573256d Updating the legacy Installer class to use the new methods in the PackagingService 2014-01-10 15:11:07 +01:00
Morten Christensen d963f5cd7d Updating a few methods that are made public in 7.0.2 2014-01-10 14:57:27 +01:00
Morten Christensen 2467b5ee3b Removing some internal experimental stuff that isnt used 2014-01-10 14:53:27 +01:00
Morten Christensen f86eb4b741 Adds import and export of languages along with tests 2014-01-10 14:48:55 +01:00
Morten Christensen 33b99073f0 Moving events out of the repository scope.
Adding Get Language by Iso Code method
2014-01-10 14:48:31 +01:00
Morten Christensen 880636c5a6 Adding languages xml to existing xml file for testing purposes 2014-01-10 14:47:31 +01:00
Morten Christensen 6e344f335e Adding Export of DictionaryItems including test 2014-01-10 13:08:33 +01:00
Morten Christensen 6b205bd725 Updates from PR#127 from Lars-Erik. Had to manually copy in the changes because the PR was closed.
Adds Import of Dictionary Items to the PackagingService along with tests and a fix for the DictionaryRepository.
2014-01-10 11:45:41 +01:00
perploug d97a0f5b6c Adds missing PluginController Attribute to updatecheckercontroller 2014-01-10 11:21:55 +01:00
Shannon a510396a57 fix merge issue 2014-01-10 17:07:28 +11:00
Shannon 297d54ec98 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Umbraco.Core.csproj
	src/Umbraco.Tests/Umbraco.Tests.csproj
	src/umbraco.cms/businesslogic/CMSNode.cs
2014-01-10 17:05:23 +11:00
Shannon 531306a091 Created notifications repository and service with unit tests, then need to start integrating that so notifications are properly sent. 2014-01-10 17:03:00 +11:00
Shannon 4346f73159 Fixes naming conventions from old Notification class 2014-01-10 15:13:25 +11:00
Shannon 3cb5754ff2 Fixed some null checks 2014-01-10 12:20:49 +11:00
Shannon bf5bb8bc70 obsoletes imageHelper in favor of the new mediaHelper, updates the link picker to fix: U4-3882 Can't Link to Non-Image Media in 7.0.1 2014-01-10 12:11:52 +11:00
Shannon 7b7ad4d350 completes: U4-3991 Ensure macroservice events are public 2014-01-10 11:20:37 +11:00
Shannon 544a0756f3 Fixes: U4-3995 Remove Contour language keys from deployed language files 2014-01-10 00:43:53 +11:00
Shannon 934215307d Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2014-01-10 00:22:09 +11:00
Shannon 349825b4f8 Fixes merge issues 2014-01-10 00:21:58 +11:00
Morten Christensen f3f1a161e4 Adding AreRelated method to the RelationService 2014-01-09 14:12:58 +01:00
Shannon c088187a13 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxContext.cs
	src/Umbraco.Core/Persistence/SqlSyntax/SqlSyntaxProviderExtensions.cs
	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
	src/Umbraco.Web.UI/packages.config
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/packages.config
	src/Umbraco.Web/umbraco.presentation/umbraco/create/ScriptTasks.cs
	src/umbraco.cms/packages.config
	src/umbraco.controls/packages.config
	src/umbraco.editorControls/packages.config
	src/umbraco.macroRenderings/packages.config
	src/umbraco.macroRenderings/umbraco.macroRenderings.csproj
2014-01-10 00:09:38 +11:00
Shannon 4db6ce4b22 Fixes various issues relating to File Repositories and Services: U4-4014 FileRepositories offer no way to create folders, U4-4013 The models that the FileService produces causes security exceptions, U4-3993 Replace system.io calls in umbraco.scriptTasks legacy task
updates to latest CDF
2014-01-09 18:08:13 +11:00
Shannon 72a366d0dc Fixes: U4-4012 When loading in a lot of separate assets in a manifest CDF is throwing exceptions with a 'too long query string' - updates to latest CDF 2014-01-09 15:58:06 +11:00
Shannon fc18189fc8 fixes a null check on membership provider, completes: U4-3962 publicize IMapperConfiguration 2014-01-09 13:32:39 +11:00
Shannon 49cfeee5b0 Fixes: U4-3880 Custom parameter editor with JSON valueType 2014-01-09 12:49:33 +11:00
Shannon 01d09548aa fixed merge issues 2014-01-09 10:54:02 +11:00
Shannon 1ff049a063 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Services/ContentService.cs
	src/Umbraco.Core/Services/MediaService.cs
	src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs
2014-01-09 10:38:31 +11:00
Shannon 7c720460f5 Fixes: U4-3876 MySQL cmsContentXml Migration Error on 7.0.1 Upgrade 2014-01-09 10:33:35 +11:00
Morten Christensen d0c0ec56a4 Adding event handlers to the PackagingService 2014-01-08 14:13:16 +01:00
Morten Christensen 3c965e8c32 Updating relation event handlers 2014-01-08 14:13:15 +01:00
Morten Christensen 5bcd6a9982 Adding interface to PackagingService 2014-01-08 14:13:15 +01:00
perploug 525477f84f Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2014-01-08 13:27:42 +01:00
perploug 7d051dffbb adds editing function to media picker controller 2014-01-08 13:27:34 +01:00
perploug c5a7eab1d5 WIP: adds cropper directive 2014-01-08 13:27:04 +01:00
perploug 115c8b15fd updates jquery ui to 1.10.3 2014-01-08 13:26:34 +01:00
Morten Christensen 29c8f065f7 Implementing Saving/Saved and Deleting/Deleted events for Relations and RelationTypes.
Fixes U4-3992 RelationService doesnt have any events.
2014-01-08 12:52:55 +01:00
Shannon 961755336a adds another test for #U4-3876 2014-01-08 20:34:20 +11:00
Shannon e0aff8a1e4 adds a unit test 2014-01-08 20:25:35 +11:00
Shannon 6fa0c627a5 working on #U4-3876 2014-01-08 20:19:08 +11:00
Shannon b3c2574aac working on #U4-3876 2014-01-08 20:04:26 +11:00
Shannon 98b2320421 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Tests/TreesAndSections/SectionTests.cs
2014-01-08 18:41:01 +11:00
Shannon 66a63b3cbb ignores these tests for now, they are successful when running isolated but as a whole they don't pass because of something with the legacy data layer. 2014-01-08 18:39:37 +11:00
Shannon 077f3468b9 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2014-01-08 18:20:49 +11:00
Shannon 21c5b6fe02 fixes user lookup on legacy provider 2014-01-08 18:20:18 +11:00
Shannon 3274d873a9 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Models/Membership/UmbracoMembershipMember.cs
2014-01-08 18:13:35 +11:00
Shannon ffed85640d fixes provider user key issue 2014-01-08 18:12:07 +11:00
Shannon 250f082346 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Security/MembershipProviderBase.cs
	src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs
	src/Umbraco.Tests/TreesAndSections/SectionTests.cs
2014-01-08 17:12:06 +11:00
Shannon cdbf89ee57 Fixes up the unit tests 2014-01-08 17:08:13 +11:00
Shannon 056b13eb98 fixes up the double member creation in the createuser method 2014-01-08 16:29:09 +11:00
Shannon e2a395e245 Fixes merge issues 2014-01-08 16:09:35 +11:00
Shannon 6b760dcfe8 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Models/Membership/EntityPermission.cs
	src/Umbraco.Core/Persistence/Factories/UserFactory.cs
	src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs
	src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserRepository.cs
	src/Umbraco.Core/Persistence/Repositories/PermissionRepository.cs
	src/Umbraco.Core/Services/ContentService.cs
	src/Umbraco.Core/Umbraco.Core.csproj
	src/Umbraco.Tests/Services/UserServiceTests.cs
2014-01-08 15:47:53 +11:00
Shannon 5ded732188 fixing some merge issues 2014-01-08 15:43:58 +11:00
Shannon 9467a67661 Backports the permissions repo updates, permissions on user/content repo updates and default permissions for users 2014-01-08 15:42:49 +11:00
Shannon d6a83d9887 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Models/IMember.cs
	src/Umbraco.Core/Models/Member.cs
	src/Umbraco.Core/Models/Membership/IUser.cs
	src/Umbraco.Core/Models/Membership/MembershipExtensions.cs
	src/Umbraco.Core/Models/Membership/UmbracoMembershipMember.cs
	src/Umbraco.Core/Models/Membership/User.cs
	src/Umbraco.Core/Models/Membership/UserProfile.cs
	src/Umbraco.Core/Persistence/Factories/MemberReadOnlyFactory.cs
	src/Umbraco.Core/Persistence/Factories/UserFactory.cs
	src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs
	src/Umbraco.Core/Persistence/Repositories/Interfaces/IUserRepository.cs
	src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs
	src/Umbraco.Core/Persistence/Repositories/PermissionRepository.cs
	src/Umbraco.Core/Persistence/Repositories/UserRepository.cs
	src/Umbraco.Core/Services/IMembershipUserService.cs
	src/Umbraco.Core/Services/MemberService.cs
	src/Umbraco.Core/Services/UserService.cs
	src/Umbraco.Tests/Persistence/Querying/PetaPocoSqlTests.cs
	src/Umbraco.Tests/Persistence/Repositories/ContentRepositoryTest.cs
	src/Umbraco.Tests/Persistence/Repositories/UserRepositoryTest.cs
	src/Umbraco.Tests/Persistence/Repositories/UserTypeRepositoryTest.cs
	src/Umbraco.Tests/Services/ContentServiceTests.cs
	src/Umbraco.Tests/Services/UserServiceTests.cs
	src/Umbraco.Tests/TestHelpers/Entities/MockedUser.cs
	src/Umbraco.Tests/TestHelpers/Entities/MockedUserType.cs
	src/Umbraco.Web.UI/umbraco/controls/PasswordChanger.ascx.cs
	src/Umbraco.Web.UI/umbraco/dashboard/ChangePassword.ascx
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/umbraco.presentation/umbraco/create/userTasks.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/dashboard/ChangePassword.ascx.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/members/EditMember.aspx.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs
	src/umbraco.businesslogic/User.cs
	src/umbraco.providers/members/UmbracoMembershipProvider.cs
2014-01-08 14:32:38 +11:00
Shannon 96e00bc1eb moves classes to sep files 2014-01-08 14:04:30 +11:00
Shannon 0f9f11bbcf re-internalizes some classes for now 2014-01-08 14:03:10 +11:00
Shannon 5b6cc51516 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2014-01-08 13:04:01 +11:00
Shannon 80b83ab64b Fixes up password changer on postback, fixes up more of the edit user and edit member pages. 2014-01-08 13:03:33 +11:00
Shandem 326d81286a Merge pull request #281 from Jeavon/U4-3987
Fixes U4-3987- Related Links
2014-01-07 15:47:16 -08:00
Jeavon Leopold 13641473d0 Fixes U4-3987- Related Links 2014-01-07 14:40:45 +00:00
Morten Christensen c6751f0374 Correcting the legacy template MakeNew private method so the OnNew event is fired after the design is added and file is created. 2014-01-07 13:24:05 +01:00
Morten Christensen d71c686aea Typo or missing update in legacy User class 2014-01-07 13:23:03 +01:00
Morten Christensen 4c5dfb42d5 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2014-01-07 13:13:38 +01:00
Shannon 0245efe3cb Fixes the change password dashboard to work properly. Fixes the EditUser to property save the member and the user. Adds new (probably temporary) MembershipHelper which is used to update a MembershipUser. Updates the User model to ignore the membership properties that we currently cannot persist. Ensures the legacy User membership provider still looks for a typed membership user (which should never have happened). Fixes small issue with underlying membership provider trying to encrypt an empty string. 2014-01-07 17:01:22 +11:00
Shandem b3151ca788 Merge pull request #280 from AndyButland/wip-u4-3980
Fix to SQL on inserting tags to handle tag with apostrophe (U4-3980)
2014-01-06 15:59:09 -08:00
AndyButland aa1edb6e69 Fix to SQL on inserting tags to handle tag with apostrophe 2014-01-06 21:56:10 +01:00
Shannon 0b4ddf82aa Adds more user service tests 2014-01-06 17:43:29 +11:00
Shannon 3ff173732b implements the remaining incomplete parts of the UserService, adds more unit tests 2014-01-06 17:30:08 +11:00
Shannon f3f7aa70d1 Ensures a default member/user type is assigned on membership provider initialize, adds more unit tests 2014-01-06 16:18:25 +11:00
Shannon cd82bc6d21 streamlined the new membership provider classes so now they all share the same logic and use IMembershipMemberService<T> which is used by both IMember and IUser services 2014-01-06 15:38:34 +11:00
Shannon c3a6c7c473 fixes up more of the legacy user membership provider 2014-01-06 14:02:09 +11:00
Shannon 5538a2e793 fixed up the failing unit tests for member service counts, added more unit tests for UserService and implemented more of the required methods. 2014-01-06 12:25:14 +11:00
Shannon 1b7dc76df2 Updated much more of the UserService + some unit tests 2014-01-06 11:56:53 +11:00
Shannon 85c85cd1eb Simplifies and streamlines the models used between IMember and IUser along with the services used for both of these entities.
Updates the model used to store and retreive permissions, instead of a single string it is an Enumerable<string> which gives us some flexibility in the future and since this was not public (yet) it's the perfect time to do this.
Removes the base Profile classes from User since these are not required, since we cannot share base classes between Member and User, these weren't necessary.
2014-01-06 11:04:26 +11:00
Shannon ba5f2bc69d Ensure the old membership provider's count online members is implemented 2014-01-02 15:57:27 +11:00
Shannon 3fcdbe85b5 Fixes merge and build issues 2014-01-02 15:41:00 +11:00
Shannon 78336181ea Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Models/Membership/MembershipExtensions.cs
	src/Umbraco.Core/Persistence/Repositories/Interfaces/IMemberRepository.cs
	src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs
	src/Umbraco.Core/Security/MembershipProviderBase.cs
	src/Umbraco.Core/Services/IMemberService.cs
	src/Umbraco.Tests/App.config
	src/Umbraco.Tests/Membership/MembershipProviderBaseTests.cs
	src/Umbraco.Tests/TestHelpers/Entities/MockedMember.cs
	src/Umbraco.Tests/Umbraco.Tests.csproj
	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
	src/Umbraco.Web.UI/config/tinyMceConfig.Release.config
	src/Umbraco.Web.UI/config/tinyMceConfig.config
	src/Umbraco.Web.UI/umbraco_client/Application/UmbracoApplicationActions.js
	src/Umbraco.Web/Security/Providers/MembersMembershipProvider.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/controls/ContentControl.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/create/member.ascx.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/create/userTasks.cs
	src/umbraco.controls/TabView.cs
	src/umbraco.providers/members/UmbracoMembershipProvider.cs
2014-01-02 15:28:42 +11:00
Shannon 17883358b6 Fixes some issues with the User membership provider, updates user create dialog to also have an email address (which is required by membership), adds validation to the member and user create dialogs to ensure that the email address is validated to be a correcty formatted address. 2014-01-02 14:13:43 +11:00
Shannon fc0c6a1cd8 fixes stored password check with legacy encoding. 2013-12-31 13:27:47 +11:00
Sebastiaan Janssen 934d4020b2 Merge pull request #224 from Attackmonkey/Hackathon-2760
Fixes issue U4-2760, sorting installed packages
2013-12-29 06:30:09 -08:00
Sebastiaan Janssen 8b03ba4f42 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-12-29 15:26:44 +01:00
Sebastiaan Janssen 3caf84c63c Merge branch 'Hackathon-U4-3063' of https://github.com/Attackmonkey/Umbraco-CMS into Attackmonkey-Hackathon-U4-3063 2013-12-29 15:24:47 +01:00
Sebastiaan Janssen aae16f227e Merge pull request #227 from mattbrailsford/6.2.0-3454
Maintains tab sort order for doc type imports/exports.
2013-12-29 06:20:09 -08:00
Sebastiaan Janssen 443002cdde Merge pull request #273 from esunxray/patch-2
Update zh.xml
2013-12-29 06:19:30 -08:00
Sebastiaan Janssen 75150f0bfa Merge pull request #223 from Attackmonkey/Hackathon-2757
Fixes issue U4-2757 where generic properties are not ordered correctly.
2013-12-29 06:18:19 -08:00
Sebastiaan Janssen af73fd8b68 Merge pull request #218 from dipunm/U4-2551
Missing languages in RTE insert link dialog.
2013-12-29 06:11:53 -08:00
Sebastiaan Janssen 139df63ddf Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-12-29 15:08:10 +01:00
Sebastiaan Janssen a49058fe00 Fixes U4-510 Copy node makes multiple copies 2013-12-29 15:07:28 +01:00
Sebastiaan Janssen dcde00cec1 Merge pull request #213 from leekelleher/U4-3452
Fixes: U4-3452 Update the MIT License URL (Packager)
2013-12-29 05:58:02 -08:00
Sebastiaan Janssen bcc70f7a1e Merge pull request #197 from mkariti/u4-415
U4-415
2013-12-29 05:39:30 -08:00
Sebastiaan Janssen 32bc2f1d69 merge ismailmayat-UK-Festival 2013-12-29 14:34:54 +01:00
Sebastiaan Janssen 4d3f67885a Fixes U4-1076 Apostrophes in document type description are shown preceded/escaped by a slash in the Create Node dialog 2013-12-29 14:12:23 +01:00
Sebastiaan Janssen a269e9d426 Merge branch 'BatJan-master' into 6.2.0 2013-12-29 13:51:54 +01:00
Sebastiaan Janssen af5a382f93 Merge branch 'master' of https://github.com/BatJan/Umbraco-CMS into BatJan-master 2013-12-29 13:51:18 +01:00
Sebastiaan Janssen 90174a39e3 Merge branch 'enkelmedia-patch-2' into 7.0.2 2013-12-29 12:41:12 +01:00
Sebastiaan Janssen 4d9f9c890d Merge branch 'patch-2' of https://github.com/enkelmedia/Umbraco-CMS into enkelmedia-patch-2 2013-12-29 12:40:46 +01:00
Sebastiaan Janssen dad910b8ab Merge pull request #212 from mattbrailsford/6.2.0-1004
Added ValidateRequest="false" on package installer page to allow user co...
2013-12-28 03:50:10 -08:00
Shannon 8a70c440f2 Added many more unit tests for the membership provider base class and fixed some logic inconsistencies. 2013-12-28 18:55:43 +11:00
Shannon 07f3de8b67 updates port number 2013-12-28 14:42:34 +11:00
Shannon 0955b0c474 fixes proj ref 2013-12-28 14:37:53 +11:00
Shannon 57d1ff20fd Improves test suite performance - this should shed a few minutes off of the test runs. 2013-12-28 14:35:43 +11:00
Shannon fbdb1d5d6c Fixes: U4-3942 Cannot configure the request if there is not content assigned - exception
Conflicts:
	src/Umbraco.Tests/Umbraco.Tests.csproj
2013-12-28 14:01:08 +11:00
Shannon b924b06062 Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2013-12-28 13:57:53 +11:00
Shannon fb029861cf Fixes: U4-3942 Cannot configure the request if there is not content assigned - exception 2013-12-28 13:57:20 +11:00
perploug 4eb19bd26c Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2013-12-27 22:03:30 +01:00
perploug 71a07060a9 removes debugging output from treesource preval editor 2013-12-27 21:55:59 +01:00
Shannon edaa5ebd43 Lots more unit tests for the membership providers and some other fixups - have a new failing test as i need to sort out salting issue with encrypted passwords. 2013-12-24 14:03:18 +11:00
Shandem c12b270511 Merge pull request #268 from james-melville/6.2.0
Fixes: U4-3814 - 6.1.6 XSS vulnerability in backoffice
2013-12-23 16:14:52 -08:00
Shannon c8fa2b3880 Merge branch 'abjerner-patch-1' into 6.2.0
Conflicts:
	src/Umbraco.Web/PublishedContentExtensions.cs
2013-12-24 11:08:48 +11:00
Shannon d474481cba publicizes MemberService so that devs can use the events on nightly builds for now. 2013-12-24 11:03:20 +11:00
Shannon 62e3ab27fe Adds comments to EntityController code to use UmbracoHelper 2013-12-24 10:58:11 +11:00
Shannon 86c008fc8c Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2013-12-24 10:49:01 +11:00
Shannon 154ee39755 Fixes: U4-3907 Token cookie issues in 7.0.1 2013-12-24 10:48:32 +11:00
Shannon 63ca9f210b updates version # 2013-12-24 10:48:14 +11:00
Shannon 1c139b685a updates legacy membership provider to use efficient paging. 2013-12-20 18:12:54 +11:00
Shannon 7a8b3dc9bc Updated the member service/repo to have paged queries and results which use db paging for maximum efficiency (of course only works for things like email, username but those are 2 specific things that are needed by the membership provider) 2013-12-20 18:11:12 +11:00
Shannon a4dde1948f Implements the member count methods on the member service and adds unit tests. 2013-12-20 16:20:32 +11:00
Shannon 0f68818a19 Updated member service with the newer property value queries and added unit tests for all of them 2013-12-20 15:44:53 +11:00
Shannon 414b65b269 More WIP on the membership providers - both new and old. They are now both working with the same up-to-date logic and base classes. Updated the interface definitions on the member services to support the membership provider queries - now to implement the logic. 2013-12-20 14:01:10 +11:00
perploug 28c2aa1195 Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2013-12-19 11:32:17 +01:00
perploug 391c778b80 Minor refactor of treesource internal model 2013-12-19 11:32:09 +01:00
perploug f2c2b7590b Get Entity by Query WIP 2013-12-19 11:31:55 +01:00
perploug 22d6981ab0 Fixes small issue with language loading 2013-12-19 11:06:10 +01:00
Stephan 4dbe317c03 Merge pull request #274 from esn303/U4-3908
Fix for U4-3908 YSOD on frontend after being logged out
2013-12-19 01:54:24 -08:00
Marc dc727ba0de Fix for U4-3908 YSOD on frontend after being logged out 2013-12-19 10:41:44 +01:00
Shannon 2dd04799b2 WIP membership provider updates 2013-12-19 18:33:25 +11:00
esunxray 1c901e00cc Update zh.xml
add line <key alias="resetPassword">重设密码</key>
2013-12-19 14:53:50 +08:00
Shannon d7207f7c2a Fixes some merge issues 2013-12-19 16:09:33 +11:00
Shannon a5828a2c3e Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Web.UI/umbraco/controls/GenericProperties/GenericProperty.ascx
2013-12-19 15:59:50 +11:00
Shandem c589c741e8 Merge pull request #220 from leekelleher/U4-2006
Fixes: U4-2006 Domain.GetDomain(string DomainName) is case-sensitive
2013-12-18 20:56:03 -08:00
Shandem c8923cbc27 Merge pull request #221 from AnthonyCogworks/U4-2272
Replaced HttpContext.Current.Cache with HttpRuntime.Cache
2013-12-18 20:54:57 -08:00
Shandem 063f405a06 Merge pull request #230 from Yawka/U4-2772
U4 2772
2013-12-18 20:51:17 -08:00
Shannon 68a25bb5b1 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2013-12-19 15:50:03 +11:00
Shandem addfbcf2a7 Merge pull request #232 from Yawka/U4-2034
U4 2034
2013-12-18 20:48:52 -08:00
Shandem 8ee133bb75 Merge pull request #239 from OptimisticCoder/U4-451
U4-451 Inconsistent line endings in template files created by Umbraco
2013-12-18 20:46:46 -08:00
Shandem fa1185cbd8 Merge pull request #241 from OptimisticCoder/U4-3039
U4-3039 Import Document Type leaves files in App_Data
2013-12-18 20:43:15 -08:00
Shandem 68e0a414a0 Merge pull request #245 from esn303/patch-1
Fixed minor typos
2013-12-18 20:39:43 -08:00
Shannon 6ddef7df27 Merge branch 'esn303-patch-2' into 7.0.2 2013-12-19 15:36:59 +11:00
Shannon 66f572b642 Merge branch 'patch-2' of https://github.com/esn303/Umbraco-CMS into esn303-patch-2 2013-12-19 15:36:44 +11:00
Shannon a7a1730898 Merge branch 'kalletoxic-7.0.0' into 7.0.2 2013-12-19 15:31:26 +11:00
Shannon 155e7338cf Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Web.UI/umbraco/masterpages/umbracoDialog.Master
	src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/autolink/editor_plugin_src.js
	src/Umbraco.Web.UI/umbraco_client/tinymce3/plugins/table/editor_plugin_src.js
	src/Umbraco.Web.UI/umbraco_client/tinymce3/tiny_mce_popup.js
2013-12-19 15:30:17 +11:00
Shandem 89860bd786 Merge pull request #261 from esunxray/patch-1
Update zh.xml
2013-12-18 20:26:48 -08:00
Shandem b5cfefa052 Merge pull request #265 from Jeavon/U4-3247
Fixes U4-3247 - TinyMce v3 doesn't work with IE11
2013-12-18 20:22:19 -08:00
Shannon b2c0f3c35a some file formatting 2013-12-19 15:21:02 +11:00
Shannon d5e0c6ff68 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	.gitignore
	src/Umbraco.Tests/PublishedContent/PublishedContentExtensionTests.cs
	src/Umbraco.Web.UI/config/ClientDependency.config
	src/Umbraco.Web.UI/umbraco/Umbraco.aspx.designer.cs
	src/Umbraco.Web.UI/umbraco/editContent.aspx
	src/Umbraco.Web.UI/umbraco/login.aspx
	src/Umbraco.Web.UI/umbraco/masterpages/umbracoDialog.Master
	src/Umbraco.Web.UI/umbraco/masterpages/umbracoPage.Master
	src/Umbraco.Web.UI/umbraco/umbraco.aspx
2013-12-19 15:08:19 +11:00
Shannon a43f4b7b7f Completes: U4-1521 Updated back office to use ClientDependency bundles for common files 2013-12-19 15:05:05 +11:00
Shandem 7ce3949852 Merge pull request #209 from ProNotion/U4-1521
U4 1521
2013-12-18 18:37:02 -08:00
Shandem 4862419744 Merge pull request #198 from craigacronin/U4-1891
Fixed as per issue comments, but also implemented for another 3 overload...
2013-12-18 18:33:57 -08:00
Shannon 6b810c89f6 un-ignores PublishedContentExtensionTests 2013-12-19 13:28:17 +11:00
Shandem 89b0a2fd89 Merge pull request #170 from lars-erik/6.2.0_fix_publishedcontentextensiontests_sidebysidefriendly
Should make the PublishedContentExtensionTests green when ran together w...
2013-12-18 18:25:38 -08:00
Shannon 73c479c843 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2013-12-19 13:23:22 +11:00
Shannon 8aceae9880 re-formats some code, simplifies calls using InvariantEquals extension method 2013-12-19 13:22:33 +11:00
Shandem 384d4d60f1 Merge pull request #168 from stevetemple/6.1.6-multiple-action-route-issue
Fix error when multiple routes have the same controller
2013-12-18 18:18:44 -08:00
Shannon 67caf81a74 adds a couple of null checks. 2013-12-19 13:14:38 +11:00
Shannon 763ab26446 Updates packaging service to not export empty properties. 2013-12-19 13:13:13 +11:00
Shannon 67a8fa5f07 Merge branch 'wtct-U4-3091' into 6.2.0 2013-12-19 13:05:27 +11:00
Shannon f7b61d09e2 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Profiling/ProfilingViewEngine.cs
2013-12-19 12:53:32 +11:00
Shannon 5c59317bf8 changes casing of col names 2013-12-19 12:52:37 +11:00
Shannon a2ec53dd4f Merge branch 'wtct-U4-3071' into 6.2.0 2013-12-19 12:50:42 +11:00
Shannon db78c78df2 fixes some merge issues with view engine wrapping PR. 2013-12-19 12:45:46 +11:00
Shannon 4558549d5a Fixes appendformat issue 2013-12-19 12:40:41 +11:00
Shannon d98801d5d1 Merge branch '6.2.0' of https://github.com/mortenbock/Umbraco-CMS into mortenbock-6.2.0
Conflicts:
	src/Umbraco.Web/WebBootManager.cs
2013-12-19 12:35:33 +11:00
Shandem de9ecf6afc Merge pull request #143 from IDisposable/patch-1
Added contextualKeyBuilder optional argument to allow the key used for cachin...
2013-12-18 17:32:26 -08:00
Shandem 702790bf77 Merge pull request #144 from IDisposable/patch-2
Make CacheHelperExtensions public so we can call CachedPartialView and C...
2013-12-18 17:30:01 -08:00
Shannon 3a1dbc778b Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Web/umbraco.presentation/umbraco/members/EditMember.aspx.cs
2013-12-19 12:29:02 +11:00
Shannon c912e80134 modified media service tests to not have to create data in teh base tests 2013-12-19 12:27:21 +11:00
Shannon 098c856138 Merge branch '6.2.0' of https://github.com/sniffdk/Umbraco-CMS into sniffdk-6.2.0
Conflicts:
	src/Umbraco.Tests/Umbraco.Tests.csproj
2013-12-19 12:11:33 +11:00
Shannon b45306e1ff Merge branch '6.2.0' of https://github.com/dprothero/Umbraco-CMS into dprothero-6.2.0
Conflicts:
	src/Umbraco.Web/umbraco.presentation/umbraco/members/EditMember.aspx.cs
2013-12-19 11:59:22 +11:00
Shannon 3499f39970 Merge branch 'kipusoep-patch-1' into 6.2.0 2013-12-19 11:49:30 +11:00
Shannon 4fb61be092 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2013-12-19 11:46:59 +11:00
Shannon 9115aa1a6d merge issue with proj file 2013-12-19 11:46:31 +11:00
Shannon f98b81116c Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Web/Umbraco.Web.csproj
2013-12-19 11:45:24 +11:00
Shannon 904cbbb906 missing proj file update 2013-12-19 11:41:26 +11:00
Shannon c0380e491b Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Web.UI/umbraco/controls/Tree/TreeControl.ascx
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/umbraco.presentation/umbraco/controls/Tree/TreeControl.ascx.cs
	src/umbraco.controls/TreePicker/SimpleContentPicker.cs
2013-12-19 11:41:03 +11:00
Shannon 8656d3e4b9 adds some null checks, removes old unused webforms files for tree control 2013-12-19 11:35:53 +11:00
Shannon 40988b4655 Merge branch 'select-parent-on-movecopy' of https://github.com/pynej/Umbraco-CMS into pynej-select-parent-on-movecopy
Completes: U4-3920 Move/Copy/Content-Picker time saver - pre-selects current node
2013-12-19 11:25:54 +11:00
Shannon 8a8b69a442 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/umbraco.presentation/umbraco/plugins/tinymce3/GoogleSpellChecker.cs
2013-12-19 11:14:06 +11:00
Shannon 06dbea84d8 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-12-19 11:06:11 +11:00
Shannon f54cf32057 Converted spell checker deserialization to json.net and changed the deserialized object to internal with correct naming conventions. 2013-12-19 11:06:00 +11:00
Shannon 64dbf0207b Merge branch 'DougMac-6.1.4' into 6.2.0 2013-12-19 10:38:56 +11:00
Shannon f743830167 Fixes: U4-3911 Datatypes changes their uniqueID on first save 2013-12-19 10:27:18 +11:00
Stephan 206c88105e Left some Console.WriteLine statements uncommented 2013-12-18 17:50:47 +01:00
Morten Christensen 3177b979d3 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-12-18 10:00:47 +01:00
Shannon 0addd719d3 fixed merge issues 2013-12-18 18:14:37 +11:00
Shannon 662dfb37d3 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Persistence/Querying/BaseExpressionHelper.cs
	src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs
	src/Umbraco.Core/Services/IMemberService.cs
	src/Umbraco.Core/Services/MemberService.cs
	src/Umbraco.Core/Umbraco.Core.csproj
2013-12-18 18:11:56 +11:00
Shannon 4ab32dd270 moves classes into sep files 2013-12-18 18:09:54 +11:00
Shannon fec55e9d1c Updates IMemberService with methods to search on string properties with an option to define how to match the string property, adds all supporting unit tests. 2013-12-18 17:37:46 +11:00
Shannon a21aa079ff Adds ability to use the query builder with string matches based on an NText column 2013-12-18 17:22:00 +11:00
Shannon ef4246478d Fixes: U4-2294 6.1.0: umbracoServer table can't be created on MySQL <5.6.5 2013-12-18 15:30:40 +11:00
Shannon dda538d1fc Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2013-12-17 16:14:33 +11:00
Shannon 137d859532 backports missing logic and tests from 7 that I overlooked. 2013-12-17 16:13:38 +11:00
Shannon d6d80ae037 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Constants-Conventions.cs
	src/Umbraco.Core/Models/ContentExtensions.cs
	src/Umbraco.Core/Persistence/Factories/MemberTypeReadOnlyFactory.cs
	src/Umbraco.Core/Persistence/Relators/PropertyDataRelator.cs
	src/Umbraco.Core/Persistence/Repositories/MemberTypeRepository.cs
	src/Umbraco.Core/Services/IMemberService.cs
	src/Umbraco.Core/Services/IMemberTypeService.cs
	src/Umbraco.Core/Services/MemberService.cs
	src/Umbraco.Core/Services/MemberTypeService.cs
	src/Umbraco.Core/Services/ServiceContext.cs
	src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs
	src/Umbraco.Tests/Persistence/Repositories/MemberTypeRepositoryTest.cs
	src/Umbraco.Tests/TestHelpers/Entities/MockedContentTypes.cs
	src/Umbraco.Tests/TestHelpers/Entities/MockedMember.cs
	src/Umbraco.Tests/Umbraco.Tests.csproj
2013-12-17 16:03:27 +11:00
Shannon 82b2821e27 Gets the members services ensuring members xml is being handled correctly, fixes issue with the static variable holding the default member type properties (this was then persisted in mem and then reused across all member types). Added more unit tests to verify all. 2013-12-17 15:40:47 +11:00
Shannon b270cefacc Upgrading member repositories and services with tests 2013-12-17 14:53:21 +11:00
Shannon 8b064fc2ec Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/Models/Member.cs
	src/Umbraco.Tests/Persistence/Repositories/MemberRepositoryTest.cs
	src/Umbraco.Tests/Persistence/Repositories/MemberTypeRepositoryTest.cs
	src/Umbraco.Tests/TestHelpers/Entities/MockedMember.cs
2013-12-17 12:39:45 +11:00
Shannon b4e984fe6a adds/updates unit tests for member and member type repository 2013-12-17 12:38:11 +11:00
Shannon 1a3339d485 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Tests/Persistence/Repositories/MemberTypeRepositoryTest.cs
2013-12-17 11:42:50 +11:00
Shannon f62e4fa973 adds/updates member type repo tests 2013-12-17 11:42:03 +11:00
Shannon ee8050f38f Fixes ContentTypeBase event assignment issue - an event handler was added for every property type added - that was not correct. 2013-12-17 11:35:56 +11:00
Stephan 8cb0f5762c Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2013-12-16 17:11:15 +01:00
Stephan 287596220a Merge remote-tracking branch 'origin/7.0.2' into 7.0.2 2013-12-16 17:10:42 +01:00
Stephan f870ee18d4 U4-3710 - fix merge 2013-12-16 17:10:30 +01:00
Stephan b506b5c8e9 U4-3710 - bugfix 2013-12-16 17:01:35 +01:00
Morten Christensen d9e843f0ba Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-12-16 09:48:18 +01:00
Shannon 805c1dfb5b Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2013-12-16 19:05:44 +11:00
Shannon 66dd0d073c backports the member type service updates 2013-12-16 19:05:03 +11:00
Shannon f269b1931d Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2013-12-16 19:03:29 +11:00
Shannon 29c22cc4b5 exposes repository service 2013-12-16 19:02:53 +11:00
Shannon 76695fc7b2 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2013-12-16 18:44:52 +11:00
Shannon e29031a2c4 Back ported relationship repo/service updates 2013-12-16 18:44:11 +11:00
Shannon 9b2b8e8166 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2013-12-16 18:24:12 +11:00
Shannon 3ff0cca033 back ports entity service updates 2013-12-16 18:23:40 +11:00
Shannon aa398b4f36 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2013-12-16 18:18:23 +11:00
Shannon fe16cc91fa back ports packaging service updates 2013-12-16 18:17:30 +11:00
Shannon 7e6fdcb05e back ported template repo and file service updates 2013-12-16 18:10:44 +11:00
Shannon ae54f34bcf Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2013-12-16 17:48:01 +11:00
Shannon d1e071b9cb adds additional unit tests for the data type service to include pre-value handling. 2013-12-16 17:47:40 +11:00
Shannon 3e253f9c19 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2013-12-16 17:18:15 +11:00
Shannon 2ce952bdbb backports data type service updates and fixes unit tests with correct seeding value. 2013-12-16 17:17:23 +11:00
Shannon b8f5d1c42c Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/umbraco.editorControls/MultiNodeTreePicker/MNTP_DataEditor.cs
2013-12-16 16:29:28 +11:00
Shannon 6a9b8d5540 Fixes a unit test issue with the mntp editor initialization. 2013-12-16 16:27:59 +11:00
Shannon fdc9261399 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2 2013-12-16 16:21:47 +11:00
Shannon 64b247157c Merge commit '0f25029ff6531095782a567bf054d6bc209e2a56' into 7.0.2
Conflicts:
	src/Umbraco.Core/Cache/DictionaryCacheProviderBase.cs
	src/Umbraco.Core/Cache/HttpRequestCacheProvider.cs
2013-12-16 16:21:38 +11:00
Shannon fcacc1bd71 Merge commit '060e584503039ac020f79602ae9565d7ee0531bb' into 7.0.2 2013-12-16 16:21:06 +11:00
Shannon 68d581ac82 fixes build (merge issue) 2013-12-16 16:18:44 +11:00
Shannon af86a5d7b1 backporting imediaservice changes 2013-12-16 16:04:37 +11:00
Shannon 0f25029ff6 Fixed typo 2013-12-16 16:02:34 +11:00
Shannon 060e584503 backported IContentService updates 2013-12-16 15:57:59 +11:00
Shannon 743c0bb31c Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-12-16 14:19:10 +11:00
Shannon 4bac3e19fe Fixes up webbootmanager with new cachehelper updates. 2013-12-16 14:18:58 +11:00
Shannon b86cddda94 fixes up unit tests 2013-12-16 13:55:46 +11:00
Shannon 11103c0bc5 proj file 2013-12-16 13:23:07 +11:00
Shannon 8210702474 removes the xquery tests - we don't need these and r# keeps wanting to run them 2013-12-16 13:22:52 +11:00
Shannon a42b660648 Backporting the cachehelper and associated cache classes. 2013-12-16 13:19:10 +11:00
Shannon f11d4fbedd Worked on the application cache, added request cache, changed some stuff over to be interfaces, added unit tests suite (need mroe) to test all caching providers.
Conflicts:
	src/Umbraco.Core/Cache/CacheProviderBase.cs
	src/Umbraco.Core/Cache/HttpRuntimeCacheProvider.cs
	src/Umbraco.Core/Cache/NullCacheProvider.cs
	src/Umbraco.Core/Cache/StaticCacheProvider.cs
2013-12-16 12:51:02 +11:00
Shannon 9105c08a4c getting membership provider to the same state as v7 2013-12-16 12:20:38 +11:00
Shannon 71b3ea2e56 Merge branch '7.0.2' of https://github.com/umbraco/Umbraco-CMS into 7.0.2 2013-12-16 11:19:57 +11:00
perploug 33b3032b30 Merge pull request #269 from hartvig/7.0.1
Fixes links in help
2013-12-14 03:02:28 -08:00
Niels Hartvig 31e5ed7b1b Fixes links in help 2013-12-14 11:48:08 +01:00
Stephan 98c8d637f4 Merge remote-tracking branch 'origin/6.2.0' into 7.0.2
Conflicts:
	src/Umbraco.Core/DatabaseContext.cs
	src/Umbraco.Core/Strings/DefaultShortStringHelper.cs
	src/Umbraco.Core/Umbraco.Core.csproj
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/umbraco.presentation/install/utills/LegacyClasses.cs
2013-12-13 13:05:10 +01:00
Stephan 8a3eae9ea6 Merge remote-tracking branch 'origin/7.0.1' into 7.0.2 2013-12-13 12:55:46 +01:00
Stephan 5aec753859 U4-3710, -3732 - Fix default ShortStringHelper 2013-12-13 12:20:57 +01:00
james-melville eeaa9166ac Fixes: U4-3814 - 6.1.6 XSS vulnerability in backoffice 2013-12-13 10:25:32 +00:00
Shannon 751ace1168 Merge branch '6.2.0-membershipprovider' into 6.2.0
Conflicts:
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/umbraco.presentation/umbraco/members/EditMember.aspx.cs
2013-12-13 17:17:24 +11:00
Shannon 51da5343ea Fixes installation issue with rebuilding media cache
Conflicts:
	src/Umbraco.Core/Umbraco.Core.csproj
	src/Umbraco.Web.UI/config/trees.config
	src/Umbraco.Web/Umbraco.Web.csproj
2013-12-13 17:07:29 +11:00
Shannon 34df5009e0 Upgraded installer to do a two part install - first install then if an upgrade is required do the upgrade in a second call - this way we can have the progress bar update since the media xml installer can take some time. 2013-12-13 16:58:21 +11:00
Shannon d4db7d9523 Merge branch '7.0.1' into 7.0.2 2013-12-13 16:54:39 +11:00
Shannon 6a5a320a22 doh, didn't mean to commit this config change 2013-12-13 16:54:16 +11:00
Shannon 62cf1cd87d Fixes: U4-3844 U7 - System.OutOfMemoryException: Out of memory - uploading 11Mb image 2013-12-13 16:50:11 +11:00
Shannon ebf22d155e Updated the migration to just remove the data it needs instead of rebuilding as that would take a very long time for some installs. 2013-12-13 12:53:02 +11:00
Shannon 01644e8f6c Upgraded installer to do a two part install - first install then if an upgrade is required do the upgrade in a second call - this way we can have the progress bar update since the media xml installer can take some time. 2013-12-13 12:34:57 +11:00
Shannon f2be1669bf Fixes installation issue with rebuilding media cache 2013-12-13 12:02:32 +11:00
Anders Bjerner e17b5e6a7b Update PublishedContentExtensions.cs
Added overloaded extension methods for Next() and Previous() to take a delegate (eg. lambda expression) as a second parameter. The methods are based on this thread by Jeavon Leopold: http://our.umbraco.org/forum/developers/razor/46832-Filtered-Next()-and-Previous()-v7-UmbracoHelperMVC

The code is tested in 7.0.0, but since it only relies on the existing Next() and Previous() methods, it should work in 6.1.x and 7.1.1 as well.
2013-12-12 15:32:52 +01:00
perploug 24911bffe2 adds version number to help dialog 2013-12-12 12:28:43 +01:00
perploug d343340f56 Adds missing language keys 2013-12-12 12:28:25 +01:00
perploug 0c82f78c43 Upgrades tinymce lib to support IE11 2013-12-12 12:27:49 +01:00
perploug 5cf3a619f7 Fixes: U4-3841 sorting picked media items with the multiple media picker clears the selection 2013-12-12 09:16:02 +01:00
Shannon 49550b410a Ensures Integer and Email validators are added on startup as manifest validators. 2013-12-12 18:28:45 +11:00
Shannon b9df55ef98 fixing more tests 2013-12-12 18:09:48 +11:00
Shannon e456c44b46 Fixing some unit tests 2013-12-12 17:57:50 +11:00
Shannon 61315a8d83 Merge remote-tracking branch 'origin/6.2.0' into 7.0.1
Conflicts:
	src/Umbraco.Tests/ObjectExtensionsTests.cs
2013-12-12 17:53:27 +11:00
Shannon a1c65f0518 Gets that naggy unit test passing 2013-12-12 17:52:03 +11:00
Shannon 49c8313c9e Fixes: U4-3638 - U7 - Preview mode seems permanent and shows incorrect content on front of website, when using same browser as admin login 2013-12-12 17:30:27 +11:00
Shannon 141f9b6ea1 ensures the cssclass is set for selecting media items (oops, had removed that before) 2013-12-12 16:23:33 +11:00
Shannon d223ee97cd Fixes: U4-3840 MediaPicker doesn't show images when there are also folders inside of the folder being viewed
and moves some of the util classes into their own files, adjusted media picker's icon sizes too to make it more readable.
2013-12-12 16:16:59 +11:00
Shannon a098e49840 Fixes: U4-3835 U7(nightly214) - Umbraco.Field not working 2013-12-12 14:41:01 +11:00
Shannon 8785239964 Finalizes the implementation of getting the menu items rendering for child of listview items for both content and media. 2013-12-12 14:10:03 +11:00
Shannon 74a691ac3a Removes all the console.log calls 2013-12-12 14:09:03 +11:00
Shannon 38c1669e57 Gets content items that are children of listviews to query for their affiliated tree-node and display the action menu. 2013-12-12 13:27:33 +11:00
Shannon 58f0d1a464 fixes null check on HttpQueryStringFilterAttribute and adds ability to specify parameters in the GetUmbracoApiService urlhelper extensions. 2013-12-12 13:26:53 +11:00
Shannon f30740bd49 grid is working nicely now with a couple tests 2013-12-12 11:38:34 +11:00
perploug 3de3ccad00 Fixes related links word-breaking 2013-12-11 13:32:17 +01:00
perploug 75502ca18c Compact form less adjustments 2013-12-11 13:09:45 +01:00
perploug c531c36cab adds target to RTE link picker 2013-12-11 13:09:25 +01:00
perploug 387e64acac Fixes wrong app_plugin dialog path
Changes /app_plugin/folder/umbraco to /app_plugins/folder/backoffice
which the way we documented it
2013-12-11 09:47:56 +01:00
perploug 91a5d55183 Merge branch '7.0.1' of https://github.com/umbraco/Umbraco-CMS into 7.0.1 2013-12-11 09:44:37 +01:00
Shannon 9819318060 Fixes up the auth http post 2013-12-11 18:53:00 +11:00
Shannon 2e990a7869 All working now, Fixes: U4-3722 Images in Media folder are huge 2013-12-11 18:05:04 +11:00
Shannon ed7175192b images that are smaller than the min display size will now just be centered in the square and are no longer scaled up. 2013-12-11 17:53:19 +11:00
Shannon 4e63bb38f3 margins are now working nicely. 2013-12-11 16:44:20 +11:00
Shannon d61b9bfdd7 Awesome progress on the photo folder changes to have correctly calculated images sizes - now just need to get margins going and centering of images that are smaller than the min. 2013-12-11 14:34:04 +11:00
Shannon 0de53308f5 Fixes some issues with app startup/authentication and when events fire 2013-12-11 12:01:22 +11:00
Shannon 85bf47df82 Fixes FileUploadPropertyEditor and IFileSystem usage 2013-12-11 09:05:38 +11:00
Shannon 791c3f5208 added missing view file 2013-12-11 08:51:07 +11:00
perploug bc7876681b docs: dialogservice 2013-12-10 15:31:08 +01:00
perploug 68aa3f7b1b broke touch detection, reverting 2013-12-10 12:15:40 +01:00
perploug 976531fe7e Removes missing file from web.ui.csproj 2013-12-10 12:08:13 +01:00
perploug ded7350d74 Docs: util.service.js 2013-12-10 11:23:54 +01:00
perploug e3594bf6fc Fixes: U4-3723 Only possible to link to content (not media) in Richtext editor
Adds file link button to link dialog, that proxies through the standard
media dialog
2013-12-10 11:20:00 +01:00
Shannon 6a6d9ec7b0 Updates the image helper and imagescontroller to never scale images larger than what they are. 2013-12-10 18:24:20 +11:00
Shannon 200a400fc5 put the row style on to the photo folder, without it the image widths are not calculated correctly and span over a row (depending on your current screen size). Since the currently implementation isn't really responsive anyways this at least makes it look better. We can later detect size changes and re-calc how they should be laid out. Updates the JS code to be more readable by humans. 2013-12-10 18:23:45 +11:00
Shannon 76c807a4e7 Fixes latest IFileSystem fix for image uploading 2013-12-10 16:48:57 +11:00
Shannon 985db6d2e3 div tag not closed on umb-photo-folder 2013-12-10 16:20:22 +11:00
Shannon 7894fcfc91 Fixes: U4-3714 Media tree doesn't get refreshed after upload 2013-12-10 15:10:11 +11:00
Shannon f41b0ff4b5 removes some debug logging 2013-12-10 14:15:23 +11:00
Shannon d0a5892f9f Fixes: U4-3796 No media macro parameter in v7 2013-12-10 14:13:56 +11:00
Shannon c0f4950270 Fixes: U4-3826 It is possible in some cases to insert a macro inside a macro inside the rte 2013-12-10 14:11:36 +11:00
Shannon 1d9c3b1a79 Merge remote-tracking branch 'origin/6.2.0' into 7.0.1
Conflicts:
	src/Umbraco.Core/Services/ContentService.cs
	src/Umbraco.Web/umbraco.presentation/library.cs
2013-12-10 12:59:29 +11:00
Shannon c5047148b3 Fixes legacy media business logic to return null when calling ToXml if the media item is trashed - this makes it consistent with how content works and also prevents being able to show the media on the front-end when it is trashed. Fixes up how the MediaService rebuilds the XML to make sure it's transactional based. Fixes: U4-3820 cached media xml is not cleared from the cmsContentXml table when recycled
Conflicts:
	src/Umbraco.Web/umbraco.presentation/library.cs
2013-12-10 12:56:31 +11:00
Shannon a6b3233c10 Fixes legacy media business logic to return null when calling ToXml if the media item is trashed - this makes it consistent with how content works and also prevents being able to show the media on the front-end when it is trashed. Fixes up how the MediaService rebuilds the XML to make sure it's transactional based. Fixes: U4-3820 cached media xml is not cleared from the cmsContentXml table when recycled 2013-12-10 12:53:33 +11:00
Shannon 9ec1f9b3f9 Merge remote-tracking branch 'origin/6.2.0' into 7.0.1
Conflicts:
	src/Umbraco.Core/Umbraco.Core.csproj
	src/Umbraco.Web.UI/install/Default.aspx.cs
2013-12-10 11:55:32 +11:00
Shannon ed2126eef9 ensures media xml cache is rebuilt on upgrade 2013-12-10 11:54:18 +11:00
Shannon ce4b56895e fixes installer login check 2013-12-10 11:51:41 +11:00
Shannon eaac76cdc1 Fixes: U4-3821 Infinite redirect loop when upgrading from 7.0.0 to 7.0.1 and ensures media cache is rebuilt on upgrade 2013-12-10 11:51:03 +11:00
Shannon bffe52e060 Merge remote-tracking branch 'origin/6.2.0' into 7.0.1
Conflicts:
	src/Umbraco.Tests/PluginManagerTests.cs
2013-12-10 10:00:37 +11:00
Shannon 94db371234 Ensures macro and urls are not parsed in the ItemRenderer when a content item is assigned since that parsing will occur with the value converters 2013-12-10 09:59:13 +11:00
Shandem b12cd81c01 Merge pull request #264 from mvanhelmont/patch-1
fix /{localLink:ID}
2013-12-09 14:53:48 -08:00
Sebastiaan Janssen 103e226b51 Merge pull request #215 from dipeshhirani/U4-752
U4-752 Add culture invariant languages to create language dialog
2013-12-09 13:40:21 -08:00
Sebastiaan Janssen 208cf8a01d Bump version and try to make the buildserver happy 2013-12-09 17:55:37 +01:00
perploug 1f81107485 Fixes: U4-3653 Bottom "Action" links inaccessible 2013-12-09 15:24:38 +01:00
perploug bf5042e3d0 fixes: U4-3718 Sorting a list view by "Updated by" throws an exception
It tries to sort the result on UserBasic, made userbasic implement
ICompareble
2013-12-09 14:32:16 +01:00
perploug 15b55f2b36 Fixes: U4-3631 Disable preview button when there is no template assigned, since there is nothing to preview then... 2013-12-09 14:17:51 +01:00
Shannon 57f2250f13 Fixes: U4-3820 cached media xml is not cleared from the cmsContentXml table when recycled 2013-12-09 16:56:02 +11:00
Shannon f15682ef60 Fixes: U4-3820 cached media xml is not cleared from the cmsContentXml table when recycled 2013-12-09 16:35:12 +11:00
Shannon 1b1ec04e7c Ensures macro and urls are not parsed in the ItemRenderer when a content item is assigned since that parsing will occur with the value converters 2013-12-09 15:42:38 +11:00
Shannon 049c65a2c7 Fixes: U4-3799 @Umbraco.Field("bodyText") returns {LocalLink:xxx} 2013-12-09 15:20:11 +11:00
Shannon d50aa38c31 Ooops fixes the rte macro parser to not return empty when no macros are found 2013-12-09 14:01:34 +11:00
Shannon 1531f979a2 fixes: U4-3816 Creating member with @ in login results in SQL parameter error 2013-12-09 13:19:59 +11:00
Shannon 69ffecd686 Fixes: U4-3741 GetMemberFromLoginNameAndPassword Always Return Null 2013-12-09 13:08:06 +11:00
Shannon 6ec297aaaf Merge remote-tracking branch 'origin/6.2.0' into 7.0.1 2013-12-09 12:49:13 +11:00
dipeshhirani bb1edd2051 remove commented line 2013-12-08 16:23:03 +00:00
Sebastiaan Janssen 14790559cb Merge pull request #140 from pynej/search-node-type
Add node type to search results
2013-12-08 07:56:50 -08:00
Sebastiaan Janssen 97457087c7 Merge pull request #266 from greystate/patch-1
Fix a typo/grammar error in da.xml
2013-12-08 06:21:31 -08:00
perploug 8469d18a0e fixes search keyboard support 2013-12-06 15:09:39 +01:00
perploug da3269e970 Fixes: U4-3426 Can't delete any contentnode, media, document type or template from back end, Umbraco 7.0.0-RC
Replaces $http.delete with $http.post enables httppost on the
server-side, its not the best solution, but has way fewer unknowns then
adding extensive VERB and origin support in the web.config
2013-12-06 13:12:18 +01:00
perploug b2b0afde4b Fixes broken copy/move dialog 2013-12-06 12:17:12 +01:00
perploug ff849ab912 Sets umbracoVersion to 7.0.1 2013-12-06 12:17:01 +01:00
perploug 97b8a5000a Fixes broken installer due to moving app-settings back into web.config 2013-12-06 12:16:36 +01:00
perploug f59489a5cb Merge branch '7.0.1' of https://github.com/umbraco/Umbraco-CMS into 7.0.1 2013-12-06 10:07:29 +01:00
perploug b03427cabc Fixes: U4-3806 Prevalue validation run all field validators against all fields 2013-12-06 10:07:04 +01:00
Shannon 2eb5c08825 Fixing: U4-3686 Umbraco 7 - Rich Text Editor and Macro Issues + fixed up the per-controller webapi configuration and more fixes to loading propertyeditors/param editors, this saves a assembly scan. 2013-12-06 15:01:58 +11:00
Shannon 37eb66510f Fixes: U4-3505 Sometimes macro parameter types are not resolved during startup 2013-12-06 14:07:29 +11:00
Shannon dc7c7304ad Fixes: U4-3505 Sometimes macro parameter types are not resolved during startup 2013-12-06 14:06:53 +11:00
Shannon 8327b8aa0e Completes: U4-3792 Move appSettings, connectionStrings back to web.config 2013-12-06 11:52:47 +11:00
Shannon 7759249963 Fixes: U4-2967 Inline macros error out when trying to access the Model 2013-12-06 11:22:16 +11:00
Shannon 9d9070c979 fixes user service query to work with mssql and mysql 2013-12-06 10:56:49 +11:00
Shannon feb1a14650 Merge remote-tracking branch 'origin/6.2.0' into 7.0.1 2013-12-06 10:27:40 +11:00
Shannon 4cb4ff0617 Fix MySQL migrations.
Conflicts:
	src/Umbraco.Core/Persistence/Migrations/Upgrades/TargetVersionSeven/AlterTagRelationsTable.cs
2013-12-06 10:26:32 +11:00
Shannon 9e1d6dbf9b Merge branch 'Bitmapped-7.0.0' into 7.0.1 2013-12-06 10:22:07 +11:00
perploug 82ec2d28ef WIP on media upload tree refresh 2013-12-05 15:28:32 +01:00
perploug 66383c6f16 merge 2013-12-05 13:11:17 +01:00
Chriztian Steinmeier dc60eb8383 Fix a typo/grammar error in da.xml 2013-12-05 13:06:24 +01:00
perploug 9733c5c031 Folderbrowser tree sync 2013-12-05 13:04:28 +01:00
Shannon 0c0c08ec98 Changes how we set the csrf header for jquery, changed to global and ensures that it is lazily resolved to always ensure it has the newest value 2013-12-05 22:18:07 +11:00
Shannon d7d800331b Merge branch '7.0.1' of https://github.com/umbraco/Umbraco-CMS into 7.0.1 2013-12-05 22:07:19 +11:00
Shannon 4346578160 Ensures csrf token is set for PostFile on the media controller for bulk file uploads 2013-12-05 22:06:57 +11:00
perploug cfe0b2f9e5 fixes failing eventsService tests 2013-12-05 11:30:08 +01:00
Shannon d7d7d88ecc Merge branch '7.0.1' of https://github.com/umbraco/Umbraco-CMS into 7.0.1 2013-12-05 21:23:53 +11:00
Shannon fd34a9cd29 fixes demo app loader to load the correct bootstrap 2013-12-05 21:23:31 +11:00
Jeavon Leopold 3f1b057f45 Fixes U4-3247 - v6.1.6 RTE view/edit HTML doesn't work with IE 11 by upgrading TinyMce to v3.5.10 2013-12-05 09:06:01 +00:00
perploug 6da1a5adb3 Fixes: U4-3405 Umbraco 7 RC admin login - remember password 2013-12-05 09:22:32 +01:00
Shannon 23cf5b544a Moved image handling to diff controller since it doesn't support the csrf header, need to test more in an hour (WIP) 2013-12-05 19:06:55 +11:00
Shannon b0cde715da fixes merge issue 2013-12-05 18:51:05 +11:00
Shannon 366ca11490 Merge branch 'lars-erik-7.0.azurestorage' into 7.0.1 2013-12-05 18:45:21 +11:00
Shannon a1a985e4a8 Merge branch '7.0.1' of https://github.com/umbraco/Umbraco-CMS into 7.0.1 2013-12-05 18:34:05 +11:00
Shannon 3384634033 Fixes: U4-3795 Cannot create content with a tag editor when the tag property belongs to an inherited doc type & U4-3786 Multi-level document types fail 2013-12-05 18:33:51 +11:00
perploug b6bcdcb351 fixes: U4-3728 Non-Mandatory Numeric property gives error when left blank
also fixes dimming on buttons fails when validation fails
2013-12-05 08:32:53 +01:00
Shannon db5b99dbf1 adds failsafe database lookup to BackwardsCompatibleData even though it shouldn't even get used. 2013-12-05 16:30:14 +11:00
Shannon a64dbb172e undo my custom test change to login controller 2013-12-05 16:20:02 +11:00
Shannon b1913c9a07 puts IDataValueSetter back in so it can be used by backwards compatible data 2013-12-05 16:18:45 +11:00
Shannon 11fc06d75d Merge remote-tracking branch 'origin/6.2.0' into 7.0.1 2013-12-05 16:12:32 +11:00
Shannon f6179ff813 Strange, somehow these updates got overwritten 2013-12-05 16:11:15 +11:00
Shannon 186e664894 Merge remote-tracking branch 'origin/6.2.0' into 7.0.1
Conflicts:
	src/Umbraco.Core/Persistence/Repositories/Interfaces/IMemberRepository.cs
	src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs
	src/Umbraco.Core/Services/MemberService.cs
	src/umbraco.cms/businesslogic/member/Member.cs
2013-12-05 16:09:34 +11:00
Shannon 1735c5adca adds Exists(string username) to member service and wraps IsMember with that call. 2013-12-05 16:04:53 +11:00
Shannon 31e715e146 Updates legacy Member class to setupNode based on the new IMember object (just like we do with media/content) - this will speed up data retrieval and is the start of wrapping the new API from the old one. 2013-12-05 15:51:38 +11:00
Shannon 4a7f7813e7 Updates legacy Member class to setupNode based on the new IMember object (just like we do with media/content) - this will speed up data retrieval and is the start of wrapping the new API from the old one. 2013-12-05 15:30:22 +11:00
Shannon 5f50bae65c Cleaning up a bit of the legacy member class
Conflicts:
	src/umbraco.cms/businesslogic/member/Member.cs
2013-12-05 14:48:30 +11:00
Shannon 996d74b1d3 Cleaning up a bit of the legacy member class 2013-12-05 14:45:28 +11:00
Shannon e6d8a83519 Ensures that the ContentBase item is set on Document/Media and that the property value is set based on the already loaded value in the model if IData implements IDataValueSetter (which DefaultData does). This streamlines how properties get their data and will save on a ton of queries when using the legacy API. 2013-12-05 14:26:18 +11:00
Shannon d3aa1b3d7e Ensures that the ContentBase item is set on Document/Media and that the property value is set based on the already loaded value in the model if IData implements IDataValueSetter (which DefaultData does). This streamlines how properties get their data and will save on a ton of queries when using the legacy API. 2013-12-05 14:24:26 +11:00
Shannon 3effe6b96d updates manifest docs to be correct 2013-12-05 12:38:39 +11:00
mvanhelmont 0b2428e9a3 fix /{localLink:ID}
ensures it set the href to /{localLink:ID} instead of /umbraco/{localLink:ID}
2013-12-04 21:01:10 +01:00
Lars-Erik Aabech 6458c223b8 Cleaned it up a bit. Now just using media file system provider.
It needs a bit of convesion rules though, need getfullpath(getrelativepath(path)) to be compatible with package & physical.
2013-12-04 19:47:54 +01:00
Brian Powell d36fc65baa Fixed MySQL issue. 2013-12-04 10:50:38 -05:00
Lars-Erik Aabech a511c84b4d Messy fix to support images on other domain. (Read: Azure Storage)
Added GetResized to replace usage of third party packages for simple resizing.

This PR should probably not be pulled, but I make a PR to show you what must be done.
Surely this is considered for UAAS?
2013-12-04 16:12:27 +01:00
perploug ff34024f39 fixes: U4-3717 List view doesn't honor the sort order 2013-12-04 13:17:55 +01:00
perploug bdc0ae7e2f fixes: U4-3707 Change password under users is not translated
translated, and added missing danish keys
2013-12-04 12:55:23 +01:00
perploug 60965ecd92 fixes: U4-3738 macro container, editing doesn't seem to work, just adds a new one
adds fallback on the parser object
2013-12-04 10:56:46 +01:00
Sebastiaan Janssen 708b49ca13 Reference the Microsoft.AspNet.WebApi.Client NuGet instead of local MVC4 install 2013-12-04 10:47:59 +01:00
perploug b6baa9af3d removes webdavModule from web.config 2013-12-04 09:24:04 +01:00
Shannon 8c7db9e846 Fixes: U4-3742 Umbraco 7 and umbraco/channels.aspx 2013-12-04 17:45:47 +11:00
Shannon 176ec0edc0 Fixes: U4-3651 What is the "Pick multiple items" prevalue on MNTP for? and removes the remaining uGoLive references. 2013-12-04 17:13:26 +11:00
Shannon 0d1cf872d3 Fixes WebApi issue with creating HttpResponseMessage manually - this shouldn't be done and we'll end up with very strange YSODs 2013-12-04 17:05:05 +11:00
Shannon 13b6318ad2 Fixes: U4-3776 v7 - MNTP value type changes between int and string 2013-12-04 15:57:55 +11:00
Shannon 18352f8a4d Fixes null check with filtered content/media attribute, fixes issue with container types and rendering tree nodes. 2013-12-04 15:54:50 +11:00
Shannon ad52b86336 Fixes scrollbar issue with directory/file browser and xslt visualize 2013-12-04 15:29:51 +11:00
Shannon 38df2017de Fixes issue with deleting content types that have content 2013-12-04 15:01:27 +11:00
Shannon 210f66cc4a Fixes issue with deleting content types that have content 2013-12-04 15:00:49 +11:00
Shannon e7e209280c Fixes issue with replacing webapi formatter 2013-12-04 14:47:19 +11:00
Shannon 5b7e9c712e Merge remote-tracking branch 'origin/6.2.0' into 7.0.1
Conflicts:
	src/Umbraco.Web.UI/umbraco/LiveEditing/Modules/SkinModule/ModuleInjector.aspx
	src/Umbraco.Web.UI/umbraco/Umbraco.aspx.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/LiveEditing/Modules/SkinModule/ImageUploader.aspx.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/dashboard.aspx.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/developer/Cache/viewCacheItem.aspx.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/developer/Macros/assemblyBrowser.aspx.cs
2013-12-04 13:50:55 +11:00
Shannon 33aa4e2062 Fixes potential xss 2013-12-04 13:33:24 +11:00
Shannon 1efa75c891 Fixes potential xss 2013-12-04 12:42:40 +11:00
Brian Powell f48fb5c499 Fix MySQL migrations. 2013-12-03 15:44:34 -05:00
perploug cb13b4a0e0 Merge branch '7.0.1' of https://github.com/umbraco/Umbraco-CMS into 7.0.1 2013-12-03 13:44:53 +01:00
Shannon cb8dbf9da5 fixes up some merge issues 2013-12-03 18:14:04 +11:00
Shannon 2a05687c8b Merge remote-tracking branch 'origin/6.2.0' into 7.0.1
Conflicts:
	src/Umbraco.Core/Persistence/Relators/PropertyTypePropertyGroupRelator.cs
	src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs
	src/Umbraco.Core/PluginManager.cs
	src/Umbraco.Tests/Services/ContentServiceTests.cs
	src/Umbraco.Web.UI/install/Default.aspx.cs
	src/Umbraco.Web.UI/umbraco/LiveEditing/Modules/SkinModule/ModuleInjector.aspx
	src/Umbraco.Web.UI/umbraco/Umbraco.aspx.cs
	src/Umbraco.Web.UI/umbraco/dashboard.aspx
	src/Umbraco.Web.UI/umbraco/dialogs/sort.aspx
	src/Umbraco.Web.UI/umbraco/dialogs/umbracoField.aspx
	src/Umbraco.Web.UI/umbraco/logout.aspx
	src/Umbraco.Web.UI/umbraco/umbraco.aspx
	src/Umbraco.Web/UI/Pages/UmbracoEnsuredPage.cs
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/umbraco.presentation/install/LegacyClasses.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/dashboard.aspx.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/logout.aspx.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/umbraco.aspx.cs
	src/umbraco.cms/businesslogic/Packager/Installer.cs
	src/umbraco.providers/members/MembersMembershipProvider.cs
2013-12-03 18:10:00 +11:00
Shannon d4514844f8 Fixes a few other potential xss entry points 2013-12-03 17:58:42 +11:00
Shannon 6b7a495d19 Fixes a few other potential xss entry points and cleans up some legacy webforms files 2013-12-03 16:38:58 +11:00
Shannon 601eb0bf38 Fixes a few other potential xss entry points and cleans up some legacy webforms files 2013-12-03 16:28:51 +11:00
Shannon 037e7e0797 Fixes remaining xslt injection U4-3175 2013-12-03 15:56:50 +11:00
Shannon a7e32e97e3 Fixes xss issue 2013-12-03 15:40:12 +11:00
Shannon 9d90506265 Fixes issue with authcookie on renew - need to ensure its http only and persited for a day remains, ensures the csrf cookies are set when getting the user since that is called before logging in. 2013-12-03 11:57:41 +11:00
Shannon 08100793af completed csrf protection 2013-12-03 11:36:17 +11:00
perploug a265424b3f Replaces all rootScope.broadcast with eventsService
Broadcast is inefficient and eventsService gives us extra options for
funneling all app events through one pipeline.

For now it just replicates rootScope on/emit, but longer term we can get
this to handle async UI events
2013-12-02 13:51:03 +01:00
perploug bb87fa7fa8 removes outcommented code 2013-12-02 12:24:36 +01:00
perploug 16cf64866a default tinymce config to have default height and width 2013-12-02 12:21:39 +01:00
perploug 11da6d5be7 Merge branch '7.0.1' of https://github.com/umbraco/Umbraco-CMS into 7.0.1 2013-12-02 09:42:53 +01:00
Shannon ea35ea1af5 getting csrf stuff coded up, it's pretty much done just need to write a couple tests and add the filter to the necessary controller/actions 2013-12-02 17:20:50 +11:00
Shannon 33c32579c8 Adds AngularJsonMediaTypeFormatter and ensures our controllers all use this formatter in order to enable angular's JSON Vulnerability protection. 2013-12-02 13:31:44 +11:00
Shannon 1ac6f6db50 publicizes macroproperty 2013-12-02 13:30:08 +11:00
esunxray cacf87be2d Update zh.xml
update Chinese file for 6.2, this can be merged into V7.
2013-11-29 21:26:16 +08:00
perploug 7baa81c2df missing en translation for login dialog 2013-11-29 12:00:03 +01:00
perploug a0e88a297d Blocks search box from loading untill after login 2013-11-29 11:59:44 +01:00
perploug 8d2b52a5b0 fixes: U4-3749 Login page is not translated 2013-11-29 11:58:58 +01:00
perploug 81389ce435 Fixes: U4-3685 Richtext Editor - Custom toolbars and dimensions ignored 2013-11-29 11:56:52 +01:00
Shannon e981776e6d Created new EnsurePublishedContentRequestAttribute for custom routing to still be able to render macros. 2013-11-29 17:41:38 +11:00
Shannon 48b3806129 adds umbraco session id to UserData so we can use for csrf 2013-11-29 12:42:50 +11:00
Shannon 9fc8e18881 Fixes csrf issue
Conflicts:
	src/Umbraco.Web.UI/config/ClientDependency.config
	src/Umbraco.Web.UI/umbraco/logout.aspx
	src/Umbraco.Web.UI/umbraco/umbraco.aspx
	src/Umbraco.Web/umbraco.presentation/install/LegacyClasses.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/logout.aspx.cs
2013-11-29 12:17:58 +11:00
Shannon 250276bbd4 Merge branch '6.1.6-U4-3619' into 6.2.0 2013-11-29 11:26:01 +11:00
Shannon af29f61478 Fixes csrf issue 2013-11-29 11:10:25 +11:00
perploug cdfebe705d Merge branch '7.0.1' of https://github.com/umbraco/Umbraco-CMS into 7.0.1 2013-11-28 15:35:34 +01:00
perploug e6714ae829 Ensure refresh node action is translated 2013-11-28 15:35:23 +01:00
perploug a0dead872b DA lang file updates 2013-11-28 15:35:06 +01:00
perploug b6ebc34199 ensure create dialogs can reopen the menu 2013-11-28 15:34:56 +01:00
perploug 49e7ace2d9 tree menu should not be selectable 2013-11-28 15:34:39 +01:00
perploug d140eab12d Ensures dialogs doesnt reopen the menu 2013-11-28 15:34:24 +01:00
Kalle Ekstrand 24fcfd9fcb Minor changes 2013-11-28 15:07:33 +01:00
perploug 83e05a4f84 Merge pull request #259 from nilzen/U4-3683
Fixed: U4-3683 Icon selector problem (Chrome)
2013-11-28 05:43:08 -08:00
Kalle Ekstrand 48dd619899 Minor changes 2013-11-28 14:34:22 +01:00
perploug ff52755636 Media and content tree root node translation 2013-11-28 13:26:05 +01:00
perploug a7cd18c3d2 The section mapping was reversed, so werent translated 2013-11-28 13:20:52 +01:00
perploug 98a0208b47 Removes button icon from script editor 2013-11-28 13:08:54 +01:00
perploug b923305527 adds pointer cursor to help 2013-11-28 13:06:28 +01:00
perploug 04ccbdde4d Dims buttons during action to prevent multiple saves 2013-11-28 13:06:19 +01:00
perploug de1e3d150f Missing script translation 2013-11-28 13:05:36 +01:00
perploug 07182529f4 replace $element with $scope.$on($destroy)
We should never access dom element from controllers
2013-11-28 12:32:03 +01:00
perploug e076b687c6 added rte and assets service mocks 2013-11-28 12:32:02 +01:00
Shannon 7f305db637 Fixing: U4-3687 Umbraco 7 Packaging Issues - have fixed the data type package issues, cleaned up some code and fixed a different underlying pre-val issue for empty legacy aliases 2013-11-28 16:57:05 +11:00
Shannon 50e10155e7 Completes: U4-3712 Allow c# property editors to have custom js injected into the js initialization block so they can load in angular controllers 2013-11-28 14:27:58 +11:00
Shannon 478b7cde42 Removes uGoLive from the core (for now until it is rebuilt against v7 ) 2013-11-28 10:51:54 +11:00
Shannon c86f52d5ea Completes: U4-3230 Combine/Minify manifest files to one request with CDF 2013-11-28 10:37:08 +11:00
Shannon 58fc51ae93 Fixes: U4-3736 Unit test Can_Get_File_Dates() now testing correctly, disregarding local (nont-UTC) time. 2013-11-28 09:30:50 +11:00
Shandem 413248a126 Merge pull request #260 from AndersKroghDk/7.0.1
Fixes: U4-3736 Unit test Can_Get_File_Dates() now testing correctly.
2013-11-27 14:25:11 -08:00
Anders f114f94740 Fixes: U4-3736 Unit test Can_Get_File_Dates() now testing correctly, disregarding local (nont-UTC) time. 2013-11-28 00:09:09 +01:00
Shannon ce162e2657 Gets the JS done for: U4-3230 Combine/Minify manifest files to one request with CDF - now loading incredibly fast. 2013-11-27 18:42:35 +11:00
Shannon 00518f8451 improves security and ensures the server vars cannot be loaded without authentication, they will get lazy loaded once authenticated and changed the controllers to listen for the 'ready' event instead. 2013-11-27 17:38:59 +11:00
Shannon ba3c1f9d21 minifies and outputcaches the server vars 2013-11-27 14:52:54 +11:00
Shannon 7535585b63 Fixes: U4-3720 Color picker prevalues isn't saved as an array and therefore "model.config.items.length === 0" doesn't work 2013-11-27 10:22:45 +11:00
nilzen bf288c0502 Fixed: U4-3683 Icon selector problem (Chrome) 2013-11-26 13:25:23 +01:00
Kalle Ekstrand f8375857c2 Updates to the swedish language file for v7 2013-11-26 11:08:55 +01:00
Shannon 2391ee1368 Changes the web.config template to use a linked resources (one file) 2013-11-26 20:03:13 +11:00
Shannon 327d17c90e obsoleted some un-used/legacy code. IMediaFactory it is no longer used and is contained in an old assembly. If we want to re-support this (which i don't think we do), it needs to be manually re-created and implemented, i don't think its been used for quite some time. 2013-11-26 17:52:53 +11:00
Shannon d6b4c47cd9 fixed gen'd mvc web.config template. 2013-11-26 17:14:58 +11:00
Shannon a052fc42b1 Fixes: U4-3682 Can not create new documents (javascript error) 2013-11-26 14:03:00 +11:00
Shannon c89fb0a0be Fixes: U4-3688 Unable to delete a property of type "Tags" from a Document Type 2013-11-26 13:58:49 +11:00
Shannon 03a606432a Fixes: U4-3695 Events does not fire 2013-11-26 13:34:51 +11:00
Shannon 54e826bc96 Fixes: U4-3696 Upload datatype only updates on first save 2013-11-26 13:13:43 +11:00
Shannon 6c57222a2e removes committed file that shouldn't have been there. 2013-11-26 13:12:59 +11:00
Shannon 97e8573dff removes debugging output 2013-11-26 12:46:16 +11:00
Shannon 683862932b Fixes: U4-3679 Using two data types with the Media Picker data editor multiple/not multiple 2013-11-25 19:38:56 +11:00
Shannon 9a856df8bc Fixes: U4-3644 Multiple Textstring DataType not displaying in DocType (vs. 7.0.0 build 183) 2013-11-25 17:36:56 +11:00
Shannon e1ef2e8700 Fixes: U4-3677 Multinode tree picker does not save content when node type is set to Media 2013-11-25 16:58:47 +11:00
Shannon 59599efab6 Fixes: U4-3655 Clicking on recycle bin in media section redirects you back to the content tree 2013-11-25 14:45:14 +11:00
Shannon 20813ef207 Fixes: U4-3673 Creating content with Services API always sets created by to admin
Conflicts:
	src/Umbraco.Tests/Services/ContentServiceTests.cs
2013-11-25 13:25:01 +11:00
Shannon 99e0a1f11b Fixes: U4-3673 Creating content with Services API always sets created by to admin 2013-11-25 13:22:35 +11:00
Shannon 9bf2819ac6 Fixes: U4-3661 Unable to Create Color Picker DataType & U4-3645 Media Picker Umbraco 7 can select multiple 2013-11-25 12:02:25 +11:00
Shannon cafeb6d8c6 Fixes: U4-3661 Unable to Create Color Picker DataType & U4-3645 Media Picker Umbraco 7 can select multiple 2013-11-25 11:58:01 +11:00
Shannon d04f2a98b9 Fixes tests 2013-11-21 17:47:57 +11:00
Shannon f41f82adc5 Changes locker to be static 2013-11-21 14:46:18 +11:00
Shannon e6ae88c016 Fixes hash generation and checking with the trees.config file - since this is changed during startup our plugin cache was never active :( 2013-11-21 14:45:52 +11:00
Shannon 474dcd0754 Fixes: U4-3587 Can't delete a member when there is a group assigned
Conflicts:
	src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs
2013-11-20 18:24:44 +11:00
Shannon 369f6ac935 fixes merge issue 2013-11-20 18:15:11 +11:00
Shannon 5a928aa459 FIxes installer when duplicate conflicts: U4-3612 Cannot install Txt starter kit in the back office
Conflicts:
	src/umbraco.cms/businesslogic/Packager/Installer.cs
2013-11-20 17:28:33 +11:00
Shannon 416a9ed064 Comments out backported code - need to wait till we merge in the custom membership branch. 2013-11-20 17:10:15 +11:00
Shannon b13c3aa3b9 Fixes: U4-3610 When adding another tab to a member type no members will load and result in a YSOD
Conflicts:
	src/Umbraco.Core/Persistence/Relators/PropertyTypePropertyGroupRelator.cs
2013-11-20 16:59:41 +11:00
Shannon 99ae94a82f Ensures that members are auto-approved if creating a member via the legacy members API. 2013-11-20 16:40:30 +11:00
Marc Stöcker 997e0e5492 Initial German v7 translation/localization
Should cover all of the already localized strings for v7 (as well as 6.x - no obsolete items removed for now).
2013-11-18 23:39:20 +01:00
Marc Stöcker 376fe0bf55 changed wording to correct one in context of content
wording was wrong until today, needed a completely different meaning in the context of the content section; ironically it's just "Alias" now ;)
2013-11-14 22:22:25 +01:00
Marc Stöcker 282da69d61 Fixed minor typos 2013-11-13 13:27:56 +01:00
OptimisticCoder c83844468d U4-3039 Import Document Type leaves files in App_Data
Added File.Delete to clean up temp files.
Added try/catch round it and logging if it fails for any reason.
2013-11-09 15:18:43 +00:00
OptimisticCoder 80b5cfbb07 U4-451 Inconsistent line endings in template files created by Umbraco
Changed all "\n"'s to Environment.NewLine
Changed a string that was being appended in that method to a StringBuilder to be more efficient.
Cleaned up old commented out code from the method.
2013-11-09 14:37:22 +00:00
yawka aacb86bf92 Add trim to all urls 2013-11-07 19:09:50 +02:00
yawka 59391f58ec Remove previous fix, and move it to IsReservedPathOrUrl 2013-11-07 19:06:25 +02:00
yawka 0debf9c34f Add check is path is whitespace 2013-11-07 19:05:50 +02:00
Morten Christensen 9fa17ef6cb Initial datalayer refactoring work on the legacy User class 2013-11-07 17:56:38 +01:00
Morten Christensen d227aa19b8 Leaving the original internal method intact 2013-11-07 17:56:12 +01:00
yawka e0a10080b1 Add UI validation for regular expression property 2013-11-07 18:39:27 +02:00
yawka 807df434f6 Add validation for regular expression property 2013-11-07 18:39:02 +02:00
mattbrailsford d963917556 Added SortOrder to XML for document types (used by export)
Added ability for doctype importer to set the sort order if a sort order element is available
2013-11-07 16:30:23 +00:00
Tim Payne 347d41c841 Fixes issue U4-2760, and makes the installed packages list by name in alphabetical order to make it easier to see what's installed. 2013-11-07 16:06:16 +00:00
Tim Payne f16aa38fff Fixes issue U4-2757 where generic properties are not ordered correctly. 2013-11-07 15:51:58 +00:00
adang@thecogworks.co.uk 62a7e0acd0 Replaced HttpContext.Current.Cache with HttpRuntime.Cache 2013-11-07 15:44:55 +00:00
leekelleher 8e89d13142 Fixes: U4-2006 Domain.GetDomain(string DomainName) is case-sensitive 2013-11-07 15:41:34 +00:00
dipunm a5782a40af Missing languages in RTE insert link dialog.
Also included files in csproj file to ensure proper build.
2013-11-07 14:59:00 +00:00
dipeshhirani c6af319805 commented out the line that checked if the language is neutral. 2013-11-07 14:56:00 +00:00
leekelleher 516beedbbb Fixes: U4-3452 Update the MIT License URL (Packager) 2013-11-07 14:48:20 +00:00
mattbrailsford 7cd01fc50b Added ValidateRequest="false" on package installer page to allow user controls which postback html / code. 2013-11-07 14:35:44 +00:00
Simon Dingley e9d12ae0d8 Revert "Group jQueryTree script files"
This reverts commit baed01518c.
2013-11-07 14:23:53 +00:00
Tim Payne 02e167c1f6 Fixes issue U4-3063 where copying a document type uses the rename for the node alias, but not the title, resulting in two Doctypes with the same name, but different aliases, rather than different names AND aliases. 2013-11-07 14:20:47 +00:00
Simon Dingley baed01518c Group jQueryTree script files 2013-11-07 13:21:01 +00:00
Craig Cronin a0106ff811 Fixed as per issue comments, but also implemented for another 3 overloads 2013-11-07 12:50:26 +00:00
Simon Dingley e0da5a9cb2 Groups jQuery dependencies using the ClientDependency Group property 2013-11-07 12:45:35 +00:00
mkariti 451d5eb484 U4-415 2013-11-07 14:40:26 +02:00
yawka 1923b68594 Fix 2034, add check for whitespaces 2013-11-07 12:36:35 +02:00
Jan Skovgaard 3abd4df8bd Enabled lists plugin in tinymce by default
Fixes http://issues.umbraco.org/issue/U4-3023
2013-10-16 16:01:17 +02:00
Jan Skovgaard ea239e6122 Missing languages in RTE insert link dialogue
Fixes this issue: http://issues.umbraco.org/issue/U4-2551
2013-10-16 15:53:56 +02:00
Lars-Erik Aabech 3fe99a402e Should make the PublishedContentExtensionTests green when ran together with everything else in TeamCity 2013-10-16 15:45:39 +02:00
Steve Temple e738738e54 Only check actions if more than 1 route matches & ignore case when comparing controller names 2013-10-16 12:02:20 +01:00
Steve Temple f502912225 Updated to use invariant culture 2013-10-15 23:51:39 +01:00
Steve Temple c8a26bf6a3 Merge branch '6.1.6-multiple-action-route-issue' of github.com:stevetemple/Umbraco-CMS into 6.1.6-multiple-action-route-issue 2013-10-15 17:18:46 +01:00
Steve Temple e06e50c4fc Tidied up tabs to match Umbraco standard and nicer string comparison 2013-10-15 17:18:12 +01:00
Steve Temple 4236473b14 Tidied up tabs to match Umbraco standard 2013-10-15 17:15:53 +01:00
Steve Temple 3285e161c0 Fix issue with error http://our.umbraco.org/forum/developers/api-questions/41483-Umbraco-6-MVC-RenderRouteHandlerHandlePostedValues-Sequence-contains-more-than-one-matching-element when multiple routes share the same controller 2013-10-15 17:09:51 +01:00
wtct b5c3fb1728 FFROM to FROM 2013-10-11 09:16:18 +02:00
wtct e1caf3a470 U4-3091 2013-10-10 14:45:18 +02:00
wtct b6cf182341 Affect the order of domains 2013-10-09 17:52:05 +02:00
mortenbock c74cdb28d6 Testing the wrapping of view engines 2013-10-03 11:01:37 +02:00
Marc Brooks b200cb463e Make CacheHelperExtensions public so we can call CachedPartialView and ClearPartialViewCache
In order to allow extensions to the logic and usage of the CachedPartial HtmlHelper, expose CachedPartialView and ClearPartialViewCache by making the wrapping static class public.
2013-09-30 18:28:45 -05:00
Marc Brooks cdf5ddf539 Added cacheKeyBuilder optional argument to allow the key used for caching to be contextual.
when building cached partials that work with many different instances of the same  partial view (e.g. using the same partial more than once on a page with different ViewDataDictionary or different model), it is necessary to either name each instance differently (ugh), or not cache.

By adding an optional argument to the CachedPartial Html helper method, we can vary the cache-key depending on the context of insertion. For maximum flexibility, pass the model and the viewData to the function so it can use that data to format a cacheKey suffix.

A typical use would be something like:

@Html.CachedPartial(
"EventListings"
, FeedRepository.getFeed(new CalendarEventsModel
  {
     StartingDate = DateTime.UtcNow.Date
     , Count = 10
  })
, 0
, contextualKeyBuilder: (model, viewData) =>
  {
     return (model as CalendarEventsModel).StartingDate.ToString();
  }
)
2013-09-30 18:23:56 -05:00
Jeremy Pyne 5716edcf80 Added node type to quick search(as a toooltip).
Added node type to search results.
2013-09-23 16:19:05 -04:00
Mads Krohn 0fe33c120b Removing unwanted ToList() 2013-09-13 10:42:08 +02:00
Mads Krohn 10ea234dbf Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-09-13 10:29:12 +02:00
Mads Krohn 31f146fc6f Updates to the media trashed state handling
Tweaked the logic for determining when a media item is trashed or not.
Added unit tests. Removed unnecessary comments.
2013-09-13 10:29:03 +02:00
Mads Krohn 0af73b0290 Fixed U4-2842 Umb 6.1.5 - moving a media item from recycle bin / trash 2013-09-12 00:14:44 +02:00
dprothero 6675bac1dc Fix #U4-2796 - fixed copy/paste error (does not affect functionality) 2013-09-05 15:23:25 -07:00
dprothero 0d49a59cfe Fix #U4-2796 Possible to have duplicate Login Name (Member.LoginName) for Umbraco Members 2013-09-05 15:15:40 -07:00
Stefan Kip baa22301e9 Added Exception which tells you which datatype is unable to load 2013-09-05 11:31:06 +02:00
enkelmedia fdfb6187e9 Removing SVG from staticContent before addings it. 2013-09-01 16:51:00 +02:00
enkelmedia 69830f28c2 Added SVG as static content so SVG-icons in the backoffice will be served by IIS 2013-09-01 14:05:54 +02:00
Jeremy Pyne e65a71a05a Added code to pre-select the current node in content tree pickers based on the location of the document in the tree.
This is a HUGE time saver with an even moderately complex site hierarchy.
2013-08-29 11:14:51 -04:00
Jeremy Pyne 7a2a444579 Fix for select parent o move or copy in 6.1.3. 2013-08-29 11:14:35 -04:00
Jeremy Pyne e16ebecda4 Merge branch '6.1.3-clean' into select-parent-on-movecopy 2013-08-29 11:09:20 -04:00
DougMac 0218e39664 Fixes: U4-2060 Spell Checker Broke After Google Update 2013-08-26 22:50:53 +01:00
DougMac 7e645f9a6a Fixes: U4-2060 Spell Checker Broke After Google Update
The Google spell check at https://www.google.com/tbproxy/spell no longer
works. This updates to a newer Google Api (again undocumented)
2013-08-17 10:50:26 +01:00
Jeremy Pyne fe23502e67 Added code to actually pre-select the parent node instead of just locating it in the tree. This seams keeps the Ui in a sane state.
Updated control code in Umbraco.Web.Ui from Umbraco.Web.
2013-06-25 15:48:16 -04:00
Jeremy Pyne ad2764e3ac Added code to select the parent node when doing Move/Copy operations. This will save lots of time for users.
This code can also be added to other places that use the TreeControl to pre-select the currently selected item(media pickers for example) so that changing content will be quicker.
2013-06-24 14:51:52 -04:00
743 changed files with 23496 additions and 13299 deletions
+1
View File
@@ -106,3 +106,4 @@ src/Umbraco.Web.UI/[Uu]mbraco/[Vv]iews/**/*.js
src/Umbraco.Web.UI/[Cc]onfig/appSettings.config
src/Umbraco.Web.UI/[Cc]onfig/connectionStrings.config
src/Umbraco.Web.UI/umbraco/plugins/*
src/Umbraco.Web.UI/umbraco/js/init.js
+6 -2
View File
@@ -1,7 +1,11 @@
Umbraco CMS
===========
##Note: Building version 7 from source##
If you're interested in using the source code and building version 7, make sure to read the [Belle ReadMe file](src/Umbraco.Web.UI.Client/README.md). Note that you can always [download a nightly build](http://nightly.umbraco.org/umbraco%207.0.0/) so you don't have to build the code yourself.
Umbraco is a free open source Content Management System built on the ASP.NET platform.
## Building Umbraco from source ##
The easiest way to get started is to run `build/build.bat` which will build both the backoffice (also known as "Belle") and the Umbraco core. You can then easily start debugging from Visual Studio, or if you need to debug Belle you can run `grunt dev` in `src\Umbraco.Web.UI.Client`.
If you're interested in making changes to Belle make sure to read the [Belle ReadMe file](src/Umbraco.Web.UI.Client/README.md). Note that you can always [download a nightly build](http://nightly.umbraco.org/umbraco%207.0.0/) so you don't have to build the code yourself.
## Watch a five minute introduction video ##
+10 -1
View File
@@ -1,14 +1,21 @@
@ECHO OFF
SET release=7.0.0
SET release=7.0.2
SET comment=
SET version=%release%
IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%)
ECHO Building Umbraco %version%
ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %release%
ECHO Installing the Microsoft.Bcl.Build package before anything else, otherwise you'd have to run build.cmd twice
SET nuGetFolder=%CD%\..\src\packages\
..\src\.nuget\NuGet.exe install ..\src\Umbraco.Web.UI\packages.config -OutputDirectory %nuGetFolder%
ECHO Performing MSBuild and producing Umbraco binaries zip files
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build.proj" /p:BUILD_RELEASE=%release% /p:BUILD_COMMENT=%comment%
ECHO Adding dummy files to include in the NuGet package so that empty folders actually get created
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Code\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Data\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\App_Plugins\dummy.txt
@@ -20,9 +27,11 @@ echo This file is only here so that the containing folder will be included in th
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\Views\Partials\dummy.txt
echo This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\Views\MacroPartials\dummy.txt
ECHO Adding Web.config transform files to the NuGet package
ren .\_BuildOutput\WebApp\MacroScripts\Web.config Web.config.transform
ren .\_BuildOutput\WebApp\Views\Web.config Web.config.transform
ECHO Packing the NuGet release files
..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.Core.nuspec -Version %version%
..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.nuspec -Version %version%
+1 -1
View File
@@ -267,7 +267,7 @@
<Message Text="Compiling web project to build\$(BuildFolder)" Importance="high" />
<!-- For UseWPP_CopyWebApplication=True see http://stackoverflow.com/questions/1983575/copywebapplication-with-web-config-transformations -->
<!-- Build the Umbraco.Web.UI project -->
<MSBuild Projects="..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj" Properties="WarningLevel=0;Configuration=$(BuildConfiguration);UseWPP_CopyWebApplication=True;PipelineDependsOnBuild=False;OutDir=$(SolutionBinFolderAbsolutePath);WebProjectOutputDir=$(WebAppFolderAbsolutePath)" Targets="Clean;Build;" BuildInParallel="False" ToolsVersion="4.0" UnloadProjectsOnCompletion="False">
<MSBuild Projects="..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj" Properties="WarningLevel=0;Configuration=$(BuildConfiguration);UseWPP_CopyWebApplication=True;PipelineDependsOnBuild=False;OutDir=$(SolutionBinFolderAbsolutePath);WebProjectOutputDir=$(WebAppFolderAbsolutePath)" Targets="Clean;Rebuild;" BuildInParallel="False" ToolsVersion="4.0" UnloadProjectsOnCompletion="False">
</MSBuild>
<!-- DONE -->
+32
View File
@@ -0,0 +1,32 @@
@ECHO OFF
ECHO Installing Npm NuGet Package
SET nuGetFolder=%CD%\..\src\packages\
ECHO Configured packages folder: %nuGetFolder%
ECHO Current folder: %CD%
%CD%\..\src\.nuget\NuGet.exe install Npm.js -OutputDirectory %nuGetFolder%
for /f "delims=" %%A in ('dir %nuGetFolder%node.js.* /b') do set "nodePath=%nuGetFolder%%%A\"
for /f "delims=" %%A in ('dir %nuGetFolder%npm.js.* /b') do set "npmPath=%nuGetFolder%%%A\tools\"
ECHO Temporarily adding Npm and Node to path
SET oldPath=%PATH%
path=%npmPath%;%nodePath%;%PATH%
SET buildFolder=%CD%
ECHO Change directory to %CD%\..\src\Umbraco.Web.UI.Client\
CD %CD%\..\src\Umbraco.Web.UI.Client\
ECHO Do npm install and the grunt build of Belle
call npm install
call npm install -g grunt-cli
call grunt build
ECHO Reset path to what it was before
path=%oldPath%
ECHO Move back to the build folder
CD %buildFolder%
+2 -4
View File
@@ -26,7 +26,7 @@
<dependency id="SharpZipLib" version="[0.86.0, 1.0.0)" />
<dependency id="MySql.Data" version="[6.6.5]" />
<dependency id="xmlrpcnet" version="[2.5.0, 3.0.0)" />
<dependency id="ClientDependency" version="[1.7.0, 2.0.0)" />
<!--<dependency id="ClientDependency" version="[1.7.0, 2.0.0)" />-->
<dependency id="ClientDependency-Mvc" version="[1.7.0, 2.0.0)" />
<dependency id="AutoMapper" version="[3.0.0, 4.0.0)" />
<dependency id="Newtonsoft.Json" version="[4.5.11, 5.0.0)" />
@@ -35,6 +35,7 @@
<files>
<file src="..\_BuildOutput\WebApp\bin\businesslogic.dll" target="lib\businesslogic.dll" />
<file src="..\_BuildOutput\WebApp\bin\businesslogic.xml" target="lib\businesslogic.xml" />
<file src="..\_BuildOutput\WebApp\bin\ClientDependency.Core.dll" target="lib\ClientDependency.Core.dll" />
<file src="..\_BuildOutput\WebApp\bin\cms.dll" target="lib\cms.dll" />
<file src="..\_BuildOutput\WebApp\bin\cms.xml" target="lib\cms.xml" />
<file src="..\_BuildOutput\WebApp\bin\controls.dll" target="lib\controls.dll" />
@@ -45,9 +46,6 @@
<file src="..\_BuildOutput\WebApp\bin\log4net.dll" target="lib\log4net.dll" />
<file src="..\_BuildOutput\WebApp\bin\Microsoft.ApplicationBlocks.Data.dll" target="lib\Microsoft.ApplicationBlocks.Data.dll" />
<file src="..\_BuildOutput\WebApp\bin\Microsoft.Web.Helpers.dll" target="lib\Microsoft.Web.Helpers.dll" />
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.47x.dll" target="lib\Our.Umbraco.uGoLive.47x.dll" />
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.Checks.dll" target="lib\Our.Umbraco.uGoLive.Checks.dll" />
<file src="..\_BuildOutput\WebApp\bin\Our.Umbraco.uGoLive.dll" target="lib\Our.Umbraco.uGoLive.dll" />
<file src="..\_BuildOutput\WebApp\bin\SQLCE4Umbraco.dll" target="lib\SQLCE4Umbraco.dll" />
<file src="..\_BuildOutput\WebApp\bin\System.Data.SqlServerCe.dll" target="lib\System.Data.SqlServerCe.dll" />
<file src="..\_BuildOutput\WebApp\bin\System.Data.SqlServerCe.Entity.dll" target="lib\System.Data.SqlServerCe.Entity.dll" />
Binary file not shown.
+12 -27
View File
@@ -18,13 +18,13 @@
<ItemGroup Condition=" '$(PackageSources)' == '' ">
<!-- Package sources used to restore packages. By default, registered sources under %APPDATA%\NuGet\NuGet.Config will be used -->
<!-- The official NuGet package source (https://nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
<!-- The official NuGet package source (https://www.nuget.org/api/v2/) will be excluded if package sources are specified and it does not appear in the list -->
<!--
<PackageSource Include="https://nuget.org/api/v2/" />
<PackageSource Include="https://www.nuget.org/api/v2/" />
<PackageSource Include="https://my-nuget-source/nuget/" />
-->
<PackageSource Include="https://nuget.org/api/v2/" />
<PackageSource Include="http://www.myget.org/F/umbracocore/" />
<PackageSource Include="http://www.myget.org/F/umbracocore/" />
</ItemGroup>
<PropertyGroup Condition=" '$(OS)' == 'Windows_NT'">
@@ -41,7 +41,7 @@
<PropertyGroup>
<!-- NuGet command -->
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\nuget.exe</NuGetExePath>
<NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
@@ -50,9 +50,14 @@
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
<RequireConsentSwitch Condition=" $(RequireRestoreConsent) == 'true' ">-RequireConsent</RequireConsentSwitch>
<NonInteractiveSwitch Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' ">-NonInteractive</NonInteractiveSwitch>
<PaddedSolutionDir Condition=" '$(OS)' == 'Windows_NT'">"$(SolutionDir) "</PaddedSolutionDir>
<PaddedSolutionDir Condition=" '$(OS)' != 'Windows_NT' ">"$(SolutionDir)"</PaddedSolutionDir>
<!-- Commands -->
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(RequireConsentSwitch) -solutionDir "$(SolutionDir) "</RestoreCommand>
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
<RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)</RestoreCommand>
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols</BuildCommand>
<!-- We need to ensure packages are restored prior to assembly resolve -->
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
@@ -70,7 +75,6 @@
<Target Name="CheckPrerequisites">
<!-- Raise an error if we're unable to locate nuget.exe -->
<Error Condition="'$(DownloadNuGetExe)' != 'true' AND !Exists('$(NuGetExePath)')" Text="Unable to locate '$(NuGetExePath)'" />
<SetEnvironmentVariable EnvKey="VisualStudioVersion" EnvValue="$(VisualStudioVersion)" Condition=" '$(VisualStudioVersion)' != '' AND '$(OS)' == 'Windows_NT' " />
<!--
Take advantage of MsBuild's build dependency tracking to make sure that we only ever download nuget.exe once.
This effectively acts as a lock that makes sure that the download operation will only happen once and all
@@ -119,7 +123,7 @@
Log.LogMessage("Downloading latest version of NuGet.exe...");
WebClient webClient = new WebClient();
webClient.DownloadFile("https://nuget.org/nuget.exe", OutputFilename);
webClient.DownloadFile("https://www.nuget.org/nuget.exe", OutputFilename);
return true;
}
@@ -131,23 +135,4 @@
</Code>
</Task>
</UsingTask>
<UsingTask TaskName="SetEnvironmentVariable" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<EnvKey ParameterType="System.String" Required="true" />
<EnvValue ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Using Namespace="System" />
<Code Type="Fragment" Language="cs">
<![CDATA[
try {
Environment.SetEnvironmentVariable(EnvKey, EnvValue, System.EnvironmentVariableTarget.Process);
}
catch {
}
]]>
</Code>
</Task>
</UsingTask>
</Project>
@@ -6,7 +6,7 @@ using System.Threading;
namespace Umbraco.Core.Cache
{
internal abstract class DictionaryCacheProdiverBase : ICacheProvider
internal abstract class DictionaryCacheProviderBase : ICacheProvider
{
protected static readonly ReaderWriterLockSlim Locker = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
protected abstract DictionaryCacheWrapper DictionaryCache { get; }
@@ -10,7 +10,7 @@ namespace Umbraco.Core.Cache
/// <summary>
/// A cache provider that caches items in the HttpContext.Items
/// </summary>
internal class HttpRequestCacheProvider : DictionaryCacheProdiverBase
internal class HttpRequestCacheProvider : DictionaryCacheProviderBase
{
private readonly Func<HttpContextBase> _context;
@@ -12,7 +12,7 @@ namespace Umbraco.Core.Cache
/// <summary>
/// A CacheProvider that wraps the logic of the HttpRuntime.Cache
/// </summary>
internal class HttpRuntimeCacheProvider : DictionaryCacheProdiverBase, IRuntimeCacheProvider
internal class HttpRuntimeCacheProvider : DictionaryCacheProviderBase, IRuntimeCacheProvider
{
private readonly System.Web.Caching.Cache _cache;
private readonly DictionaryCacheWrapper _wrapper;
@@ -268,7 +268,7 @@ namespace Umbraco.Core.Configuration
/// <param name="value">Value of the setting to be saved.</param>
internal static void SaveSetting(string key, string value)
{
var fileName = IOHelper.MapPath(string.Format("{0}/appSettings.config", SystemDirectories.Config));
var fileName = IOHelper.MapPath(string.Format("{0}/web.config", SystemDirectories.Root));
var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace);
var appSettings = xml.Root.DescendantsAndSelf("appSettings").Single();
@@ -290,7 +290,7 @@ namespace Umbraco.Core.Configuration
/// <param name="key">Key of the setting to be removed.</param>
internal static void RemoveSetting(string key)
{
var fileName = IOHelper.MapPath(string.Format("{0}/appSettings.config", SystemDirectories.Config));
var fileName = IOHelper.MapPath(string.Format("{0}/web.config", SystemDirectories.Root));
var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace);
var appSettings = xml.Root.DescendantsAndSelf("appSettings").Single();
@@ -697,8 +697,12 @@ namespace Umbraco.Core.Configuration
StartsWithContainer _newReservedList = new StartsWithContainer();
foreach (string reservedUrl in _reservedUrlsCache.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries))
{
if (string.IsNullOrWhiteSpace(reservedUrl))
continue;
//resolves the url to support tilde chars
string reservedUrlTrimmed = IOHelper.ResolveUrl(reservedUrl).Trim().ToLower();
string reservedUrlTrimmed = IOHelper.ResolveUrl(reservedUrl.Trim()).Trim().ToLower();
if (reservedUrlTrimmed.Length > 0)
_newReservedList.Add(reservedUrlTrimmed);
}
@@ -706,8 +710,11 @@ namespace Umbraco.Core.Configuration
foreach (string reservedPath in _reservedPathsCache.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries))
{
bool trimEnd = !reservedPath.EndsWith("/");
if (string.IsNullOrWhiteSpace(reservedPath))
continue;
//resolves the url to support tilde chars
string reservedPathTrimmed = IOHelper.ResolveUrl(reservedPath).Trim().ToLower();
string reservedPathTrimmed = IOHelper.ResolveUrl(reservedPath.Trim()).Trim().ToLower();
if (reservedPathTrimmed.Length > 0)
_newReservedList.Add(reservedPathTrimmed + (reservedPathTrimmed.EndsWith("/") ? "" : "/"));
@@ -27,7 +27,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
return new OptionalInnerTextConfigurationElement<bool>(
(InnerTextConfigurationElement<bool>)this["ResolveUrlsFromTextString"],
//set the default
true);
false);
}
}
@@ -10,6 +10,8 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
bool RemoveDoubleDashes { get; }
bool ConvertUrlsToAscii { get; }
IEnumerable<IChar> CharCollection { get; }
}
}
@@ -121,6 +121,11 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
get { return UrlReplacing.RemoveDoubleDashes; }
}
bool IRequestHandlerSection.ConvertUrlsToAscii
{
get { return UrlReplacing.ConvertUrlsToAscii; }
}
IEnumerable<IChar> IRequestHandlerSection.CharCollection
{
get { return UrlReplacing.CharCollection; }
@@ -36,7 +36,7 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
return new OptionalInnerTextConfigurationElement<string>(
(InnerTextConfigurationElement<string>)this["authCookieName"],
//set the default
"UMB_UCONTEXT");
Constants.Web.AuthCookieName);
}
}
@@ -11,6 +11,12 @@ namespace Umbraco.Core.Configuration.UmbracoSettings
get { return (bool) base["removeDoubleDashes"]; }
}
[ConfigurationProperty("toAscii", DefaultValue = false)]
internal bool ConvertUrlsToAscii
{
get { return (bool)base["toAscii"]; }
}
[ConfigurationCollection(typeof(CharCollection), AddItemName = "char")]
[ConfigurationProperty("", IsDefaultCollection = true)]
internal CharCollection CharCollection
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Configuration
{
public class UmbracoVersion
{
private static readonly Version Version = new Version("7.0.0");
private static readonly Version Version = new Version("7.0.2");
/// <summary>
/// Gets the current version of Umbraco.
+80 -125
View File
@@ -171,131 +171,84 @@ namespace Umbraco.Core
public const string FailedPasswordAttemptsLabel = "Failed Password Attempts";
internal static Dictionary<string, PropertyType>
StandardPropertyTypeStubs = new Dictionary<string, PropertyType>
{
{
Comments,
new PropertyType(
PropertyEditors
.TextboxMultipleAlias,
DataTypeDatabaseType
.Ntext)
{
Alias = Comments,
Name =
CommentsLabel
}
},
{
FailedPasswordAttempts,
new PropertyType(
PropertyEditors
.IntegerAlias,
DataTypeDatabaseType
.Integer)
{
Alias =
FailedPasswordAttempts,
Name =
FailedPasswordAttemptsLabel
}
},
{
IsApproved,
new PropertyType(
PropertyEditors
.TrueFalseAlias,
DataTypeDatabaseType
.Integer)
{
Alias = IsApproved,
Name =
IsApprovedLabel
}
},
{
IsLockedOut,
new PropertyType(
PropertyEditors
.TrueFalseAlias,
DataTypeDatabaseType
.Integer)
{
Alias =
IsLockedOut,
Name =
IsLockedOutLabel
}
},
{
LastLockoutDate,
new PropertyType(
PropertyEditors.DateAlias,
DataTypeDatabaseType
.Date)
{
Alias =
LastLockoutDate,
Name =
LastLockoutDateLabel
}
},
{
LastLoginDate,
new PropertyType(
PropertyEditors.DateAlias,
DataTypeDatabaseType
.Date)
{
Alias =
LastLoginDate,
Name =
LastLoginDateLabel
}
},
{
LastPasswordChangeDate,
new PropertyType(
PropertyEditors.DateAlias,
DataTypeDatabaseType
.Date)
{
Alias =
LastPasswordChangeDate,
Name =
LastPasswordChangeDateLabel
}
},
{
PasswordAnswer,
new PropertyType(
PropertyEditors
.TextboxAlias,
DataTypeDatabaseType
.Nvarchar)
{
Alias =
PasswordAnswer,
Name =
PasswordAnswerLabel
}
},
{
PasswordQuestion,
new PropertyType(
PropertyEditors
.TextboxAlias,
DataTypeDatabaseType
.Nvarchar)
{
Alias =
PasswordQuestion,
Name =
PasswordQuestionLabel
}
}
};
internal static Dictionary<string, PropertyType> GetStandardPropertyTypeStubs()
{
return new Dictionary<string, PropertyType>
{
{
Comments,
new PropertyType(PropertyEditors.TextboxMultipleAlias, DataTypeDatabaseType.Ntext)
{
Alias = Comments,
Name = CommentsLabel
}
},
{
FailedPasswordAttempts,
new PropertyType(PropertyEditors.IntegerAlias, DataTypeDatabaseType.Integer)
{
Alias = FailedPasswordAttempts,
Name = FailedPasswordAttemptsLabel
}
},
{
IsApproved,
new PropertyType(PropertyEditors.TrueFalseAlias, DataTypeDatabaseType.Integer)
{
Alias = IsApproved,
Name = IsApprovedLabel
}
},
{
IsLockedOut,
new PropertyType(PropertyEditors.TrueFalseAlias, DataTypeDatabaseType.Integer)
{
Alias = IsLockedOut,
Name = IsLockedOutLabel
}
},
{
LastLockoutDate,
new PropertyType(PropertyEditors.DateAlias, DataTypeDatabaseType.Date)
{
Alias = LastLockoutDate,
Name = LastLockoutDateLabel
}
},
{
LastLoginDate,
new PropertyType(PropertyEditors.DateAlias, DataTypeDatabaseType.Date)
{
Alias = LastLoginDate,
Name = LastLoginDateLabel
}
},
{
LastPasswordChangeDate,
new PropertyType(PropertyEditors.DateAlias, DataTypeDatabaseType.Date)
{
Alias = LastPasswordChangeDate,
Name = LastPasswordChangeDateLabel
}
},
{
PasswordAnswer,
new PropertyType(PropertyEditors.TextboxAlias, DataTypeDatabaseType.Nvarchar)
{
Alias = PasswordAnswer,
Name = PasswordAnswerLabel
}
},
{
PasswordQuestion,
new PropertyType(PropertyEditors.TextboxAlias, DataTypeDatabaseType.Nvarchar)
{
Alias = PasswordQuestion,
Name = PasswordQuestionLabel
}
}
};
}
}
/// <summary>
@@ -307,6 +260,8 @@ namespace Umbraco.Core
/// MemberType alias for default member type.
/// </summary>
public const string Member = "Member";
public const string SystemDefaultProtectType = "_umbracoSystemDefaultProtectType";
}
/// <summary>
+22
View File
@@ -0,0 +1,22 @@
namespace Umbraco.Core
{
public static partial class Constants
{
/// <summary>
/// Defines the identifiers for Umbraco system nodes.
/// </summary>
public static class Web
{
/// <summary>
/// The preview cookie name
/// </summary>
public const string PreviewCookieName = "UMB_PREVIEW";
/// <summary>
/// The auth cookie name
/// </summary>
public const string AuthCookieName = "UMB_UCONTEXT";
}
}
}
+11 -16
View File
@@ -64,7 +64,7 @@ namespace Umbraco.Core
InitializeProfilerResolver();
_timer = DisposableTimer.DebugDuration<CoreBootManager>("Umbraco application starting", "Umbraco application startup complete");
CreateApplicationCache();
//Create the legacy prop-eds mapping
@@ -223,10 +223,7 @@ namespace Umbraco.Core
throw new InvalidOperationException("The boot manager has already been completed");
FreezeResolution();
//stop the timer and log the output
_timer.Dispose();
//call OnApplicationStarting of each application events handler
ApplicationEventsResolver.Current.ApplicationEventHandlers
.ForEach(x => x.OnApplicationStarted(UmbracoApplication, ApplicationContext));
@@ -244,6 +241,9 @@ namespace Umbraco.Core
// we're ready to serve content!
ApplicationContext.IsReady = true;
//stop the timer and log the output
_timer.Dispose();
return this;
}
@@ -268,7 +268,9 @@ namespace Umbraco.Core
{
new Lazy<Type>(() => typeof (RequiredManifestValueValidator)),
new Lazy<Type>(() => typeof (RegexValidator)),
new Lazy<Type>(() => typeof (DelimitedManifestValueValidator))
new Lazy<Type>(() => typeof (DelimitedManifestValueValidator)),
new Lazy<Type>(() => typeof (EmailValidator)),
new Lazy<Type>(() => typeof (IntegerValidator)),
});
//by default we'll use the standard configuration based sync
@@ -322,17 +324,10 @@ namespace Umbraco.Core
// fixme - why not use the following syntax?
//PluginManager.Current.ResolveTypes<IPropertyValueConverter>());
// use the new DefaultShortStringHelper but sort-of remain compatible
// - use UmbracoSettings UrlReplaceCharacters
// - allow underscores in terms, allow leading digits
// use the new DefaultShortStringHelper
ShortStringHelperResolver.Current = new ShortStringHelperResolver(
new DefaultShortStringHelper()
.WithConfig(CleanStringType.Url, DefaultShortStringHelper.ApplyUrlReplaceCharacters,
allowUnderscoreInTerm: true, allowLeadingDigits: true));
// that was the old one
//ShortStringHelperResolver.Current = new ShortStringHelperResolver(
// new LegacyShortStringHelper());
//new LegacyShortStringHelper());
new DefaultShortStringHelper().WithDefaultConfig());
UrlSegmentProviderResolver.Current = new UrlSegmentProviderResolver(
typeof (DefaultUrlSegmentProvider));
+123 -59
View File
@@ -250,7 +250,7 @@ namespace Umbraco.Core
_connectionString = connectionString;
_providerName = providerName;
var fileName = IOHelper.MapPath(string.Format("{0}/connectionStrings.config", SystemDirectories.Config));
var fileName = IOHelper.MapPath(string.Format("{0}/web.config", SystemDirectories.Root));
var xml = XDocument.Load(fileName, LoadOptions.PreserveWhitespace);
var connectionstrings = xml.Root.DescendantsAndSelf("connectionStrings").Single();
@@ -424,24 +424,19 @@ namespace Umbraco.Core
return _result;
}
internal Result CreateDatabaseSchemaAndDataOrUpgrade()
internal Result CreateDatabaseSchemaAndData()
{
if (_configured == false || (string.IsNullOrEmpty(_connectionString) || string.IsNullOrEmpty(ProviderName)))
var readyForInstall = CheckReadyForInstall();
if (readyForInstall.Success == false)
{
return new Result
{
Message =
"Database configuration is invalid. Please check that the entered database exists and that the provided username and password has write access to the database.",
Success = false,
Percentage = "10"
};
return readyForInstall.Result;
}
try
{
LogHelper.Info<DatabaseContext>("Database configuration status: Started");
var message = string.Empty;
string message;
var database = new UmbracoDatabase(_connectionString, ProviderName);
var supportsCaseInsensitiveQueries = SqlSyntaxContext.SqlSyntaxProvider.SupportsCaseInsensitiveQueries(database);
@@ -456,50 +451,73 @@ namespace Umbraco.Core
return new Result { Message = message, Success = false, Percentage = "15" };
}
else if (supportsCaseInsensitiveQueries == null)
{
message = "<p>&nbsp;</p><p>Warning! Could not check if your database type supports case insensitive queries. <br />We currently do not support these databases that do not support case insensitive queries.</p>" +
"<p>You can check this by looking for the following setting in your my.ini file in your MySQL installation directory:</p>" +
"<pre>lower_case_table_names=1</pre><br />" +
"<p>Note: Make sure to check with your hosting provider if they support case insensitive queries as well.</p>" +
"<p>For more technical information on case sensitivity in MySQL, have a look at " +
"<a href='http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html'>the documentation on the subject</a></p>";
}
else
{
if (SqlSyntaxContext.SqlSyntaxProvider.GetType() == typeof(MySqlSyntaxProvider))
{
message = "<p>&nbsp;</p><p>Congratulations, the database step ran successfully!</p>" +
"<p>Note: You're using MySQL and the database instance you're connecting to seems to support case insensitive queries.</p>" +
"<p>However, your hosting provider may not support this option. Umbraco does not currently support MySQL installs that do not support case insensitive queries</p>" +
"<p>Make sure to check with your hosting provider if they support case insensitive queries as well.</p>" +
"<p>They can check this by looking for the following setting in the my.ini file in their MySQL installation directory:</p>" +
"<pre>lower_case_table_names=1</pre><br />" +
"<p>For more technical information on case sensitivity in MySQL, have a look at " +
"<a href='http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html'>the documentation on the subject</a></p>";
}
}
message = GetResultMessageForMySql(supportsCaseInsensitiveQueries);
var schemaResult = ValidateDatabaseSchema();
var installedVersion = schemaResult.DetermineInstalledVersion();
//If Configuration Status is empty and the determined version is "empty" its a new install - otherwise upgrade the existing
if (string.IsNullOrEmpty(GlobalSettings.ConfigurationStatus) && installedVersion.Equals(new Version(0, 0, 0)))
{
database.CreateDatabaseSchema();
message = message + "<p>Installation completed!</p>";
//now that everything is done, we need to determine the version of SQL server that is executing
LogHelper.Info<DatabaseContext>("Database configuration status: " + message);
return new Result { Message = message, Success = true, Percentage = "100" };
}
else
{
var configuredVersion = string.IsNullOrEmpty(GlobalSettings.ConfigurationStatus)
//we need to do an upgrade so return a new status message and it will need to be done during the next step
LogHelper.Info<DatabaseContext>("Database requires upgrade");
message = "<p>Upgrading database, this may take some time...</p>";
return new Result
{
RequiresUpgrade = true,
Message = message,
Success = true,
Percentage = "30"
};
}
catch (Exception ex)
{
return HandleInstallException(ex);
}
}
/// <summary>
/// This assumes all of the previous checks are done!
/// </summary>
/// <returns></returns>
internal Result UpgradeSchemaAndData()
{
var readyForInstall = CheckReadyForInstall();
if (readyForInstall.Success == false)
{
return readyForInstall.Result;
}
try
{
LogHelper.Info<DatabaseContext>("Database upgrade started");
var database = new UmbracoDatabase(_connectionString, ProviderName);
var supportsCaseInsensitiveQueries = SqlSyntaxContext.SqlSyntaxProvider.SupportsCaseInsensitiveQueries(database);
var message = GetResultMessageForMySql(supportsCaseInsensitiveQueries);
var schemaResult = ValidateDatabaseSchema();
var installedVersion = schemaResult.DetermineInstalledVersion();
//DO the upgrade!
var configuredVersion = string.IsNullOrEmpty(GlobalSettings.ConfigurationStatus)
? installedVersion
: new Version(GlobalSettings.ConfigurationStatus);
var targetVersion = UmbracoVersion.Current;
var runner = new MigrationRunner(configuredVersion, targetVersion, GlobalSettings.UmbracoMigrationName);
var upgraded = runner.Execute(database, true);
message = message + "<p>Upgrade completed!</p>";
}
var targetVersion = UmbracoVersion.Current;
var runner = new MigrationRunner(configuredVersion, targetVersion, GlobalSettings.UmbracoMigrationName);
var upgraded = runner.Execute(database, true);
message = message + "<p>Upgrade completed!</p>";
//now that everything is done, we need to determine the version of SQL server that is executing
@@ -509,26 +527,72 @@ namespace Umbraco.Core
}
catch (Exception ex)
{
LogHelper.Info<DatabaseContext>("Database configuration failed with the following error and stack trace: " + ex.Message + "\n" + ex.StackTrace);
if (_result != null)
{
LogHelper.Info<DatabaseContext>("The database schema validation produced the following summary: \n" + _result.GetSummary());
}
return new Result
{
Message =
"The database configuration failed with the following message: " + ex.Message +
"\n Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')",
Success = false,
Percentage = "90"
};
return HandleInstallException(ex);
}
}
private string GetResultMessageForMySql(bool? supportsCaseInsensitiveQueries)
{
if (supportsCaseInsensitiveQueries == null)
{
return "<p>&nbsp;</p><p>Warning! Could not check if your database type supports case insensitive queries. <br />We currently do not support these databases that do not support case insensitive queries.</p>" +
"<p>You can check this by looking for the following setting in your my.ini file in your MySQL installation directory:</p>" +
"<pre>lower_case_table_names=1</pre><br />" +
"<p>Note: Make sure to check with your hosting provider if they support case insensitive queries as well.</p>" +
"<p>For more technical information on case sensitivity in MySQL, have a look at " +
"<a href='http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html'>the documentation on the subject</a></p>";
}
if (SqlSyntaxContext.SqlSyntaxProvider.GetType() == typeof(MySqlSyntaxProvider))
{
return "<p>&nbsp;</p><p>Congratulations, the database step ran successfully!</p>" +
"<p>Note: You're using MySQL and the database instance you're connecting to seems to support case insensitive queries.</p>" +
"<p>However, your hosting provider may not support this option. Umbraco does not currently support MySQL installs that do not support case insensitive queries</p>" +
"<p>Make sure to check with your hosting provider if they support case insensitive queries as well.</p>" +
"<p>They can check this by looking for the following setting in the my.ini file in their MySQL installation directory:</p>" +
"<pre>lower_case_table_names=1</pre><br />" +
"<p>For more technical information on case sensitivity in MySQL, have a look at " +
"<a href='http://dev.mysql.com/doc/refman/5.0/en/identifier-case-sensitivity.html'>the documentation on the subject</a></p>";
}
return string.Empty;
}
private Attempt<Result> CheckReadyForInstall()
{
if (_configured == false || (string.IsNullOrEmpty(_connectionString) || string.IsNullOrEmpty(ProviderName)))
{
return Attempt.Fail(new Result
{
Message =
"Database configuration is invalid. Please check that the entered database exists and that the provided username and password has write access to the database.",
Success = false,
Percentage = "10"
});
}
return Attempt<Result>.Succeed();
}
private Result HandleInstallException(Exception ex)
{
LogHelper.Info<DatabaseContext>("Database configuration failed with the following error and stack trace: " + ex.Message + "\n" + ex.StackTrace);
if (_result != null)
{
LogHelper.Info<DatabaseContext>("The database schema validation produced the following summary: \n" + _result.GetSummary());
}
return new Result
{
Message =
"The database configuration failed with the following message: " + ex.Message +
"\n Please check log file for additional information (can be found in '/App_Data/Logs/UmbracoTraceLog.txt')",
Success = false,
Percentage = "90"
};
}
internal class Result
{
public bool RequiresUpgrade { get; set; }
public string Message { get; set; }
public bool Success { get; set; }
public string Percentage { get; set; }
+6 -6
View File
@@ -231,7 +231,7 @@ namespace Umbraco.Core
/// <returns>The contains key ignore case.</returns>
public static bool ContainsKeyIgnoreCase<TValue>(this IDictionary<string, TValue> dictionary, string key)
{
return dictionary.Keys.Any(i => i.Equals(key, StringComparison.CurrentCultureIgnoreCase));
return dictionary.Keys.InvariantContains(key);
}
/// <summary>
@@ -257,9 +257,9 @@ namespace Umbraco.Core
/// <param name="key">The key.</param>
/// <typeparam name="TValue">The type</typeparam>
/// <returns>The entry</returns>
public static TValue GetEntryIgnoreCase<TValue>(this IDictionary<string, TValue> dictionary, string key)
public static TValue GetValueIgnoreCase<TValue>(this IDictionary<string, TValue> dictionary, string key)
{
return dictionary.GetEntryIgnoreCase(key, default(TValue));
return dictionary.GetValueIgnoreCase(key, default(TValue));
}
/// <summary>The get entry ignore case.</summary>
@@ -268,11 +268,11 @@ namespace Umbraco.Core
/// <param name="defaultValue">The default value.</param>
/// <typeparam name="TValue">The type</typeparam>
/// <returns>The entry</returns>
public static TValue GetEntryIgnoreCase<TValue>(this IDictionary<string, TValue> dictionary, string key, TValue defaultValue)
public static TValue GetValueIgnoreCase<TValue>(this IDictionary<string, TValue> dictionary, string key, TValue defaultValue)
{
key = dictionary.Keys.Where(i => i.Equals(key, StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault();
key = dictionary.Keys.FirstOrDefault(i => i.InvariantEquals(key));
return !key.IsNullOrWhiteSpace()
return key.IsNullOrWhiteSpace() == false
? dictionary[key]
: defaultValue;
}
@@ -0,0 +1,52 @@
using System.Collections.Generic;
using System.Xml.Linq;
namespace Umbraco.Core.Events
{
public class ExportEventArgs<TEntity> : CancellableObjectEventArgs<IEnumerable<TEntity>>
{
/// <summary>
/// Constructor accepting a single entity instance
/// </summary>
/// <param name="eventObject"></param>
/// <param name="xml"></param>
/// <param name="canCancel"></param>
public ExportEventArgs(TEntity eventObject, XElement xml, bool canCancel)
: base(new List<TEntity> { eventObject }, canCancel)
{
Xml = xml;
}
/// <summary>
/// Constructor accepting a single entity instance
/// and cancellable by default
/// </summary>
/// <param name="eventObject"></param>
/// <param name="elementName"></param>
public ExportEventArgs(TEntity eventObject, string elementName) : base(new List<TEntity> {eventObject}, true)
{
Xml = new XElement(elementName);
}
protected ExportEventArgs(IEnumerable<TEntity> eventObject, bool canCancel) : base(eventObject, canCancel)
{
}
protected ExportEventArgs(IEnumerable<TEntity> eventObject) : base(eventObject)
{
}
/// <summary>
/// Returns all entities that were exported during the operation
/// </summary>
public IEnumerable<TEntity> ExportedEntities
{
get { return EventObject; }
}
/// <summary>
/// Returns the xml relating to the export event
/// </summary>
public XElement Xml { get; private set; }
}
}
@@ -0,0 +1,50 @@
using System.Collections.Generic;
using System.Xml.Linq;
namespace Umbraco.Core.Events
{
public class ImportEventArgs<TEntity> : CancellableObjectEventArgs<IEnumerable<TEntity>>
{
/// <summary>
/// Constructor accepting an XElement with the xml being imported
/// </summary>
/// <param name="xml"></param>
public ImportEventArgs(XElement xml) : base(new List<TEntity>(), true)
{
Xml = xml;
}
/// <summary>
/// Constructor accepting a list of entities and an XElement with the imported xml
/// </summary>
/// <param name="eventObject"></param>
/// <param name="xml"></param>
/// <param name="canCancel"></param>
public ImportEventArgs(IEnumerable<TEntity> eventObject, XElement xml, bool canCancel)
: base(eventObject, canCancel)
{
Xml = xml;
}
protected ImportEventArgs(IEnumerable<TEntity> eventObject, bool canCancel) : base(eventObject, canCancel)
{
}
protected ImportEventArgs(IEnumerable<TEntity> eventObject) : base(eventObject)
{
}
/// <summary>
/// Returns all entities that were imported during the operation
/// </summary>
public IEnumerable<TEntity> ImportedEntities
{
get { return EventObject; }
}
/// <summary>
/// Returns the xml relating to the import event
/// </summary>
public XElement Xml { get; private set; }
}
}
-3
View File
@@ -49,8 +49,5 @@ namespace Umbraco.Core.Events
{
get { return EventObject; }
}
}
}
+14 -1
View File
@@ -1,4 +1,5 @@
using System.IO;
using System;
using System.IO;
using Umbraco.Core.CodeAnnotations;
namespace Umbraco.Core.IO
@@ -30,5 +31,17 @@ namespace Umbraco.Core.IO
{
return Path.GetFileName(fs.GetFullPath(path));
}
//TODO: Currently this is the only way to do this
internal static void CreateFolder(this IFileSystem fs, string folderPath)
{
var path = fs.GetRelativePath(folderPath);
var tempFile = Path.Combine(path, Guid.NewGuid().ToString("N") + ".tmp");
using (var s = new MemoryStream())
{
fs.AddFile(tempFile, s);
}
fs.DeleteFile(tempFile);
}
}
}
+2
View File
@@ -5,6 +5,8 @@ using Umbraco.Core.CodeAnnotations;
namespace Umbraco.Core.IO
{
//TODO: There is no way to create a directory here without creating a file in a directory and then deleting it
public interface IFileSystem
{
IEnumerable<string> GetDirectories(string path);
+1 -1
View File
@@ -43,7 +43,7 @@ namespace Umbraco.Core.IO
//Replaces tildes with the root dir
public static string ResolveUrl(string virtualPath)
{
if (virtualPath.StartsWith("~"))
if (virtualPath.StartsWith("~"))
return virtualPath.Replace("~", SystemDirectories.Root).Replace("//", "/");
else if (Uri.IsWellFormedUriString(virtualPath, UriKind.Absolute))
return virtualPath;
+34 -6
View File
@@ -2,6 +2,7 @@ using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using HtmlAgilityPack;
namespace Umbraco.Core.Macros
{
@@ -10,8 +11,8 @@ namespace Umbraco.Core.Macros
/// </summary>
internal class MacroTagParser
{
private static readonly Regex MacroRteContent = new Regex(@"(<div.*?>.*?<!--\s*?)(<\?UMBRACO_MACRO.*?/>)(.*?</div>)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
private static readonly Regex MacroPersistedFormat = new Regex(@"(<\?UMBRACO_MACRO macroAlias=[""'](\w+?)[""'].+?)(?:/>|>.*?</\?UMBRACO_MACRO>)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
private static readonly Regex MacroRteContent = new Regex(@"(<!--\s*?)(<\?UMBRACO_MACRO.*?/>)(\s*?-->)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
private static readonly Regex MacroPersistedFormat = new Regex(@"(<\?UMBRACO_MACRO macroAlias=[""']([\w\.]+?)[""'].+?)(?:/>|>.*?</\?UMBRACO_MACRO>)", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.Singleline);
/// <summary>
/// This formats the persisted string to something useful for the rte so that the macro renders properly since we
@@ -38,8 +39,8 @@ namespace Umbraco.Core.Macros
//<div class="umb-macro-holder myMacro mceNonEditable">
var alias = match.Groups[2].Value;
var sb = new StringBuilder("<div class=\"umb-macro-holder ");
sb.Append(alias);
sb.Append(" mceNonEditable\"");
//sb.Append(alias.ToSafeAlias());
sb.Append("mceNonEditable\"");
foreach (var htmlAttribute in htmlAttributes)
{
sb.Append(" ");
@@ -88,7 +89,34 @@ namespace Umbraco.Core.Macros
/// </remarks>
internal static string FormatRichTextContentForPersistence(string rteContent)
{
return MacroRteContent.Replace(rteContent, match =>
if (string.IsNullOrEmpty(rteContent))
{
return string.Empty;
}
var html = new HtmlDocument();
html.LoadHtml(rteContent);
//get all the comment nodes we want
var commentNodes = html.DocumentNode.SelectNodes("//comment()[contains(., '<?UMBRACO_MACRO')]");
if (commentNodes == null)
{
//There are no macros found, just return the normal content
return rteContent;
}
//replace each containing parent <div> with the comment node itself.
foreach (var c in commentNodes)
{
var div = c.ParentNode;
var divContainer = div.ParentNode;
divContainer.ReplaceChild(c, div);
}
var parsed = html.DocumentNode.OuterHtml;
//now replace all the <!-- and --> with nothing
return MacroRteContent.Replace(parsed, match =>
{
if (match.Groups.Count >= 3)
{
@@ -96,7 +124,7 @@ namespace Umbraco.Core.Macros
return match.Groups[2].Value;
}
//replace with nothing if we couldn't find the syntax for whatever reason
return "";
return string.Empty;
});
}
+47 -12
View File
@@ -25,6 +25,15 @@ namespace Umbraco.Core.Media
return codec.MimeType;
}
/// <summary>
/// Creates the thumbnails if the image is larger than all of the specified ones.
/// </summary>
/// <param name="fs"></param>
/// <param name="fileName"></param>
/// <param name="extension"></param>
/// <param name="originalImage"></param>
/// <param name="additionalThumbSizes"></param>
/// <returns></returns>
internal static IEnumerable<ResizedImage> GenerateMediaThumbnails(
IFileSystem fs,
string fileName,
@@ -32,22 +41,33 @@ namespace Umbraco.Core.Media
Image originalImage,
IEnumerable<int> additionalThumbSizes)
{
// Make default thumbnails
var thumbs = new List<ResizedImage>
{
Resize(fs, fileName, extension, 100, "thumb", originalImage),
Resize(fs, fileName, extension, 500, "big-thumb", originalImage)
};
//make custom ones
foreach (var thumb in additionalThumbSizes.Where(x => x > 0).Distinct())
var result = new List<ResizedImage>();
var allSizes = new List<int> {100, 500};
allSizes.AddRange(additionalThumbSizes.Where(x => x > 0).Distinct());
foreach (var s in allSizes)
{
thumbs.Add(Resize(fs, fileName, extension, thumb, string.Format("thumb_{0}", thumb), originalImage));
if (originalImage.Width >= s && originalImage.Height >= s)
{
result.Add(Resize(fs, fileName, extension, s, "thumb", originalImage));
}
}
return thumbs;
return result;
}
/// <summary>
/// Performs an image resize
/// </summary>
/// <param name="fileSystem"></param>
/// <param name="path"></param>
/// <param name="extension"></param>
/// <param name="maxWidthHeight"></param>
/// <param name="fileNameAddition"></param>
/// <param name="originalImage"></param>
/// <returns></returns>
private static ResizedImage Resize(IFileSystem fileSystem, string path, string extension, int maxWidthHeight, string fileNameAddition, Image originalImage)
{
var fileNameThumb = String.IsNullOrEmpty(fileNameAddition)
@@ -105,8 +125,23 @@ namespace Umbraco.Core.Media
{
using (var g = Graphics.FromImage(bp))
{
g.SmoothingMode = SmoothingMode.HighQuality;
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
//if the image size is rather large we cannot use the best quality interpolation mode
// because we'll get out of mem exceptions. So we'll detect how big the image is and use
// the mid quality interpolation mode when the image size exceeds our max limit.
if (image.Width > 5000 || image.Height > 5000)
{
//use mid quality
g.InterpolationMode = InterpolationMode.Bilinear;
}
else
{
//use best quality
g.InterpolationMode = InterpolationMode.HighQualityBicubic;
}
g.SmoothingMode = SmoothingMode.HighQuality;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
g.CompositingQuality = CompositingQuality.HighQuality;
+19 -14
View File
@@ -618,7 +618,7 @@ namespace Umbraco.Core.Models
/// <returns>Xml representation of the passed in <see cref="IContent"/></returns>
internal static XElement ToDeepXml(this IContent content)
{
return ApplicationContext.Current.Services.PackagingService.Export(content, true);
return ApplicationContext.Current.Services.PackagingService.Export(content, true, raiseEvents: false);
}
/// <summary>
@@ -628,7 +628,7 @@ namespace Umbraco.Core.Models
/// <returns>Xml representation of the passed in <see cref="IContent"/></returns>
public static XElement ToXml(this IContent content)
{
return ApplicationContext.Current.Services.PackagingService.Export(content);
return ApplicationContext.Current.Services.PackagingService.Export(content, raiseEvents: false);
}
/// <summary>
@@ -638,24 +638,19 @@ namespace Umbraco.Core.Models
/// <returns>Xml representation of the passed in <see cref="IContent"/></returns>
public static XElement ToXml(this IMedia media)
{
return ApplicationContext.Current.Services.PackagingService.Export(media);
}
internal static XElement ToDeepXml(this IMedia media)
{
return ApplicationContext.Current.Services.PackagingService.Export(media, true);
return ApplicationContext.Current.Services.PackagingService.Export(media, raiseEvents: false);
}
/// <summary>
/// Creates the xml representation for the <see cref="IMedia"/> object
/// Creates the full xml representation for the <see cref="IMedia"/> object and all of it's descendants
/// </summary>
/// <param name="member"><see cref="IContent"/> to generate xml for</param>
/// <returns>Xml representation of the passed in <see cref="IContent"/></returns>
public static XElement ToXml(this IMember member)
/// <param name="media"><see cref="IMedia"/> to generate xml for</param>
/// <returns>Xml representation of the passed in <see cref="IMedia"/></returns>
internal static XElement ToDeepXml(this IMedia media)
{
return ApplicationContext.Current.Services.PackagingService.Export(member);
return ApplicationContext.Current.Services.PackagingService.Export(media, true, raiseEvents: false);
}
/// <summary>
/// Creates the xml representation for the <see cref="IContent"/> object
/// </summary>
@@ -668,6 +663,16 @@ namespace Umbraco.Core.Models
//If current IContent is published we should get latest unpublished version
return content.ToXml();
}
/// <summary>
/// Creates the xml representation for the <see cref="IMember"/> object
/// </summary>
/// <param name="member"><see cref="IMember"/> to generate xml for</param>
/// <returns>Xml representation of the passed in <see cref="IContent"/></returns>
public static XElement ToXml(this IMember member)
{
return ((PackagingService)(ApplicationContext.Current.Services.PackagingService)).Export(member);
}
#endregion
}
+3 -2
View File
@@ -43,6 +43,7 @@ namespace Umbraco.Core.Models
_allowedContentTypes = new List<ContentTypeSort>();
_propertyGroups = new PropertyGroupCollection();
_propertyTypes = new PropertyTypeCollection();
_propertyTypes.CollectionChanged += PropertyTypesChanged;
_additionalData = new Dictionary<string, object>();
}
@@ -54,6 +55,7 @@ namespace Umbraco.Core.Models
_allowedContentTypes = new List<ContentTypeSort>();
_propertyGroups = new PropertyGroupCollection();
_propertyTypes = new PropertyTypeCollection();
_propertyTypes.CollectionChanged += PropertyTypesChanged;
_additionalData = new Dictionary<string, object>();
}
@@ -433,8 +435,7 @@ namespace Umbraco.Core.Models
{
if (PropertyTypeExists(propertyType.Alias) == false)
{
_propertyTypes.Add(propertyType);
_propertyTypes.CollectionChanged += PropertyTypesChanged;
_propertyTypes.Add(propertyType);
return true;
}
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Reflection;
using System.Runtime.Serialization;
using Umbraco.Core.Models.EntityBase;
using Umbraco.Core.Persistence.Mappers;
namespace Umbraco.Core.Models
{
+29 -5
View File
@@ -6,6 +6,16 @@ using Umbraco.Core.Models.EntityBase;
namespace Umbraco.Core.Models
{
internal sealed class Folder : Entity
{
public Folder(string folderPath)
{
Path = folderPath;
}
public string Path { get; set; }
}
/// <summary>
/// Represents an abstract file which provides basic functionality for a File with an Alias and Name
/// </summary>
@@ -23,6 +33,8 @@ namespace Umbraco.Core.Models
private static readonly PropertyInfo ContentSelector = ExpressionHelper.GetPropertyInfo<File, string>(x => x.Content);
private static readonly PropertyInfo PathSelector = ExpressionHelper.GetPropertyInfo<File, string>(x => x.Path);
private string _alias;
private string _name;
/// <summary>
/// Gets or sets the Name of the File including extension
@@ -32,7 +44,11 @@ namespace Umbraco.Core.Models
{
get
{
return new FileInfo(Path).Name;
if (_name == null)
{
_name = System.IO.Path.GetFileName(Path);
}
return _name;
}
}
@@ -44,10 +60,14 @@ namespace Umbraco.Core.Models
{
get
{
var fileInfo = new FileInfo(Path);
var name = fileInfo.Name;
int lastIndexOf = name.LastIndexOf(".", StringComparison.InvariantCultureIgnoreCase);
return name.Substring(0, lastIndexOf);
if (_alias == null)
{
var name = System.IO.Path.GetFileName(Path);
if (name == null) return string.Empty;
var lastIndexOf = name.LastIndexOf(".", StringComparison.InvariantCultureIgnoreCase);
_alias = name.Substring(0, lastIndexOf);
}
return _alias;
}
}
@@ -60,6 +80,10 @@ namespace Umbraco.Core.Models
get { return _path; }
set
{
//reset
_alias = null;
_name = null;
SetPropertyValueAndDetectChanges(o =>
{
_path = value;
+2 -98
View File
@@ -1,106 +1,10 @@
using System;
using Umbraco.Core.Models.Membership;
namespace Umbraco.Core.Models
{
public interface IMember : IContentBase
public interface IMember : IContentBase, IMembershipUser
{
/// <summary>
/// Gets or sets the Username
/// </summary>
string Username { get; set; }
/// <summary>
/// Gets or sets the Email
/// </summary>
string Email { get; set; }
/// <summary>
/// Gets or sets the Password
/// </summary>
string Password { get; set; }
/// <summary>
/// Gets or sets the Password Question
/// </summary>
/// <remarks>
/// Alias: umbracoPasswordRetrievalQuestionPropertyTypeAlias
/// Part of the standard properties collection.
/// </remarks>
string PasswordQuestion { get; set; }
/// <summary>
/// Gets or sets the Password Answer
/// </summary>
/// <remarks>
/// Alias: umbracoPasswordRetrievalAnswerPropertyTypeAlias
/// Part of the standard properties collection.
/// </remarks>
string PasswordAnswer { get; set; }
/// <summary>
/// Gets or set the comments for the member
/// </summary>
/// <remarks>
/// Alias: umbracoCommentPropertyTypeAlias
/// Part of the standard properties collection.
/// </remarks>
string Comments { get; set; }
/// <summary>
/// Gets or sets a boolean indicating whether the Member is approved
/// </summary>
/// <remarks>
/// Alias: umbracoApprovePropertyTypeAlias
/// Part of the standard properties collection.
/// </remarks>
bool IsApproved { get; set; }
/// <summary>
/// Gets or sets a boolean indicating whether the Member is locked out
/// </summary>
/// <remarks>
/// Alias: umbracoLockPropertyTypeAlias
/// Part of the standard properties collection.
/// </remarks>
bool IsLockedOut { get; set; }
/// <summary>
/// Gets or sets the date for last login
/// </summary>
/// <remarks>
/// Alias: umbracoLastLoginPropertyTypeAlias
/// Part of the standard properties collection.
/// </remarks>
DateTime LastLoginDate { get; set; }
/// <summary>
/// Gest or sets the date for last password change
/// </summary>
/// <remarks>
/// Alias: umbracoMemberLastPasswordChange
/// Part of the standard properties collection.
/// </remarks>
DateTime LastPasswordChangeDate { get; set; }
/// <summary>
/// Gets or sets the date for when Member was locked out
/// </summary>
/// <remarks>
/// Alias: umbracoMemberLastLockout
/// Part of the standard properties collection.
/// </remarks>
DateTime LastLockoutDate { get; set; }
/// <summary>
/// Gets or sets the number of failed password attempts.
/// This is the number of times the password was entered incorrectly upon login.
/// </summary>
/// <remarks>
/// Alias: umbracoFailedPasswordAttemptsPropertyTypeAlias
/// Part of the standard properties collection.
/// </remarks>
int FailedPasswordAttempts { get; set; }
/// <summary>
/// String alias of the default ContentType
/// </summary>
-1
View File
@@ -3,7 +3,6 @@ using System.Globalization;
using System.Reflection;
using System.Runtime.Serialization;
using Umbraco.Core.Models.EntityBase;
using Umbraco.Core.Persistence.Mappers;
namespace Umbraco.Core.Models
{
+5 -5
View File
@@ -107,7 +107,7 @@ namespace Umbraco.Core.Models
private bool _dontRender;
private string _scriptFile;
private string _scriptAssembly;
private string _python;
private string _scriptPath;
private string _xslt;
private readonly MacroPropertyCollection _properties;
private readonly List<string> _addedProperties;
@@ -360,14 +360,14 @@ namespace Umbraco.Core.Models
[DataMember]
public string ScriptPath
{
get { return _python; }
get { return _scriptPath; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_python = value;
return _python;
}, _python, ScriptPathSelector);
_scriptPath = value;
return _scriptPath;
}, _scriptPath, ScriptPathSelector);
}
}
+1 -2
View File
@@ -11,7 +11,7 @@ namespace Umbraco.Core.Models
/// </summary>
[Serializable]
[DataContract(IsReference = true)]
internal class MacroProperty : TracksChangesEntityBase, IMacroProperty, IRememberBeingDirty
public class MacroProperty : TracksChangesEntityBase, IMacroProperty, IRememberBeingDirty
{
public MacroProperty()
{
@@ -155,7 +155,6 @@ namespace Umbraco.Core.Models
/// </remarks>
[DataMember]
public string EditorAlias
{
get { return _editorAlias; }
set
@@ -15,7 +15,7 @@ namespace Umbraco.Core.Models.Mapping
/// All automapper configurations are done during startup
/// inside an Automapper Initialize call which is better for performance
/// </remarks>
internal interface IMapperConfiguration : IApplicationEventHandler
public interface IMapperConfiguration : IApplicationEventHandler
{
void ConfigureMappings(IConfiguration config, ApplicationContext applicationContext);
}
@@ -8,7 +8,7 @@ namespace Umbraco.Core.Models.Mapping
/// <remarks>
/// Use this class if your mapper configuration isn't also explicitly an ApplicationEventHandler.
/// </remarks>
internal abstract class MapperConfiguration : ApplicationEventHandler, IMapperConfiguration
public abstract class MapperConfiguration : ApplicationEventHandler, IMapperConfiguration
{
public abstract void ConfigureMappings(IConfiguration config, ApplicationContext applicationContext);
}
+15 -4
View File
@@ -31,7 +31,7 @@ namespace Umbraco.Core.Models
_contentType = contentType;
}
public Member(string name, string email, string username, string password, int parentId, IMemberType contentType)
internal Member(string name, string email, string username, string password, int parentId, IMemberType contentType)
: base(name, parentId, contentType, new PropertyCollection())
{
Mandate.ParameterNotNull(contentType, "contentType");
@@ -42,8 +42,8 @@ namespace Umbraco.Core.Models
_password = password;
}
public Member(string name, string email, string username, string password, IContentBase parent, IMemberType contentType)
: base(name, parent, contentType, new PropertyCollection())
public Member(string name, string email, string username, string password, IMemberType contentType)
: this(name, email, username, password, -1, contentType)
{
Mandate.ParameterNotNull(contentType, "contentType");
@@ -53,6 +53,17 @@ namespace Umbraco.Core.Models
_password = password;
}
//public Member(string name, string email, string username, string password, IContentBase parent, IMemberType contentType)
// : base(name, parent, contentType, new PropertyCollection())
//{
// Mandate.ParameterNotNull(contentType, "contentType");
// _contentType = contentType;
// _email = email;
// _username = username;
// _password = password;
//}
private static readonly PropertyInfo DefaultContentTypeAliasSelector = ExpressionHelper.GetPropertyInfo<Member, string>(x => x.ContentTypeAlias);
private static readonly PropertyInfo UsernameSelector = ExpressionHelper.GetPropertyInfo<Member, string>(x => x.Username);
private static readonly PropertyInfo EmailSelector = ExpressionHelper.GetPropertyInfo<Member, string>(x => x.Email);
@@ -377,7 +388,7 @@ namespace Umbraco.Core.Models
/// membership provider.
/// </remarks>
[DataMember]
internal virtual object ProviderUserKey
public virtual object ProviderUserKey
{
get
{
+24
View File
@@ -15,6 +15,7 @@ namespace Umbraco.Core.Models
{
//Dictionary is divided into string: PropertyTypeAlias, Tuple: MemberCanEdit, VisibleOnProfile, PropertyTypeId
private IDictionary<string, Tuple<bool, bool, int>> _memberTypePropertyTypes;
private string _alias;
public MemberType(int parentId) : base(parentId)
{
@@ -27,6 +28,29 @@ namespace Umbraco.Core.Models
}
private static readonly PropertyInfo MemberTypePropertyTypesSelector = ExpressionHelper.GetPropertyInfo<MemberType, IDictionary<string, Tuple<bool, bool, int>>>(x => x.MemberTypePropertyTypes);
private static readonly PropertyInfo AliasSelector = ExpressionHelper.GetPropertyInfo<MemberType, string>(x => x.Alias);
/// <summary>
/// The Alias of the ContentType
/// </summary>
[DataMember]
public override string Alias
{
get { return _alias; }
set
{
//NOTE: WE are overriding this because we don't want to do a ToSafeAlias when the alias is the special case of
// "_umbracoSystemDefaultProtectType" which is used internally, currently there is an issue with the safe alias as it strips
// leading underscores which we don't want in this case.
// see : http://issues.umbraco.org/issue/U4-3968
SetPropertyValueAndDetectChanges(o =>
{
_alias = value == "_umbracoSystemDefaultProtectType" ? value : value.ToSafeAlias();
return _alias;
}, _alias, AliasSelector);
}
}
/// <summary>
/// Gets or Sets a Dictionary of Tuples (MemberCanEdit, VisibleOnProfile, PropertyTypeId) by the PropertyTypes' alias.
@@ -4,9 +4,9 @@ using Umbraco.Core.Models.EntityBase;
namespace Umbraco.Core.Models.Membership
{
internal interface IMembershipUser : IMembershipUserId, IAggregateRoot
{
/*new object Id { get; set; }*/
public interface IMembershipUser : IAggregateRoot
{
object ProviderUserKey { get; set; }
string Username { get; set; }
string Email { get; set; }
string Password { get; set; }
@@ -14,13 +14,22 @@ namespace Umbraco.Core.Models.Membership
string PasswordAnswer { get; set; }
string Comments { get; set; }
bool IsApproved { get; set; }
bool IsOnline { get; set; }
bool IsLockedOut { get; set; }
DateTime LastLoginDate { get; set; }
DateTime LastPasswordChangeDate { get; set; }
DateTime LastLockoutDate { get; set; }
object ProfileId { get; set; }
IEnumerable<object> Groups { get; set; }
/// <summary>
/// Gets or sets the number of failed password attempts.
/// This is the number of times the password was entered incorrectly upon login.
/// </summary>
/// <remarks>
/// Alias: umbracoFailedPasswordAttemptsPropertyTypeAlias
/// Part of the standard properties collection.
/// </remarks>
int FailedPasswordAttempts { get; set; }
//object ProfileId { get; set; }
//IEnumerable<object> Groups { get; set; }
}
}
@@ -1,7 +0,0 @@
namespace Umbraco.Core.Models.Membership
{
internal interface IMembershipUserId
{
object ProviderUserKey { get; set; }
}
}
+10 -11
View File
@@ -7,29 +7,28 @@ namespace Umbraco.Core.Models.Membership
/// Defines the interface for a <see cref="User"/>
/// </summary>
/// <remarks>Will be left internal until a proper Membership implementation is part of the roadmap</remarks>
internal interface IUser : IMembershipUser, IUserProfile
internal interface IUser : IMembershipUser, IProfile
{
new object Id { get; set; }
//string Name { get; set; }
int SessionTimeout { get; set; }
int StartContentId { get; set; }
int StartMediaId { get; set; }
string Language { get; set; }
bool NoConsole { get; set; }
IUserType UserType { get; }
//NOTE: I have removed this because it is obsolete in v7 and we are basically removing live editing for now
//bool DefaultToLiveEditing { get; set; }
IUserType UserType { get; }
/// <summary>
/// The default permissions for the user
/// The default permission set for the user
/// </summary>
/// <remarks>
/// The default permissions are assigned to the user object based on the user type's default permissions
/// </remarks>
string DefaultPermissions { get; }
}
/// Currently in umbraco each permission is a single char but with an Enumerable{string} collection this allows for flexible changes to this in the future
/// </remarks>
IEnumerable<string> DefaultPermissions { get; set; }
internal interface IUserProfile : IProfile
{
IEnumerable<string> AllowedSections { get; }
void RemoveAllowedSection(string sectionAlias);
void AddAllowedSection(string sectionAlias);
@@ -1,3 +1,4 @@
using System.Collections.Generic;
using Umbraco.Core.Models.EntityBase;
using Umbraco.Core.Persistence.Mappers;
@@ -6,8 +7,22 @@ namespace Umbraco.Core.Models.Membership
internal interface IUserType : IAggregateRoot
{
/// <summary>
/// The user type alias
/// </summary>
string Alias { get; set; }
/// <summary>
/// The user type name
/// </summary>
string Name { get; set; }
string Permissions { get; set; }
/// <summary>
/// The set of default permissions for the user type
/// </summary>
/// <remarks>
/// By default each permission is simply a single char but we've made this an enumerable{string} to support a more flexible permissions structure in the future.
/// </remarks>
IEnumerable<string> Permissions { get; set; }
}
}
@@ -6,15 +6,15 @@ namespace Umbraco.Core.Models.Membership
{
internal static class MembershipExtensions
{
internal static MembershipUser AsConcreteMembershipUser(this IMember member)
internal static UmbracoMembershipMember AsConcreteMembershipUser(this IMembershipUser member, string providerName)
{
var membershipMember = new UmbracoMembershipMember(member);
var membershipMember = new UmbracoMembershipMember(member, providerName);
return membershipMember;
}
internal static IMember AsIMember(this MembershipUser membershipMember)
internal static IMembershipUser AsIMember(this UmbracoMembershipMember membershipMember)
{
var member = membershipMember as UmbracoMembershipMember;
var member = membershipMember;
if (member != null)
{
return member.Member;
@@ -1,123 +0,0 @@
using System;
using System.Reflection;
using System.Runtime.Serialization;
using Umbraco.Core.Models.EntityBase;
namespace Umbraco.Core.Models.Membership
{
/// <summary>
/// Represents a Profile which is shared between Members and Users
/// </summary>
[Serializable]
[DataContract(IsReference = true)]
internal class Profile : TracksChangesEntityBase, IProfile, IRememberBeingDirty
{
/// <summary>
/// Initializes a new instance of the <see cref="Profile"/> class.
/// </summary>
protected Profile()
{
ProviderUserKeyType = typeof(int);
}
public Profile(object id, string name)
{
ProviderUserKeyType = typeof(int);
Id = id;
Name = name;
}
private object _id;
private string _name;
private object _providerUserKey;
private Type _userTypeKey;
private static readonly PropertyInfo IdSelector = ExpressionHelper.GetPropertyInfo<Profile, object>(x => x.Id);
private static readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo<Profile, string>(x => x.Name);
private static readonly PropertyInfo ProviderUserKeySelector = ExpressionHelper.GetPropertyInfo<Profile, object>(x => x.ProviderUserKey);
private static readonly PropertyInfo UserTypeKeySelector = ExpressionHelper.GetPropertyInfo<Profile, Type>(x => x.ProviderUserKeyType);
[DataMember]
public virtual object Id
{
get
{
return _id;
}
set
{
SetPropertyValueAndDetectChanges(o =>
{
_id = value;
return _id;
}, _id, IdSelector);
}
}
[DataMember]
public virtual string Name
{
get
{
return _name;
}
set
{
SetPropertyValueAndDetectChanges(o =>
{
_name = value;
return _name;
}, _name, NameSelector);
}
}
[IgnoreDataMember]
public virtual object ProviderUserKey
{
get
{
return _providerUserKey;
}
set
{
SetPropertyValueAndDetectChanges(o =>
{
_providerUserKey = value;
return _id;
}, _providerUserKey, ProviderUserKeySelector);
}
}
/// <summary>
/// Gets or sets the type of the provider user key.
/// </summary>
/// <value>
/// The type of the provider user key.
/// </value>
[IgnoreDataMember]
internal Type ProviderUserKeyType
{
get
{
return _userTypeKey;
}
private set
{
SetPropertyValueAndDetectChanges(o =>
{
_userTypeKey = value;
return _userTypeKey;
}, _userTypeKey, UserTypeKeySelector);
}
}
/// <summary>
/// Sets the type of the provider user key.
/// </summary>
/// <param name="type">The type.</param>
internal void SetProviderUserKeyType(Type type)
{
ProviderUserKeyType = type;
}
}
}
@@ -1,66 +1,127 @@
using System.Web.Security;
using System;
using System.Web.Security;
namespace Umbraco.Core.Models.Membership
{
//TODO: THere's still a bunch of properties that don't exist in this use that need to be mapped somehow.
internal class UmbracoMembershipMember : MembershipUser
{
private readonly IMember _member;
private readonly IMembershipUser _member;
private readonly string _userName;
private readonly object _providerUserKey;
private readonly string _passwordQuestion;
private readonly bool _isLockedOut;
private readonly DateTime _lastLockoutDate;
private readonly DateTime _creationDate;
private DateTime _lastLoginDate;
private readonly DateTime _lastPasswordChangedDate;
private readonly string _providerName;
private string _email;
private string _comment;
private bool _isApproved;
private DateTime _lastActivityDate;
public UmbracoMembershipMember(IMember member)
//NOTE: We are only overriding the properties that matter, we don't override things like IsOnline since that is handled with the sub-class and the membership providers.
//NOTE: We are not calling the base constructor which will validate that a provider with the specified name exists which causes issues with unit tests. The ctor
// validation for that doesn't need to be there anyways (have checked the source).
public UmbracoMembershipMember(IMembershipUser member, string providerName)
{
_member = member;
//NOTE: We are copying the values here so that everything is consistent with how the underlying built-in ASP.Net membership user
// handles data! We don't want to do anything differently there but since we cannot use their ctor we'll need to handle this logic ourselves.
if (member.Username != null)
_userName = member.Username.Trim();
if (member.Email != null)
_email = member.Email.Trim();
if (member.PasswordQuestion != null)
_passwordQuestion = member.PasswordQuestion.Trim();
_providerName = providerName;
_providerUserKey = member.ProviderUserKey;
_comment = member.Comments;
_isApproved = member.IsApproved;
_isLockedOut = member.IsLockedOut;
_creationDate = member.CreateDate.ToUniversalTime();
_lastLoginDate = member.LastLoginDate.ToUniversalTime();
//TODO: We currently don't really have any place to store this data!!
_lastActivityDate = member.LastLoginDate.ToUniversalTime();
_lastPasswordChangedDate = member.LastPasswordChangeDate.ToUniversalTime();
_lastLockoutDate = member.LastLockoutDate.ToUniversalTime();
}
internal IMember Member
internal IMembershipUser Member
{
get { return _member; }
}
public override string Email
public override string UserName
{
get { return _member.Email; }
set { _member.Email = value; }
get { return _userName; }
}
public override object ProviderUserKey
{
get { return _member.Key; }
get { return _providerUserKey; }
}
public override System.DateTime CreationDate
public override string Email
{
get { return _member.CreateDate; }
get { return _email; }
set { _email = value; }
}
public override string UserName
public override string PasswordQuestion
{
get { return _member.Username; }
get { return _passwordQuestion; }
}
public override string Comment
{
get { return _member.Comments; }
set { _member.Comments = value; }
get { return _comment; }
set { _comment = value; }
}
public override bool IsApproved
{
get { return _member.IsApproved; }
set { _member.IsApproved = value; }
get { return _isApproved; }
set { _isApproved = value; }
}
public override bool IsLockedOut
{
get { return _member.IsLockedOut; }
get { return _isLockedOut; }
}
public override System.DateTime LastLoginDate
public override DateTime LastLockoutDate
{
get { return _member.LastLoginDate; }
set { _member.LastLoginDate = value; }
get { return _lastLockoutDate; }
}
public override DateTime CreationDate
{
get { return _creationDate; }
}
public override DateTime LastLoginDate
{
get { return _lastLoginDate; }
set { _lastLoginDate = value; }
}
public override DateTime LastActivityDate
{
get { return _lastActivityDate; }
set { _lastActivityDate = value; }
}
public override DateTime LastPasswordChangedDate
{
get { return _lastPasswordChangedDate; }
}
public override string ProviderName
{
get { return _providerName; }
}
}
}
+395 -44
View File
@@ -1,6 +1,9 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using Umbraco.Core.Models.EntityBase;
using Umbraco.Core.Persistence.Mappers;
@@ -16,15 +19,69 @@ namespace Umbraco.Core.Models.Membership
/// </remarks>
[Serializable]
[DataContract(IsReference = true)]
internal class User : UserProfile, IUser
internal class User : TracksChangesEntityBase, IUser
{
private bool _hasIdentity;
public User(IUserType userType)
{
Groups = new List<object> { userType };
if (userType == null) throw new ArgumentNullException("userType");
_userType = userType;
//Groups = new List<object> { userType };
SessionTimeout = 60;
_sectionCollection = new ObservableCollection<string>();
_addedSections = new List<string>();
_removedSections = new List<string>();
_sectionCollection.CollectionChanged += SectionCollectionChanged;
}
public User(string name, string email, string username, string password, IUserType userType)
: this(userType)
{
_name = name;
_email = email;
_username = username;
_password = password;
}
private readonly IUserType _userType;
private bool _hasIdentity;
private object _id;
private string _name;
private Type _userTypeKey;
private readonly List<string> _addedSections;
private readonly List<string> _removedSections;
private readonly ObservableCollection<string> _sectionCollection;
private int _sessionTimeout;
private int _startContentId;
private int _startMediaId;
private string _username;
private string _email;
private string _password;
private Guid _key;
private bool _isApproved;
private bool _isLockedOut;
private string _language;
private IEnumerable<string> _defaultPermissions;
private bool _defaultToLiveEditing;
private static readonly PropertyInfo SessionTimeoutSelector = ExpressionHelper.GetPropertyInfo<User, int>(x => x.SessionTimeout);
private static readonly PropertyInfo StartContentIdSelector = ExpressionHelper.GetPropertyInfo<User, int>(x => x.StartContentId);
private static readonly PropertyInfo StartMediaIdSelector = ExpressionHelper.GetPropertyInfo<User, int>(x => x.StartMediaId);
private static readonly PropertyInfo AllowedSectionsSelector = ExpressionHelper.GetPropertyInfo<User, IEnumerable<string>>(x => x.AllowedSections);
private static readonly PropertyInfo IdSelector = ExpressionHelper.GetPropertyInfo<User, object>(x => x.Id);
private static readonly PropertyInfo NameSelector = ExpressionHelper.GetPropertyInfo<User, string>(x => x.Name);
private static readonly PropertyInfo UserTypeKeySelector = ExpressionHelper.GetPropertyInfo<User, Type>(x => x.ProviderUserKeyType);
private static readonly PropertyInfo UsernameSelector = ExpressionHelper.GetPropertyInfo<User, string>(x => x.Username);
private static readonly PropertyInfo EmailSelector = ExpressionHelper.GetPropertyInfo<User, string>(x => x.Email);
private static readonly PropertyInfo PasswordSelector = ExpressionHelper.GetPropertyInfo<User, string>(x => x.Password);
private static readonly PropertyInfo IsLockedOutSelector = ExpressionHelper.GetPropertyInfo<User, bool>(x => x.IsLockedOut);
private static readonly PropertyInfo IsApprovedSelector = ExpressionHelper.GetPropertyInfo<User, bool>(x => x.IsApproved);
private static readonly PropertyInfo LanguageSelector = ExpressionHelper.GetPropertyInfo<User, string>(x => x.Language);
private static readonly PropertyInfo DefaultPermissionsSelector = ExpressionHelper.GetPropertyInfo<User, IEnumerable<string>>(x => x.DefaultPermissions);
private static readonly PropertyInfo DefaultToLiveEditingSelector = ExpressionHelper.GetPropertyInfo<User, bool>(x => x.DefaultToLiveEditing);
#region Implementation of IEntity
[IgnoreDataMember]
@@ -35,78 +92,372 @@ namespace Umbraco.Core.Models.Membership
{
get
{
return int.Parse(base.Id.ToString());
return int.Parse(Id.ToString());
}
set
{
base.Id = value;
Id = value;
_hasIdentity = true;
}
}
//this doesn't get used
[IgnoreDataMember]
public Guid Key { get; set; }
#endregion
#region Implementation of IMembershipUser
[DataMember]
public string Username { get; set; }
[DataMember]
public string Email { get; set; }
[DataMember]
public string Password { get; set; }
[DataMember]
public string PasswordQuestion { get; set; }
[DataMember]
public string PasswordAnswer { get; set; }
[DataMember]
public string Comments { get; set; }
[DataMember]
public bool IsApproved { get; set; }
[DataMember]
public bool IsOnline { get; set; }
[DataMember]
public bool IsLockedOut { get; set; }
[DataMember]
public DateTime CreateDate { get; set; }
[DataMember]
public DateTime UpdateDate { get; set; }
[DataMember]
public DateTime LastLoginDate { get; set; }
[DataMember]
public DateTime LastPasswordChangeDate { get; set; }
[DataMember]
public DateTime LastLockoutDate { get; set; }
[IgnoreDataMember]
public object ProviderUserKey
{
get { return Id; }
set { throw new NotSupportedException("Cannot set the provider user key for a user"); }
}
/// <summary>
/// Gets or sets the type of the provider user key.
/// </summary>
/// <value>
/// The type of the provider user key.
/// </value>
[IgnoreDataMember]
internal Type ProviderUserKeyType
{
get
{
return _userTypeKey;
}
private set
{
SetPropertyValueAndDetectChanges(o =>
{
_userTypeKey = value;
return _userTypeKey;
}, _userTypeKey, UserTypeKeySelector);
}
}
/// <summary>
/// Sets the type of the provider user key.
/// </summary>
/// <param name="type">The type.</param>
internal void SetProviderUserKeyType(Type type)
{
ProviderUserKeyType = type;
}
[DataMember]
public object ProfileId { get; set; }
public string Username
{
get { return _username; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_username = value;
return _username;
}, _username, UsernameSelector);
}
}
[DataMember]
public IEnumerable<object> Groups { get; set; }
public string Email
{
get { return _email; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_email = value;
return _email;
}, _email, EmailSelector);
}
}
[DataMember]
public string Password
{
get { return _password; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_password = value;
return _password;
}, _password, PasswordSelector);
}
}
[DataMember]
public bool IsApproved
{
get { return _isApproved; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_isApproved = value;
return _isApproved;
}, _isApproved, IsApprovedSelector);
}
}
[DataMember]
public bool IsLockedOut
{
get { return _isLockedOut; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_isLockedOut = value;
return _isLockedOut;
}, _isLockedOut, IsLockedOutSelector);
}
}
//TODO: Figure out how to support all of this! - we cannot have NotImplementedExceptions because these get used by the IMembershipMemberService<IUser> service so
// we'll just have them as generic get/set which don't interact with the db.
[IgnoreDataMember]
public string PasswordQuestion { get; set; }
[IgnoreDataMember]
public string PasswordAnswer { get; set; }
[IgnoreDataMember]
public string Comments { get; set; }
[IgnoreDataMember]
public DateTime CreateDate { get; set; }
[IgnoreDataMember]
public DateTime UpdateDate { get; set; }
[IgnoreDataMember]
public DateTime LastLoginDate { get; set; }
[IgnoreDataMember]
public DateTime LastPasswordChangeDate { get; set; }
[IgnoreDataMember]
public DateTime LastLockoutDate { get; set; }
[IgnoreDataMember]
public int FailedPasswordAttempts { get; set; }
#endregion
#region Implementation of IProfile
[DataMember]
public string Name
{
get { return _name; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_name = value;
return _name;
}, _name, NameSelector);
}
}
#endregion
#region Implementation of IUser
public IEnumerable<string> AllowedSections
{
get { return _sectionCollection; }
}
public void RemoveAllowedSection(string sectionAlias)
{
_sectionCollection.Remove(sectionAlias);
}
public void AddAllowedSection(string sectionAlias)
{
if (_sectionCollection.Contains(sectionAlias) == false)
{
_sectionCollection.Add(sectionAlias);
}
}
/// <summary>
/// Used internally to check if we need to add a section in the repository to the db
/// </summary>
internal IEnumerable<string> AddedSections
{
get { return _addedSections; }
}
/// <summary>
/// Used internally to check if we need to remove a section in the repository to the db
/// </summary>
internal IEnumerable<string> RemovedSections
{
get { return _removedSections; }
}
/// <summary>
/// Gets or sets the session timeout.
/// </summary>
/// <value>
/// The session timeout.
/// </value>
[DataMember]
public string Language { get; set; }
public int SessionTimeout
{
get { return _sessionTimeout; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_sessionTimeout = value;
return _sessionTimeout;
}, _sessionTimeout, SessionTimeoutSelector);
}
}
/// <summary>
/// Gets or sets the start content id.
/// </summary>
/// <value>
/// The start content id.
/// </value>
[DataMember]
public int StartContentId
{
get { return _startContentId; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_startContentId = value;
return _startContentId;
}, _startContentId, StartContentIdSelector);
}
}
/// <summary>
/// Gets or sets the start media id.
/// </summary>
/// <value>
/// The start media id.
/// </value>
[DataMember]
public int StartMediaId
{
get { return _startMediaId; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_startMediaId = value;
return _startMediaId;
}, _startMediaId, StartMediaIdSelector);
}
}
[DataMember]
public string DefaultPermissions { get; set; }
public object Id
{
get { return _id; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_id = value;
return _id;
}, _id, IdSelector);
}
}
[DataMember]
public bool NoConsole { get; set; }
public string Language
{
get { return _language; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_language = value;
return _language;
}, _language, LanguageSelector);
}
}
[DataMember]
public IEnumerable<string> DefaultPermissions
{
get { return _defaultPermissions; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_defaultPermissions = value;
return _defaultPermissions;
}, _defaultPermissions, DefaultPermissionsSelector);
}
}
[IgnoreDataMember]
internal bool DefaultToLiveEditing
{
get { return _defaultToLiveEditing; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_defaultToLiveEditing = value;
return _defaultToLiveEditing;
}, _defaultToLiveEditing, DefaultToLiveEditingSelector);
}
}
[IgnoreDataMember]
public IUserType UserType
{
get
{
var type = Groups.FirstOrDefault();
return type as IUserType;
}
get { return _userType; }
}
#endregion
/// <summary>
/// Whenever resetting occurs, clear the remembered add/removed collections, even if
/// rememberPreviouslyChangedProperties is true, the AllowedSections property will still
/// be flagged as dirty.
/// </summary>
/// <param name="rememberPreviouslyChangedProperties"></param>
public override void ResetDirtyProperties(bool rememberPreviouslyChangedProperties)
{
_addedSections.Clear();
_removedSections.Clear();
base.ResetDirtyProperties(rememberPreviouslyChangedProperties);
}
/// <summary>
/// Handles the collection changed event in order for us to flag the AllowedSections property as changed
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void SectionCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
OnPropertyChanged(AllowedSectionsSelector);
if (e.Action == NotifyCollectionChangedAction.Add)
{
//remove from the removed/added sections (since people could add/remove all they want in one request)
_removedSections.RemoveAll(s => s == e.NewItems.Cast<string>().First());
_addedSections.RemoveAll(s => s == e.NewItems.Cast<string>().First());
//add to the added sections
_addedSections.Add(e.NewItems.Cast<string>().First());
}
else if (e.Action == NotifyCollectionChangedAction.Remove)
{
//remove from the removed/added sections (since people could add/remove all they want in one request)
_removedSections.RemoveAll(s => s == e.OldItems.Cast<string>().First());
_addedSections.RemoveAll(s => s == e.OldItems.Cast<string>().First());
//add to the added sections
_removedSections.Add(e.OldItems.Cast<string>().First());
}
}
}
}
@@ -1,188 +0,0 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
namespace Umbraco.Core.Models.Membership
{
/// <summary>
/// Represents the Profile implementation for a backoffice User
/// </summary>
/// <remarks>
/// Should be internal until a proper user/membership implementation
/// is part of the roadmap.
/// </remarks>
[Serializable]
[DataContract(IsReference = true)]
internal class UserProfile : Profile, IUserProfile
{
public UserProfile()
{
SessionTimeout = 60;
_sectionCollection = new ObservableCollection<string>();
_addedSections = new List<string>();
_removedSections = new List<string>();
_sectionCollection.CollectionChanged += SectionCollectionChanged;
}
private readonly List<string> _addedSections;
private readonly List<string> _removedSections;
private readonly ObservableCollection<string> _sectionCollection;
private int _sessionTimeout;
private int _startContentId;
private int _startMediaId;
private static readonly PropertyInfo SessionTimeoutSelector = ExpressionHelper.GetPropertyInfo<UserProfile, int>(x => x.SessionTimeout);
private static readonly PropertyInfo StartContentIdSelector = ExpressionHelper.GetPropertyInfo<UserProfile, int>(x => x.StartContentId);
private static readonly PropertyInfo StartMediaIdSelector = ExpressionHelper.GetPropertyInfo<UserProfile, int>(x => x.StartMediaId);
private static readonly PropertyInfo AllowedSectionsSelector = ExpressionHelper.GetPropertyInfo<UserProfile, IEnumerable<string>>(x => x.AllowedSections);
/// <summary>
/// Gets or sets the session timeout.
/// </summary>
/// <value>
/// The session timeout.
/// </value>
[DataMember]
public int SessionTimeout
{
get
{
return _sessionTimeout;
}
set
{
SetPropertyValueAndDetectChanges(o =>
{
_sessionTimeout = value;
return _sessionTimeout;
}, _sessionTimeout, SessionTimeoutSelector);
}
}
/// <summary>
/// Gets or sets the start content id.
/// </summary>
/// <value>
/// The start content id.
/// </value>
[DataMember]
public int StartContentId
{
get
{
return _startContentId;
}
set
{
SetPropertyValueAndDetectChanges(o =>
{
_startContentId = value;
return _startContentId;
}, _startContentId, StartContentIdSelector);
}
}
/// <summary>
/// Gets or sets the start media id.
/// </summary>
/// <value>
/// The start media id.
/// </value>
[DataMember]
public int StartMediaId
{
get
{
return _startMediaId;
}
set
{
SetPropertyValueAndDetectChanges(o =>
{
_startMediaId = value;
return _startMediaId;
}, _startMediaId, StartMediaIdSelector);
}
}
public IEnumerable<string> AllowedSections
{
get { return _sectionCollection; }
}
public void RemoveAllowedSection(string sectionAlias)
{
_sectionCollection.Remove(sectionAlias);
}
public void AddAllowedSection(string sectionAlias)
{
if (!_sectionCollection.Contains(sectionAlias))
{
_sectionCollection.Add(sectionAlias);
}
}
/// <summary>
/// Whenever resetting occurs, clear the remembered add/removed collections, even if
/// rememberPreviouslyChangedProperties is true, the AllowedSections property will still
/// be flagged as dirty.
/// </summary>
/// <param name="rememberPreviouslyChangedProperties"></param>
public override void ResetDirtyProperties(bool rememberPreviouslyChangedProperties)
{
_addedSections.Clear();
_removedSections.Clear();
base.ResetDirtyProperties(rememberPreviouslyChangedProperties);
}
/// <summary>
/// Used internally to check if we need to add a section in the repository to the db
/// </summary>
internal IEnumerable<string> AddedSections
{
get { return _addedSections; }
}
/// <summary>
/// Used internally to check if we need to remove a section in the repository to the db
/// </summary>
internal IEnumerable<string> RemovedSections
{
get { return _removedSections; }
}
/// <summary>
/// Handles the collection changed event in order for us to flag the AllowedSections property as changed
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
void SectionCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
{
OnPropertyChanged(AllowedSectionsSelector);
if (e.Action == NotifyCollectionChangedAction.Add)
{
//remove from the removed/added sections (since people could add/remove all they want in one request)
_removedSections.RemoveAll(s => s == e.NewItems.Cast<string>().First());
_addedSections.RemoveAll(s => s == e.NewItems.Cast<string>().First());
//add to the added sections
_addedSections.Add(e.NewItems.Cast<string>().First());
}
else if (e.Action == NotifyCollectionChangedAction.Remove)
{
//remove from the removed/added sections (since people could add/remove all they want in one request)
_removedSections.RemoveAll(s => s == e.OldItems.Cast<string>().First());
_addedSections.RemoveAll(s => s == e.OldItems.Cast<string>().First());
//add to the added sections
_removedSections.Add(e.OldItems.Cast<string>().First());
}
}
}
}
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Umbraco.Core.Models.EntityBase;
using Umbraco.Core.Persistence.Mappers;
@@ -22,7 +23,13 @@ namespace Umbraco.Core.Models.Membership
[DataMember]
public string Name { get; set; }
/// <summary>
/// The set of default permissions for the user type
/// </summary>
/// <remarks>
/// By default each permission is simply a single char but we've made this an enumerable{string} to support a more flexible permissions structure in the future.
/// </remarks>
[DataMember]
public string Permissions { get; set; }
public IEnumerable<string> Permissions { get; set; }
}
}
+23
View File
@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Umbraco.Core.Models
{
internal class Notification
{
public Notification(int entityId, int userId, string action, Guid entityType)
{
EntityId = entityId;
UserId = userId;
Action = action;
EntityType = entityType;
}
public int EntityId { get; private set; }
public int UserId { get; private set; }
public string Action { get; private set; }
public Guid EntityType { get; private set; }
}
}
+10 -2
View File
@@ -377,8 +377,16 @@ namespace Umbraco.Core.Models
//Check against Regular Expression for Legacy DataTypes - Validation exists and value is not null:
if(string.IsNullOrEmpty(ValidationRegExp) == false && (value != null && string.IsNullOrEmpty(value.ToString()) == false))
{
var regexPattern = new Regex(ValidationRegExp);
return regexPattern.IsMatch(value.ToString());
try
{
var regexPattern = new Regex(ValidationRegExp);
return regexPattern.IsMatch(value.ToString());
}
catch
{
throw new Exception(string .Format("Invalid validation expression on property {0}",this.Alias));
}
}
//TODO Add PropertyEditor validation when its relevant to introduce
@@ -80,11 +80,8 @@ namespace Umbraco.Core.Models.PublishedContent
private void InitializeConverters()
{
var converters = PropertyValueConvertersResolver.Current.Converters.ToArray();
var defaultConverters = converters
.Where(x => x.GetType().GetCustomAttribute<DefaultPropertyValueConverterAttribute>(false) != null)
.ToArray();
var converters = PropertyValueConvertersResolver.Current.Converters.ToArray();
var defaultConvertersWithAttributes = PropertyValueConvertersResolver.Current.DefaultConverters;
_converter = null;
@@ -98,8 +95,14 @@ namespace Umbraco.Core.Models.PublishedContent
else if (foundConverters.Length > 1)
{
//more than one was found, we need to first figure out if one of these is an Umbraco default value type converter
var nonDefault = foundConverters.Except(defaultConverters).ToArray();
if (nonDefault.Length > 1)
//get the non-default and see if we have one
var nonDefault = foundConverters.Except(defaultConvertersWithAttributes.Select(x => x.Item1)).ToArray();
if (nonDefault.Length == 1)
{
//there's only 1 custom converter registered that so use it
_converter = nonDefault[0];
}
else if (nonDefault.Length > 1)
{
//this is not allowed, there cannot be more than 1 custom converter
throw new InvalidOperationException(
@@ -109,9 +112,31 @@ namespace Umbraco.Core.Models.PublishedContent
ContentType.Alias, PropertyTypeAlias,
nonDefault[1].GetType().FullName, nonDefault[0].GetType().FullName));
}
else
{
//we need to remove any converters that have been shadowed by another converter
var foundDefaultConvertersWithAttributes = defaultConvertersWithAttributes.Where(x => foundConverters.Contains(x.Item1));
var shadowedTypes = foundDefaultConvertersWithAttributes.SelectMany(x => x.Item2.DefaultConvertersToShadow);
var shadowedDefaultConverters = foundConverters.Where(x => shadowedTypes.Contains(x.GetType()));
var nonShadowedDefaultConverters = foundConverters.Except(shadowedDefaultConverters).ToArray();
//there's only 1 custom converter registered that so use it
_converter = nonDefault[0];
if (nonShadowedDefaultConverters.Length == 1)
{
//assign to the single default converter
_converter = nonShadowedDefaultConverters[0];
}
else if (nonShadowedDefaultConverters.Length > 1)
{
//this is not allowed, there cannot be more than 1 custom converter
throw new InvalidOperationException(
string.Format("Type '{2}' cannot be an IPropertyValueConverter"
+ " for property '{1}' of content type '{0}' because type '{3}' has already been detected as a converter"
+ " for that property, and only one converter can exist for a property.",
ContentType.Alias, PropertyTypeAlias,
nonShadowedDefaultConverters[1].GetType().FullName, nonShadowedDefaultConverters[0].GetType().FullName));
}
}
}
// get the cache levels, quietely fixing the inconsistencies (no need to throw, really)
@@ -30,7 +30,6 @@ namespace Umbraco.Core.Models.Rdbms
public DateTime DateRegistered { get; set; }
[Column("lastNotifiedDate")]
[Constraint(Default = "getdate()")]
public DateTime LastNotified { get; set; }
[Column("isActive")]
@@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.UI.WebControls;
using Umbraco.Core.Models.EntityBase;
namespace Umbraco.Core.Models
{
internal static class UmbracoEntityExtensions
{
public static object GetAdditionalDataValueIgnoreCase(this IUmbracoEntity entity, string key, object defaultVal)
{
if (entity.AdditionalData.ContainsKeyIgnoreCase(key) == false) return defaultVal;
return entity.AdditionalData.GetValueIgnoreCase(key, defaultVal);
}
public static bool IsContainer(this IUmbracoEntity entity)
{
if (entity.AdditionalData.ContainsKeyIgnoreCase("IsContainer") == false) return false;
var val = entity.AdditionalData.GetValueIgnoreCase("IsContainer", null);
if (val is bool && (bool) val)
{
return true;
}
return false;
}
}
}
@@ -151,6 +151,21 @@ namespace Umbraco.Core.Persistence.Caching
_keyTracker.Remove(key);
}
public void Delete(Type type, int entityId)
{
var key = GetCompositeId(type, entityId);
if (_memoryCache != null)
{
_memoryCache.Remove(key);
}
else
{
HttpRuntime.Cache.Remove(key);
}
_keyTracker.Remove(key);
}
/// <summary>
/// Clear cache by type
/// </summary>
@@ -25,7 +25,7 @@ namespace Umbraco.Core.Persistence.Factories
CreateDate = dto.CreateDate,
UpdateDate = dto.UpdateDate,
Name = dto.Text,
ProviderUserKey = dto.UniqueId,
ProviderUserKey = dto.UniqueId.Value,
Trashed = dto.Trashed,
Key = dto.UniqueId.Value,
CreatorId = dto.UserId.HasValue ? dto.UserId.Value : 0,
@@ -36,7 +36,7 @@ namespace Umbraco.Core.Persistence.Factories
var propertyTypes = GetPropertyTypes(dto, memberType);
//By Convention we add 9 stnd PropertyTypes - This is only here to support loading of types that didn't have these conventions before.
var standardPropertyTypes = Constants.Conventions.Member.StandardPropertyTypeStubs;
var standardPropertyTypes = Constants.Conventions.Member.GetStandardPropertyTypeStubs();
foreach (var standardPropertyType in standardPropertyTypes)
{
if(dto.PropertyTypes.Any(x => x.Alias.Equals(standardPropertyType.Key))) continue;
@@ -17,12 +17,12 @@ namespace Umbraco.Core.Persistence.Factories
public IRelation BuildEntity(RelationDto dto)
{
var entity = new Relation(dto.ParentId, dto.ChildId, _relationType)
{
Comment = dto.Comment,
CreateDate = dto.Datetime,
Id = dto.Id,
UpdateDate = dto.Datetime
};
{
Comment = dto.Comment,
CreateDate = dto.Datetime,
Id = dto.Id,
UpdateDate = dto.Datetime
};
//on initial construction we don't want to have dirty properties tracked
// http://issues.umbraco.org/issue/U4-1946
entity.ResetDirtyProperties(false);
@@ -32,13 +32,13 @@ namespace Umbraco.Core.Persistence.Factories
public RelationDto BuildDto(IRelation entity)
{
var dto = new RelationDto
{
ChildId = entity.ChildId,
Comment = string.IsNullOrEmpty(entity.Comment) ? string.Empty : entity.Comment,
Datetime = entity.CreateDate,
ParentId = entity.ParentId,
RelationType = entity.RelationType.Id
};
{
ChildId = entity.ChildId,
Comment = string.IsNullOrEmpty(entity.Comment) ? string.Empty : entity.Comment,
Datetime = entity.CreateDate,
ParentId = entity.ParentId,
RelationType = entity.RelationType.Id
};
if (entity.HasIdentity)
dto.Id = entity.Id;
@@ -10,11 +10,11 @@ namespace Umbraco.Core.Persistence.Factories
public IRelationType BuildEntity(RelationTypeDto dto)
{
var entity = new RelationType(dto.ChildObjectType, dto.ParentObjectType, dto.Alias)
{
Id = dto.Id,
IsBidirectional = dto.Dual,
Name = dto.Name
};
{
Id = dto.Id,
IsBidirectional = dto.Dual,
Name = dto.Name
};
//on initial construction we don't want to have dirty properties tracked
// http://issues.umbraco.org/issue/U4-1946
entity.ResetDirtyProperties(false);
@@ -24,14 +24,14 @@ namespace Umbraco.Core.Persistence.Factories
public RelationTypeDto BuildDto(IRelationType entity)
{
var dto = new RelationTypeDto
{
Alias = entity.Alias,
ChildObjectType = entity.ChildObjectType,
Dual = entity.IsBidirectional,
Name = entity.Name,
ParentObjectType = entity.ParentObjectType
};
if(entity.HasIdentity)
{
Alias = entity.Alias,
ChildObjectType = entity.ChildObjectType,
Dual = entity.IsBidirectional,
Name = entity.Name,
ParentObjectType = entity.ParentObjectType
};
if (entity.HasIdentity)
dto.Id = entity.Id;
return dto;
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using Umbraco.Core.Models.Membership;
using Umbraco.Core.Models.Rdbms;
@@ -18,24 +19,23 @@ namespace Umbraco.Core.Persistence.Factories
public IUser BuildEntity(UserDto dto)
{
var guidId = dto.Id.ToGuid();
var user = new User(_userType)
{
Id = dto.Id,
ProfileId = dto.Id,
StartContentId = dto.ContentStartId,
StartMediaId = dto.MediaStartId.HasValue ? dto.MediaStartId.Value : -1,
Password = dto.Password,
Username = dto.Login,
Name = dto.UserName,
IsLockedOut = dto.Disabled,
IsApproved = dto.Disabled == false,
Email = dto.Email,
Language = dto.UserLanguage,
NoConsole = dto.NoConsole,
//NOTE: The default permission come from the user type's default permissions
DefaultPermissions = _userType.Permissions
};
{
Id = dto.Id,
Key = guidId,
StartContentId = dto.ContentStartId,
StartMediaId = dto.MediaStartId.HasValue ? dto.MediaStartId.Value : -1,
Password = dto.Password,
Username = dto.Login,
Name = dto.UserName,
IsLockedOut = dto.NoConsole,
IsApproved = dto.Disabled == false,
Email = dto.Email,
Language = dto.UserLanguage,
//NOTE: The default permission come from the user type's default permissions
DefaultPermissions = _userType.Permissions
};
foreach (var app in dto.User2AppDtos)
{
@@ -58,7 +58,7 @@ namespace Umbraco.Core.Persistence.Factories
Disabled = entity.IsApproved == false,
Email = entity.Email,
Login = entity.Username,
NoConsole = entity.NoConsole,
NoConsole = entity.IsLockedOut,
Password = entity.Password,
UserLanguage = entity.Language,
UserName = entity.Name,
@@ -1,4 +1,6 @@
using Umbraco.Core.Models.Membership;
using System.Globalization;
using System.Linq;
using Umbraco.Core.Models.Membership;
using Umbraco.Core.Models.Rdbms;
namespace Umbraco.Core.Persistence.Factories
@@ -10,12 +12,14 @@ namespace Umbraco.Core.Persistence.Factories
public IUserType BuildEntity(UserTypeDto dto)
{
var userType = new UserType
{
Alias = dto.Alias,
Id = dto.Id,
Name = dto.Name,
Permissions = dto.DefaultPermissions
};
{
Alias = dto.Alias,
Id = dto.Id,
Name = dto.Name,
Permissions = dto.DefaultPermissions.IsNullOrWhiteSpace()
? Enumerable.Empty<string>()
: dto.DefaultPermissions.ToCharArray().Select(x => x.ToString(CultureInfo.InvariantCulture))
};
//on initial construction we don't want to have dirty properties tracked
// http://issues.umbraco.org/issue/U4-1946
userType.ResetDirtyProperties(false);
@@ -27,7 +31,7 @@ namespace Umbraco.Core.Persistence.Factories
var userType = new UserTypeDto
{
Alias = entity.Alias,
DefaultPermissions = entity.Permissions,
DefaultPermissions = entity.Permissions == null ? "" : string.Join("", entity.Permissions),
Name = entity.Name
};
@@ -39,7 +39,7 @@ namespace Umbraco.Core.Persistence.Mappers
CacheMap<Relation, RelationDto>(src => src.ParentId, dto => dto.ParentId);
CacheMap<Relation, RelationDto>(src => src.RelationTypeId, dto => dto.RelationType);
}
#endregion
}
}
@@ -39,7 +39,7 @@ namespace Umbraco.Core.Persistence.Mappers
CacheMap<RelationType, RelationTypeDto>(src => src.Name, dto => dto.Name);
CacheMap<RelationType, RelationTypeDto>(src => src.ParentObjectType, dto => dto.ParentObjectType);
}
#endregion
}
}
@@ -38,7 +38,7 @@ namespace Umbraco.Core.Persistence.Mappers
CacheMap<User, UserDto>(src => src.StartMediaId, dto => dto.MediaStartId);
CacheMap<User, UserDto>(src => src.StartContentId, dto => dto.ContentStartId);
CacheMap<User, UserDto>(src => src.IsApproved, dto => dto.Disabled);
CacheMap<User, UserDto>(src => src.NoConsole, dto => dto.NoConsole);
CacheMap<User, UserDto>(src => src.IsLockedOut, dto => dto.NoConsole);
CacheMap<User, UserDto>(src => src.UserType, dto => dto.Type);
CacheMap<User, UserDto>(src => src.Language, dto => dto.UserLanguage);
}
@@ -27,7 +27,7 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete
public IDeleteColumnFromTableSyntax Column(string columnName)
{
var expression = _databaseProviders == null
var expression = _databaseProviders == null
? new DeleteColumnExpression { ColumnNames = { columnName } }
: new DeleteColumnExpression(_context.CurrentDatabaseProvider, _databaseProviders) { ColumnNames = { columnName } };
_context.Expressions.Add(expression);
@@ -36,7 +36,7 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete
public IDeleteForeignKeyFromTableSyntax ForeignKey()
{
var expression = _databaseProviders == null
var expression = _databaseProviders == null
? new DeleteForeignKeyExpression()
: new DeleteForeignKeyExpression(_context.CurrentDatabaseProvider, _databaseProviders);
_context.Expressions.Add(expression);
@@ -45,7 +45,7 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete
public IDeleteForeignKeyOnTableSyntax ForeignKey(string foreignKeyName)
{
var expression = _databaseProviders == null
var expression = _databaseProviders == null
? new DeleteForeignKeyExpression { ForeignKey = { Name = foreignKeyName } }
: new DeleteForeignKeyExpression(_context.CurrentDatabaseProvider, _databaseProviders) { ForeignKey = { Name = foreignKeyName } };
_context.Expressions.Add(expression);
@@ -68,17 +68,17 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete
public IDeleteIndexForTableSyntax Index(string indexName)
{
var expression = new DeleteIndexExpression {Index = {Name = indexName}};
var expression = new DeleteIndexExpression { Index = { Name = indexName } };
_context.Expressions.Add(expression);
return new DeleteIndexBuilder(expression);
}
public IDeleteConstraintOnTableSyntax PrimaryKey(string primaryKeyName)
{
var expression = new DeleteConstraintExpression(ConstraintType.PrimaryKey)
{
Constraint = { ConstraintName = primaryKeyName }
};
var expression = new DeleteConstraintExpression(_context.CurrentDatabaseProvider, _databaseProviders, ConstraintType.PrimaryKey)
{
Constraint = { ConstraintName = primaryKeyName }
};
_context.Expressions.Add(expression);
return new DeleteConstraintBuilder(expression);
}
@@ -86,16 +86,16 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete
public IDeleteConstraintOnTableSyntax UniqueConstraint(string constraintName)
{
var expression = new DeleteConstraintExpression(ConstraintType.Unique)
{
Constraint = { ConstraintName = constraintName }
};
{
Constraint = { ConstraintName = constraintName }
};
_context.Expressions.Add(expression);
return new DeleteConstraintBuilder(expression);
}
public IDeleteDefaultConstraintOnTableSyntax DefaultConstraint()
{
var expression = _databaseProviders == null
var expression = _databaseProviders == null
? new DeleteDefaultConstraintExpression()
: new DeleteDefaultConstraintExpression(_context.CurrentDatabaseProvider, _databaseProviders);
_context.Expressions.Add(expression);
@@ -10,13 +10,40 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete.Expressions
Constraint = new ConstraintDefinition(type);
}
public DeleteConstraintExpression(DatabaseProviders current, DatabaseProviders[] databaseProviders, ConstraintType type)
: base(current, databaseProviders)
{
Constraint = new ConstraintDefinition(type);
}
public ConstraintDefinition Constraint { get; private set; }
public override string ToString()
{
return string.Format(SqlSyntaxContext.SqlSyntaxProvider.DeleteConstraint,
// Test for MySQL primary key situation.
if (CurrentDatabaseProvider == DatabaseProviders.MySql)
{
if (Constraint.IsPrimaryKeyConstraint)
{
return string.Format(SqlSyntaxContext.SqlSyntaxProvider.DeleteConstraint,
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedTableName(Constraint.TableName),
"PRIMARY KEY",
"");
}
else
{
return string.Format(SqlSyntaxContext.SqlSyntaxProvider.DeleteConstraint,
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedTableName(Constraint.TableName),
"FOREIGN KEY",
"");
}
}
else
{
return string.Format(SqlSyntaxContext.SqlSyntaxProvider.DeleteConstraint,
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedTableName(Constraint.TableName),
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedName(Constraint.ConstraintName));
}
}
}
}
@@ -27,7 +27,7 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete.Expressions
if (ForeignKey.ForeignTable == null)
throw new ArgumentNullException("Table name not specified, ensure you have appended the OnTable extension. Format should be Delete.ForeignKey(KeyName).OnTable(TableName)");
if(CurrentDatabaseProvider == DatabaseProviders.MySql)
if (CurrentDatabaseProvider == DatabaseProviders.MySql)
{
//MySql naming "convention" for foreignkeys, which aren't explicitly named
if (string.IsNullOrEmpty(ForeignKey.Name))
@@ -35,7 +35,7 @@ namespace Umbraco.Core.Persistence.Migrations.Syntax.Delete.Expressions
return string.Format(SqlSyntaxContext.SqlSyntaxProvider.DeleteConstraint,
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedTableName(ForeignKey.ForeignTable),
"FOREIGN KEY ",
"FOREIGN KEY",
SqlSyntaxContext.SqlSyntaxProvider.GetQuotedName(ForeignKey.Name));
}
@@ -26,11 +26,11 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
//create a new col which we will make a foreign key, but first needs to be populated with data.
Alter.Table("cmsTagRelationship").AddColumn("propertyTypeId").AsInt32().Nullable();
//drop the foreign key on umbracoNode. Must drop foreign key first before primary key can be removed in MySql.
Delete.ForeignKey("FK_cmsTagRelationship_umbracoNode_id").OnTable("cmsTagRelationship");
//we need to drop the primary key
Delete.PrimaryKey("PK_cmsTagRelationship").FromTable("cmsTagRelationship");
//drop the foreign key on umbracoNode
Delete.ForeignKey("FK_cmsTagRelationship_umbracoNode_id").OnTable("cmsTagRelationship");
}
private void Upgrade()
@@ -57,9 +57,9 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
var propertyTypes = propertyTypeIdRef.Where(x => x.NodeId == tr.NodeId).ToArray();
if (propertyTypes.Length == 0)
{
LogHelper.Warn<AlterTagRelationsTable>("There was no cmsContent reference for cmsTagRelationship for nodeId "
LogHelper.Warn<AlterTagRelationsTable>("There was no cmsContent reference for cmsTagRelationship for nodeId "
+ tr.NodeId +
". The new tag system only supports tags with references to content in the cmsContent and cmsPropertyType tables. This row will be deleted: "
". The new tag system only supports tags with references to content in the cmsContent and cmsPropertyType tables. This row will be deleted: "
+ string.Format("nodeId: {0}, tagId: {1}", tr.NodeId, tr.TagId));
Delete.FromTable("cmsTagRelationship").Row(new { nodeId = tr.NodeId, tagId = tr.TagId });
}
@@ -92,7 +92,7 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
Alter.Table("cmsTagRelationship").AlterColumn("propertyTypeId").AsInt32().NotNullable();
//we need to re-add the new primary key on all 3 columns
Create.PrimaryKey("PK_cmsTagRelationship").OnTable("cmsTagRelationship").Columns(new[] {"nodeId", "propertyTypeId", "tagId"});
Create.PrimaryKey("PK_cmsTagRelationship").OnTable("cmsTagRelationship").Columns(new[] { "nodeId", "propertyTypeId", "tagId" });
//now we need to add a foreign key to the propertyTypeId column and change it's constraints
Create.ForeignKey("FK_cmsTagRelationship_cmsPropertyType")
@@ -102,7 +102,7 @@ namespace Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSeven
.PrimaryColumn("id")
.OnDelete(Rule.None)
.OnUpdate(Rule.None);
//now we need to add a foreign key to the nodeId column to cmsContent (intead of the original umbracoNode)
Create.ForeignKey("FK_cmsTagRelationship_cmsContent")
.FromTable("cmsTagRelationship")
@@ -21,14 +21,18 @@ namespace Umbraco.Core.Persistence
/// <summary>
/// This will escape single @ symbols for peta poco values so it doesn't think it's a parameter
/// </summary>
/// <param name="db"></param>
/// <param name="value"></param>
/// <returns></returns>
public static string EscapeAtSymbols(this Database db, string value)
public static string EscapeAtSymbols(string value)
{
//this fancy regex will only match a single @ not a double, etc...
var regex = new Regex("(?<!@)@(?!@)");
return regex.Replace(value, "@@");
if (value.Contains("@"))
{
//this fancy regex will only match a single @ not a double, etc...
var regex = new Regex("(?<!@)@(?!@)");
return regex.Replace(value, "@@");
}
return value;
}
public static void CreateTable<T>(this Database db)
@@ -336,6 +340,14 @@ namespace Umbraco.Core.Persistence
creation.UninstallDatabaseSchema();
}
internal static void CreateDatabaseSchemaDo(this Database db, bool guardConfiguration)
{
if (guardConfiguration && ApplicationContext.Current.IsConfigured)
throw new Exception("Umbraco is already configured!");
CreateDatabaseSchemaDo(db);
}
internal static void CreateDatabaseSchemaDo(this Database db)
{
NewTable += PetaPocoExtensions_NewTable;
@@ -64,13 +64,7 @@ namespace Umbraco.Core.Persistence.Querying
public virtual string EscapeAtArgument(string exp)
{
/*if (exp.StartsWith("@"))
return string.Concat("@", exp);*/
if (exp.Contains("@"))
return exp.Replace("@", "@@");
return exp;
return PetaPocoExtensions.EscapeAtSymbols(exp);
}
public virtual bool ShouldQuoteValue(Type fieldType)
@@ -2,9 +2,11 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using Umbraco.Core.Persistence.Mappers;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core.Persistence.Querying
{
@@ -226,6 +228,41 @@ namespace Umbraco.Core.Persistence.Querying
}
private string HandleStringComparison(string col, string val, string verb, TextColumnType columnType)
{
switch (verb)
{
case "SqlWildcard":
return SqlSyntaxContext.SqlSyntaxProvider.GetStringColumnWildcardComparison(col, EscapeAtArgument(RemoveQuote(val)), columnType);
case "Equals":
return SqlSyntaxContext.SqlSyntaxProvider.GetStringColumnEqualComparison(col, EscapeAtArgument(RemoveQuote(val)), columnType);
case "StartsWith":
return SqlSyntaxContext.SqlSyntaxProvider.GetStringColumnStartsWithComparison(col, EscapeAtArgument(RemoveQuote(val)), columnType);
case "EndsWith":
return SqlSyntaxContext.SqlSyntaxProvider.GetStringColumnEndsWithComparison(col, EscapeAtArgument(RemoveQuote(val)), columnType);
case "Contains":
return SqlSyntaxContext.SqlSyntaxProvider.GetStringColumnContainsComparison(col, EscapeAtArgument(RemoveQuote(val)), columnType);
case "InvariantEquals":
case "SqlEquals":
//recurse
return HandleStringComparison(col, val, "Equals", columnType);
case "InvariantStartsWith":
case "SqlStartsWith":
//recurse
return HandleStringComparison(col, val, "StartsWith", columnType);
case "InvariantEndsWith":
case "SqlEndsWith":
//recurse
return HandleStringComparison(col, val, "EndsWith", columnType);
case "InvariantContains":
case "SqlContains":
//recurse
return HandleStringComparison(col, val, "Contains", columnType);
default:
throw new ArgumentOutOfRangeException("verb");
}
}
protected virtual string VisitMethodCall(MethodCallExpression m)
{
List<Object> args = this.VisitExpressionList(m.Arguments);
@@ -245,12 +282,31 @@ namespace Umbraco.Core.Persistence.Querying
return string.Format("upper({0})", r);
case "ToLower":
return string.Format("lower({0})", r);
case "SqlWildcard":
case "StartsWith":
return string.Format("upper({0}) like '{1}%'", r, EscapeAtArgument(RemoveQuote(args[0].ToString().ToUpper())));
case "EndsWith":
return string.Format("upper({0}) like '%{1}'", r, EscapeAtArgument(RemoveQuote(args[0].ToString()).ToUpper()));
case "Contains":
return string.Format("{0} like '%{1}%'", r, EscapeAtArgument(RemoveQuote(args[0].ToString()).ToUpper()));
case "Equals":
case "SqlStartsWith":
case "SqlEndsWith":
case "SqlContains":
case "SqlEquals":
case "InvariantStartsWith":
case "InvariantEndsWith":
case "InvariantContains":
case "InvariantEquals":
//default
var colType = TextColumnType.NVarchar;
//then check if this arg has been passed in
if (m.Arguments.Count > 1)
{
var colTypeArg = m.Arguments.FirstOrDefault(x => x is ConstantExpression && x.Type == typeof(TextColumnType));
if (colTypeArg != null)
{
colType = (TextColumnType) ((ConstantExpression) colTypeArg).Value;
}
}
return HandleStringComparison(r.ToString(), args[0].ToString(), m.Method.Name, colType);
case "Substring":
var startIndex = Int32.Parse(args[0].ToString()) + 1;
if (args.Count == 2)
@@ -0,0 +1,40 @@
using System;
using System.Text.RegularExpressions;
namespace Umbraco.Core.Persistence.Querying
{
/// <summary>
/// String extension methods used specifically to translate into SQL
/// </summary>
internal static class SqlStringExtensions
{
public static bool SqlWildcard(this string str, string txt, TextColumnType columnType)
{
var wildcardmatch = new Regex("^" + Regex.Escape(txt).
//deal with any wildcard chars %
Replace(@"\%", ".*") + "$");
return wildcardmatch.IsMatch(str);
}
public static bool SqlContains(this string str, string txt, TextColumnType columnType)
{
return str.InvariantContains(txt);
}
public static bool SqlEquals(this string str, string txt, TextColumnType columnType)
{
return str.InvariantEquals(txt);
}
public static bool SqlStartsWith(this string str, string txt, TextColumnType columnType)
{
return str.InvariantStartsWith(txt);
}
public static bool SqlEndsWith(this string str, string txt, TextColumnType columnType)
{
return str.InvariantEndsWith(txt);
}
}
}
@@ -0,0 +1,15 @@
namespace Umbraco.Core.Persistence.Querying
{
/// <summary>
/// Determines how to match a string property value
/// </summary>
public enum StringPropertyMatchType
{
Exact,
Contains,
StartsWith,
EndsWith,
//Deals with % as wildcard chars in a string
Wildcard
}
}
@@ -0,0 +1,8 @@
namespace Umbraco.Core.Persistence.Querying
{
public enum TextColumnType
{
NVarchar,
NText
}
}
@@ -0,0 +1,14 @@
namespace Umbraco.Core.Persistence.Querying
{
/// <summary>
/// Determine how to match a number or data value
/// </summary>
public enum ValuePropertyMatchType
{
Exact,
GreaterThan,
LessThan,
GreaterThanOrEqualTo,
LessThanOrEqualTo
}
}
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using Umbraco.Core.Models.Rdbms;
namespace Umbraco.Core.Persistence.Relators
@@ -20,8 +21,12 @@ namespace Umbraco.Core.Persistence.Relators
// Is this the same MemberReadOnlyDto as the current one we're processing
if (Current != null && Current.UniqueId == a.UniqueId)
{
// Yes, just add this PropertyDataReadOnlyDto to the current MemberReadOnlyDto's collection
Current.Properties.Add(p);
//This property may already be added so we need to check for that
if (Current.Properties.Any(x => x.Id == p.Id) == false)
{
// Yes, just add this PropertyDataReadOnlyDto to the current MemberReadOnlyDto's collection
Current.Properties.Add(p);
}
// Return null to indicate we're not done with this MemberReadOnlyDto yet
return null;
@@ -273,7 +273,7 @@ namespace Umbraco.Core.Persistence.Repositories
//Assign the same permissions to it as the parent node
// http://issues.umbraco.org/issue/U4-2161
// http://issues.umbraco.org/issue/U4-2161
var permissionsRepo = new PermissionRepository<IContent>(UnitOfWork);
var parentPermissions = permissionsRepo.GetPermissionsForEntity(entity.ParentId).ToArray();
//if there are parent permissions then assign them, otherwise leave null and permissions will become the
@@ -284,7 +284,7 @@ namespace Umbraco.Core.Persistence.Repositories
from perm in parentPermissions
from p in perm.AssignedPermissions
select new Tuple<object, string>(perm.UserId, p)).ToList();
permissionsRepo.AssignEntityPermissions(entity, userPermissions);
//flag the entity's permissions changed flag so we can track those changes.
//Currently only used for the cache refreshers to detect if we should refresh all user permissions cache.
@@ -261,6 +261,7 @@ namespace Umbraco.Core.Persistence.Repositories
foreach (var item in items)
{
//Before a PropertyType can be deleted, all Properties based on that PropertyType should be deleted.
Database.Delete<TagRelationshipDto>("WHERE propertyTypeId = @Id", new { Id = item });
Database.Delete<PropertyDataDto>("WHERE propertytypeid = @Id", new {Id = item});
Database.Delete<PropertyTypeDto>("WHERE contentTypeId = @Id AND id = @PropertyTypeId",
new {Id = entity.Id, PropertyTypeId = item});
@@ -180,7 +180,7 @@ namespace Umbraco.Core.Persistence.Repositories
}
else
{
translation.Id = Convert.ToInt32(Database.Insert(dto));
translation.Id = Convert.ToInt32(Database.Insert(textDto));
translation.Key = entity.Key;
}
}
@@ -33,6 +33,16 @@ namespace Umbraco.Core.Persistence.Repositories
get { return _fileSystem; }
}
internal virtual void AddFolder(string folderPath)
{
_work.RegisterAdded(new Folder(folderPath), this);
}
internal virtual void DeleteFolder(string folderPath)
{
_work.RegisterRemoved(new Folder(folderPath), this);
}
#region Implementation of IRepository<TId,TEntity>
public virtual void AddOrUpdate(TEntity entity)
@@ -68,7 +78,16 @@ namespace Umbraco.Core.Persistence.Repositories
public void PersistNewItem(IEntity entity)
{
PersistNewItem((TEntity)entity);
//special case for folder
var folder = entity as Folder;
if (folder != null)
{
PersistNewFolder(folder);
}
else
{
PersistNewItem((TEntity)entity);
}
}
public void PersistUpdatedItem(IEntity entity)
@@ -78,23 +97,46 @@ namespace Umbraco.Core.Persistence.Repositories
public void PersistDeletedItem(IEntity entity)
{
PersistDeletedItem((TEntity)entity);
//special case for folder
var folder = entity as Folder;
if (folder != null)
{
PersistDeletedFolder(folder);
}
else
{
PersistDeletedItem((TEntity)entity);
}
}
#endregion
#region Abstract IUnitOfWorkRepository Methods
internal virtual void PersistNewFolder(Folder entity)
{
_fileSystem.CreateFolder(entity.Path);
}
internal virtual void PersistDeletedFolder(Folder entity)
{
_fileSystem.DeleteDirectory(entity.Path);
}
#region Abstract IUnitOfWorkRepository Methods
protected virtual void PersistNewItem(TEntity entity)
{
var stream = new MemoryStream(Encoding.UTF8.GetBytes(entity.Content));
FileSystem.AddFile(entity.Name, stream, true);
using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(entity.Content)))
{
FileSystem.AddFile(entity.Path, stream, true);
}
}
protected virtual void PersistUpdatedItem(TEntity entity)
{
var stream = new MemoryStream(Encoding.UTF8.GetBytes(entity.Content));
FileSystem.AddFile(entity.Name, stream, true);
using (var stream = new MemoryStream(Encoding.UTF8.GetBytes(entity.Content)))
{
FileSystem.AddFile(entity.Path, stream, true);
}
}
protected virtual void PersistDeletedItem(TEntity entity)
@@ -1,5 +1,9 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Umbraco.Core.Models;
using Umbraco.Core.Models.Rdbms;
using Umbraco.Core.Persistence.Querying;
namespace Umbraco.Core.Persistence.Repositories
{
@@ -12,5 +16,30 @@ namespace Umbraco.Core.Persistence.Repositories
/// <returns></returns>
IEnumerable<IMember> GetByMemberGroup(string groupName);
/// <summary>
/// Checks if a member with the username exists
/// </summary>
/// <param name="username"></param>
/// <returns></returns>
bool Exists(string username);
/// <summary>
/// Gets the count of items based on a complex query
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
int GetCountByQuery(IQuery<IMember> query);
/// <summary>
/// Gets paged member results
/// </summary>
/// <param name="query"></param>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="totalRecords"></param>
/// <param name="orderBy"></param>
/// <returns></returns>
IEnumerable<IMember> GetPagedResultsByQuery(IQuery<IMember> query, int pageIndex, int pageSize, out int totalRecords, Expression<Func<IMember, string>> orderBy);
}
}
@@ -4,6 +4,6 @@ namespace Umbraco.Core.Persistence.Repositories
{
public interface IRelationRepository : IRepositoryQueryable<int, IRelation>
{
}
}
@@ -4,6 +4,6 @@ namespace Umbraco.Core.Persistence.Repositories
{
public interface IRelationTypeRepository : IRepositoryQueryable<int, IRelationType>
{
}
}
@@ -4,6 +4,6 @@ namespace Umbraco.Core.Persistence.Repositories
{
public interface IScriptRepository : IRepository<string, Script>
{
}
}
@@ -34,7 +34,7 @@ namespace Umbraco.Core.Persistence.Repositories
/// Assigns the given tags to a content item's property
/// </summary>
/// <param name="contentId"></param>
/// <param name="propertyTypeAlias"></param>
/// <param name="propertyTypeId"></param>
/// <param name="tags">The tags to assign</param>
/// <param name="replaceTags">
/// If set to true, this will replace all tags with the given tags,
@@ -44,14 +44,14 @@ namespace Umbraco.Core.Persistence.Repositories
/// <remarks>
/// This can also be used to remove all tags from a property by specifying replaceTags = true and an empty tag list.
/// </remarks>
void AssignTagsToProperty(int contentId, string propertyTypeAlias, IEnumerable<ITag> tags, bool replaceTags);
void AssignTagsToProperty(int contentId, int propertyTypeId, IEnumerable<ITag> tags, bool replaceTags);
/// <summary>
/// Removes any of the given tags from the property association
/// </summary>
/// <param name="contentId"></param>
/// <param name="propertyTypeAlias"></param>
/// <param name="propertyTypeId"></param>
/// <param name="tags">The tags to remove from the property</param>
void RemoveTagsFromProperty(int contentId, string propertyTypeAlias, IEnumerable<ITag> tags);
void RemoveTagsFromProperty(int contentId, int propertyTypeId, IEnumerable<ITag> tags);
}
}
@@ -1,20 +1,45 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using Umbraco.Core.Models.Membership;
using Umbraco.Core.Persistence.Querying;
namespace Umbraco.Core.Persistence.Repositories
{
internal interface IUserRepository : IRepositoryQueryable<int, IUser>
{
//IProfile GetProfileById(int id);
IProfile GetProfileByUserName(string username);
IUser GetUserByUserName(string username);
/// <summary>
/// Gets the count of items based on a complex query
/// </summary>
/// <param name="query"></param>
/// <returns></returns>
int GetCountByQuery(IQuery<IUser> query);
/// <summary>
/// Checks if a user with the username exists
/// </summary>
/// <param name="username"></param>
/// <returns></returns>
bool Exists(string username);
/// <summary>
/// This is useful when an entire section is removed from config
/// </summary>
/// <param name="sectionAlias"></param>
IEnumerable<IUser> GetUsersAssignedToSection(string sectionAlias);
/// <summary>
/// Gets paged member results
/// </summary>
/// <param name="query"></param>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="totalRecords"></param>
/// <param name="orderBy"></param>
/// <returns></returns>
IEnumerable<IUser> GetPagedResultsByQuery(IQuery<IUser> query, int pageIndex, int pageSize, out int totalRecords, Expression<Func<IUser, string>> orderBy);
/// <summary>
/// Gets the user permissions for the specified entities
/// </summary>
@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Linq.Expressions;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Models.EntityBase;
@@ -9,6 +10,7 @@ using Umbraco.Core.Models;
using Umbraco.Core.Models.Rdbms;
using Umbraco.Core.Persistence.Caching;
using Umbraco.Core.Persistence.Factories;
using Umbraco.Core.Persistence.Mappers;
using Umbraco.Core.Persistence.Querying;
using Umbraco.Core.Persistence.Relators;
using Umbraco.Core.Persistence.UnitOfWork;
@@ -446,6 +448,89 @@ namespace Umbraco.Core.Persistence.Repositories
return BuildFromDtos(dtos);
}
public bool Exists(string username)
{
var sql = new Sql();
var escapedUserName = PetaPocoExtensions.EscapeAtSymbols(username);
sql.Select("COUNT(*)")
.From<MemberDto>()
.Where<MemberDto>(x => x.LoginName == escapedUserName);
return Database.ExecuteScalar<int>(sql) > 0;
}
public int GetCountByQuery(IQuery<IMember> query)
{
var sqlSubquery = GetSubquery();
var translator = new SqlTranslator<IMember>(sqlSubquery, query);
var subquery = translator.Translate();
//get the COUNT base query
var sql = GetBaseQuery(true)
.Append(new Sql("WHERE umbracoNode.id IN (" + subquery.SQL + ")", subquery.Arguments));
return Database.ExecuteScalar<int>(sql);
}
/// <summary>
/// Gets paged member results
/// </summary>
/// <param name="query">
/// The where clause, if this is null all records are queried
/// </param>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="totalRecords"></param>
/// <param name="orderBy"></param>
/// <returns></returns>
/// <remarks>
/// The query supplied will ONLY work with data specifically on the cmsMember table because we are using PetaPoco paging (SQL paging)
/// </remarks>
public IEnumerable<IMember> GetPagedResultsByQuery(IQuery<IMember> query, int pageIndex, int pageSize, out int totalRecords, Expression<Func<IMember, string>> orderBy)
{
if (orderBy == null) throw new ArgumentNullException("orderBy");
var sql = new Sql();
sql.Select("*").From<MemberDto>();
Sql resultQuery;
if (query != null)
{
var translator = new SqlTranslator<IMember>(sql, query);
resultQuery = translator.Translate();
}
else
{
resultQuery = sql;
}
//get the referenced column name
var expressionMember = ExpressionHelper.GetMemberInfo(orderBy);
//now find the mapped column name
var mapper = MappingResolver.Current.ResolveMapperByType(typeof(IMember));
var mappedField = mapper.Map(expressionMember.Name);
if (mappedField.IsNullOrWhiteSpace())
{
throw new ArgumentException("Could not find a mapping for the column specified in the orderBy clause");
}
//need to ensure the order by is in brackets, see: https://github.com/toptensoftware/PetaPoco/issues/177
resultQuery.OrderBy(string.Format("({0})", mappedField));
var pagedResult = Database.Page<MemberDto>(pageIndex + 1, pageSize, resultQuery);
totalRecords = Convert.ToInt32(pagedResult.TotalItems);
//now that we have the member dto's we need to construct true members from the list.
if (totalRecords == 0)
{
return Enumerable.Empty<IMember>();
}
var result = GetAll(pagedResult.Items.Select(x => x.NodeId).ToArray());
//now we need to ensure this result is also ordered by the same order by clause
return result.OrderBy(orderBy.Compile());
}
private IMember BuildFromDto(List<MemberReadOnlyDto> dtos)
{
if (dtos == null || dtos.Any() == false)
@@ -168,7 +168,7 @@ namespace Umbraco.Core.Persistence.Repositories
((MemberType)entity).AddingEntity();
//By Convention we add 9 stnd PropertyTypes to an Umbraco MemberType
var standardPropertyTypes = Constants.Conventions.Member.StandardPropertyTypeStubs;
var standardPropertyTypes = Constants.Conventions.Member.GetStandardPropertyTypeStubs();
foreach (var standardPropertyType in standardPropertyTypes)
{
entity.AddPropertyType(standardPropertyType.Value);
@@ -0,0 +1,85 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Umbraco.Core.Models;
using Umbraco.Core.Models.EntityBase;
using Umbraco.Core.Models.Membership;
using Umbraco.Core.Models.Rdbms;
using Umbraco.Core.Persistence.UnitOfWork;
namespace Umbraco.Core.Persistence.Repositories
{
internal class NotificationsRepository
{
private readonly IDatabaseUnitOfWork _unitOfWork;
public NotificationsRepository(IDatabaseUnitOfWork unitOfWork)
{
_unitOfWork = unitOfWork;
}
public IEnumerable<Notification> GetUserNotifications(IUser user)
{
var sql = new Sql()
.Select("DISTINCT umbracoNode.id, umbracoUser2NodeNotify.userId, umbracoNode.nodeObjectType, umbracoUser2NodeNotify.action")
.From<User2NodeNotifyDto>()
.InnerJoin<NodeDto>()
.On<User2NodeNotifyDto, NodeDto>(dto => dto.NodeId, dto => dto.NodeId)
.Where<User2NodeNotifyDto>(dto => dto.UserId == (int)user.Id)
.OrderBy<NodeDto>(dto => dto.NodeId);
var dtos = _unitOfWork.Database.Fetch<dynamic>(sql);
//need to map the results
return dtos.Select(d => new Notification(d.id, d.userId, d.action, d.nodeObjectType)).ToList();
}
public IEnumerable<Notification> GetEntityNotifications(IEntity entity)
{
var sql = new Sql()
.Select("DISTINCT umbracoNode.id, umbracoUser2NodeNotify.userId, umbracoNode.nodeObjectType, umbracoUser2NodeNotify.action")
.From<User2NodeNotifyDto>()
.InnerJoin<NodeDto>()
.On<User2NodeNotifyDto, NodeDto>(dto => dto.NodeId, dto => dto.NodeId)
.Where<User2NodeNotifyDto>(dto => dto.NodeId == entity.Id)
.OrderBy<NodeDto>(dto => dto.NodeId);
var dtos = _unitOfWork.Database.Fetch<dynamic>(sql);
//need to map the results
return dtos.Select(d => new Notification(d.id, d.userId, d.action, d.nodeObjectType)).ToList();
}
public int DeleteNotifications(IEntity entity)
{
return _unitOfWork.Database.Delete<User2NodeNotifyDto>("WHERE nodeId = @nodeId", new { nodeId = entity.Id });
}
public int DeleteNotifications(IUser user)
{
return _unitOfWork.Database.Delete<User2NodeNotifyDto>("WHERE userId = @userId", new { userId = user.Id });
}
public int DeleteNotifications(IUser user, IEntity entity)
{
// delete all settings on the node for this user
return _unitOfWork.Database.Delete<User2NodeNotifyDto>("WHERE userId = @userId AND nodeId = @nodeId", new { userId = user.Id, nodeId = entity.Id });
}
public Notification CreateNotification(IUser user, IEntity entity, string action)
{
var sql = new Sql()
.Select("DISTINCT nodeObjectType")
.From<NodeDto>()
.Where<NodeDto>(nodeDto => nodeDto.NodeId == entity.Id);
var nodeType = _unitOfWork.Database.ExecuteScalar<Guid>(sql);
var dto = new User2NodeNotifyDto()
{
Action = action,
NodeId = entity.Id,
UserId = (int)user.Id
};
_unitOfWork.Database.Insert(dto);
return new Notification(dto.NodeId, dto.UserId, dto.Action, nodeType);
}
}
}
@@ -110,11 +110,11 @@ namespace Umbraco.Core.Persistence.Repositories
internal void AssignEntityPermissions(TEntity entity, char permission, IEnumerable<object> userIds)
{
var actions = userIds.Select(id => new User2NodePermissionDto
{
NodeId = entity.Id,
Permission = permission.ToString(CultureInfo.InvariantCulture),
UserId = (int)id
});
{
NodeId = entity.Id,
Permission = permission.ToString(CultureInfo.InvariantCulture),
UserId = (int)id
});
_unitOfWork.Database.BulkInsertRecords(actions);
}
@@ -163,14 +163,14 @@ namespace Umbraco.Core.Persistence.Repositories
{
_unitOfWork.Database.Update<User2NodePermissionDto>(
GenerateReplaceEntityPermissionsSql(
new[] {entity.Id}.Concat(getDescendantIds(entity)).ToArray(),
permissions,
new[] { entity.Id }.Concat(getDescendantIds(entity)).ToArray(),
permissions,
userIds.ToArray()));
}
internal static string GenerateReplaceEntityPermissionsSql(int entityId, string permissions, object[] userIds)
{
return GenerateReplaceEntityPermissionsSql(new[] {entityId}, permissions, userIds);
return GenerateReplaceEntityPermissionsSql(new[] { entityId }, permissions, userIds);
}
internal static string GenerateReplaceEntityPermissionsSql(int[] entityIds, string permissions, object[] userIds)
@@ -182,7 +182,7 @@ namespace Umbraco.Core.Persistence.Repositories
//build the nodeIds part of the where clause
var sqlNodeWhere = BuildOrClause(entityIds, "nodeId");
//build up the userIds part of the where clause
var userWhereBuilder = BuildOrClause(userIds, "userId");
@@ -211,5 +211,6 @@ namespace Umbraco.Core.Persistence.Repositories
userWhereBuilder.Append(")");
return userWhereBuilder.ToString();
}
}
}
@@ -18,13 +18,13 @@ namespace Umbraco.Core.Persistence.Repositories
{
private readonly IRelationTypeRepository _relationTypeRepository;
public RelationRepository(IDatabaseUnitOfWork work, IRelationTypeRepository relationTypeRepository)
: base(work)
public RelationRepository(IDatabaseUnitOfWork work, IRelationTypeRepository relationTypeRepository)
: base(work)
{
_relationTypeRepository = relationTypeRepository;
}
public RelationRepository(IDatabaseUnitOfWork work, IRepositoryCacheProvider cache, IRelationTypeRepository relationTypeRepository)
public RelationRepository(IDatabaseUnitOfWork work, IRepositoryCacheProvider cache, IRelationTypeRepository relationTypeRepository)
: base(work, cache)
{
_relationTypeRepository = relationTypeRepository;
@@ -42,7 +42,7 @@ namespace Umbraco.Core.Persistence.Repositories
return null;
var relationType = _relationTypeRepository.Get(dto.RelationType);
if(relationType == null)
if (relationType == null)
throw new Exception(string.Format("RelationType with Id: {0} doesn't exist", dto.RelationType));
var factory = new RelationFactory(relationType);
@@ -16,12 +16,12 @@ namespace Umbraco.Core.Persistence.Repositories
/// </summary>
internal class RelationTypeRepository : PetaPocoRepositoryBase<int, IRelationType>, IRelationTypeRepository
{
public RelationTypeRepository(IDatabaseUnitOfWork work)
: base(work)
public RelationTypeRepository(IDatabaseUnitOfWork work)
: base(work)
{
}
public RelationTypeRepository(IDatabaseUnitOfWork work, IRepositoryCacheProvider cache)
public RelationTypeRepository(IDatabaseUnitOfWork work, IRepositoryCacheProvider cache)
: base(work, cache)
{
}
@@ -28,9 +28,10 @@ namespace Umbraco.Core.Persistence.Repositories
public override Script Get(string id)
{
if(!FileSystem.FileExists(id))
if(FileSystem.FileExists(id) == false)
{
throw new Exception(string.Format("The file {0} was not found", id));
return null;
//throw new Exception(string.Format("The file {0} was not found", id));
}
string content = string.Empty;
@@ -230,7 +230,7 @@ namespace Umbraco.Core.Persistence.Repositories
/// Assigns the given tags to a content item's property
/// </summary>
/// <param name="contentId"></param>
/// <param name="propertyTypeAlias"></param>
/// <param name="propertyTypeId"></param>
/// <param name="tags">The tags to assign</param>
/// <param name="replaceTags">
/// If set to true, this will replace all tags with the given tags,
@@ -240,7 +240,8 @@ namespace Umbraco.Core.Persistence.Repositories
/// <remarks>
/// This can also be used to remove all tags from a property by specifying replaceTags = true and an empty tag list.
/// </remarks>
public void AssignTagsToProperty(int contentId, string propertyTypeAlias, IEnumerable<ITag> tags, bool replaceTags)
//public void AssignTagsToProperty(int contentId, string propertyTypeAlias, IEnumerable<ITag> tags, bool replaceTags)
public void AssignTagsToProperty(int contentId, int propertyTypeId, IEnumerable<ITag> tags, bool replaceTags)
{
//First we need to ensure there are no duplicates
var asArray = tags.Distinct(new TagComparer()).ToArray();
@@ -251,8 +252,6 @@ namespace Umbraco.Core.Persistence.Repositories
return;
}
var propertyTypeId = EnsureContentProperty(contentId, propertyTypeAlias);
//next check if we're removing all of the tags
if (asArray.Length == 0 && replaceTags)
{
@@ -310,7 +309,7 @@ namespace Umbraco.Core.Persistence.Repositories
"left outer join cmsTagRelationship ",
"on (cmsTagRelationship.TagId = NewTagsSet.Id and cmsTagRelationship.nodeId = ",
contentId,
"and cmsTagRelationship.propertyTypeId = ",
" and cmsTagRelationship.propertyTypeId = ",
propertyTypeId,
") ",
"where cmsTagRelationship.tagId is null ");
@@ -327,12 +326,10 @@ namespace Umbraco.Core.Persistence.Repositories
/// Removes any of the given tags from the property association
/// </summary>
/// <param name="contentId"></param>
/// <param name="propertyTypeAlias"></param>
/// <param name="propertyTypeId"></param>
/// <param name="tags">The tags to remove from the property</param>
public void RemoveTagsFromProperty(int contentId, string propertyTypeAlias, IEnumerable<ITag> tags)
public void RemoveTagsFromProperty(int contentId, int propertyTypeId, IEnumerable<ITag> tags)
{
var propertyTypeId = EnsureContentProperty(contentId, propertyTypeAlias);
var tagSetSql = GetTagSet(tags);
var deleteSql = string.Concat("DELETE FROM cmsTagRelationship WHERE nodeId = ",
@@ -376,7 +373,7 @@ namespace Umbraco.Core.Persistence.Repositories
/// <returns></returns>
private static string GetTagSet(IEnumerable<ITag> tagsToInsert)
{
var array = tagsToInsert.Select(tag => string.Format("select '{0}' as Tag, '{1}' as [Group]", tag.Text, tag.Group)).ToArray();
var array = tagsToInsert.Select(tag => string.Format("select '{0}' as Tag, '{1}' as [Group]", tag.Text.Replace("'", "''"), tag.Group)).ToArray();
return "(" + string.Join(" union ", array).Replace(" ", " ") + ") as TagSet";
}
@@ -396,36 +393,5 @@ namespace Umbraco.Core.Persistence.Repositories
}
}
/// <summary>
/// Ensures the content and property alias exist, then returns the property type id for the alias
/// </summary>
/// <param name="contentId"></param>
/// <param name="propertyAlias"></param>
/// <returns></returns>
private int EnsureContentProperty(int contentId, string propertyAlias)
{
//ensure that there's content and a property to assign - NOTE: we cannot use the content repository here
// because the content repository requires one of us TagsRepository instance, then we'll have circular dependencies
// instead we'll just look it up ourselves.
var sql = new Sql()
.Select("cmsPropertyType.id")
.From<ContentDto>()
.InnerJoin<ContentTypeDto>()
.On<ContentTypeDto, ContentDto>(left => left.NodeId, right => right.ContentTypeId)
.InnerJoin<PropertyTypeDto>()
.On<PropertyTypeDto, ContentTypeDto>(left => left.ContentTypeId, right => right.NodeId)
.Where<ContentDto>(dto => dto.NodeId == contentId)
.Where<PropertyTypeDto>(dto => dto.Alias == propertyAlias);
var result = Database.Fetch<int>(sql).ToArray();
if (result.Length == 0)
{
throw new InvalidOperationException("Cannot modify tags for content id " + contentId + " and property " + propertyAlias + " because the content item does not exist with this property");
}
return result.First();
}
}
}
@@ -1,12 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using Umbraco.Core.Models;
using Umbraco.Core.Models.EntityBase;
using Umbraco.Core.Models.Membership;
using Umbraco.Core.Models.Rdbms;
using Umbraco.Core.Persistence.Caching;
using Umbraco.Core.Persistence.Factories;
using Umbraco.Core.Persistence.Mappers;
using Umbraco.Core.Persistence.Querying;
using Umbraco.Core.Persistence.Relators;
using Umbraco.Core.Persistence.SqlSyntax;
@@ -200,7 +202,30 @@ namespace Umbraco.Core.Persistence.Repositories
#endregion
#region Implementation of IUserRepository
public int GetCountByQuery(IQuery<IUser> query)
{
var sqlClause = GetBaseQuery("umbracoUser.id");
var translator = new SqlTranslator<IUser>(sqlClause, query);
var subquery = translator.Translate();
//get the COUNT base query
var sql = GetBaseQuery(true)
.Append(new Sql("WHERE umbracoUser.id IN (" + subquery.SQL + ")", subquery.Arguments));
return Database.ExecuteScalar<int>(sql);
}
public bool Exists(string username)
{
var sql = new Sql();
var escapedUserName = PetaPocoExtensions.EscapeAtSymbols(username);
sql.Select("COUNT(*)")
.From<UserDto>()
.Where<UserDto>(x => x.UserName == escapedUserName);
return Database.ExecuteScalar<int>(sql) > 0;
}
public IEnumerable<IUser> GetUsersAssignedToSection(string sectionAlias)
{
//Here we're building up a query that looks like this, a sub query is required because the resulting structure
@@ -224,6 +249,66 @@ namespace Umbraco.Core.Persistence.Repositories
return ConvertFromDtos(Database.Fetch<UserDto, User2AppDto, UserDto>(new UserSectionRelator().Map, sql));
}
/// <summary>
/// Gets paged user results
/// </summary>
/// <param name="query">
/// The where clause, if this is null all records are queried
/// </param>
/// <param name="pageIndex"></param>
/// <param name="pageSize"></param>
/// <param name="totalRecords"></param>
/// <param name="orderBy"></param>
/// <returns></returns>
/// <remarks>
/// The query supplied will ONLY work with data specifically on the umbracoUser table because we are using PetaPoco paging (SQL paging)
/// </remarks>
public IEnumerable<IUser> GetPagedResultsByQuery(IQuery<IUser> query, int pageIndex, int pageSize, out int totalRecords, Expression<Func<IUser, string>> orderBy)
{
if (orderBy == null) throw new ArgumentNullException("orderBy");
var sql = new Sql();
sql.Select("*").From<UserDto>();
Sql resultQuery;
if (query != null)
{
var translator = new SqlTranslator<IUser>(sql, query);
resultQuery = translator.Translate();
}
else
{
resultQuery = sql;
}
//get the referenced column name
var expressionMember = ExpressionHelper.GetMemberInfo(orderBy);
//now find the mapped column name
var mapper = MappingResolver.Current.ResolveMapperByType(typeof(IUser));
var mappedField = mapper.Map(expressionMember.Name);
if (mappedField.IsNullOrWhiteSpace())
{
throw new ArgumentException("Could not find a mapping for the column specified in the orderBy clause");
}
//need to ensure the order by is in brackets, see: https://github.com/toptensoftware/PetaPoco/issues/177
resultQuery.OrderBy(string.Format("({0})", mappedField));
var pagedResult = Database.Page<UserDto>(pageIndex + 1, pageSize, resultQuery);
totalRecords = Convert.ToInt32(pagedResult.TotalItems);
//now that we have the user dto's we need to construct true members from the list.
if (totalRecords == 0)
{
return Enumerable.Empty<IUser>();
}
var result = GetAll(pagedResult.Items.Select(x => x.Id).ToArray());
//now we need to ensure this result is also ordered by the same order by clause
return result.OrderBy(orderBy.Compile());
}
/// <summary>
/// Returns permissions for a given user for any number of nodes
/// </summary>
@@ -236,63 +321,6 @@ namespace Umbraco.Core.Persistence.Repositories
return repo.GetUserPermissionsForEntities(userId, entityIds);
}
public IProfile GetProfileByUserName(string username)
{
var sql = GetBaseQuery(false);
sql.Where("umbracoUser.userLogin = @Username", new { Username = username });
var dto = Database.FirstOrDefault<UserDto>(sql);
if (dto == null)
return null;
return new Profile(dto.Id, dto.UserName);
}
public IUser GetUserByUserName(string username)
{
var sql = GetBaseQuery(false);
sql.Where("umbracoUser.userLogin = @Username", new { Username = username });
var dto = Database.FirstOrDefault<UserDto>(sql);
if (dto == null)
return null;
return new User(_userTypeRepository.Get(dto.Type))
{
Id = dto.Id,
Email = dto.Email,
Language = dto.UserLanguage,
Name = dto.UserName,
NoConsole = dto.NoConsole,
IsLockedOut = dto.Disabled
};
}
public IUser GetUserById(int id)
{
var sql = GetBaseQuery(false);
sql.Where(GetBaseWhereClause(), new { Id = id });
var dto = Database.FirstOrDefault<UserDto>(sql);
if (dto == null)
return null;
return new User(_userTypeRepository.Get(dto.Type))
{
Id = dto.Id,
Email = dto.Email,
Language = dto.UserLanguage,
Name = dto.UserName,
NoConsole = dto.NoConsole,
IsLockedOut = dto.Disabled
};
}
#endregion
private IEnumerable<IUser> ConvertFromDtos(IEnumerable<UserDto> dtos)
@@ -106,7 +106,7 @@ namespace Umbraco.Core.Persistence.Repositories
//remove the specific tags
tagRepo.RemoveTagsFromProperty(
entity.Id,
tagProp.Alias,
tagProp.PropertyTypeId,
tagProp.TagSupport.Tags.Select(x => new Tag { Text = x.Item1, Group = x.Item2 }));
}
else
@@ -114,7 +114,7 @@ namespace Umbraco.Core.Persistence.Repositories
//assign the tags
tagRepo.AssignTagsToProperty(
entity.Id,
tagProp.Alias,
tagProp.PropertyTypeId,
tagProp.TagSupport.Tags.Select(x => new Tag { Text = x.Item1, Group = x.Item2 }),
tagProp.TagSupport.Behavior == PropertyTagBehavior.Replace);
}

Some files were not shown because too many files have changed in this diff Show More