Compare commits

...

2987 Commits

Author SHA1 Message Date
Sebastiaan Janssen 4d3eef1124 Update version 2014-03-07 15:25:10 +01:00
Shannon 3e6e6faf03 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2014-03-07 20:08:22 +11:00
Shannon b3f18bc677 fixed an issue with setting password with legacy api 2014-03-07 20:08:10 +11:00
Sebastiaan Janssen a48fe40675 Also clean up v6 snippets 2014-03-07 09:46:45 +01:00
Shannon 1511ad58b2 oops, put back the defaults for umbracoSettings 2014-03-06 20:16:55 +11:00
Shannon 2e9b751174 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2014-03-06 20:12:21 +11:00
Shannon d61ab97be3 Fixes: U4-4217 Ensure that the cmsTask data is cleared for any entity that uses umbracoNode table 2014-03-06 20:12:05 +11:00
Stephan dd40d73b71 Merge remote-tracking branch 'origin/6.2.0' into 6.2.0 2014-03-06 10:06:50 +01:00
Shannon 068bca84b7 Fixes: U4-156 Drag / drop support 2014-03-06 20:05:13 +11:00
Shannon 0fda528b94 Fixes: U4-1550 Publish notifications on a load balanced environment 2014-03-06 19:47:23 +11:00
Shannon 3552f63d87 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2014-03-06 19:29:35 +11:00
Shannon 01d04fde37 Fixes: U4-4060 Rollback feature does not show differences 2014-03-06 19:29:09 +11:00
Stephan 7f8c526136 Fix TryConvertTo handling of number decimal separator 2014-03-06 09:14:05 +01:00
Stephan ea4be14f0c Fix 026d040 - keep Standalone stuff internal 2014-03-06 09:10:14 +01:00
Stephan 20df48e2f0 Merge remote-tracking branch 'origin/6.2.0' into 6.2.0 2014-03-06 08:49:38 +01:00
Stephan 2c0f6f975c Bugfix UmbracoEntity ctor test 2014-03-06 08:42:41 +01:00
Shannon fa7f91b39d Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2014-03-06 18:26:10 +11:00
Shannon 72c5853fb1 Completes: U4-3937 Ensure media is indexed across all servers in LB environment with Distributed Cache calls
for members
2014-03-06 18:25:38 +11:00
Stephan f03b1a22f9 Merge remote-tracking branch 'origin/6.2.0' into 6.2.0 2014-03-06 08:12:51 +01:00
Shannon e7fb6e5beb Streamlines member and user services CreateMemberWithIdentity to be similar to media/content and not have a raise events flag. Also implements the CreateWithIdentity explicitly 2014-03-06 18:07:02 +11:00
Shannon d0cc93d6a2 Fixes: U4-3937 Ensure media is indexed across all servers in LB environment with Distributed Cache calls
This fix is for media indexes to be distributed properly and for unpublished content to be distributed properly, now to get members to do the same.
2014-03-06 17:50:08 +11:00
Shannon 4adc2562b1 Fixes issue with ugolive dashboard trying to load in knockout from a bundle which causes the examine mgr to fail 2014-03-06 17:49:09 +11:00
Shannon ba6878666c Fixes pretty ugly issue of the Saving/Saved events not being raised when using CreateWithIdentity 2014-03-06 17:35:47 +11:00
Stephan 792ab8d088 Introduce support for content fragments 2014-03-05 15:46:37 +01:00
Stephan 3d4409e52a Refactor CacheRefreshersResolver.CacheResolvers into .CacheRefreshers 2014-03-05 15:46:35 +01:00
Stephan acd377956f Improve how DomainHelper determines domain 2014-03-05 15:46:34 +01:00
Stephan 3b6dcc3421 Factor Dictionary.ReplaceKey method 2014-03-05 15:46:33 +01:00
Stephan cec4d41df7 Add comments to UmbracoViewPageOfTModel 2014-03-05 15:46:32 +01:00
Stephan ff0bcffefa Implement DefaultShortStringHelper.PostFilter to cut url segments at 240 chars 2014-03-05 15:46:31 +01:00
Stephan 5dbc72897a Add method to reset PublishedContentRequest template 2014-03-05 15:46:30 +01:00
Stephan 83736bec01 U4-4190 - enable retrieval of wildcard domains 2014-03-05 15:46:29 +01:00
Stephan 2f953c3819 Fix a38e0dc - use UInt64 instead of int 2014-03-05 15:46:28 +01:00
Stephan 026d040a62 Enable StandaloneApplication to work with Powershell 2014-03-05 15:39:16 +01:00
Stephan 7747b8f64f U4-3579 - support chars such as <, > or & in prevalues 2014-03-05 15:33:15 +01:00
Shannon feb9f40237 updates some ctors on umbraco context and routing context to have lazy overloads which allows us to more easily create/mock the umbraco context. 2014-03-03 04:16:09 +01:00
Shannon 651182f5de Fixes sql statement - to be like we have in v7 that supports all sql servers 2014-02-25 02:37:48 +11:00
Shannon 22b15a06f6 Fixes how member is approved is set by defaut and adds unit test for it. Also ensures that it returns true if the property value is invalid for whatever odd reason. 2014-02-25 02:10:25 +11:00
Shannon cb09795280 Removes new member service Creating event, as only Created makes sense. Deprecates the other 'Creating' events with a note to just use the Created event. 2014-02-25 01:45:41 +11:00
Sebastiaan Janssen a5637af2d8 Adding missing CreateMember method that also as a convenience allows you to pass in the member type alias instead of a whole membertype 2014-02-22 18:32:26 +01:00
Sebastiaan Janssen ac59c5deb0 Fixing some potential upgrade issues and two issues found with the legacy member API
- For legacy API we never had and "approved" checkbox, so the assumption is that members are always approved
- The RequiresUniqueEmail check was wrong, previously the assumption was: if there's no e-mail then don't check for uniqueness
2014-02-22 16:44:02 +01:00
Sebastiaan Janssen 683ddf6d34 Apparently we rely on <error404>1</error404> to be in umbracoSettings.config 2014-02-22 16:03:59 +01:00
Sebastiaan Janssen eda33b1ac4 Update incorrect summary 2014-02-22 14:47:59 +01:00
Sebastiaan Janssen ed0f884348 Been a while: properly syncing /config/*.config with /config/*.Release.config 2014-02-21 17:50:58 +01:00
Sebastiaan Janssen b561351340 Update UI.Release.xml with the correct Partial View references 2014-02-21 17:33:19 +01:00
Sebastiaan Janssen 690ab29863 Use the database "agnostic" query for this (see U4-3876) 2014-02-21 17:01:59 +01:00
Shannon 27cb1d5223 completes: U4-4275 Hide built-in member type properties from the insert umbraco field list 2014-02-21 16:20:07 +11:00
Shannon c677f36f08 Changes some of the naming conventions for the underlying membership provider services bits. 2014-02-21 16:03:32 +11:00
Shannon 750f7a6b33 Updates some method names to be less confusing regarding permissions 2014-02-21 15:55:56 +11:00
Shannon dea804b402 fixes some permission logic and a unit test 2014-02-21 15:46:39 +11:00
Shannon 3803d1d7da fixes reflected property on dynamicnode and unit test 2014-02-21 15:22:02 +11:00
Shannon 3e67b3034d Added the ability to specify explicit db type's for a property type using an overloaded ctor argument. This allows us to specify explicit db types for properties without having them get overwritten during the repository saving logic which will always reset it to be the db type of the underlying property editor. In the case of our built-in membership properties we do not want this to happen. Fixes some unit tests. Removes built-in props from being included in the property types on the profile model on the front-end. 2014-02-21 12:56:00 +11:00
Shannon 1ada5210ad updated to latest examine 2014-02-21 09:54:53 +11:00
Shannon 9a608674eb fixes another test 2014-02-20 23:11:27 +11:00
Shannon 7dae412a29 fixes most of the newly failing unit tests and adds better null checking 2014-02-20 23:00:04 +11:00
Shannon a1067e676f publicizes some repository factory methods and interfaces 2014-02-20 21:56:58 +11:00
Shannon ce649f54d7 Upgraded to latest examine, completes: U4-4240 Update with new examine version 0.1.53 2014-02-20 15:01:47 +11:00
Shannon d159792256 Updates last step of installer logic, we don't care about other providers as that would never have worked anyways 2014-02-20 14:38:00 +11:00
Shannon 606b5aa60a fixes logic in membershiphelper updatemember 2014-02-20 13:55:56 +11:00
Shannon a206652a0d updates login redirect logic to be more inline with v7, less greedy which is better. 2014-02-20 13:37:12 +11:00
Shannon 545040fdf0 Fixes installer upgrade 2014-02-20 13:09:54 +11:00
Shannon 40d1a09609 Updates the membership helper in how it updates the membership provider data, updates the editMember page to update the membership provider properties all via the membership provider 2014-02-19 23:49:53 +11:00
Shannon 2e25bc8fdb Moves all FindCOntrolRecursive calls to an extension method 2014-02-19 23:49:08 +11:00
Shannon 1618ac86b8 Adds implicit bool operator for Attempt, makes things nicer to check for success :) 2014-02-19 22:45:22 +11:00
Shannon a4adbca12c Removes the ability to edit the data type for a built-in membership property. Ensures that even if a data type is attempted to be changed with the API that the built-in properties are always persisted with the data type that we have defined by convention. 2014-02-19 21:56:33 +11:00
Shannon 8728e2f918 Fixes: U4-4260 When changing sort order on member type and saving, this doesn't get reflected on the member 2014-02-19 20:17:21 +11:00
Shannon cd53682ddb removes ability to configure custom fields for the new membership provider 2014-02-19 17:52:45 +11:00
Shannon e2d5fbf545 Fixes issue with ensuring properties on entities when a new property type has been created - but if the property type doesn't have an id, we should ignore it. 2014-02-19 17:27:08 +11:00
Shannon d339e7c814 updates the property type editability for built in member types 2014-02-19 16:57:33 +11:00
Shannon 078deb704b Completes: U4-4255 Add readonly membership provider properties to the profile model 2014-02-19 16:27:14 +11:00
Shannon 6858eb3330 Fixes: U4-4257 Fix member type editor to not have to re-call 'Save' so many times,
streamlines how the show property and editable property on member type's are dealt with (removes tuples)
2014-02-19 16:14:34 +11:00
Shannon e267b7700a Ensures that member properties are created when member type property type's are added (same as U4-1407), streamlines how this occurs on the base class. Streamlines how empty aliases are validated at the repo level for members, media, content. Makes built-in member property type's non-editable 2014-02-19 14:23:48 +11:00
Shannon 1e45abe71e oops, changes the failedpassattempts back to noedit 2014-02-18 17:58:57 +11:00
Shannon a556b4ed21 Logs warnings if accessing built-in properties on the member model but the underlying property type is missing. 2014-02-18 17:53:02 +11:00
Shannon 953c711ca4 Updates the default member type property types to use "Labels", then needed to update the member type repo and membertypereadonlyfactory to ensure that even though the underlying data type for the property exposes a different Db Type that we 'reset' that Db Type to what it always should be. This means that no matter what underlying data type a developer changes a property to, if it is a built-in membership property, the Db Type will always stay consistent and save in the correct column. Of course if someone enters some invalid data, then the data will not be saved. 2014-02-18 17:19:38 +11:00
Shannon f06c9e8235 Ensures the default member type properties are put on a custom tab 2014-02-18 15:39:00 +11:00
Shannon f1a439e851 removes version specific references to mysql in the proj files and web.config
ensures that escaping in the sql expression classes is done correctly without any double escaping. Also ensures that escaping is happening using the equals operator, not just the Equals() method and adds unit tests for them.
Fixes: U4-4232 Umbraco.Core.Persistence.Querying issue with backslashes
2014-02-18 14:57:03 +11:00
Shannon a0e496e589 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2014-02-17 21:38:38 +11:00
Shannon e0dcc3afbc Streamlines how strings are escaped with the sql expression helpers and syntax providers. Fixes: U4-4232 Umbraco.Core.Persistence.Querying issue with backslashes 2014-02-17 21:38:13 +11:00
Stephan 3634a77d61 U4-4241 - UrlAbsolute() returns relative urls 2014-02-17 10:47:51 +01:00
Shannon 846f4b5b6c Removes the various old hacks for the legacy user's membership provider, now that we have the AllowManuallyChangingPassword flag, these hacks are not required. 2014-02-17 19:32:04 +11:00
Shannon 2869f17eff ensures the default property aliases are set during ctor 2014-02-17 18:02:29 +11:00
Shannon feefb052fd Updates the BulkInsertRecords method to optionally close the trans - shouldn't by default. Updates how permissions are handled in the new services and exposes another method, ensures it's all wrapped in trans and ensures that cache is cleared properly. Fixes: U4-4213 "Replace child node permissions" does not work if all permissions cleared 2014-02-17 17:45:59 +11:00
Shannon 4d2d9156ba updates more plugin manager defs 2014-02-17 15:58:57 +11:00
Shannon 82ba1a24a3 Ensures we perform null checks in both GetAll and GetByQuery as we never want to include a null item in the resultant collection - which could happen depending on what the sub class repository is doing.
Fixes: U4-3145 Cache file periodically becomes corrupted: "Oops: this document is published but is not in the cache (internal error)"
2014-02-17 15:45:36 +11:00
Shannon 357db9d0b6 completes: U4-3282 Expose permission assignment methods at the service layer 2014-02-17 15:33:17 +11:00
Shannon 61766287bc Cleans up some more of the old 'object' User Id references. 2014-02-17 15:26:38 +11:00
Shannon ffbf8b2fd6 completes: U4-4103 Publicize PluginManager for devs to use to create their own plugins 2014-02-17 15:08:27 +11:00
Shannon f7a703195c Fixes: U4-4215 Tree.config registeres tree inconsistently 2014-02-17 14:56:12 +11:00
Shannon 509be9b431 Updates the underlying UmbracoServiceMembershipProvider to deal with 'object' for provider key, this then lets us deal with either guid or int for the new membership provider, just like the old one does. 2014-02-17 14:14:17 +11:00
Shannon 10ef5eb7bc adds new interface for members' membership providers to implement so we know what aliases to store data against. 2014-02-17 13:16:28 +11:00
Shannon 2849ecadb7 fix legacy member wrapping new api and mixing email/login name 2014-02-17 12:24:11 +11:00
Shannon 697f93c3ce removes null check for LoginName, since it gets set to the name passed in if it is empty 2014-02-17 12:09:27 +11:00
Shannon 18121e8726 Enxures user start node's are -1 by default when creating the model. 2014-02-17 11:48:32 +11:00
Shannon 81cdc71145 Ensures new user objects are approved by default. 2014-02-17 11:17:15 +11:00
Shannon 4069fc8d1f fixes issue with legacy user.Password property and fixes comparison of sections 2014-02-13 17:19:28 +11:00
Shannon 0a80c39962 Fixes merge 2014-02-13 15:25:57 +11:00
Florian Verdonck edee8134c2 Updated request after feedback 2014-02-13 15:21:40 +11:00
Shannon 30a73c0886 updated web.config template to use new role provider. 2014-02-13 14:45:24 +11:00
Shannon f5ee02a3e9 Updates the membership partial view templates to redirect to current page by default but allows this to be overridden. Creates a new RedirectToCurrentUmbracoUrl method which is slightly diff from RedirectToCurrentUmbracoPage since it doesn't care about the actual page item rendering, just the currently rendered URL which is useful if coming from a rewritten URL (which is what happens with public access rewrites) 2014-02-13 13:30:32 +11:00
Shannon 9827b40bea Fixes: U4-4223 MVC based forms with SurfaceControllers don't work when rendered in Webforms mode.
This slightly changes how the routing works in the module, now we always send the request to the RenderRouteHandler, this will first process the logic for route hijacking, then it will determine if the request was found to be a WebForms template, if so then we'll return the webforms handler. This also now allows us to have POSTed values to SurfaceController's from forms that have been rendered in Webforms whilst maintaining all viewdata, tempdata and model state on postback even when rendering in webforms!
2014-02-13 13:19:51 +11:00
Stephan f9323c85e4 Fix issue with 9d7b3b96 in .designer.cs file 2014-02-12 13:22:35 +01:00
Stephan 2677672e50 Merge remote-tracking branch 'origin/6.2.0' into 6.2.0 2014-02-12 13:22:30 +01:00
Morten Christensen a38e0dcf86 Adding integer overload for UmbracoEntity so it can be used with a dynamic object containing either a boolean or integer retrieved from the database to initialize the UmbracoEntity object. 2014-02-12 12:47:47 +01:00
Stephan fdd7227494 Fix DynamicPublishedContent to use CleanStringType.ConvertCase 2014-02-12 10:46:57 +01:00
Stephan 6b74e14cdd Backport DefaultShortStringHelper from 7.1 2014-02-12 10:40:00 +01:00
Shannon 9d7b3b965a fixes some issues with new bundles. 2014-02-12 18:19:20 +11:00
Shannon 806008a7e9 Fixes issue with @ symbols in login name and a member group query 2014-02-12 18:02:00 +11:00
Shannon 45fa192c95 Fixes some unit tests 2014-02-12 17:25:45 +11:00
Shannon 92235128f1 Got new MemberGroupService done, completed the MemberService for role based stuff, created a member group cache refresher since we are caching member groups by name (probably should cache others too). Public access stuff changes if a name of a member group is changed which is now done with an event instead of coded into the biz logic. 2014-02-12 17:14:16 +11:00
Shannon 7622937cfd implemented remaining methods for member groups/roles + unit tests 2014-02-11 20:38:48 +11:00
Shannon bf41694572 Fixed up some more of the member group + member stuff with more unit tests 2014-02-11 19:21:36 +11:00
Shannon 7b897ce64c Member group repo updated along with the member service to support roles, etc... got first of many unit tests passing. 2014-02-11 12:43:55 +11:00
Shannon 1ca950f721 Starts creating the IMemberGroupService and supporting classes. 2014-02-10 19:48:16 +11:00
Shannon ffba271fd0 Creates the MemberGroupRepository and supporting models. 2014-02-10 19:35:32 +11:00
Shannon ec08d3e910 Updates MembershipHelper to not change the email/name if the value has not changed. Updates the templates to show only validation summaries for their own values/prefixes. Fixes some underlying MVC methods that merge view state to ensure the prefixes work with validation summaries properly when not showing property level errors. Updates the Umb controllers to add model level validation msgs when failed. 2014-02-10 18:34:12 +11:00
Shannon 0bfd032fad Obsoletes the RedirectOnSucces on the RegisterModel as it is not needed. Adds RedirectUrl to the ProfileModel and updates the controller to redirect properly (ensures it doesn't just redirect to home!) 2014-02-10 16:46:45 +11:00
Shannon 2bb58b6fca Updates MembershipHelper to ensure that the membership provider is used when updating a profile, specifically to deal with unique emails. Updates the profile edit template to have correct validation procedures. 2014-02-10 16:22:15 +11:00
Shannon 4d2d656b3d Moved ChangePassword method to MembershipHelper and makes it public, adds an overload. 2014-02-10 14:29:29 +11:00
Shannon fa625d72f9 updates some comments 2014-02-10 14:12:44 +11:00
Shannon 1991380e02 Changes CDF version to be the hash code of UTC now 2014-02-10 13:53:12 +11:00
Shannon 3b8d6dc2c7 Merge remote-tracking branch 'origin/6.2.0' into 6.2.0 2014-02-10 13:50:43 +11:00
Shannon 1faeb76c27 Removes the need for duplicate templates for partial views. Of course we can have partial view only templates if necessary but currently we just borrow them from the partial view macros and update the header 2014-02-10 13:50:31 +11:00
Sebastiaan Janssen 3a513668fd U4-4185 Log fails to show unicode (cyrillic) characters 2014-02-05 15:52:20 +01:00
Stephan 3ef51d7357 U4-2317 - issue with domains & languages management 2014-01-30 16:18:06 +01:00
Stephan 8b553dd067 U4-4144 - work around media cache exceptions on invalid properties 2014-01-29 19:30:17 +01:00
Shannon ccaf82d797 Fixes object extensions for dates with a 'kind' specified. 2014-01-29 11:21:35 +11:00
Shannon f28ae52ae3 moved logic to update a profile to MembershipHelper. 2014-01-28 21:57:00 +11:00
Shannon cfd0973f00 Moves the registration logic to the MembershipHelper, fixes up the views to keep the indexes so props save. 2014-01-28 21:42:30 +11:00
Shannon 1bfdd83ba7 Cleans up more of the membership controllers and snippets to be using the membership helper and fixes up a few issues 2014-01-28 19:41:21 +11:00
Shannon 6fefcacc61 Adds more methods to the MembershipHelper, updates the RegisterModel and obsoletes the standard ctor so biz logic is not happening in the model, updates the snippets to use the correct way. Fixes an issue in the membership repo for persisting new members when the member type doesn't contain all the built-in props. 2014-01-28 18:59:27 +11:00
Shannon 3b639e61b2 Exposes MembershipHelper onthe UmbracoViewPage so people can use it directly in views. 2014-01-28 17:02:20 +11:00
Shannon 9959ff667e publicizes MembershipHelper and exposes it on the various base classes: SurfaceController, UmbracoApiController and UmbracoUserControl as the property "Members", will add more helper methods. 2014-01-28 16:58:55 +11:00
Shannon de1f86c7a1 adds logic to the membership helper to create a new LoginStatusModel with the values filled in, obsoletes the empty ctor on LoginStatusModel since that does some biz logic lookups, instead replaces it with a static method to create an empty one. 2014-01-28 16:30:58 +11:00
Shannon 28d8fd0531 Changes LoginStatusModel to use the correct api and updates the new membership provider stuff to ensure that the provideruserkey is the int id of the model for backwards compatibility. 2014-01-28 16:13:05 +11:00
Shannon e4e76eb0bf Backports commit: Prefixed built in controllers to better avoid conflicts with people's custom code
Conflicts:
	src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/EditProfile.cshtml
	src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Login.cshtml
	src/Umbraco.Web/Controllers/UmbLoginController.cs
	src/Umbraco.Web/Controllers/UmbLoginStatusController.cs
	src/Umbraco.Web/Controllers/UmbProfileController.cs
	src/Umbraco.Web/Controllers/UmbRegisterController.cs
	src/Umbraco.Web/Umbraco.Web.csproj
2014-01-28 13:47:16 +11:00
Shannon 677cc8c8fd Fixes ProfileController to use normal .Net APIs and the new members service - also removes the Response.Redirect that was in there, why was it like that? 2014-01-28 13:35:43 +11:00
Shannon 3fa5c4e0b2 Updates RegisterController with the standard ASP.Net APIs to create and login a member. 2014-01-28 13:21:30 +11:00
Shannon 360393c464 Fixes LoginStatusController to use the standard ASP.Net APIs 2014-01-28 13:07:25 +11:00
Shannon d3daf88a8d Fixes the LoginController to use the correct APIs 2014-01-28 12:58:22 +11:00
Shannon 7a99ebd6d9 Starts the implementation of the new role provider. 2014-01-28 12:48:41 +11:00
Shannon a7298e2e5a Completes: U4-4148 Anytime RuntimeCacheProvider or InMemoryCacheProvider is used, a cache refresher will need to handle it's distribution! 2014-01-28 12:20:10 +11:00
Shannon 15d7443c61 Streamlines the content type cache refreshing, leaving some of the legacy cache clearing but that shouldn't really have an effect, with these new changes it should be guaranteed that the distributed cache is executed always for Doc, media and member types. 2014-01-28 12:13:27 +11:00
Shannon f2b7e27b34 Fixes: U4-2721 RuntimeCacheProvider is not cleared when data type changes and updates the repo factory to not use the InMemory cache provider since we should only ever use that for very very specific reasons since the memory can never auto-clear with that provider. 2014-01-28 11:30:02 +11:00
Shannon 690d08aa8c Completes wrapping the new IUserService from the legacy User object. Ensures User cache is handled correctly and distributed cache is updated for Users. 2014-01-28 10:46:59 +11:00
Shannon 6719d70cc0 Updates UserTypeCacheRefresher to clear the runtime cache accordingly. 2014-01-28 09:22:01 +11:00
Shannon 3cdcf513ec removes ancient test project 2014-01-28 09:00:17 +11:00
Shannon 43c426b46c Update booting.aspx
Throw the exception immediately if the parameter is not there or empty.

If the parameter is not there it's defaulted to the current url, and this will redirect to itself and create an endless loop here.
2014-01-24 12:36:02 +11:00
Shannon e2ac82abca Gets most of the User and UserType legacy objects wrapping the new services, yay! Now just need to sort out all the caching stuff which I have tasks for. 2014-01-23 18:44:41 +11:00
Shannon 64d1a484bd Fixes User Id issues with HasIdentity, wraps legacy UserType to the new service, fixes the uninstalling db schema to not throw exceptions and clog up the unit test log. 2014-01-23 17:11:58 +11:00
Shannon 585b42af48 More Save()'s missing and removes the extra calls to XmlGenerate - should save some processing time. 2014-01-23 16:13:29 +11:00
Shannon 7c4412fc4b Ensures that Save() is called wherever member data is saved 2014-01-23 16:09:59 +11:00
Shannon 0be8039c8f Changes how IProfile works which is now just exposed by the IUser instead of implemented, this cleans up the Id situation. 2014-01-23 15:31:49 +11:00
Shannon 668265f1ac Allows forcing pass change with new provider, updates conventions to not allow editing of question/answer - unfortunately cannot make the other ones readonly because noEdit data type is the wrong clr type. 2014-01-23 15:11:54 +11:00
Shannon 4735f27a66 Fixes more naming conventions with CreateMemberWithIdentity, fixes memberTasks to ensure the name is set, fixes new membership providers which had the name/email call reversed. Updates the cache refresher event handler to listen to MemberService events instead of the old legacy API events. 2014-01-23 14:55:41 +11:00
Shannon 6377b9aa50 Fixes some underlying type conversions, fixes more of the member type wrapping, updates contenttypecontrolnew to work with member types properly, ensures the property type cache is cleared when member types change. 2014-01-23 13:33:58 +11:00
Shannon 011be60205 Finishes wrapping the member service and fixes a few bugs - ensures the RepositoryBase doesn't keep enumerating when getting all 2014-01-23 12:30:28 +11:00
Shannon a272675ed8 Wraps the MemberService from the legacy Member object 2014-01-23 11:41:01 +11:00
Shannon 80697cf9ca MemberType fully wraps new MemberTypeService 2014-01-23 10:57:24 +11:00
Shannon f4534aa94c adds unit tests for member type can view/can edit properties 2014-01-23 10:55:22 +11:00
Shannon 56dec485a5 Starts wrapping MemberTypeService from the legacy MemberType object. Changes the User.Id to an int - no more casting. Changes CreateMember to CreateMemberWithIdentity for consistency. Adds raiseEvent params to the create/save methods. Updates the MemberTypeService to have consistent naming conventions. Starts wrapping more of the MemberService from the legacy Member object. 2014-01-23 10:41:57 +11:00
Shannon ffde0f48cf Starts wrapping MemberTypeService from the legacy MemberType object. Changes the User.Id to an int - no more casting. Changes CreateMember to CreateMemberWithIdentity for consistency. Adds raiseEvent params to the create/save methods. Updates the MemberTypeService to have consistent naming conventions. Starts wrapping more of the MemberService from the legacy Member object. 2014-01-23 10:35:30 +11:00
Shannon 2956aee4e3 Fixes: U4-4108 The backoffice should not be accessible when the app is not configured, it should redirect to the installer and U4-4106 Set the new membership providers to be shipped as default. 2014-01-22 15:26:45 +11:00
Shannon 9bd8d729fa publicizes user stuff, changes the IUser.Id to an int - no need for it to be an object and casted everywhere. Updates the login logic to perform the mapping logic for custom membership providers with an extension method. 2014-01-22 14:07:18 +11:00
Shannon fb9569d914 Fixes user membership providers to throw exceptions on duplicate emails when the provider is configured to not allow duplicates. 2014-01-22 13:20:00 +11:00
Shannon 47974d49fe obsoletes old providers, creates new membership role provider stub 2014-01-22 12:16:47 +11:00
Shannon 3f8b3031c2 completes: U4-3996 Fix EditUser to use the membership provider properly, U4-3997 Fix EditMember to use the membership provider properly 2014-01-22 11:57:33 +11:00
Shannon 7da41594fd re-publicizes member services, fixes: U4-4102 Un-obsolete ContentService.Publish 2014-01-22 11:27:44 +11:00
Shannon 9796b30bbb Fixes: U4-4104 Using strongly typed Html.Action<T> with a PluginController causes exception 2014-01-22 11:02:24 +11:00
Shannon c2c4763faa Ensures username is escaped in user service 2014-01-20 16:11:38 +11:00
Shannon c062d3b71b Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2014-01-20 16:01:53 +11:00
Shannon ed83fb8216 updates user task creation for release 2014-01-20 16:00:19 +11:00
Stephan 326309e61e U4-4056 - better unicode/ascii support for urls 2014-01-16 17:09:21 +01:00
Shannon c38030def2 Fixes: U4-3855 Preview cookie should be a session cookie not persisted 2014-01-16 20:47:13 +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
Sebastiaan Janssen ae83b0fbaf Hardcoded empty snippets need to be updated as well.. 2014-01-15 21:07:24 +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 5c614a88a2 ensures webapi plugincontrollers are routed to /backoffice if [IsBackOffice] is specified 2014-01-15 13:29:17 +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 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
Shannon 000c2637d6 fixes view state and err msg 2014-01-14 16:54:32 +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 7d57521ad8 Fixes some thread safety issues with old membership API 2014-01-14 11:53:41 +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 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 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
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 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 7c720460f5 Fixes: U4-3876 MySQL cmsContentXml Migration Error on 7.0.1 Upgrade 2014-01-09 10:33:35 +11: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 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 21c5b6fe02 fixes user lookup on legacy provider 2014-01-08 18:20:18 +11:00
Shannon ffed85640d fixes provider user key issue 2014-01-08 18:12:07 +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 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 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
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
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 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 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 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 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 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
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
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
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
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 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 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 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 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 9115aa1a6d merge issue with proj file 2013-12-19 11:46:31 +11:00
Shannon 904cbbb906 missing proj file update 2013-12-19 11:41:26 +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 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
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 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 137d859532 backports missing logic and tests from 7 that I overlooked. 2013-12-17 16:13:38 +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 b4e984fe6a adds/updates unit tests for member and member type repository 2013-12-17 12:38:11 +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 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 66dd0d073c backports the member type service updates 2013-12-16 19:05:03 +11:00
Shannon 29c22cc4b5 exposes repository service 2013-12-16 19:02:53 +11:00
Shannon e29031a2c4 Back ported relationship repo/service updates 2013-12-16 18:44:11 +11:00
Shannon 3ff0cca033 back ports entity service updates 2013-12-16 18:23:40 +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 d1e071b9cb adds additional unit tests for the data type service to include pre-value handling. 2013-12-16 17:47:40 +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 6a9b8d5540 Fixes a unit test issue with the mntp editor initialization. 2013-12-16 16:27:59 +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
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
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
Shannon a1c65f0518 Gets that naggy unit test passing 2013-12-12 17:52:03 +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 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 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
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
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
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
Shannon 37eb66510f Fixes: U4-3505 Sometimes macro parameter types are not resolved during startup 2013-12-06 14:07:29 +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
Chriztian Steinmeier dc60eb8383 Fix a typo/grammar error in da.xml 2013-12-05 13:06:24 +01: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
Shannon f6179ff813 Strange, somehow these updates got overwritten 2013-12-05 16:11:15 +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 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 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 38df2017de Fixes issue with deleting content types that have content 2013-12-04 15:01:27 +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
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
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
Shannon e981776e6d Created new EnsurePublishedContentRequestAttribute for custom routing to still be able to render macros. 2013-11-29 17:41:38 +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
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
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 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
Shandem 96440c9ee5 Merge pull request #248 from lars-erik/6.2.0-fix-sqlsyntaxprovider-indexclustring
6.2.0 fix sqlsyntaxprovider indexclustring
2013-11-14 22:00:31 -08:00
Shannon b4c005c140 Fixes up the EntityRepository to use dynamics for media as well so that *all* fields in the main table are returned so we can store this information in AdditionalData, now that this is working nicely we should make the entity repo lookup the properties for content too just like we're doing for media since these get put into AdditionalData as well and there's really not much overhead to do that.
Conflicts:
	src/Umbraco.Core/Persistence/Repositories/EntityRepository.cs
2013-11-15 14:53:26 +11:00
Shannon eca823ea90 Fix for U4-3529 Ysod editing Partial View 2013-11-15 13:49:20 +11: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
Lars-Erik Aabech e3cd85a6a2 Made CreateIndexBuilder set IndexType in Clustered(), NonClustered() and Unique(). 2013-11-14 10:55:35 +01:00
Lars-Erik Aabech 69f805ecca Proof that CreateIndexBuilder.NonClustered() does not affect index creation statement on SQL Server.
CreateIndexBuilder_SqlServer_NonClustered_CreatesNonClusteredIndex() fails expecting NONCLUSTERED but getting CLUSTERED.
CreateIndexBuilder_SqlServer_Unique_CreatesUniqueNonClusteredIndex() fails expecting UNIQUE NONCLUSTERED but getting CLUSTERED.
2013-11-14 10:53:58 +01:00
Shandem c037e2e09f Merge pull request #246 from lars-erik/6.2.0-fix-U4-3508
Fixes Template.ToXml() (U4-3508) and refactored Template.Import to use P...
2013-11-13 15:51:29 -08:00
lars-erik d8debf6789 Fixes Template.ToXml() (U4-3508) and refactored Template.Import to use PackagingService.ImportTemplates.
Fixed nullreference bug in ImportTemplates when used with XElement("Template"). (Added test for case with one template only)
2013-11-13 14:27:05 +01:00
Marc Stöcker 282da69d61 Fixed minor typos 2013-11-13 13:27:56 +01:00
Shandem e9ed1bf17a Merge pull request #244 from leekelleher/U4-3051
Fixes: U4-3051 GetAncestorOrSelfDocuments gets stuck in infinite loop
2013-11-12 14:11:05 -08:00
leekelleher cfcfb75dcc Fixes: U4-3051 GetAncestorOrSelfDocuments gets stuck in infinite loop 2013-11-12 21:26:21 +00:00
Morten Christensen 181593f5ea Merge pull request #234 from saciervo/fix/petapoco-fetch
SqlHelper Refactoring
2013-11-11 02:59:49 -08:00
Shannon a311a54d3d Hugely simplifies setting properties from macro parameters on user control macros with tests. 2013-11-11 12:22:29 +11: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
Sandro Ciervo 9911f03745 Fixed potential DbReaderException
- Use Fetch<T> instead of Query<T> because we create another DbReader inside the loop with DoesMacroHaveParameters().
2013-11-07 20:09:06 +01: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
Sebastiaan Janssen d76336cd39 Merge pull request #194 from Attackmonkey/Hackathon-U4-3228
Fixes issue U4-3228, where dictionary item names are not trimmed.
2013-11-07 08:45:21 -08: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
Sebastiaan Janssen 0dc3920309 Merge pull request #191 from dipeshhirani/U4-2756
Fixed the issue below: U4-2756
2013-11-07 08:38:44 -08:00
Sebastiaan Janssen 98d1aafb75 Merge pull request #187 from wpyz/6.2.0
Fixes issue with opening VS solution when only Visual Studio 2013 is installed (fixes U4-3445)
2013-11-07 08:36:40 -08: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
Sebastiaan Janssen 6a0d7ec8d6 Merge pull request #183 from mkariti/U4-1477
fix U4-1477
2013-11-07 07:49:27 -08: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
Morten Christensen f9a86385b5 Rearranging the create schema extensions methods to provide a bit more flexibility for external usage. 2013-11-07 14:03:34 +01: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
Morten Christensen b8f7df1a96 Fixing the broken stylesheetrepository test and ignoring the StylesheetRepository in the RepositoryResolverTest for the time being as it takes two different UOWs as opposed to other repositories. 2013-11-07 13:33:49 +01:00
Tim Payne 425fd80e65 Fixes issue U4-3228, where dictionary item names are not trimmed. 2013-11-07 12:28:43 +00:00
Morten Christensen 04bb778dc1 Fix StylesheetRepositoryTest which broke as a result of PR #176 2013-11-07 12:52:25 +01:00
dipeshhirani 3f2be3342a Fixed the issue below:
The "Unpublish" button (under Properties tab) is bad translated to Italian.
The used word is "Non pubblicato". This phrase is mean "It is not published".
A best translation is "Non pubblicare" (unpublish).

Did not do any of the others as they are either already done or the requesters change seems incorrect/irrelevent
2013-11-07 11:42:08 +00:00
Morten Christensen 3ba50e7bae Merge pull request #176 from pynej/add-stylesheet-ids
Fix for missing Id's on FileService.GetStylesheets() call.  This is need...
2013-11-07 03:41:33 -08:00
Morten Christensen 7306ddef14 Merge pull request #182 from stocksr/6.2.0-petapoco-refactor
6.2.0 petapoco refactor - umbraco.cms.businesslogic.language.Item
2013-11-07 03:37:37 -08:00
Morten Christensen 17bb29eb66 Merge pull request #185 from saciervo/6.2.0
Use PetaPoco instead of SqlHelper
2013-11-07 03:35:49 -08:00
Morten Christensen 8bf3de738f Merge pull request #188 from stocksr/6.2.0-petapoco-refactor-umbraco.cms.businesslogic.language.Language
Refactoring umbraco.cms.businesslogic.language.Language class
2013-11-07 03:34:08 -08:00
Robert Stocks 2d37502a44 Refactoring umbraco.cms.businesslogic.language.Language class 2013-11-07 11:28:00 +00:00
Ryan Lewis d5c485205a Whitespace 2013-11-07 11:24:40 +00:00
Ryan Lewis 9533198365 Can open VS solution with only Visual Studio 2013 installed (fixes U4-3445) 2013-11-07 11:23:41 +00:00
Morten Christensen 66f20e3800 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-11-07 12:19:27 +01:00
Sandro Ciervo 9269a98806 Refactored Umbraco.Web.UI.Controls.InsertMacroSplitButton
- CreateChildControls()
- DoesMacroHaveParameters (Int32)
2013-11-07 12:15:03 +01:00
mkariti 7c97fddec5 fix U4-1477 2013-11-07 13:08:56 +02:00
Morten Christensen a567cf2a87 Minor update to the DefaultData so the used PetaPoco db object is consistent 2013-11-07 12:00:45 +01:00
Morten Christensen 1e319d667b Updating the remaining methods in the Notification class so it no longer uses the legacy SqlHelper. 2013-11-07 11:59:59 +01:00
Sebastiaan Janssen cc039e365d Merge pull request #181 from Attackmonkey/Tim-Payne-Hackathon-U4-2708
Fixes issue U4-2708
2013-11-07 02:55:03 -08:00
Morten Christensen f91ff5dc31 Special commit for a special Lars-Erik 2013-11-07 11:48:25 +01:00
Robert Stocks 9347a2edbb Refactoring umbraco.cms.businesslogic.language.Item class - Fix Update and Delete calls 2013-11-07 10:40:23 +00:00
yawka 1923b68594 Fix 2034, add check for whitespaces 2013-11-07 12:36:35 +02:00
Robert Stocks 64a73ef528 Refactoring umbraco.cms.businesslogic.language.Item class 2013-11-07 10:20:55 +00:00
Tim Payne 4ea04f5ffe Fixes issue U4-2708 2013-11-07 10:08:11 +00:00
Morten Christensen 6b006e6fd7 Refactoring GetUserNotifications method in the Notification class 2013-11-07 11:00:19 +01:00
Shannon fc0654a80f Fixes: U4-2241 Native Multi-node tree picker in Member Types: Saving clears selected items 2013-11-07 12:02:41 +11:00
Sebastiaan Janssen 4717faaf1b Merge pull request #180 from Jeavon/U4-3432
Fix for U4-3432Rollback Dialog - CreateDate/Creator formatting tweaks
2013-11-06 09:48:08 -08:00
Jeavon Leopold e7d587f776 Fix for U4-3432Rollback Dialog - CreateDate/Creator formatting tweaks required 2013-11-06 17:19:18 +00:00
Stephan dca0c85db5 Merge remote-tracking branch 'origin/6.2.0' into 6.2.0 2013-11-04 12:54:07 +01:00
Shannon 5006115b2d Fixes object extensions and tests
Conflicts:
	src/Umbraco.Core/ObjectExtensions.cs
	src/Umbraco.Tests/ObjectExtensionsTests.cs
2013-11-02 15:20:04 +11:00
Stephan 058cec7551 Cache AspNet hosting permission level 2013-11-01 16:57:31 +01:00
Stephan 2671709991 U4-2518 - issue with virtual dir named Umbraco 2013-11-01 09:53:50 +01:00
Shannon ac2d8633af Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-11-01 18:07:18 +11:00
Shannon 76bc312842 Fixes an issue with empty string conversions to date time - should fail 2013-11-01 18:06:58 +11:00
Stephan 767719357e U4-3279 - better exception message when failing to find a content type 2013-10-31 18:28:49 +01:00
Stephan 7b29bd67f3 Merge remote-tracking branch 'origin/6.2.0' into 6.2.0 2013-10-31 15:29:16 +01:00
Shannon dc4a0fec80 Merge branch '6.2.0' into 6.2.0-membershipprovider
Conflicts:
	src/Umbraco.Web/Umbraco.Web.csproj
2013-10-31 11:36:04 +11:00
Shannon 4c3d700c54 Changes the UserMembershipProvider to validate an already hashed/encrypted password and then validate a non hashed/encrypted attempt, this is to maintain compatibility with how v6 works, it's not ideal but needs to be there. Creates a settable property on the password changer to be able to dynamically hide the old password field if you are going to manually set the old password. Updates the EditUser to hide the old password field and pass in the alraedy encrypted pword to validate against like it used to be. 2013-10-31 11:35:12 +11:00
Jeremy Pyne 6451f6ad68 Fix sql errors in prev change. 2013-10-29 10:00:25 -04:00
Jeremy Pyne 7cd6882f28 Removed dependence in Stylesheet repository on Entity Service. 2013-10-29 09:24:05 -04:00
Jeremy Pyne dc336728b5 Fix for missing Id's on FileService.GetStylesheets() call. This is needed as sytlesheets can only be loaded in the editor via their Id so listing stylesheets needs to list there Id as well for custom plugins to render the build in editor. 2013-10-28 14:32:18 -04:00
Shannon 49d5791825 Adds DescendantsOrSelf extensions on ienumerable to published content extensions 2013-10-28 12:35:50 +11:00
Shannon 6cfb864055 Fixes DataTypeDefinitionRepository to properly delete a data type including it's pre-values 2013-10-28 11:23:09 +11:00
Stephan 89c5d5d613 PublishedContent - get published properties to report the CLR type of the value 2013-10-28 01:09:34 +01:00
Stephan 73b7729b82 Standalone - fix so it works again 2013-10-28 01:07:29 +01:00
Stephan c66d49dbfe PublishedContent - remove useles code in model factory 2013-10-28 01:07:17 +01:00
Shannon 9a3b70149c Fixes packaging service to export data type's property with the ID as the property editor ID 2013-10-28 11:00:14 +11:00
Shandem 98cc1c63ce Merge pull request #173 from pynej/trees-config-action
Trees config action
2013-10-27 16:00:00 -07:00
Stephan 128a08f169 Web.Mvc - Refactor UmbracoViewPage, UmbracoTemplatePage, support strongly-typed content
Conflicts:
	src/Umbraco.Web/Umbraco.Web.csproj
2013-10-25 13:21:29 +02:00
Stephan 4487e686d7 Core.TypeExtensions - add methods 2013-10-25 13:19:20 +02:00
Shannon ae32968efd Updates the legacy membership providers and WebSecurity/Password changer to stay backwards compatible with their previous settings whilst still keeping all of the provider fixes. 2013-10-23 10:19:43 +11:00
Shannon c1778918b5 Fixes more membership provider woes. 2013-10-22 17:37:03 +11:00
Shannon 680a4b9570 Fixes a lot -
U4-3208 Ensure all membership provider properties exist on the default Member type shipped with Umbraco
U4-3158 user back office password policies doesn't adhere to membership provider rules
and even more fixes to the membership provider like actually integrating the last locked out date and last pword change date. Fixes member creation to actually use the membership provider - this means that the password is created properly based on the provider config. Fixes the provider to have default fields specified so people don't actually have to specify in config.
2013-10-22 13:41:04 +11:00
Jeremy Pyne ba6ba15732 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.1.3-clean 2013-10-18 11:37:28 -04:00
Jeremy Pyne 291f526368 Fix to properly read actions from trees.config. 2013-10-18 11:37:06 -04:00
Shannon ff61812e65 Merge remote-tracking branch 'origin/6.2.0' into 6.2.0-membershipprovider 2013-10-18 16:14:24 +11:00
Shannon d20ea58467 Fixes: U4-3193 Partial view cache needs to invalidate based on cache refreshers 2013-10-18 16:13:41 +11:00
Shandem c4f3dae317 Merge pull request #172 from IDisposable/6.2.0
Reduce Exceptions thrown during type conversions.
2013-10-17 18:07:52 -07:00
Marc Brooks 4d5b330567 Reduce Exceptions thrown during type conversions.
There are tons of places where null, blank or empty strings are being
converted to primative types (like int,, long, etc) or other ValueTypes
(like Guid, DateTime, etc.). When this is attempted, Exceptions are
thrown (and caught/swallowed) to allow for value defaulting. Since this
happens all the time in normal operation, tons of Exceptions are being
thrown. By switching to the TryParse methods available on all primative
types and the interesting ValueTypes, we can greatly speed the
processing of content data.
2013-10-17 19:12:08 -05:00
Shannon a87e699f8d Updates the web.config template to allow password reset 2013-10-18 09:54:34 +11:00
Shannon 40287fd427 adds some tests for membership provider base 2013-10-18 09:33:10 +11:00
Shannon 5d5f7a4516 Updated edit member with correct usage of password changer. 2013-10-18 08:52:46 +11:00
Shannon 61ef83c748 Gets the password changer working - on the edit user page. reset/change password wth validation 2013-10-18 00:37:51 +11:00
Shannon f82329b371 More updates the password changer and edit user 2013-10-17 22:52:37 +11:00
Shannon 0fee434ac2 Working on the password changer control to present the correct inputs based on the membership provider given.... nearly there. 2013-10-17 22:40:38 +11:00
Shannon 3aab41b1e4 Fixes lots of membership provider stuff
U4-3057 MembershipPasswordFormat problem at EncodePassword method in UmbracoMembershipProvider class
U4-3176 UsersMembershipProvider.CreateUser does not encrypt/hash the password
U4-3173 UserMembershipProvider.ChangePassword does not work

- Now we need to update the UI for the member

Signed-off-by: Shannon <sdeminick@gmail.com>
2013-10-17 20:20:43 +11: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
Sebastiaan Janssen f9ad06be29 Something odd going on with the new tests being affected by tests that ran before them, no time to fix. Runs fine independently. 2013-10-16 14:19:24 +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
Sebastiaan Janssen 699c651daa Merge pull request #169 from stocksr/U4-3033-take2
Really Fix U4-3033 - inserting extra blank line at end of CSS
2013-10-16 04:00:26 -07:00
Robert Stocks 79299175c1 Really Fix U4-3033 - inserting extra blank line at end of CSS 2013-10-16 11:49:02 +01:00
Sebastiaan Janssen 14e3976e88 Merge pull request #142 from lars-erik/6.2.0-recursive_isofdocumenttype
Recursive PublishedContentExtensions IsDocumentType
2013-10-16 02:55:09 -07:00
Sebastiaan Janssen 76c86daf24 Update da.xml 2013-10-16 11:50:12 +02:00
Lars-Erik Aabech a1ef40e4be Split the recursive IsDocumentType into an overload for "real" backwards compatibility.
Changed string comparison to use InvariantEquals. (guessing it doesn't _really_ break backw. compat?)
Added XML docs.
2013-10-16 11:38:58 +02:00
Sebastiaan Janssen e4a0904de6 Merge pull request #167 from lars-erik/change-doctype-defaultnone
Change doctype - default suggestion none when no matching alias.
2013-10-16 01:09:02 -07: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
Lars-Erik Aabech 607a52883a Change doctype - default suggestion none when no matching alias. 2013-10-15 13:21:30 +02:00
Sebastiaan Janssen 4651dfc763 Merge pull request #166 from stocksr/U4-3033
Fix U4-3033 - inserting extra blank line at end of CSS
2013-10-15 01:13:37 -07:00
Robert Stocks da74c0a163 Fix U4-3033 - inserting extra blank line at end of CSS 2013-10-15 09:09:03 +01:00
Shannon fbb7f18f23 fixes publish status when publishing child that doesn't have a parent published. 2013-10-15 14:12:10 +11:00
Shannon af43b35d17 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-10-14 10:46:06 +11:00
Shannon 72ea43758d Fixes - U4-3119 Non-Admin Users Cannot Create or Edit Users regardless of permission settings - 6.1.6 2013-10-14 10:45:51 +11:00
Stephan ee5af4998f Fix bug after merge 2013-10-11 12:30:17 +02:00
Stephan 565a020acf Merge remote-tracking branch 'origin/6.2.0' into 6.2.0-pubcontent 2013-10-11 11:14:36 +02:00
Stephan 15bbe1b829 PublishedContentModel - keep it internal for now 2013-10-11 10:10:19 +02:00
Shannon c459a893a5 adds new db indexes 2013-10-11 18:45:37 +11:00
Stephan 671b94dd06 PublishedContentModel - keep it internal for now 2013-10-11 09:24:26 +02:00
Stephan bc9dc911ed Merge remote-tracking branch 'origin/6.2.0' into 6.2.0-pubcontent 2013-10-11 09:24:06 +02:00
Stephan cc8298d83c U4-2606 - List registered types in a ManyObject resolver 2013-10-11 09:22:48 +02:00
wtct b5c3fb1728 FFROM to FROM 2013-10-11 09:16:18 +02:00
Shannon 13dcfbbd2b Fixes build - removes .net 4.5 reference of EmailAddressAttribute - we'll leave that in for v7 when targettng 4.5 2013-10-11 10:58:31 +11:00
Stephan 18ea5b3768 Merge remote-tracking branch 'origin/6.2.0' into 6.2.0-pubcontent
Conflicts:
	src/Umbraco.Tests/TestHelpers/BaseWebTest.cs
2013-10-10 15:52:09 +02:00
wtct e1caf3a470 U4-3091 2013-10-10 14:45:18 +02:00
Shannon 63a4e00f52 tweaks to membership providers so if we cast we can specify the member type. 2013-10-10 17:23:29 +11:00
Shannon cb8c1a31cb Fixes/updates more of the member repository and related items
Conflicts:
	src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs
2013-10-10 16:50:57 +11:00
Shannon 6c77749e32 Fixes: U4-3077 No id "xxxx" exists in dictionary 2013-10-10 15:45:52 +11:00
Shannon 4170713e29 More member service and provider updates
Conflicts:
	src/Umbraco.Core/Persistence/Repositories/Interfaces/IMemberRepository.cs
	src/Umbraco.Core/Persistence/Repositories/MemberRepository.cs
2013-10-10 14:51:01 +11:00
Shannon a3bca42117 updates UmbracoMembershipMember 2013-10-10 14:10:28 +11:00
Shannon 80488e012f Fixes up and implements more if the IMemberService, repository and membership providers (both legacy and what seems to be the new one). 2013-10-10 14:00:35 +11:00
wtct b6cf182341 Affect the order of domains 2013-10-09 17:52:05 +02:00
Shannon 27e6e9b91c removes duplicate declaration 2013-10-09 13:52:44 +11:00
Shannon 09b7186713 Completes: U4-2963 Updated EntityService / IUmbracoEntity to have a dictionary to fill additional data - fixes merge issues and explicitly implements interface for entities that are not UmbracoEntity and hides other implementations from intellisense. 2013-10-09 13:32:58 +11:00
Shannon c6389852ea Adds public ctors for ApplicationContext, ServiceContext, DatabaseContext, RepositoryFactory, makes IDatabaseFactory public, makes an interfaces for IEntityService, adds EnsureContext methods for ApplicationContext - to set the singleton. 2013-10-09 13:17:19 +11:00
Shannon 49f10ccd32 Fixes merge issue , fixes the ServiceContext lazy fields to be the underlying interfaces, adds public ctor 2013-10-09 12:18:42 +11:00
Shannon a8b037f2e0 Fixes member type repository when member types don't have properties declared and adds tests. Adds IMemberTypeService.
Conflicts:
	src/Umbraco.Core/Persistence/Repositories/MemberTypeRepository.cs
	src/Umbraco.Core/Services/ServiceContext.cs
2013-10-09 12:09:28 +11:00
Stephan 17c055472d Merge remote-tracking branch 'origin/6.2.0' into 6.2.0-pubcontent 2013-10-08 09:44:37 +02:00
Shannon 16bce4248d Fixes merge issues with 6.2 and copying across TempData properly. 2013-10-08 10:46:02 +11:00
Shannon a2e9ec0412 Merge remote-tracking branch 'origin/6.1.6' into 6.2.0
Conflicts:
	src/Umbraco.Web/Mvc/UmbracoPageResult.cs
2013-10-08 10:37:46 +11:00
Shandem 11c9abf359 Merge pull request #145 from florisrobbemont/6.1.6
U4-3007 RouteDefinition should not store instance of controller
2013-10-07 16:31:50 -07:00
Sebastiaan Janssen 12b7a9d874 Argh, didn't save csproj file before committing. 2013-10-07 13:20:34 +02:00
Sebastiaan Janssen a90f32035d U4-2733 call to umbraco.library:Request broken? 2013-10-07 08:18:44 +02:00
Sebastiaan Janssen 33b09c80aa Forgot to commit csproj file 2013-10-06 18:55:52 +02:00
Sebastiaan Janssen b2980cedc6 Also apply to media types - U4-541 Wrong dictionary key when using in backend template names 2013-10-06 18:54:46 +02:00
Sebastiaan Janssen 34b7f86b8b U4-541 Wrong dictionary key when using in backend template names 2013-10-06 18:24:46 +02:00
Sebastiaan Janssen 130f6d3a42 Additions for U4-2776 Default Content For A Razor Layout Section 2013-10-06 17:52:46 +02:00
Sebastiaan Janssen 3ff9d6adbc U4-2509 Umbraco backend search not working correctly with spaces - Also updated search.aspx dialog 2013-10-06 16:55:54 +02:00
Sebastiaan Janssen fd5de171c9 Merge branch '6.2.0' of github.com:umbraco/Umbraco-CMS into 6.2.0 2013-10-06 16:45:31 +02:00
Sebastiaan Janssen 45ad51b8df U4-2737 Snippets that are available when creating new MacroScripts should also be available for Partial Views 2013-10-06 16:45:21 +02:00
Floris Robbemont b02657f32c Cleaning up commit for issue U4-3007
Changed documentation on UmbracoMvcHandler
2013-10-05 23:31:02 +02:00
Sebastiaan Janssen 9f3784aaed U4-1242 Template editor sometimes stops editing. 2013-10-05 19:26:01 +02:00
Sebastiaan Janssen 2ab2a5a9f3 Fix bug where Right ALT+S would save in Firefox instead of inserting the correct character 2013-10-05 19:23:57 +02:00
Sebastiaan Janssen 2d83ba06a5 Fix small styling issues in installer 2013-10-05 19:18:11 +02:00
Sebastiaan Janssen 06d5c60803 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-10-05 19:09:49 +02:00
Sebastiaan Janssen fe18722e1f Merge pull request #147 from AndyButland/u4-2958
Fix for issue U4-2958 Member can edit & Show on profile do not persist on Member Type editor
2013-10-05 19:08:03 +02:00
Sebastiaan Janssen 4935525591 Merge pull request #147 from AndyButland/u4-2958
Fix for issue U4-2958 Member can edit & Show on profile do not persist on Member Type editor
2013-10-05 10:04:08 -07:00
Stephan c2e7fc2f10 PropertyValueConverter - add converters for built-in data types 2013-10-04 20:14:38 +02:00
Sebastiaan Janssen b595ec4d88 Merge pull request #149 from bjawnie/patch-1
Made two minor corrections to the text
2013-10-04 00:25:59 -07:00
bjawnie 20ab14beb4 Made two minor corrections to the texts.
"Content>alias" changed to "Alternativ link" from "Alias", so it makes more sense.

"defaultdialogs>treepicker" changed to "Vælg" from "Vælg punkt", so it fits in the button.
2013-10-03 20:43:42 +02:00
Stephan a264342bcc Merge remote-tracking branch 'origin/6.2.0' into 6.2.0-pubcontent
Conflicts:
	src/Umbraco.Tests/CodeFirst/ContentTypeMapper.cs
	src/Umbraco.Web/Models/DynamicPublishedContent.cs
2013-10-03 18:16:29 +02:00
Stephan 08660704cc Core.StringExtensions - adjust to new default IShortStringHelper (see f64b8d6) 2013-10-03 18:10:51 +02:00
Stephan 4c13dbf8b7 Core.StringExtensions - fix methods that should be extension methods 2013-10-03 18:10:50 +02:00
Stephan 9a10863760 Core.EnumerableExtensions - bugfix f9663a9 2013-10-03 18:10:48 +02:00
mortenbock c74cdb28d6 Testing the wrapping of view engines 2013-10-03 11:01:37 +02:00
Shannon 86430f1b01 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-10-03 12:46:01 +10:00
Shannon 55247fe31d Finally got around to changing all calls to umbraco.IO to Umbraco.Core.IO - that'll clear up several hundreds of warnings :) 2013-10-03 12:45:40 +10:00
Shandem a806f40093 Merge pull request #146 from mortenbock/6.2.0
Custom ProfilingViewEngine
2013-10-02 15:53:58 -07:00
Andy Butland 693778fe74 Fixed issue where member type properties would not persist after first save without reloading page 2013-10-02 21:20:05 +02:00
mortenbock 24020cfea3 Make sure the profilingengine doesn't wrap itself 2013-10-02 18:30:59 +02:00
mortenbock 9ec30860b0 Wrap all ViewEngines in a profiler
Wrap all ViewEngines in a custom profiler view engine, using the
ProfilerResolver to track performance
2013-10-02 17:48:44 +02:00
Stephan 06206c60d9 Merge remote-tracking branch 'origin/6.2.0' into 6.2.0-pubcontent 2013-10-02 17:06:46 +02:00
Stephan 5937a7e976 CoreXml - fix tests CRLF issues for build server, take 2 2013-10-02 17:03:50 +02:00
Stephan f64b8d680d Core.StringExtensions - switch over to the new DefaultShortStringHelper 2013-10-02 16:54:56 +02:00
Stephan f9663a9e80 Core.EnumerableExtensions - refactor InGroupsOf to enumerate source only once 2013-10-02 16:54:47 +02:00
Stephan c604cc5c2f CoreXml - fix tests CRLF issues for build server 2013-10-02 16:39:54 +02:00
Stephan 520ebc3394 Merge remote-tracking branch 'origin/6.2.0' into 6.2.0-pubcontent 2013-10-02 11:43:10 +02:00
Stephan e6bb999d83 Core.Resolution - umbraco.cms.Action should NOT reset resolution 2013-10-02 11:42:17 +02:00
Stephan cdd1a0a4cb Core.Resolution - fix concurrency issues
Conflicts:
	src/Umbraco.Core/ObjectResolution/Resolution.cs
2013-10-02 11:41:48 +02:00
Stephan 5e0fbe5634 Macros - bugfix parameters 2013-10-02 11:16:39 +02:00
Stephan e5b3ca1907 Merge remote-tracking branch 'origin/6.2.0' into 6.2.0-pubcontent 2013-10-02 11:14:08 +02:00
Floris Robbemont 9ddee615cc U4-3007 RouteDefinition should not store instance of controller 2013-10-01 14:09:38 +02:00
Morten Christensen 74f6a34651 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-10-01 10:20:29 +02:00
Morten Christensen 7dee2802fe Fixing Member and MemberType, so the ids are properly assigned through the repositories.
Adding test to assert that no Properties, PropertyTypes or PropertyGroups exists without an id when loaded from the db.
NOTE Changes signature of Member class as Email, Username and Password is required.
2013-10-01 10:20:16 +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
Sebastiaan Janssen 8eee7cae2f Merge branch '6.1.6' 2013-09-30 16:10:14 +02:00
Sebastiaan Janssen 5238293c09 Merge branch '6.1.6' into 6.2.0
Conflicts:
	build/Build.bat
	src/Umbraco.Core/Configuration/UmbracoVersion.cs
	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
	src/Umbraco.Web/umbraco.presentation/umbraco/users/EditUser.aspx.cs
2013-09-30 16:09:25 +02:00
Sebastiaan Janssen 226e35d65a NuSpec update: we can only accept a specific version of MySQL 2013-09-30 14:32:06 +02:00
Stephan bfa7ab788b Merge remote-tracking branch 'origin/6.2.0' into 6.2.0-pubcontent 2013-09-30 14:00:01 +02:00
Stephan 5a15c93195 PublishedContent - ensure exceptions don't corrupt InPreviewMode 2013-09-30 13:58:02 +02:00
Stephan 77777c8007 Bugfix e775421 2013-09-30 13:57:58 +02:00
Sebastiaan Janssen cdda69c4cd U4-2788 Error installing Umbraco 6.1.5 with SQL CE 4 option 2013-09-30 12:39:28 +02:00
Morten Christensen 5aa01e78ab Updating conn.string in test 2013-09-30 12:13:49 +02:00
Morten Christensen a21bee6683 Fixing MemberType- and MemberRepository so properties, property types and property groups are properly initialized. 2013-09-30 12:12:58 +02:00
Shannon 0cff484113 fixes unit test 2013-09-30 12:12:17 +02:00
Shannon 830fde372e Fixes EditUser.aspx 2013-09-30 11:49:31 +02:00
Shannon 35f65a2c64 re-enables LoadMinimalDocument and adds this to the optimized check, even in optimized model the OnRenderNode can still execute with a minimal doc. 2013-09-30 10:55:38 +02:00
Shannon e5320f0abd Obsoletes the LoadMinimalDocument flag since it no longer serves a purpose. 2013-09-30 10:55:26 +02:00
Sebastiaan Janssen 965a7fc500 Fixes: U4-2925 Tree performance is very poor in 6.1.x when having event subscriptions 2013-09-30 10:55:13 +02:00
Sebastiaan Janssen abbf8aeb42 U4-2709 Error after upgrading from 6.1.3 to 6.1.4 2013-09-30 10:49:33 +02:00
Sebastiaan Janssen 328ada2f38 Bump version number 2013-09-30 10:46:08 +02:00
Sebastiaan Janssen 767252cdf1 Creates IDisposeOnRequestEnd and ensures UmbracoContext and UmbracoDatabase implement it, then we only dispose of these types of objects at the end of the request if they are part of the httpcontext items (U4-2738). Fixes: U4-2988 UmbracoObjectTypesExtensions is not thread safe 2013-09-30 10:31:45 +02:00
Sebastiaan Janssen 010d47c68b Fixes U4-2822 Datepicker throws "Specified cast is not valid" when saving through API 2013-09-30 10:23:43 +02:00
Shannon 56f1062db8 Fixes up EditUser - non-admins who have access to the Users app can edit other non-admins and cannot change anyone to be admin, but only admins can edit other admins that are not the root admin. Only the root admin can edit the root admin. 2013-09-30 17:28:44 +10:00
Shannon e0878fdd9f fixes unit test 2013-09-30 14:48:05 +10:00
Shannon c9aac96c1a Fixes EditUser.aspx 2013-09-30 14:15:39 +10:00
Shannon 4df79ce55b re-enables LoadMinimalDocument and adds this to the optimized check, even in optimized model the OnRenderNode can still execute with a minimal doc. 2013-09-30 13:47:19 +10:00
Shannon 15d2021786 Obsoletes the LoadMinimalDocument flag since it no longer serves a purpose. 2013-09-30 13:36:49 +10:00
Shannon a8f6b9eeb9 Fixes: U4-2925 Tree performance is very poor in 6.1.x when having event subscriptions 2013-09-30 13:31:48 +10:00
Shannon 3d4b403c0e Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-09-30 12:02:51 +10:00
Shannon 957760d29a Creates IDisposeOnRequestEnd and ensures UmbracoContext and UmbracoDatabase implement it, then we only dispose of these types of objects at the end of the request if they are part of the httpcontext items (U4-2738). Fixes: U4-2988 UmbracoObjectTypesExtensions is not thread safe 2013-09-30 12:02:35 +10:00
Stephan a7603747a6 XmlPublishedCache - 'version' is not a property 2013-09-29 15:22:39 +02:00
Stephan e7754213f1 INode to IPublishedContent transition for Razor macros 2013-09-29 15:22:35 +02:00
Stephan ea82e9c67e Web.Routing - fix PublishedContentRequest exception message 2013-09-29 15:22:31 +02:00
Stephan 182cc1ace7 Web.UmbracoHelper - add Url overload w/mode 2013-09-29 15:22:27 +02:00
Stephan 205b9889f2 Macros - PartialViewMacro use IPublishedContent, not INode 2013-09-29 15:22:23 +02:00
Stephan 4a58fbfa1d PublishedContent - add OfType<> extension to IPublishedContent 2013-09-29 15:22:19 +02:00
Stephan af534e87f3 PublishedContent - bugfix IsDraft on previewed document 2013-09-29 15:22:15 +02:00
Lars-Erik Aabech b6777e4635 Recursive PublishedContentExtensions IsDocumentType
Optional recursive parameter defaulted to false for backwards compatibility and no performance hit.
Settings recursive = true fetches content type for content and checks ancestor content types for the same alias.
2013-09-27 13:12:16 +02:00
Stephan 9a66948857 Merge pull request #141 from IDisposable/patch-1
Fix order of null-check versus dotting through to .UmbracoContext.
2013-09-26 23:29:59 -07:00
Marc Brooks b5022bb183 Fix order of null-check versus dotting through to .UmbracoContext.
The order of operations in the constructor dots through to the _routingContext.UmbracoContext before checking if the value was null and throwing the argument exception (which really isn't an ArgumentException...)
2013-09-26 13:41:51 -05:00
Sebastiaan Janssen 2e9bc3bb2b Oops updated wrong branch 2013-09-26 15:43:08 +02:00
Sebastiaan Janssen 98e487753f Pointing to the Belle docs for building from source 2013-09-26 14:52:48 +02:00
Stephan 725b938de1 PublishedContent - revert to using property.Value vs .ObjectValue 2013-09-25 13:17:21 +02:00
Stephan 2ef4b77bd9 Fix broken tests 2013-09-24 11:28:54 +02:00
Stephan fae9fc6e2d Merge branch '6.2.0' into 6.2.0-pubcontent 2013-09-24 10:51:44 +02:00
Shannon 099c1ff2ea Fixes: U4-2914 Examine doesn't index newly created items 2013-09-24 10:39:47 +10: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
Stephan 6c32cf9529 Fix broken build 2013-09-23 17:30:09 +02:00
Stephan d925f856ae Take care of FIXMEs 2013-09-23 16:55:59 +02:00
Stephan 3de2196e01 PublishedContent - reorg. existing IPropertyValueConverter impl. 2013-09-23 16:42:35 +02:00
Stephan ac2d010df3 PublishedContent - refactor PublishedContentType cache 2013-09-23 16:18:39 +02:00
Stephan eb4317a9c1 Take care of FIXMEs 2013-09-23 13:08:45 +02:00
Stephan c3caf7ff04 PublishedContent - align with v7, refactor IPublishedProperty & names 2013-09-19 13:12:18 +02:00
Stephan f9cae9c4d8 PublishedContent - align with v7, refactor IPropertyValueConverter 2013-09-19 12:07:43 +02:00
Stephan dd16af0989 PublishedContent - align with v7, refactor PublishedPropertyType 2013-09-19 12:07:30 +02:00
Stephan c118990a4c Merge branch '6.2.0' into 6.2.0-pubcontent 2013-09-18 12:51:07 +02:00
Morten Christensen ebf60071ab Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-09-18 11:51:13 +02:00
Morten Christensen f4b8d9bd6e Fixing broken Publishing test after the service and repository tests are probably setup. 2013-09-18 11:50:52 +02:00
Morten Christensen 5cf07ba6be Refactoring how DeleteVersion and DeleteVersions is used in the Content- and MediaRepository, so we ensure that the latest version is never deleted. Worse case would have been an incomplete content node, which we want to avoid. So better to have a fail safe way of deleting versions, and use the regular Delete method for deleting the latest version. 2013-09-18 11:49:36 +02:00
Stephan cb4eef54a4 Core.Cache - fix issue introduced in 761354d 2013-09-18 11:47:37 +02:00
Stephan 7a541ba489 Merge branch '6.2.0' into 6.2.0-pubcontent 2013-09-18 11:34:00 +02:00
Stephan d2647ea607 Core.Cache - fix issue introduced in 761354d 2013-09-18 11:33:42 +02:00
Stephan a785cd1569 Merge branch '6.2.0' into 6.2.0-pubcontent 2013-09-18 10:56:07 +02:00
Stephan d1f36346de Core.Cache - fix bug in StaticCacheProvider 2013-09-18 10:55:20 +02:00
Stephan 761354dbf5 Core.Cache - add new method to remove items from cache 2013-09-18 10:55:10 +02:00
Stephan 1e786ac311 PublishedContent - proper PublishedContentType cache management 2013-09-18 10:09:11 +02:00
Stephan 0c28e01347 Core.Cache - add new method to remove items from cache 2013-09-18 10:09:08 +02:00
Stephan 08566f32de Take care of more FIXMEs 2013-09-18 10:09:05 +02:00
Morten Christensen dc1a67bfa2 Fixes U4-2822 Datepicker throws "Specified cast is not valid" when saving through API 2013-09-18 10:06:08 +02:00
Shannon 95df28bf64 Fixes issue with runtime cache provider when retrieving all items of a certain type, we were sending back an array of nulls if the cache was expired. 2013-09-18 17:44:25 +10:00
Shannon a027c3cb22 Found out if we don't do ToArray here and if we were caching we'd end up with null values in the cache, do to yield return i think. 2013-09-18 16:08:15 +10:00
Shannon f1c0aa2439 adds a comment 2013-09-18 15:21:35 +10:00
Shannon c8fa881bc5 Ensures all service tests do not use any caching in their underlying repos. This change has been made to the base database test classes so any repo/service access done for inheritors also ensure that no cache is used for tests. 2013-09-18 12:54:06 +10:00
Shannon b17db9f143 Fixed last failing unit test with repo's 2013-09-18 12:42:18 +10:00
Shannon 23b7e94ce3 Fixes pretty big issue with MediaType's not implementing the same IsDirty property check rules as ContentType when they should have shared the same rules. After removing caching on the unit tests, this bug became known. 2013-09-18 12:36:38 +10:00
Shannon 8fe7c0da9e Changed all repository tests to ensure they are not testing with cache enabled... now to fix the problems :( 2013-09-18 11:40:40 +10:00
Stephan 16ec58f338 Merge branch '6.2.0' into 6.2.0-pubcontent 2013-09-17 10:49:46 +02:00
Stephan e8fd6a6ece Take care of FIXMEs 2013-09-17 10:18:26 +02:00
Shannon 5b943ca866 fixed couple tests 2013-09-17 11:53:57 +10:00
Shannon abe3efa9a1 Replaces Rhino mocks with Moq... so much nicer/easier. 2013-09-17 11:35:08 +10:00
Stephan ee4f4440d5 PublishedContent - implement strongly typed methods for other axes 2013-09-16 17:17:51 +02:00
Stephan f4d060f3eb PublishedContent - implement strongly typed methods for parent, children, ancestors & descendants axes 2013-09-16 17:17:49 +02:00
Stephan 85cb7fadfc PublishedContent - implement a model factory 2013-09-16 17:17:48 +02:00
Stephan ac19ac7a6b PublishedContent - use PublishedContentModelFactory in XmlPublishedCache 2013-09-16 17:17:46 +02:00
Stephan 0415a31d0e PublishedContent - the big refactoring 2013-09-16 17:17:45 +02:00
Stephan 912716f889 Content - add @isDraft to preview Xml for draft content 2013-09-16 17:17:42 +02:00
Stephan 5dc9bb752e Macros - cache xslt settings 2013-09-16 17:17:41 +02:00
Stephan cf435011df Macros - support navigable caches 2013-09-16 17:17:39 +02:00
Stephan f63514e8ea Web.PublishedCache - add XPathNavigatorIsNavigable to caches 2013-09-16 17:17:38 +02:00
Stephan 1ddf2fa365 Core.Xml - import NavigableNavigator initial version 2013-09-16 17:17:36 +02:00
Sebastiaan Janssen 9d243c6c46 Merge pull request #139 from greystate/pedantic-casing
Minor corrections to language files
2013-09-15 04:24:44 -07:00
Sebastiaan Janssen 8f8da5a7ec Merge pull request #138 from kalletoxic/6.2.0
Swedish languagefile
2013-09-13 03:27:14 -07:00
Kalle Ekstrand 7e1d8a6108 Swedish languagefile
This is a fully translated languagefile fpr the swedish language.
2013-09-13 12:10:16 +02: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
Stephan 67a632aa43 Merge branch '6.2.0' into zb-cleanup 2013-09-12 11:13:07 +02:00
Shannon dcd5decd3a Fixes up the events in the new MacroRendering event stuff 2013-09-12 14:55:29 +10:00
Shandem b6d4415f5c Merge pull request #131 from neehouse/6.2.0
Removing file location restriction from PartialViewMacro
2013-09-11 21:47:51 -07:00
Shannon 24471c32f9 Improved search with "and", partial match U4-2509
- added partial matching on each word.
- fixed bug so 'all' words match rather than 'any' words.
2013-09-12 14:12:33 +10:00
Shandem a353f6fb74 Merge pull request #135 from Myster/master
Fix multiple words in search U4-2509
2013-09-11 19:33:47 -07:00
Murray Roke a64efb93b3 Improved search with "and", partial match U4-2509
- added partial matching on each word.
- fixed bug so 'all' words match rather than 'any' words.
2013-09-12 14:30:42 +12:00
Murray Roke cf9f11ff45 Improved admin search splitting query U4-2509 2013-09-12 13:22:14 +12:00
Murray Roke d7481b5ca4 Fix multiple words in search U4-2509
When multiple words are entered in the search field no results are
returned.
This pull req. contains the fix suggested by Tony.
2013-09-12 10:22:59 +12: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
Chriztian Steinmeier b22fd4c5b1 Minor typos 2013-09-11 21:36:45 +02:00
Chriztian Steinmeier e977a8c656 Fix spelling of "publisere" => "publicere" 2013-09-11 21:36:03 +02:00
Chriztian Steinmeier af6eb2724d Casing XSLT (zh) 2013-09-11 21:22:00 +02:00
Chriztian Steinmeier 237ee71177 Casing XSLT (ru) 2013-09-11 21:21:44 +02:00
Chriztian Steinmeier d5604ea427 Casing XSLT (pt) 2013-09-11 21:21:38 +02:00
Chriztian Steinmeier 16f8c61f28 Casing XSLT (pl) 2013-09-11 21:21:31 +02:00
Chriztian Steinmeier f066473f14 Casing XSLT (nl) 2013-09-11 21:21:24 +02:00
Chriztian Steinmeier 1a1641d300 Casing XSLT (ko) 2013-09-11 21:21:15 +02:00
Chriztian Steinmeier 3d46cd1186 Casing XSLT (it) 2013-09-11 21:21:08 +02:00
Chriztian Steinmeier 1d200b6f2f Casing XSLT (fr) 2013-09-11 21:21:03 +02:00
Chriztian Steinmeier 86f0c7c7c9 Casing XSLT (he) 2013-09-11 21:20:55 +02:00
Chriztian Steinmeier 72e1b5a0c6 Casing XSLT (es) 2013-09-11 21:20:36 +02:00
Chriztian Steinmeier 94a78aec4b Correct XSLT casing for da, en & en-us 2013-09-11 21:19:40 +02:00
Stephan f53a23553b Core.Attempt - replace calls to obsolete ctor 2013-09-11 11:06:14 +02:00
Stephan 42c432caa0 Merge branch '6.2.0' into zb-cleanup 2013-09-11 10:39:40 +02:00
Morten Christensen e69b043cfa Oops, double column is no good syntax... 2013-09-11 10:24:05 +02:00
Morten Christensen 812d5c1391 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-09-11 10:17:08 +02:00
Morten Christensen 8d510fd512 Committing some POC code in the test project for strongly typed models/queries 2013-09-11 10:16:49 +02:00
Morten Christensen c5c44cec37 Correcting syntax output for AlterColumnExpression, so Shannon's migrations will work 2013-09-11 10:15:31 +02:00
Stephan 82f81d1f4f Core.Attempt - backport and refactor Attempt.Outcome from v7 2013-09-11 10:03:17 +02:00
Stephan 32e3048717 Core.Attempt - refactor Succ() into Succeed() 2013-09-11 09:30:00 +02:00
Shannon 90abe8c25f Fixes: U4-2823 RenderRouteHandler.GetUmbracoRouteDefinition() fails to store the route definition when an incidental alias-controller match is made 2013-09-11 12:15:29 +10:00
Shannon 9f1d212375 Implements: U4-2824 Type Converter for string type with unit test 2013-09-11 11:57:15 +10:00
Stephan 9ca048f0ad Core.Attempt - maintain backward compatibility 2013-09-10 17:56:49 +02:00
Stephan 85ab96f71a Core.Attempt - refactor and cleanup 2013-09-10 17:56:47 +02:00
Stephan 1ba8ad5fbb Comments - UmbracoModule 2013-09-10 17:56:46 +02:00
Stephan 433e141761 Comments - misc 2013-09-10 17:56:44 +02:00
Stephan 9fa5821f07 Comments - Web.Standalone 2013-09-10 17:56:43 +02:00
Stephan 447b3227a9 Web.Routing - remove duplicate code 2013-09-10 17:56:41 +02:00
Stephan ddfd9eeb18 Core.UriExtensions - refactor + issue with IsClientSideRequest 2013-09-10 17:56:39 +02:00
Stephan 6e0fa9f945 Core.Configuration - support missing notDynamicXmlDocumentElements 2013-09-10 17:56:38 +02:00
Stephan 4d726167f6 Core.XmlHelper - refactor 2013-09-10 17:56:36 +02:00
neehouse 1781528390 Removing Whitespace 2013-09-10 09:36:09 -04:00
neehouse c0214ac4ec Modified the MacroRendering event as requested. Removed the unnecessary check for the file path from the Partial View Macro as it would not be hit anyhow since the macro engine is determined using the same rule. U4-2644 & U4-2643 2013-09-10 09:34:19 -04:00
Shannon b2deb3def3 Fixes: U4-2815 The code to determine the macro type is currently case sensitive 2013-09-10 11:15:25 +10:00
neehouse 998e222881 Adding event to RenderMacro methods to allow for manipulation of the MacroModel. 2013-09-09 14:00:08 -04:00
Sebastiaan Janssen 58ba7d2d6d Fixes U4-502 TextString/TextBox multiple don't accept polish Ś character 2013-09-08 21:29:20 +02:00
Sebastiaan Janssen edd9aa80ae Fixes U4-489 Installer, link to folder permission video broken 2013-09-08 21:18:00 +02:00
Sebastiaan Janssen 7ddb77db66 Fixed U4-576 Umb 4.7.x - Dashboards 2013-09-08 21:06:22 +02:00
Sebastiaan Janssen b25e015890 Merge branch '6.2.0' of github.com:umbraco/Umbraco-CMS into 6.2.0 2013-09-08 19:42:51 +02:00
Sebastiaan Janssen 686250c586 Fixed U4-608 Empty tinymce config throws null ref exception 2013-09-08 19:42:34 +02:00
Stephan c5197dbe17 U4-2807 - better exception message on bogus domain 2013-09-07 10:25:39 +02:00
neehouse d821401ea2 Removing file location restriction from PartialViewMacro to allow custom paths. 2013-09-06 15:34:19 -04:00
Stephan 39316a345f Tests - stop deleting dummy.txt files 2013-09-06 20:24:22 +02:00
Sebastiaan Janssen 349dc9a228 Merge branch '6.2.0' of github.com:umbraco/Umbraco-CMS into 6.2.0 2013-09-06 16:20:16 +02:00
Sebastiaan Janssen 303c1e16b8 Change document type did unnecessary checks on root node which resulted in YSOD 2013-09-06 16:17:08 +02:00
Shannon c2b1ed205b Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-09-06 11:40:56 +10:00
Shannon fee02af4eb Completes: U4-1639 Add support to generate GET urls to SurfaceController actions 2013-09-06 11:40:37 +10: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
leekelleher 4770e903fb Minor corrected to uQuery doco/comments. 2013-09-05 18:22:48 +01:00
Stefan Kip baa22301e9 Added Exception which tells you which datatype is unable to load 2013-09-05 11:31:06 +02:00
Morten Christensen e080965468 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-09-05 11:28:45 +02:00
Morten Christensen 0c05836537 Fixes U4-2791 Error creating node containing @ v6.1.4.
Adding unit test which covers both U4-2791 and U4-2607
2013-09-05 10:44:28 +02:00
Shannon c269f55074 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-09-05 14:01:48 +10:00
Shannon 177486418d Implements: U4-1639 Add support to generate GET urls to SurfaceController actions 2013-09-05 14:01:28 +10:00
Morten Christensen 3393b6b0da Adding comments to the MemberService methods 2013-09-04 16:35:54 +02:00
Morten Christensen 33bba57047 Implementing addtional methods in the MemberService 2013-09-04 16:30:51 +02:00
Morten Christensen 269f573b82 Refactoring the GetById method in the MemberService. 2013-09-04 16:00:38 +02:00
Morten Christensen 2ec367fd59 Removing the SecurityHelper and moving the 3 methods into the Provider as private classes, as they aren't used anywhere else.
The SecUtility will be removed along with the legacy MembershipProvider when cleanup is possible.
2013-09-04 15:44:29 +02:00
Morten Christensen 72dcb32ac2 Refactoring the TypedModelBase and UmbracoTempaltePage for the TypedModel POC 2013-09-04 15:42:25 +02:00
Morten Christensen 1f68cad45b Refactoring MemberService and MembersMembershipProvider from Darrens pull request to fit the changes made the past week.
SecurityHelper is moved to the Umbraco.Web.Security namespace.
MembershipExtensions are changed to the new models
2013-09-04 15:42:01 +02:00
Morten Christensen 8ffbad4b49 Merge pull request #118 from darrenferguson/6.2.0
Adding new Memership provider implementation
2013-09-04 06:14:40 -07:00
Morten Christensen 24091991fa Updating MemberRepository test fixture. All tests ignored while using local db for testing. 2013-09-04 14:47:42 +02:00
Morten Christensen d65e94f519 Adding LocalizationService test fixture class 2013-09-04 14:43:48 +02:00
Morten Christensen 966416c0a5 Updating classes for small TypedModel POC 2013-09-04 11:30:21 +02:00
Morten Christensen 09de4a3666 Adding LocalizationService to ctor 2013-09-04 11:30:00 +02:00
Morten Christensen f2f1d265ec Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-09-03 17:15:03 +02:00
Morten Christensen 642c6c1afe Implementing a POC and tests for a simple TypedModel base class 2013-09-03 17:03:35 +02:00
Morten Christensen c5945789f0 Refactoring the MemberRepository to use the new Member class 2013-09-03 17:02:15 +02:00
Morten Christensen 6742bf4708 Removing the old Member, MemberType and MemberGroup classes from the Model.Membership namespace 2013-09-03 17:01:34 +02:00
Sebastiaan Janssen 5e83023ce5 Merge pull request #126 from Jeavon/6.2.0
U4-2783 url attribute in installedPackages.config is not populated when ...
2013-09-03 05:55:51 -07:00
Jeavon Leopold 05039fdd7c U4-2783 url attribute in installedPackages.config is not populated when a package is installed 2013-09-03 13:32:10 +01:00
Sebastiaan Janssen 21954f7bc6 Merge branch '6.2.0' of github.com:umbraco/Umbraco-CMS into 6.2.0 2013-09-03 10:31:17 +02:00
Sebastiaan Janssen 25d2b56ed7 U4-2776 Default Content For A Razor Layout Section 2013-09-03 10:31:00 +02:00
Shannon eeeb99b3b5 Fixes U4-2738 Collection Disposal issue when deploying 6.1.4 on Windows Server 2008 (Random, environment specific) 2013-09-03 17:19:31 +10:00
Morten Christensen 008d413302 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0
Conflicts:
	src/Umbraco.Core/Persistence/Repositories/ContentRepository.cs
	src/Umbraco.Core/Persistence/Repositories/MediaRepository.cs
	src/Umbraco.Core/Persistence/Repositories/VersionableRepositoryBase.cs
	src/Umbraco.Tests/Services/ContentServiceTests.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs
2013-09-02 15:55:05 +02:00
Morten Christensen 186d5157ec Implementing the read only side of the MemberType/MemberTypeRepository.
PropertyTypes and PropertyGroups are loaded as part of the MemberType in one go.
MemberTypeRepository uses the same approach as the ContentTypeRepository and MediaTypeRepository for saving/updating.
Refactoring how the 9-PropertyType convention is handled.
2013-09-02 15:53:09 +02:00
Niels Hartvig 2fb55cb831 Enhanced permission checking on views and snippets
Thanks to Richard Turnbull from NGS Secure Research who discovered a
minor issue that made it possible for authenticated Umbraco Users to
view files beyond their permissions
2013-09-02 14:23:27 +02:00
Sebastiaan Janssen 35c7b224bd Fix merge issue 2013-09-02 12:49:01 +02:00
Sebastiaan Janssen 437408464f Merge branch '6.1.5' into 6.2.0
Conflicts:
	.gitignore
	build/Build.bat
	src/Umbraco.Core/Configuration/UmbracoVersion.cs
	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/umbraco.presentation/umbraco/create/PartialViewTasks.cs
2013-09-02 12:29:47 +02:00
Sebastiaan Janssen 0e6a926a3f Merge branch '6.1.5' 2013-09-02 12:24:26 +02:00
Sebastiaan Janssen 173ac65eb5 Remove misleading comment as this has been moved out of the if statement 2013-09-02 11:41:13 +02:00
Sebastiaan Janssen 7c28e1aeba Fixed U4-2763 Content rollback generates duplicates 2013-09-02 10:56:42 +02:00
Morten Christensen 969dece8fc Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-09-02 09:53:42 +02:00
Shannon 5989d19f7f Re-fixes the issue with using IDataValueSetter.SetValue on the DefaultData implementation and ensures that when there is a null value that it reverts to an empty string since this was what the default value was in the Value getter of DefaultData when there was no value. Have added a couple unit tests to support. 2013-09-02 13:27:48 +10:00
Shannon da1c33a034 Fixes unit test 2013-09-02 12:57:56 +10:00
Sebastiaan Janssen 2111a5e31e Fix MySQL install failing on UmbracoServer table 2013-09-01 17:28:22 +02:00
Sebastiaan Janssen 5478de911b Merge pull request #115 from stocksr/6.2.0
U4-516 - Fix DatePicker with time default value
2013-09-01 17:24:03 +02:00
Sebastiaan Janssen 7765acb130 Merge pull request #124 from AndyButland/wip-u4-2759
U4-2759 - member authorise attribute was not restricting for group
2013-09-01 17:23:53 +02:00
Sebastiaan Janssen a535a4c96f Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-09-01 17:21:32 +02:00
Sebastiaan Janssen c3ef39661b Fix MySQL install failing on UmbracoServer table 2013-09-01 17:21:19 +02:00
Sebastiaan Janssen e9b9fb15c1 Can't install starterkits message was always showing, even if install folder was present 2013-09-01 16:47:28 +02:00
Sebastiaan Janssen 3d4b54064f I love managing files in csproj files.. NOT. 2013-09-01 15:32:55 +02:00
Sebastiaan Janssen 14303fab0c File move didn't make it into the csproj file previously, leading to build errors. Fixed!
Also changed default PartialView template and added another Empty one
2013-09-01 15:05:17 +02:00
Sebastiaan Janssen 262ef8d305 Merge pull request #115 from stocksr/6.2.0
U4-516 - Fix DatePicker with time default value
2013-09-01 05:34:18 -07:00
Sebastiaan Janssen 6e6ac8a4d5 Merge pull request #124 from AndyButland/wip-u4-2759
U4-2759 - member authorise attribute was not restricting for group
2013-09-01 05:22:51 -07:00
AndyButland a262f0b342 Fixed bug where member authorise attribute was not restricting for groups 2013-08-31 22:52:54 +01:00
Morten Christensen 5640daff32 Fixes U4-2752 ContentService.DeleteVersion and DeleteVersions fail
Signed-off-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2013-08-31 19:19:25 +02:00
Morten Christensen a1cae3f286 Fixes U4-2731 Document.BeforeMove + Document.AfterMove Doesn't get fired.
Using the legacy Document and Media classes for the .Move and .Copy calls as they already use the new services under the hood, so shouldn't make any noticeable difference except that the legacy events will also work.

Signed-off-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2013-08-31 19:18:47 +02:00
Morten Christensen 20b4975cfb Creating a new Member/IMember and MemberType/IMemberType class under the Umbraco.Core.Model namespace in order to move away from the weird structure that we initially ported over.
Refactoring the MemberTypeRepository to use the new MemberType class.
Starting the implementation of ReadOnly DTOs for MemberType.
Starting the implementation of the factory for the MemberTypeReadOnlyDto.
2013-08-31 19:13:36 +02:00
Morten Christensen 757283a3ff Making explicit references to the legacy member class to avoid ambiguous references to the new member classes 2013-08-31 19:09:29 +02:00
Morten Christensen ea76c42c7b Updating Resolves_Assigned_Mappers test to reflect current number of mappers 2013-08-31 18:02:10 +02:00
Shannon d22dbb4654 Fixes U4-2734 Don't set the cache references to null when disposing the UmbracoContext 2013-08-31 11:11:25 +02:00
Morten Christensen 0196afa12a Correcting the update of the cmsContentVersion table so the UpdateDate is updated properly 2013-08-30 17:24:42 +02:00
Morten Christensen 5d5c25f0e4 Implemented new IMemberType, MemberTypeFactory, MemberFactory and MemberTypeMapper.
Started implementation of MemberTypeRepository.
2013-08-30 17:24:06 +02:00
Stephan 4d5a8298b0 U4-2549 - fix it differently 2013-08-30 12:22:58 +02:00
Stephan 9e2733ce69 U4-2549 - fix issue with last chance content finder
Conflicts:
	src/Umbraco.Web/Umbraco.Web.csproj

Conflicts:
	src/Umbraco.Web/Umbraco.Web.csproj
2013-08-30 12:22:36 +02:00
Sebastiaan Janssen fbfdd8d398 Bump version number 2013-08-30 12:00:33 +02:00
Stephan 2552dffdad U4-2691 - fix issue with alt template and internal redirects 2013-08-30 11:59:28 +02:00
Sebastiaan Janssen 52540165f1 Creating a partial view now inherits from UmbracoTemplatePage (in 6.2.0 there will be 2 snippets, one for UmbracoViewPage<dynamic>, for MVC experts and one for UmbracoTemplatePage, the default). 2013-08-30 11:47:39 +02:00
Morten Christensen 09c9fb4e8f Fixes U4-2731 Document.BeforeMove + Document.AfterMove Doesn't get fired.
Using the legacy Document and Media classes for the .Move and .Copy calls as they already use the new services under the hood, so shouldn't make any noticeable difference except that the legacy events will also work.
2013-08-30 10:52:58 +02:00
Shannon 2b408df24c Fixes: U4-2727 PluginManager's TypeList can contain duplicates - updates the locks to be upgradeable read locks, changes over all lists/collecitons to be HashSet<T> this ensures no duplicates and also improves performance. 2013-08-30 10:51:06 +02:00
Morten Christensen d44318f589 Fixes U4-2752 ContentService.DeleteVersion and DeleteVersions fail 2013-08-30 10:50:43 +02:00
Shannon d559411187 Fixes U4-2300 6.1.0: Changing a template's parent causes tree to collapse 2013-08-30 10:45:13 +02:00
Sebastiaan Janssen 3a4a6579d3 Fixes: U4-2711 DAMP throws unknown exception on image upload with image cropper 2013-08-30 10:40:29 +02:00
Morten Christensen 9112e2e626 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-08-30 09:43:11 +02:00
Shannon 9b56c7eab6 Fixes U4-2300 6.1.0: Changing a template's parent causes tree to collapse 2013-08-30 14:15:51 +10:00
Shannon f332e6530a Ensures the whole ancestry of view data is merged in with unit tests. 2013-08-30 12:50:39 +10:00
Shannon c228c24ba5 Creted MergeParentContextViewData filter, this is by default applied to SurfaceController's and the PartialViewMacroController. Now if you are rendering a partial view macro or a child action from a SurfaceController and are putting data into ViewData on a POST, you don't have to access the ViewData from the ParentViewContext. 2013-08-30 12:03:16 +10:00
Shannon 697aa03758 Fixes U4-1339 SurfaceController returning PartialView - cannot use ModelState - TempData merge correctly. 2013-08-30 11:34:02 +10:00
Stephan c62689450b Merge remote-tracking branch 'origin/6.2.0' into 6.2.0 2013-08-29 17:28:46 +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
Stephan 0ed4c1868b U4-2549 - fix it differently 2013-08-29 17:08:16 +02:00
Sebastiaan Janssen 2bdbd6c7d9 Updated controller, more flexible, moved UmbracoProperty to Umbraco.Web.Helpers 2013-08-29 16:12:50 +02:00
Sebastiaan Janssen 23517d0c36 Argh, starter kit is hardcoding a content type, so I have to register the new member type with a different Id 2013-08-29 16:10:23 +02:00
Sebastiaan Janssen 2238f81d83 Oops, accidentally killed creating a partial view from the backoffice as it's also using PartialViewTasks.cs (like when you create a partial view macro) 2013-08-29 16:09:23 +02:00
Morten Christensen 37ce5c7a22 Implementing subquery addon for PerformGetByQuery, which allows for better querying first level properties as well as the property collection on a member 2013-08-29 15:42:13 +02:00
Sebastiaan Janssen 4ef10c8afe Install a default member type during initial setup 2013-08-29 13:54:30 +02:00
Morten Christensen e5145f3eb0 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-08-29 12:51:43 +02:00
Shannon 244dcff8da Fixes: U4-1339 SurfaceController returning PartialView - cannot use ModelState ? 2013-08-29 14:51:30 +10:00
Shannon 2e747caa10 Fixes: U4-2727 PluginManager's TypeList can contain duplicates - updates the locks to be upgradeable read locks, changes over all lists/collecitons to be HashSet<T> this ensures no duplicates and also improves performance. 2013-08-29 13:33:01 +10:00
Shannon 93691f13df Fixes U4-2734 Don't set the cache references to null when disposing the UmbracoContext 2013-08-29 12:38:14 +10:00
Shannon 258d526435 Merge branch 'U4-2711-Fix-imagecropper-ToXMl' of https://github.com/stocksr/Umbraco-CMS into stocksr-U4-2711-Fix-imagecropper-ToXMl
Conflicts:
	src/umbraco.editorControls/imagecropper/DataTypeData.cs
2013-08-29 12:31:08 +10:00
Shannon 357dc6ec8e Fixes: U4-2711 DAMP throws unknown exception on image upload with image cropper 2013-08-29 12:27:49 +10:00
Shannon 232c81543a Fixes the rest of U4-2713 Property Editor Value Converters don't get applied to Umbraco.TypedMedia 2013-08-29 12:11:48 +10:00
Shannon 581f3a1893 Fixes build errors 2013-08-29 12:01:30 +10:00
Shannon 9fc3efd73a Fixes U4-2713 Property Editor Value Converters don't get applied to Umbraco.TypedMedia 2013-08-29 11:59:07 +10:00
Shannon 9445f008bc Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-08-29 10:09:09 +10:00
Shannon 36c281a19a updated ignore 2013-08-29 10:08:54 +10:00
Stephan 3fc4f36859 U4-2549 - fix issue with last chance content finder
Conflicts:
	src/Umbraco.Web/Umbraco.Web.csproj
2013-08-28 18:16:20 +02:00
Sebastiaan Janssen 02566589fe Added admin permission for change doctype action to the OOB installer 2013-08-28 17:52:44 +02:00
Sebastiaan Janssen 49637e62fe Updated, more robust versions of the Member template/snippets 2013-08-28 17:52:06 +02:00
Morten Christensen 136673fd23 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-08-28 17:27:43 +02:00
Morten Christensen c7351dfad7 Adding additional methods to the MemberRepository to support various types of lookups/queries, and experimenting with adding dummy properties to the model so a strongly typed query can be translated using mappers.
GetByQuery needs to be refactored so the selection is done in a subquery, so we don't loose properties in the result set
2013-08-28 17:27:29 +02:00
Morten Christensen 575abc6abf Implementing the mapper for Member. Refactoring the MemberProfile, IMember and IMembershipUser interfaces 2013-08-28 15:24:22 +02:00
Morten Christensen 6f63369e11 Updating the Member and MemberProfile class to include the standard UmbracoEntity properties.
Refactoring the sql query and the dtos to use the PropertyType as Primary and Property as secondary as a Property might be empty for a defined type.
Adding labels to the conventional Member PropertyType aliases.
2013-08-28 14:17:16 +02:00
Darren Ferguson 1995b25092 Adding new Memership provider implementation
Obsolete SecUtility class
Add Security Helper class
2013-08-28 12:48:04 +01:00
Sebastiaan Janssen f26d759c84 Moved controllers and models as per Shannon's suggestion
Added LoginStatus and updated Register
Updated to use CDF instead of <script> tags
2013-08-28 13:36:04 +02:00
Morten Christensen 3f0dc7f652 Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-08-28 09:38:40 +02:00
Sebastiaan Janssen 8274883fa5 Bump version number to 6.2.0 2013-08-28 09:09:21 +02:00
Sebastiaan Janssen 12b3d50717 Merge branch '6.2.0' of github.com:umbraco/Umbraco-CMS into 6.2.0 2013-08-27 19:29:43 +02:00
Sebastiaan Janssen 86276206d5 Add register member partial view macro template 2013-08-27 19:29:15 +02:00
Stephan da719377df U4-2691 - fix issue with alt template and internal redirects 2013-08-27 18:06:53 +02:00
Robert Stocks 614dc8f4d1 Fix U4-2711 add Null Check to ToXMl method
Fixes Object reference not set to an instance of an object. at
umbraco.editorControls.imagecropper.DataTypeData.ToXMl(XmlDocument data)
2013-08-27 16:10:04 +01:00
Morten Christensen a3f41af3ba Updating the sql query in the MemberRepository 2013-08-27 15:50:17 +02:00
Morten Christensen 342232f21e Updating the Member class and adding an UmbracoMember wrapper as a bridge between MembershipUser and Member 2013-08-27 15:49:46 +02:00
Morten Christensen c3c9c10060 Implementing a factory for readonly Member objects 2013-08-27 15:48:58 +02:00
Morten Christensen 89fbad447b Adding propertytype alias conventions for Member 2013-08-27 15:48:18 +02:00
Morten Christensen 0aa38728fc Updating the readonly dtos 2013-08-27 15:48:00 +02:00
Robert Stocks 23e4003af0 U4-516 - Fix DatePicker with time default value
Enables the standard jQuery date picker to parse the current value of
the field correctly, this prevents it from defaulting to Today and
overwriting the currently stored value.
2013-08-27 12:04:20 +01:00
Sebastiaan Janssen 53b6fb7b56 Add login template to partial view macros 2013-08-27 11:37:20 +02:00
Sebastiaan Janssen 6bbc2de43e Update failing unit test due to added action for changing the document type on a node 2013-08-27 09:37:00 +02:00
DougMac 0218e39664 Fixes: U4-2060 Spell Checker Broke After Google Update 2013-08-26 22:50:53 +01:00
Sebastiaan Janssen 91590c824f Merge branch '6.2.0' of github.com:umbraco/Umbraco-CMS into 6.2.0 2013-08-26 17:28:31 +02:00
Sebastiaan Janssen d17b2cf884 Added ability to have predefined templates for Partial View Macros 2013-08-26 17:28:15 +02:00
Morten Christensen aed017641d Merge branch '6.2.0' of https://github.com/umbraco/Umbraco-CMS into 6.2.0 2013-08-26 17:01:05 +02:00
Morten Christensen 2b82e74b90 Adding test fixture for the MemberRepository 2013-08-26 17:00:12 +02:00
Morten Christensen 37d190c97d Implementing read-only DTOs for improved reading of Members from db.
Started implementation of Member, MemberType and MemberGroup repositories.
2013-08-26 16:59:41 +02:00
Morten Christensen f1818aae1b Updating the Profile and Member classes 2013-08-26 16:58:08 +02:00
Sebastiaan Janssen ee4312b7f2 U4-2464 Single user protection, password not changeable! 2013-08-26 13:56:22 +02:00
Sebastiaan Janssen 2345a5e133 U4-2477 Member editing - Indicate which box is active and which is inactive 2013-08-26 13:45:09 +02:00
Sebastiaan Janssen cbe8f15007 U4-2636 Allow at root property are outside of view in backoffice 2013-08-26 12:11:07 +02:00
Sebastiaan Janssen dd59038369 Fixes U4-2686 Error when trying to delete member group with ampersand in name. 2013-08-26 10:29:30 +02:00
Sebastiaan Janssen c9942d7ca5 Merge pull request #106 from pynej/code-mirror-search
Added plugin to all code area editors to suppressed normal browser Find ...
2013-08-25 08:37:08 -07:00
Sebastiaan Janssen ab8e6b8f33 Merge branch 'wip-dragdrop2' of https://github.com/AndyButland/Umbraco-CMS into AndyButland-wip-dragdrop2 2013-08-25 17:26:08 +02:00
Sebastiaan Janssen d21f10ec1e Db migration to allow admins to change the document type 2013-08-25 17:14:01 +02:00
Sebastiaan Janssen 76d0ffb797 Merge branch 'wip-changedoctypeui' of https://github.com/AndyButland/Umbraco-CMS into AndyButland-wip-changedoctypeui
Conflicts:
	.gitignore
	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
	src/Umbraco.Web.UI/config/ClientDependency.config
	src/Umbraco.Web/Umbraco.Web.csproj
2013-08-25 15:50:07 +02:00
Sebastiaan Janssen 6437179a83 Merge pull request #112 from dampee/6.1.3
U4-2638 Developer/Packages/Install Starterkit give 500 server error
2013-08-25 05:36:49 -07:00
Sebastiaan Janssen cc45bbeca6 Fix unit tests that failed because UmbracoSettings.config was being cleaned up 2013-08-23 16:22:26 +02:00
Sebastiaan Janssen 8cd9266ea6 Updated obsolete msg after feedback here: https://github.com/umbraco/Umbraco-CMS/commit/2b532f72c34a33e2966b1fb5c7f068564e518c91#commitcomment-3899011 2013-08-23 14:17:40 +02:00
Sebastiaan Janssen ad44feb6dd Don't throw exception when node has no template and asking for GetTemplateAlias (return string.Empty instead) 2013-08-23 14:08:13 +02:00
Sebastiaan Janssen 16ed85ecc9 Merge branch '4.11.10' into 6.2.0
Conflicts:
	.gitignore
	build/Build.bat
	src/Umbraco.Core/Configuration/GlobalSettings.cs
2013-08-23 13:48:38 +02:00
Sebastiaan Janssen 9d45b10ee5 Merge pull request #104 from umbraco/6.0.7
6.0.7
2013-08-23 04:46:41 -07:00
Sebastiaan Janssen e9f8cf25b9 Merge branch '6.0.0-PetaPocoExtension' into 6.2.0
Conflicts:
	.hgignore
2013-08-23 13:42:26 +02:00
Sebastiaan Janssen 19a3b8809e Merge branch '4.11.9' into 6.2.0
Conflicts:
	.hgtags
2013-08-23 12:18:25 +02:00
Sebastiaan Janssen 96e40b8b4f Merge pull request #101 from umbraco/4.11.8
Closing branch 4.11.9 as that version number was used for the emergency ...
2013-08-23 03:17:46 -07:00
Sebastiaan Janssen 53aeb59eb4 Merge pull request #100 from umbraco/6.0.5
Closing branch 6.0.5 as that version number was used for the emergency s...
2013-08-23 03:17:29 -07:00
Sebastiaan Janssen befb42cd68 Merge pull request #99 from umbraco/4.11.7---cmsContentXml-fixes
Close 4.11.7 - cmsContentXml fixes branch
2013-08-23 03:17:06 -07:00
Sebastiaan Janssen 15bab05e18 Merge branch '6.2.0' of github.com:umbraco/Umbraco-CMS into 6.2.0 2013-08-23 12:15:37 +02:00
Sebastiaan Janssen 7d2e408363 Merge branch '4.11.5' into 6.2.0
Conflicts:
	.hgtags
2013-08-23 12:15:28 +02:00
Sebastiaan Janssen c1cc62543d Merge pull request #97 from umbraco/6.1.0-public
Close 6.1.0-public branch, merged.
2013-08-23 03:13:19 -07:00
Sebastiaan Janssen 6d61c93f62 Merge pull request #96 from umbraco/6.0.0-LegacyApi-Refactor
Close 6.0.0-LegacyApi-Refactor branch
2013-08-23 03:12:29 -07:00
Sebastiaan Janssen 38c8860e92 Merge pull request #95 from umbraco/6.0.0-Repository-Resolvers-refactor
Closing branch after having merged the changes to events to the main 6.0...
2013-08-23 03:12:08 -07:00
Sebastiaan Janssen 4719bfb4ad Merge pull request #94 from umbraco/4.10.1
Close 4.10.1 branch
2013-08-23 03:11:49 -07:00
Sebastiaan Janssen b5719ab103 Merge pull request #93 from umbraco/4.6.1
Closing branch
2013-08-23 03:10:24 -07:00
Sebastiaan Janssen c82573a697 Merge pull request #92 from umbraco/4.7.1
Closing branch
2013-08-23 03:10:03 -07:00
Sebastiaan Janssen 6448554343 Merge pull request #91 from umbraco/4.7.2
Closing branch
2013-08-23 03:09:40 -07:00
Sebastiaan Janssen c0b9e803d9 Merge pull request #90 from umbraco/4.8-apptreexml-wip
Closing branch
2013-08-23 03:08:55 -07:00
Sebastiaan Janssen ab06a22272 Merge pull request #89 from umbraco/4.8-tinymce-wip
Closing old branch
2013-08-23 03:08:31 -07:00
Sebastiaan Janssen eac56eba47 Merge pull request #88 from umbraco/4.8-solutioncleanup-wip
Close 4.8-solutioncleanup-wip branch
2013-08-23 03:07:25 -07:00
Sebastiaan Janssen 0e822bdc81 Merge pull request #87 from umbraco/4.6.0
Closing branch
2013-08-23 02:52:25 -07:00
Sebastiaan Janssen 1e76cf67d3 Fix merge problem 2013-08-23 08:57:02 +02:00
Shannon ec4f6de631 Fixes: U4-2701 The media creation process needs to be optimized, there's far too much IO occuring 2013-08-23 13:41:16 +10:00
Shannon 3bb61294e9 Ensures all IDisposables are in a using clause for all processes involved with the media uploader, there were also a few streams not being closed or disposed either!
U4-2699 The media upload process doesn't dispose all resources
2013-08-23 11:46:55 +10:00
Shannon c477da95fd Ensures all IDisposables are in a using clause for all processes involved with the media uploader, there were also a few streams not being closed or disposed either! 2013-08-23 11:20:00 +10:00
Sebastiaan Janssen 61149f8112 Merge branch '6.1.4'
Conflicts:
	.gitignore
	src/Umbraco.Web.UI/install/steps/database.ascx
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/ImageViewer.ascx.cs
	src/umbraco.editorControls/mediapicker/mediaChooser.cs
2013-08-22 14:46:11 +02:00
Sebastiaan Janssen adb059e0da Revert U4-2511 Locallink:NODEID not working as it was breaking expectations of people running site without this fix 2013-08-22 13:13:32 +02:00
Morten Christensen 4337976887 Merge branch '6.1.4' of https://github.com/umbraco/Umbraco-CMS into 6.1.4 2013-08-22 12:59:08 +02:00
Morten Christensen efe5de87a6 Updating readme for nuget packages 2013-08-22 12:58:53 +02:00
Sebastiaan Janssen 389642946e Merge pull request #85 from rolfis/patch-1
Update sv.xml
2013-08-21 09:03:37 -07:00
rolfis 53d30aa3cb Update sv.xml
Changed {0} to %0% in login screen bottomText to display correct end year of copyright notice.
2013-08-21 16:55:53 +02:00
Shannon e233cffb9d Changes the cache keys in PluginManager to reference a const to make it a bit more clear. 2013-08-21 11:19:27 +10:00
Shannon 9e58ebed24 Merge branch '6.1.4' of https://github.com/umbraco/Umbraco-CMS into 6.1.4 2013-08-21 11:14:59 +10:00
Shannon f51c4e332e Fixes: U4-2653 BeginUmbracoForm should use absolute path with query string URLs without the protocol 2013-08-21 11:14:37 +10:00
Sebastiaan Janssen 03a0a0a0e9 Fix a strange VS2012 build targets problem 2013-08-20 18:06:09 +02:00
Sebastiaan Janssen dcb381770f Fix unit test that was looking at the wrong filename 2013-08-19 12:54:20 +02:00
dampee fb03de37ce U4-2638 Developer/Packages/Install Starterkit give 500 server error 2013-08-19 12:51:13 +02:00
Sebastiaan Janssen 65db0e69a9 Fixes: U4-2642 Make SQL CE more resilient to server crashes 2013-08-19 12:26:01 +02:00
Sebastiaan Janssen 23c6a91e9c Fixes merge issue 2013-08-19 11:47:53 +02:00
Sebastiaan Janssen a03c6dcf13 Merge pull request #80 from ThomasSkyldahl/6.1.4
UmbracoViewPage.WriteLiteral(object value)  optimized memory usage and combined markup injection
2013-08-19 02:34:13 -07:00
Sebastiaan Janssen 3029d97f33 Merge pull request #78 from dprothero/6.1.4
Fixed membership provider to correctly log failed attempts.
2013-08-19 02:06:15 -07:00
Sebastiaan Janssen f41d967864 Fixes: U4-2637 Error adding a User using AD Membership Provider when no Email Address Defined 2013-08-19 10:41:49 +02: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
Thomas Skyldahl Sørensen 4a481b05d4 Optimized WriteLiteral 2013-08-16 10:09:09 +02:00
Shannon 66c6b5b524 Fixes: U4-2632 Remove the recursive permissions check on the move/copy dialog 2013-08-16 12:46:40 +10:00
Shannon e3b0f71549 Merge branch '6.1.4' of https://github.com/umbraco/Umbraco-CMS into 6.1.4 2013-08-16 12:25:55 +10:00
Shannon 973b466798 Fixes: U4-2627 Ensure that the plugins cache files are named with the machine name 2013-08-16 12:25:38 +10:00
Shandem fa0eef4333 Merge pull request #79 from sniffdk/6.1.4
Moved WriteLiteral method to UmbracoViewPage
2013-08-15 19:12:54 -07:00
Mads Krohn a343a76a26 Moved WriteLiteral method to UmbracoViewPage
When we use a custom model through a custom controller, in our view, we
inherit from UmbracoViewPage, so the WriteLiteral method, which provides
preview badge and miniprofiler code, should be placed there.
2013-08-16 00:01:31 +02:00
Morten Christensen d0a9e3236e Promise for the changed unit test was incorrect, so correcting it in this commit 2013-08-15 10:26:24 +02:00
Morten Christensen b899805ec9 Correcting issue introduced in d3b69e04e1 where the returned IProfile would contain the Username and not the Name. This will have changed the Creator and Writer name in the xml cache to be the Login instead of the Name of the user, so for those that use these fields its important to republish to update the xml cache.
Fixes U4-2628 creatorName and writerName should use username - not loginname. Also verified through file history back to v4.
2013-08-15 10:08:59 +02:00
Morten Christensen 766497e355 Refactoring QueryHelper to be a base class instead.
Fix U4-2607 Creating nodes with special characters causes YSOD
2013-08-14 17:07:21 +02:00
Morten Christensen 67a2a9cfe4 Refactoring the optimized Recycle Bin, so that the Recycle Bin's repository is more independent and easier to use with the new events added to the Content- and MediaService. 2013-08-14 16:12:13 +02:00
dprothero 766ba0c8f5 Fixed membership provider to correctly log failed attempts. 2013-08-13 13:46:32 -07:00
Morten Christensen ca71c59880 Fixes U4-2218 Document Type copy looses property tab assignment 2013-08-13 17:41:35 +02:00
Morten Christensen 6c87cf729a Fixes U4-2592 Cannot delete a node when the node has just a closing bracket in the name. 2013-08-13 11:27:39 +02:00
Shannon 5c63afa31a removed my test examine settings 2013-08-13 18:26:32 +10:00
Shannon fa88768c91 removed my test examine settings 2013-08-13 18:25:39 +10:00
Shannon bfabfd9fa5 Updated to latest Examine version (contains bug fix for U4-2180 Problem with Examine MultiIndexSearcher after upgrading from 4.11.3 to 4.11.8) and removes the partially trusted callers attribute from the PDF lib because itextsharp by default doesn't support med trust. 2013-08-13 15:41:40 +10:00
Shannon aa1c411c8c Fixes U4-2618 PDF indexer does not ensure spaces are added to textual content and fixes med trust compat relating to U4-2180 Problem with Examine MultiIndexSearcher after upgrading from 4.11.3 to 4.11.8 2013-08-13 13:47:57 +10:00
Shannon c52c452b36 Fixes issue relating to the fix for U4-2589 where we need to clear the published db flag for previous versions when creating a new published version. 2013-08-13 11:01:49 +10:00
Morten Christensen 86811fe507 Fixes U4-2397 IContent Properties added with incorrect Value when read from Cache, and adds unit test for verifying types saved and returned for 24 standard DataTypes. 2013-08-12 16:20:32 +02:00
Morten Christensen 363de53b82 Updates query to limit results in subquery for MySql according to U4-2329 Browsing Media Slow in 6.1.1 2013-08-12 12:42:21 +02:00
Shandem 958fb66f2c Merge pull request #73 from florisrobbemont/6.1.3
U4-2596: UmbracoControllerFactory method ReleaseController should be virtual
2013-08-11 18:13:06 -07:00
Morten Christensen 30e12c1367 Final piece to the puzzle for U4-2571 Need to optimize empty recycle bin. Needed to hack around the ordering of items in the recycle bin because of the self-referencing constraint - parentID to id in the umbracoNode table by updating all parentID entries, which bypasses any reference issues with the foreignkey. 2013-08-11 21:12:02 +02:00
Morten Christensen 89ff7d85e2 Correcting DELETE FROM query so it works with sql ce as well. 2013-08-09 17:44:57 +02:00
Shannon 61fbf2cfc6 reverts PersistDeletedItem transaction because i forgot that the Commit() method of the UOW already takes care of the transaction. 2013-08-09 10:52:24 +10:00
Shannon ce847e97a8 Updates the PetaPocoRepositoryBase to ensure that the deletion process is wrapped in a transaction so if any of the processes fail, it all gets rolled back. 2013-08-09 10:07:03 +10:00
Shannon 1e61563f79 Ensures the deletions are wrapped in a transaction - for performance and to mitigate db corruption if one of the deletes fails. 2013-08-09 10:01:28 +10:00
Morten Christensen b4f9985695 Last bits to implement U4-2571 Need to optimize empty recycle bin 2013-08-08 15:12:26 +02:00
Morten Christensen 82f19ede8c Merge branch '6.1.4' of https://github.com/umbraco/Umbraco-CMS into 6.1.4 2013-08-08 10:22:38 +02:00
Shannon 0fbc32a87f Fixes up logic for creating new versions (U4-2589 Save and Publish is not creating version of document) 2013-08-08 10:42:06 +10:00
Jeremy Pyne f3e8359e36 Added plugin to all code area editors to suppressed normal browser Find function with internal code mirror functions. This is needed for search to work on long documents and also adds more advanced regex search and replace options including:
Ctrl-F / Cmd-F
Start searching
Ctrl-G / Cmd-G
Find next
Shift-Ctrl-G / Shift-Cmd-G
Find previous
Shift-Ctrl-F / Cmd-Option-F
Replace
Shift-Ctrl-R / Shift-Cmd-Option-F
Replace all

Demo: http://codemirror.net/demo/search.html
2013-08-07 16:08:40 -04:00
Floris Robbemont dc2de4b5e7 U4-2596: UmbracoControllerFactory method ReleaseController should be virtual 2013-08-07 15:06:41 +02:00
Shannon 5fce741940 another sln update 2013-08-07 11:53:09 +10:00
Shannon 14e4a8061c removes the vs profiling files from the sln. 2013-08-07 11:49:48 +10:00
Shannon 1b9f071581 Fixes: U4-2589 Save and Publish is not creating version of document and adds a few unit tests 2013-08-07 11:39:25 +10:00
Morten Christensen 79141ef86d Initial work on U4-2571 Need to optimize empty recycle bin 2013-08-06 15:08:05 +02:00
Sebastiaan Janssen 08609a887c Merge branch '6.1.4' of github.com:umbraco/Umbraco-CMS into 6.1.4 2013-08-06 10:24:42 +02:00
Sebastiaan Janssen b11932240c Fixes U4-2587 Regression: Hide Preview Button on nodes that have no template
Now also checks if the template still exists and if it's allowed on that document to determine when to enable the preview button
2013-08-06 10:24:20 +02:00
Shannon d47b4517c1 Fixes unit tests 2013-08-06 13:06:25 +10:00
Morten Christensen 226a13c6e1 Minor adjustment related to U4-2560 Working with ContentService can give 2 versions of a document as "newest" 2013-08-05 14:30:03 +02:00
Shannon d78a03a610 Massively improves performance for the packaging service (converting docs to XML) which is used in republishing the tree. 2013-08-05 13:11:47 +10:00
Shannon b7a1123319 U4-2579 BulkPublishController causes YSOD when there are invalid child elements due to InvalidProperties having a null reference 2013-08-02 16:23:32 +10:00
Shannon 7e9cad34db Creates an SQL Server version check for bulk sql imports. 2013-08-02 16:01:54 +10:00
Shannon c4b44ea0e3 Fixes: U4-2577 Can't save umbraco user - without re-filling in the password
Fixes: U4-541 Wrong dictionary key when using in backend template names
This changes the way that the value that is stored in the auth cookie. Previously we just stored a GUID which was the user's contextid stored in the db, now we store encrypted values of a few necessary user objects. In 6.2 we'll actually set a real .Net user object on the HttpContext. For now, the http module will simply just ensure that the culture is set correctly for the currently logged in user.
2013-08-02 15:16:04 +10:00
Sebastiaan Janssen 3435a75e9e U4-2553 Double tabs when installing package that makes use of Dictionary Items to translate document types
Forgto to commit a file :)
2013-08-01 14:39:22 +02:00
Sebastiaan Janssen bdb6c5768a U4-2553 Double tabs when installing package that makes use of Dictionary Items to translate document types
Added GetRawCaptionById method for the packager so the generated XML is correct
2013-08-01 13:40:23 +02:00
Sebastiaan Janssen 87a3c53e22 Merge branch '6.1.4' of github.com:umbraco/Umbraco-CMS into 6.1.4 2013-07-31 18:31:56 +02:00
Sebastiaan Janssen 898d25f3cb Include lang files in project so they'll actually end up in the final build 2013-07-31 18:31:39 +02:00
Shannon 9bc3fdd555 Makes UmbracoContext disposable and fixes the module's DisposeHttpContextItems to actual perform the disposal of each item. 2013-07-31 17:34:42 +10:00
Shannon cbda86fe92 Fixes build error, streamlines all calls to validate a user for base controllers. 2013-07-31 17:24:36 +10:00
Shannon b48f0f52e0 updates uri extensions + tests
Conflicts:
	src/Umbraco.Core/UriExtensions.cs
2013-07-31 17:08:10 +10:00
Shannon e2eeafcbfc Fixes: U4-2232 UmbracoAuthorizeAttribute breaks Relfection methods - ensures that no singleton instances are passed into attributes since they only ever get created once, meaning we're left with a stale version in the attribute. 2013-07-31 16:45:11 +10:00
Shannon ad697db42b Fixes an issue with WebSecurity logout 2013-07-31 11:10:33 +10:00
Shannon 9bb31e9456 Merge branch '6.1.4-cmsContentXml_Optimizations' into 6.1.4 2013-07-29 17:45:48 +10:00
Shannon a195d33332 Added another benchmark for removing/re-inserting records for cmsContentXml table using one transaction which again improves performance. Now have changed the rebuild xml method in the content service to : Lookup all data that it needs to insert first, then we begin a transaction and inside of the one transaction we clear the data and re-insert it so if anything fails in this process it should be rolled back. 2013-07-29 17:45:05 +10:00
Shannon 82a87cbd92 Doh, missed file 2013-07-29 16:46:30 +10:00
Shannon 5b26436862 Removes all references to the legacy Document.RepublishAll and replaces it's logic with the correct logic. 2013-07-29 16:45:54 +10:00
Shannon eed61f9053 Adds unit test for U4-2556 to ensure that it is solved. 2013-07-29 16:42:53 +10:00
Shannon 55c68485e9 Changed the logic of the GetByPublishedVersion to only return from cache if the cache item is published. 2013-07-29 16:03:37 +10:00
Shannon b9ba350a2f Updated the RebuildXmlStructures method with performance improvements. Added cache checking to the GetByPublishedVersion method since published content should always be 'latest' this will speed things up tremendously if items are found there. Added 2 more performance tests which show very large perf improvements, namely the Get_All_Published_Content_Of_Type shows a 77% improvement. 2013-07-29 15:49:56 +10:00
Shannon 696306e7c9 Implements the bulk insert procedure for re-populating the cmsContentXml tables, removes the need to rebuild all xml structures when sorting if in LB environments 2013-07-29 13:25:02 +10:00
Sebastiaan Janssen 9bf86aff09 Merge branch '6.1.4' of github.com:umbraco/Umbraco-CMS into 6.1.4 2013-07-26 15:17:20 +02:00
Sebastiaan Janssen f50de5b049 U4-2550 Could not load file or assembly 'HtmlAgilityPack, Version=1.4.5.0 2013-07-26 15:16:55 +02:00
Sebastiaan Janssen d734ba6136 U4-2543 In the back office its possible to get Response Validation errors 2013-07-26 12:43:19 +02:00
Morten Christensen c49becea53 Cleanup of unused using statements in a few files 2013-07-26 12:35:40 +02:00
Shannon 614aea203d Merge remote-tracking branch 'origin/6.1.4' into 6.1.4-cmsContentXml_Optimizations 2013-07-26 18:14:13 +10:00
Shannon ed88bbf75f Fixed up BaseDatabaseFactoryTests so that it only loads in one db factory with the correct conn strings, now we can easily override to use a custom db. Added benchmark tests for bulk inserting records for the cmsContentXml table which shows how we can improve performance quite a bit especially for larger node sets. Added more unit tests for bulk inserting and fixed it up a bit more. 2013-07-26 18:13:56 +10:00
Sebastiaan Janssen e41d3c7e84 Increase version to 6.1.4 2013-07-25 11:59:37 +02:00
Sebastiaan Janssen a099af39c2 xmlrpcnet was missing from nuspecs 2013-07-25 11:50:56 +02:00
Shannon 118f9b02e2 Fixes: U4-1027 Media Sort Usability -> changed the sorting to use Web API instead of asmx web service. 2013-07-25 12:29:41 +10:00
Sebastiaan Janssen 38778cc7c7 Fixes U4-2488 Edit datatype: Media Picker appears incorrectly 2013-07-24 14:52:25 +02:00
Shannon ffff9efaa8 Fixes: U4-2535 The actions/publish.aspx page does not publish correctly and show the correct publish result 2013-07-24 13:06:25 +10:00
Shannon 7f4abb4893 Fixed editContent.aspx to let the business logic handle the property validation when trying to publish and show the correct status message result (if it was not publishable). Adds the invalid properties collection to the PublishStatus so those can be shown too. 2013-07-24 12:54:10 +10:00
Shannon 4d39ce1202 Fixes Allow At Root styling 2013-07-24 11:44:26 +10:00
Shannon 7164f23a98 Fixes up validation styling and the validation summary close button display. 2013-07-24 11:31:31 +10:00
Shannon 8b2d1b8eab Fixed Template model class to not have it's own NodePath property which was always null since it wasn't mapped (and there was no point in it). 2013-07-24 10:11:05 +10:00
Shannon 80394f08fb Fixed runtime cache provider issues & unit tests. 2013-07-24 09:36:01 +10:00
Sebastiaan Janssen ca1fe5ff2a Unit test for: U4-2514 Checkboxlist prevalues in packages broken 2013-07-23 16:13:20 +02:00
Sebastiaan Janssen a1037ce43c Fixes U4-2187 - Enable support for MySQL on Linux 2013-07-23 15:38:26 +02:00
Sebastiaan Janssen 89622998e0 Merge pull request #34 from luckyrat/6.0.7
Fixes U4-2187 - Enable support for MySQL on Linux
2013-07-23 06:24:42 -07:00
Sebastiaan Janssen 2cd2f3741d Merge branch '6.1.2' of https://github.com/stevetemple/Umbraco-CMS into stevetemple-6.1.3 2013-07-23 15:20:28 +02:00
Sebastiaan Janssen e634dba4ea 2nd attempt: U4-2514 Checkboxlist prevalues in packages broken 2013-07-23 13:16:18 +02:00
Shannon d1eb8fd9eb Obsoletes UmbracoFile with new UmbracoMediaFile in the Core assembly and wraps the legacy class to use the new one. Improves performance of UmbracoMediaFile by ensuring any IO is lazy loaded and then saved to a local property so it doesn't need to re-read the file for things like length/size.
Conflicts:
	src/Umbraco.Core/Umbraco.Core.csproj
2013-07-23 17:59:44 +10:00
Shannon 2e91c89c02 Fixes null check for changes to RuntimeCacheProvider 2013-07-23 14:00:52 +10:00
Shannon 8be54ba0cc Fixes: U4-1970 v6 API - need to implement caching for templates since we're doing a db lookup on a front-end request. This is a temporary fix until we implement the ApplicationCache properly but it still works by utilizing the existing RuntimeCacheProvider singleton. I've tweaked this provider as well to ensure we use the HttpRuntime.Cache when it is available (during a web session). We don't want to have a seperate caching bucket so that IIS can manage cache memory properly. Have ensured that the template cache is cleared when templates are updated/removed. 2013-07-23 11:46:18 +10:00
Shannon 3da7682415 reverted change for U4-2514 as this change will cause other unwanted problems. Added logging for DefaultDataKeyValue instead of blindly swallowing an exception. 2013-07-23 10:50:48 +10:00
Sebastiaan Janssen 775892ff5a U4-2514 Checkboxlist prevalues in packages broken 2013-07-22 16:23:16 +02:00
Sebastiaan Janssen f30b4c8184 Slight refactor of UmbracoFile 2013-07-22 13:55:10 +02:00
Sebastiaan Janssen 319ba5c791 U4-2524 If tinyMCEImageHelper.DoResize fails, the src gets removed from the img tag 2013-07-22 13:51:13 +02:00
Sebastiaan Janssen 398bc6d767 Fix merge issue 2013-07-22 12:15:54 +02:00
Sebastiaan Janssen 5d3ef8d97f Merge branch '6.1.3' of https://github.com/Myster/Umbraco-CMS into Myster-6.1.3
Conflicts:
	src/Umbraco.Web.UI/umbraco/config/lang/de.xml
	src/Umbraco.Web.UI/umbraco/config/lang/no.xml
2013-07-22 12:09:41 +02:00
Sebastiaan Janssen 08a300fbe5 U4-2370 Style sheet property sorting broken 2013-07-22 10:47:01 +02:00
Sebastiaan Janssen 845770c4bb Merge pull request #69 from abryukhov/patch-2
tinyMCE internal language pack - RU
2013-07-22 00:05:22 -07:00
Sebastiaan Janssen 771dc10c85 Merge pull request #68 from abryukhov/patch-3
tinyMCE internal language pack - RU
2013-07-22 00:04:23 -07:00
Sebastiaan Janssen 2ac76202e5 Merge pull request #67 from abryukhov/patch-4
tinyMCE internal language pack - RU
2013-07-22 00:04:11 -07:00
Sebastiaan Janssen a5ecbe96e2 Merge pull request #66 from abryukhov/patch-5
tinyMCE internal language pack - RU
2013-07-22 00:04:03 -07:00
Sebastiaan Janssen 7240b22e48 Merge pull request #65 from abryukhov/patch-6
tinyMCE internal language pack - RU
2013-07-22 00:03:51 -07:00
Sebastiaan Janssen 1f00589cb4 Merge pull request #64 from abryukhov/patch-7
tinyMCE internal language pack - RU
2013-07-22 00:03:33 -07:00
Sebastiaan Janssen 60b14487a9 Merge pull request #63 from abryukhov/patch-8
tinyMCE internal language pack - RU
2013-07-22 00:03:24 -07:00
Sebastiaan Janssen 33bc85a843 Merge pull request #62 from abryukhov/patch-9
tinyMCE internal language pack - RU
2013-07-22 00:03:14 -07:00
Sebastiaan Janssen e6642674d4 Merge pull request #61 from abryukhov/patch-10
tinyMCE internal language pack - RU
2013-07-22 00:03:01 -07:00
Sebastiaan Janssen 8ad5fb3c44 Merge pull request #60 from abryukhov/patch-11
tinyMCE internal language pack - RU
2013-07-22 00:02:50 -07:00
Sebastiaan Janssen 1752d14c57 Merge pull request #59 from abryukhov/patch-12
tinyMCE internal language pack - RU
2013-07-22 00:02:40 -07:00
Sebastiaan Janssen ec4ccba1a7 Merge pull request #58 from abryukhov/patch-13
tinyMCE internal language pack - RU
2013-07-22 00:02:32 -07:00
Sebastiaan Janssen 0244492a89 Merge pull request #57 from abryukhov/patch-14
tinyMCE internal language pack - RU
2013-07-22 00:02:22 -07:00
Sebastiaan Janssen 546cf2c84d Merge pull request #56 from abryukhov/patch-15
tinyMCE internal language pack - RU
2013-07-22 00:02:14 -07:00
Sebastiaan Janssen d354dde774 Merge pull request #55 from abryukhov/patch-16
tinyMCE internal language pack - RU
2013-07-22 00:02:03 -07:00
Sebastiaan Janssen 22c9e9acd9 Merge pull request #54 from abryukhov/patch-17
tinyMCE internal language pack - RU
2013-07-22 00:01:47 -07:00
Alexander Bryukhov 5dd14723e9 tinyMCE internal language pack - RU 2013-07-22 10:29:12 +07:00
Alexander Bryukhov 7134e80c44 tinyMCE internal language pack - RU 2013-07-22 10:27:31 +07:00
Alexander Bryukhov f7196ee8f9 tinyMCE internal language pack - RU 2013-07-22 10:26:47 +07:00
Alexander Bryukhov fdecd697b7 tinyMCE internal language pack - RU 2013-07-22 10:26:04 +07:00
Alexander Bryukhov 6c03dac869 tinyMCE internal language pack - RU 2013-07-22 10:25:18 +07:00
Alexander Bryukhov 6cdb564a9f tinyMCE internal language pack - RU 2013-07-22 10:24:31 +07:00
Alexander Bryukhov 0da8a8db36 tinyMCE internal language pack - RU 2013-07-22 10:23:51 +07:00
Alexander Bryukhov a4a9620889 tinyMCE internal language pack - RU 2013-07-22 10:22:46 +07:00
Alexander Bryukhov 2307424fb6 tinyMCE internal language pack - RU 2013-07-22 10:22:01 +07:00
Alexander Bryukhov ca124fb662 tinyMCE internal language pack - RU 2013-07-22 10:21:16 +07:00
Alexander Bryukhov 6787252f9b tinyMCE internal language pack - RU 2013-07-22 10:20:36 +07:00
Alexander Bryukhov ef3094f8d9 tinyMCE internal language pack - RU 2013-07-22 10:19:51 +07:00
Alexander Bryukhov a2a20133aa tinyMCE internal language pack - RU 2013-07-22 10:18:38 +07:00
Alexander Bryukhov bb750d186a tinyMCE internal language pack - RU 2013-07-22 10:17:56 +07:00
Alexander Bryukhov f2a7dde5ce tinyMCE internal language pack - RU 2013-07-22 10:16:00 +07:00
Alexander Bryukhov 73e2559a13 tinyMCE internal language pack - RU 2013-07-22 10:14:48 +07:00
Shannon 80f8a9d01c Merge branch '6.1.3' of https://github.com/umbraco/Umbraco-CMS into 6.1.3 2013-07-22 12:44:06 +10:00
Shannon 6f9883d373 Fixes MNTP required validation (U4-1975) 2013-07-22 12:30:12 +10:00
Shannon 41c920a4ec Updated to latest CDF version which contains some fixes. 2013-07-22 11:29:32 +10:00
Sebastiaan Janssen 1f79b71738 Merge branch '6.1.3' of github.com:umbraco/Umbraco-CMS into 6.1.3 2013-07-19 15:59:09 +02:00
Sebastiaan Janssen 64fb588556 defaultDocumentTypeProperty is no longer case-sensitive. Added to the Release config as well so it makes it into the umbraco downloadable package. 2013-07-19 15:41:29 +02:00
Sebastiaan Janssen 90cfd004cb Merge branch 'wip-u4-1949' of https://github.com/AndyButland/Umbraco-CMS into AndyButland-wip-u4-1949 2013-07-19 15:41:15 +02:00
Sebastiaan Janssen b5494546c7 defaultDocumentTypeProperty is no longer case-sensitive. Added to the Release config as well so it makes it into the umbraco downloadable package. 2013-07-19 15:40:12 +02:00
Sebastiaan Janssen 7bac1ef1cd Merge branch 'wip-u4-1949' of https://github.com/AndyButland/Umbraco-CMS into AndyButland-wip-u4-1949 2013-07-19 15:22:05 +02:00
Sebastiaan Janssen ad927ec6c1 Merge pull request #53 from abryukhov/patch-1
Update of ru.xml with latest keys
2013-07-19 06:20:55 -07:00
Sebastiaan Janssen 8a19d28859 Merge pull request #52 from enkelmedia/patch-1
Update to readme to contain info about the support for MVC
2013-07-19 06:20:37 -07:00
Sebastiaan Janssen 7e24af9daf Merge branch '6.1.3' of github.com:umbraco/Umbraco-CMS into 6.1.3 2013-07-19 15:19:27 +02:00
Sebastiaan Janssen 7518b514a7 Merge pull request #51 from kipusoep/master
Updated the download link
2013-07-19 15:19:01 +02:00
Sebastiaan Janssen da15d40b04 Merge pull request #51 from kipusoep/master
Updated the download link
2013-07-19 06:18:13 -07:00
Sebastiaan Janssen 96c38f50e4 Merge pull request #49 from lars-erik/6.1.3
Prettifying norwegian translation
2013-07-19 06:17:48 -07:00
Sebastiaan Janssen e723f1169f Merge pull request #48 from marc303/patch-1
Updated DE to 6.1.2
2013-07-19 06:16:48 -07:00
Sebastiaan Janssen 914005b2b6 Merge pull request #46 from michielvoo/u4-2417
U4-2417 Could the preview thumbnail link to the full image
Conflicts:
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/umbraco.presentation/umbraco/controls/Images/ImageViewer.ascx.cs
	src/umbraco.editorControls/mediapicker/mediaChooser.cs
2013-07-19 15:09:07 +02:00
Sebastiaan Janssen 67bd303173 Merge pull request #46 from michielvoo/u4-2417
U4-2417 Could the preview thumbnail link to the full image
2013-07-19 06:02:51 -07:00
Sebastiaan Janssen 972b903f52 Merge pull request #32 from AndyButland/wip-u4-1285
Fix for U4-1285: Apostrophes in member groups cause exceptions
2013-07-19 14:40:28 +02:00
Sebastiaan Janssen 20e6843bf0 Merge pull request #32 from AndyButland/wip-u4-1285
Fix for U4-1285: Apostrophes in member groups cause exceptions
2013-07-19 05:39:38 -07:00
Sebastiaan Janssen 61d072c8d6 Fix merge issue 2013-07-19 13:32:24 +02:00
Sebastiaan Janssen 8740848aac Merge pull request #42 from michielvoo/u4-232
Enabled support for integrated security for SQL Server to the installer.
Conflicts:
	src/Umbraco.Web.UI/install/steps/database.ascx
2013-07-19 13:29:07 +02:00
Sebastiaan Janssen 85c80b07f9 Merge pull request #42 from michielvoo/u4-232
Enabled support for integrated security for SQL Server to the installer.
2013-07-19 04:26:50 -07:00
Sebastiaan Janssen 6766aa9732 Merge pull request #41 from michielvoo/u4-667
U4-667
2013-07-19 13:19:30 +02:00
Sebastiaan Janssen 557dccd88b Merge pull request #41 from michielvoo/u4-667
U4-667
2013-07-19 04:18:29 -07:00
Sebastiaan Janssen a57334d1f7 Merge pull request #40 from michielvoo/u4-663
U4-663
2013-07-19 12:55:16 +02:00
Sebastiaan Janssen 334f0bfd2b Merge pull request #40 from michielvoo/u4-663
U4-663
2013-07-19 03:53:15 -07:00
Sebastiaan Janssen 3dea16fad1 U4-2309 BackOffice / ExamineMngr : "Optimize index" don't ends correctly when website has not members. 2013-07-19 12:39:50 +02:00
Shannon 1bf4121796 Fixes a null check in UmbracoTemplatePage 2013-07-19 12:36:02 +10:00
Shannon 93bebdd50b Merge branch '6.1.3' of https://github.com/umbraco/Umbraco-CMS into 6.1.3 2013-07-19 12:27:59 +10:00
Shannon 6a9532f10a Fixes: U4-1599 [MVC] ChangeContentType doesn't work in macros rendered from a View -> We need to manually reset the ContentType after we execute a webforms based macro because Server.Execute resets the ContentType back to the default. 2013-07-19 12:27:37 +10:00
AndyButland 986d37afd6 Removed debugging console.log reference 2013-07-18 21:23:05 +02:00
Sebastiaan Janssen d88494e90e U4-638 Bug (and fix/solution): Saving inline base64 image (or any attribute value with equal sign at the end) 2013-07-18 17:09:26 +02:00
Sebastiaan Janssen e48f08b657 When using Public Access > Single User Protection the email of the member is empty, this caused errors because the result of GetMembersFromEmail is null 2013-07-18 16:07:39 +02:00
Sebastiaan Janssen a79e349f3d U4-2467 v4.11.1: Membership search does not search on email address anymore 2013-07-18 11:00:56 +02:00
Shannon 1c70570078 Fixes : U4-2055 Unpublish Date Bug in Umbraco 6.0.3 -> with unit test to ensure that all dates are formatted as ISO date standards when used in SQL 2013-07-17 14:16:38 +10:00
Alexander Bryukhov 197dacfae7 Update of ru.xml with latest keys 2013-07-17 09:56:50 +07:00
Shannon d8aad718d5 Fixed broken unit test 2013-07-17 11:28:46 +10:00
Sebastiaan Janssen 1d7bfc2781 U4-2465 "Login Name already exists" when creating a new member that existed before 2013-07-16 13:33:52 +02:00
Sebastiaan Janssen 8063717e4c U4-2511 Locallink:NODEID not working 2013-07-16 13:21:27 +02:00
Lars-Erik Aabech 3900b7ebc8 Remove WebForms from nuspec file
Not just WebForms anymore. :)
2013-07-16 13:09:53 +02:00
Shannon 0296c646cb Fixes up a small code issue for U4-2505 2013-07-16 11:45:28 +10:00
enkelmedia 275dbc83dd Update to readme to contain info about the support for MVC 2013-07-15 19:38:10 +02:00
Sebastiaan Janssen 1cd2dc8a42 Fixes U4-2436 Editing an existing property changes its alias 2013-07-15 16:52:23 +02:00
Sebastiaan Janssen 60867af1a7 Fixes U4-2444 Missing image - /umbraco/images/pinnedIcons/umb.ico
Also fixes casing of folder names
2013-07-15 16:31:19 +02:00
Sebastiaan Janssen 1e129bcc4d Fixes U4-2505 umbraco 6.1.2 throws System.NullReferenceException on the first publish after site compilation 2013-07-15 16:16:39 +02:00
Sebastiaan Janssen e5c758bbc1 Fixes U4-1838 uGoLive Success/Failure Images not showing 2013-07-15 16:07:42 +02:00
Shannon 25780663a6 Fixes: U4-1304 Umbraco.Field not replacing localLink when recursive:true . 2013-07-15 15:26:18 +10:00
Stefan Kip 63ea79a4d6 Updated the download link 2013-07-11 10:03:25 +02:00
Sebastiaan Janssen aa327696fe Fixes U4-2354 MiniProfiler - Show SQL parameter values and more stacktrace info
Refactored duplicate code
2013-07-10 12:35:21 +02:00
Lars-Erik Aabech 1272a7c74b Prettifying norwegian translation
Removed obsolete, translated new, removed incorrect spacing and
hyphenation, misc. improvements in term usage. Ref.
http://i18n.skulelinux.no/nb/Fellesordl.eng-no.html.
2013-07-09 12:56:13 +02:00
esn303 dcbe6726b0 Updated DE to 6.1.2
Markup encoded instead of CDATA blocks
2013-07-09 10:30:20 +02:00
Shannon ba68da5736 Makes Domain.GetDomains public (#U4-2483) 2013-07-09 11:55:29 +10:00
Shannon fdabd945dc Merge branch '6.1.3' of https://github.com/umbraco/Umbraco-CMS into 6.1.3 2013-07-09 11:48:03 +10:00
Shannon 868edee5e6 Fixes: #U4-2161 - permissions inheritance. Fixes up how user permissions cache is invalidated and looked up (it is now lazy and not forced). User permissions are also cached as a low priority for now and only for 20 mins based on #U4-2474. 2013-07-09 11:47:46 +10:00
Shannon b91d0bb117 Updates ContentRepository to bulk insert all parent permissions at once (overload to the AssignEntityPermissions method) 2013-07-09 10:08:31 +10:00
Murray Roke cc91977e94 Fix notification-email link to unpublished page
http://issues.umbraco.org/issue/U4-2482
I've added links to language files which did not contain it.
I used the %5% syntax in the sv.xml file which seems to otherwise use
{5} syntax
2013-07-09 11:19:51 +12:00
Shannon 90b94f6ffb Fixes: #U4-2476 2013-07-08 18:58:38 +10:00
Shannon 3c4cf56309 Fixes: #U4-2475 2013-07-08 18:47:53 +10:00
Shannon b7f6195791 Started adding base PermissionsRepository for sub classes to use for assigning permissions, created a BulkImport extension methods for PetaPoco with tests since we'll be needing that for assigning permissions in a nice way. Wrote unit tests for all sql gen for permissions and assigning permissions. This all starts fixing #U4-2161 but there's still a bit more work to do. 2013-07-08 17:29:26 +10:00
Morten Christensen 42eb82e6ca Merge branch '6.1.3' of https://github.com/umbraco/Umbraco-CMS into 6.1.3 2013-07-05 10:55:12 +02:00
Morten Christensen 93def731ef Fixes #U4-2466 2013-07-05 10:51:19 +02:00
Shannon 60805f91d6 bit of code cleaning. 2013-07-05 16:58:51 +10:00
Shannon 048480d5be Fixes: #U4-2460 - UmbracoHelper.RenderTemplate will now execute the complete MVC cycle when rendering MVC templates whereas before it would only execute the view which means any actionfilters, etc... applied would never have fired (as well as other things) 2013-07-05 14:12:31 +10:00
Morten Christensen 173d388c12 Fixes #U4-2450 2013-07-04 12:31:31 +02:00
Morten Christensen b1285fa7e3 Add missing id to unique naming overload 2013-07-04 12:31:10 +02:00
Morten Christensen e34c857f6c A bit of refactoring around unique naming, and implementing it for media as well 2013-07-04 11:22:59 +02:00
Morten Christensen 7ff0e6cd4b Fixes #U4-2458 2013-07-04 10:50:02 +02:00
Shannon 0683094f84 oops, overwrote previous changes to CmsNode, now merged them back in properly. 2013-07-04 12:20:25 +10:00
Shannon 983b7a85e1 Merge branch '6.1.3' of https://github.com/umbraco/Umbraco-CMS into 6.1.3 2013-07-04 12:13:24 +10:00
Shannon d015780b9f Fixes: #U4-2447 - non thread safe icon lookup 2013-07-04 12:13:02 +10:00
Michiel van Oosterhout e4df176a37 U4-2417: show media picker image as link to the original image.
Order of the views in the markup did not match the order of the Style enum.
ImageViewer control now selects the view by matching the ViewerStyle enum to a View ID. This way the order of the views in the markup is no longer important.

Also:
Removed user control from Umbraco.Web project, moved designer code and added code behind class for user control to Umbraco.Web.UI
Refactored code to use Umbraco.Core.IO
Removed some code that was commented out
2013-07-03 17:36:28 +02:00
Morten Christensen aeece499bb Fixing unit test for PublishedMedia cache, which had expected result set incorrect 2013-07-03 14:00:44 +02:00
Morten Christensen 8465b4e556 Merge branch '6.1.3' of https://github.com/umbraco/Umbraco-CMS into 6.1.3 2013-07-03 12:34:52 +02:00
Morten Christensen e280785f48 Adding Msdeploy PropertyGroup to build prop file, so both FileSystem and MsDeploy package will include the umbraco and umbraco_client folders 2013-07-03 12:30:34 +02:00
Shannon 5e0a59e4b3 Merge branch '6.1.3' of https://github.com/umbraco/Umbraco-CMS into 6.1.3 2013-07-03 19:47:25 +10:00
Morten Christensen 30835797ff Merge branch '6.1.3' of https://github.com/umbraco/Umbraco-CMS into 6.1.3 2013-07-03 11:47:09 +02:00
Shannon 4077a01a6b Fixes: #U4-2344 - fixes examine re-indexing for media and a null check for DataType.Data 2013-07-03 19:47:06 +10:00
Morten Christensen aed70ae40c Updating dependencies in our own nuspec file 2013-07-03 11:46:53 +02:00
Morten Christensen 6d44628352 Merge pull request #45 from jhauge/PublishUmbracoFiles
Add Umbraco files during publish
2013-07-03 02:39:12 -07:00
Jesper Hauge 7a398d34b1 Added file-reg to .nuspec 2013-07-03 11:33:05 +02:00
Morten Christensen 69c5aeb1b3 Updating nuget dependencies for test project 2013-07-03 11:29:58 +02:00
Shannon da545b890b Updated UserRepository to not contain the general query methods, we do those in the service. 2013-07-03 19:26:28 +10:00
Morten Christensen 6609bc09f2 Updating nuget dependency for HtmlAgilityPack 2013-07-03 11:26:17 +02:00
Morten Christensen f06a6f42da Updating nuget dependency for ClientDependency 2013-07-03 11:20:42 +02:00
Jesper Hauge c9065d96a9 These files will add MSBuild target that copies /umbraco /umbraco_client and /App_Browsers files to .csproj files, during install of NuGet package UmbracoCms
Functionality has been tested by creating af copy of the current Nuget package and add these files to the package, then using this package on a new Web application project. Building and doing a VS Publish to the filesystem.
2013-07-03 11:17:47 +02:00
Morten Christensen 9d4e1362c4 Updating nuget references for ASP.NET MVC, Razor, WebPages and WebApi to latest patch release 2013-07-03 11:11:37 +02:00
Shannon d3b69e04e1 Updated IUserService and added more unit tests for new methods. Fixed unit tests that were failing due to incorrectly set settings... not sure how this is working on the server but oh well. 2013-07-03 19:01:37 +10:00
Morten Christensen 0d54e8df89 Updating MySql package dependency 2013-07-03 11:00:26 +02:00
Morten Christensen 8f949d0a2f Merge branch '6.1.3' of https://github.com/umbraco/Umbraco-CMS into 6.1.3 2013-07-03 09:40:17 +02:00
Shannon d67480e98b Updated UserService, didn't need one of the methods on there, updated the unit tests to test all the other methods. 2013-07-03 17:09:14 +10:00
Shannon 5d76ead469 backported changes to IUserRepository from v7 2013-07-03 16:52:00 +10:00
Shannon 2796100067 added another unit test. 2013-07-03 16:45:56 +10:00
Shannon a132f609d7 backports changes for -> Finished upgrading the UserRepository and entities to properly support Users' Allowed Sections & streamlines Persistence/Mappers with less code duplication. 2013-07-03 16:40:22 +10:00
Morten Christensen 7f7456701d Adding license 2013-07-02 15:32:53 +02:00
AndyButland 2fd9efffa1 Styling of drop zone for draggable document type properties 2013-06-29 23:37:02 +02:00
AndyButland 91465c6aa2 Fixed issue with re-ordering on a single tab 2013-06-29 23:15:41 +02:00
AndyButland f4eb8c7517 Localised no properties message 2013-06-29 22:57:53 +02:00
AndyButland bd3616239f Fixed issue where dropped properties not saving when dropped on a tab inherited from a parent document type 2013-06-29 22:42:41 +02:00
AndyButland ef0744a849 Drag/drop UI for document type properties and tabs 2013-06-29 22:42:15 +02:00
AndyButland adeb859195 Reload content page when document type changed if content already loaded; improved display of confirmation screen 2013-06-29 22:30:12 +02:00
AndyButland aaec90e47a Used override on change document type to clear properties; display of summary on completion 2013-06-29 21:54:48 +02:00
Michiel van Oosterhout d926180e3a Added special overload for creating a connection string with integrated security.
Actually disable checkbox is the selected database type is not Microsoft SQL Server.
Refactored saveDBConfig for readability.
2013-06-28 16:40:23 +02:00
Sebastiaan Janssen ffce1a3e6b Open new branch for 6.1.3 2013-06-28 14:44:56 +02:00
Sebastiaan Janssen e553f2c671 Correct little mistake in nuspec file 2013-06-28 14:21:25 +02:00
Sebastiaan Janssen d4d21c18b2 Correct little mistake in nuspec file 2013-06-28 14:21:00 +02:00
Morten Christensen 42c6533e16 Correcting merge issues 2013-06-28 13:33:41 +02:00
Morten Christensen b0f4cb7d02 Merge branch '6.0.7' into 6.1.2 2013-06-28 13:30:04 +02:00
Morten Christensen f809dec874 Updating repository factory to inject unique name setting into ContentRepository 2013-06-28 13:28:03 +02:00
Morten Christensen 2477500045 Fixes #U4-2414 and removes internal usage of action handlers Yay! 2013-06-28 13:27:23 +02:00
Michiel van Oosterhout 72bb1b3583 U4-667
Added a script to make the checkbox "Render content in editor" dependent on the "Use in editor" checkbox.
Also refactored the create.aspx code-behind so it's easier to see what control is loaded in the dialog when debugging.
2013-06-28 10:44:24 +02:00
Michiel van Oosterhout 240e58e061 U4-663
Do not overwrite existing files when creating a new template.
2013-06-28 10:42:51 +02:00
Michiel van Oosterhout e980296d6d Enabled support for integrated security for SQL Server to the installer. 2013-06-28 10:39:48 +02:00
AndyButland 9d0f544840 Handled inherited properties on source and destination side 2013-06-27 22:24:10 +02:00
AndyButland 3ecd564c57 Sync tree once document type changed 2013-06-27 21:49:06 +02:00
AndyButland 9c23bbd87a Minor styling improvements 2013-06-27 21:44:53 +02:00
AndyButland d3562b797e Back-office UI for change of document type for content item 2013-06-27 21:29:27 +02:00
AndyButland d23482b7a6 Moved setting for DefaultDocumentTypeProperty from GlobalSettings to UmbracoSettings 2013-06-27 16:00:49 +02:00
Morten Christensen d89539a437 Merge branch '6.1.2' of https://github.com/umbraco/Umbraco-CMS into 6.1.2 2013-06-27 15:36:46 +02:00
Morten Christensen 4368f15097 Updating nuspec files which is a bit different for 6.1.x then 6.0.x 2013-06-27 15:36:25 +02:00
Morten Christensen b90150279b Merge branch '6.0.7' into 6.1.2
Conflicts:
	build/Build.proj
	build/NuSpecs/UmbracoCms.Core.nuspec
	src/Umbraco.Tests/Services/ContentTypeServiceTests.cs
2013-06-27 15:27:31 +02:00
Morten Christensen ca1b05e30d Correcting unit test after update to ContentType ctor 2013-06-27 15:23:15 +02:00
Morten Christensen 5c09ba9a2d Updating nuspec files and build 2013-06-27 15:15:27 +02:00
Sebastiaan Janssen cfa3e3aff1 Bump version number 2013-06-27 15:09:44 +02:00
Morten Christensen 59ff4a0484 It hurts having to do this, but Sebastiaan says I have to. So re-wiring the BulkPublishController to use the legacy Document class so legacy events are also fired. 2013-06-27 12:30:16 +02:00
Morten Christensen b1db99f639 Fixing issue in previous fix for #U4-2182 2013-06-27 10:57:49 +02:00
Morten Christensen ccbb838cef Fixing another part of #U4-2186 2013-06-27 10:56:45 +02:00
Steve Temple b12f60e443 Allow for absolute URLs as well as virtual in ResolveUrl to allow for FileSystemProviders that use CDNs 2013-06-27 00:04:37 +01:00
Sebastiaan Janssen 0d5ec8bfd5 Merge branch '6.0.7' into 6.1.2 2013-06-26 20:57:32 +02:00
Sebastiaan Janssen 5f67e85471 Merge branch '6.0.7' of github.com:umbraco/Umbraco-CMS into 6.0.7 2013-06-26 20:55:11 +02:00
Sebastiaan Janssen d9228c368f Fixes U4-2404 Photo gallery broken on Azure - Since the template saving routine is doing ToSafeAlias, we should also do it when setting the default template 2013-06-26 20:54:36 +02:00
AndyButland 212800f706 Added config setting for default document type property; used setting to set default new property type 2013-06-26 17:25:44 +02:00
Chris Tomlinson ea1aefa09e Fixes U4-2187 - Enable support for MySQL on Linux 2013-06-26 15:46:50 +01:00
Morten Christensen 8226505e5b Merge branch '6.0.7' into 6.1.2 2013-06-26 15:55:49 +02:00
Morten Christensen 41b8de09b7 Fixes U4-2234 including test case from issue 2013-06-26 15:49:00 +02:00
Morten Christensen bbf06cd13d Fixes U4-2234 2013-06-26 14:31:36 +02:00
Morten Christensen 639cb17741 Fixes U4-2182 and U4-2167 2013-06-26 14:31:10 +02:00
Morten Christensen 4643d34546 Moving generation of xml from ContentExtensions to the PackagingService 2013-06-26 13:30:54 +02:00
Sebastiaan Janssen 50035eae49 Merge pull request #33 from bokmadsen/6.0.7
Bugfix for previous pullrequest "Duplicate e-mail addresses: U4-315, U4-...
2013-06-26 02:43:34 -07:00
Bo Kingo Damgaard 2d857a8635 Bugfix for previous pullrequest "Duplicate e-mail addresses: U4-315, U4-2147, U4-304"
There was a bug in the previous pullrequest that didn't allow a member
to saved if the email wasn't changed. Furthermore duplicate emails are
now prevented if requireUniqueEmail was false, but is switched to true
(when saving a member)
2013-06-26 10:47:27 +02:00
AndyButland d47ff4005c Support for deleting member groups with apostrophes 2013-06-26 06:16:39 +02:00
AndyButland dfeb1c7a0b Support for displaying and editing member groups with apostrophes 2013-06-26 06:16:23 +02: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
Morten Christensen e4387b8dae Adding some internal bits in the ServiceContextManager and PackagingService 2013-06-25 13:43:57 +02:00
Morten Christensen 188aca499a Merge branch '6.0.7' into 6.1.2 2013-06-25 11:54:24 +02:00
Morten Christensen 3040d362ef Fixes #U4-2361 2013-06-25 11:48:37 +02:00
Shannon a57aa07721 Updated default controller resolver to use new IRenderMvcController interface, fixed some merge issues. 2013-06-25 09:55:45 +10:00
Shannon f2b8e3407b Merge remote-tracking branch 'origin/6.0.7' into 6.1.2
Conflicts:
	src/Umbraco.Web/Mvc/RenderControllerFactory.cs
	src/Umbraco.Web/Mvc/RenderMvcController.cs
	src/Umbraco.Web/Mvc/RenderRouteHandler.cs
	src/Umbraco.Web/Umbraco.Web.csproj
2013-06-25 09:41:27 +10:00
Shannon 1ec7cd3b89 Implements: #U4-2342 - IRenderMvcController 2013-06-25 09:33:48 +10: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
Sebastiaan Janssen bd77463fa4 Merge branch '6.0.7' into 6.1.2
Conflicts:
	build/NuSpecs/UmbracoCms.Core.nuspec
	src/Umbraco.Core/Models/ContentTypeBase.cs
	src/Umbraco.Core/Models/IContentTypeBase.cs
	src/Umbraco.Core/Models/PropertyGroupCollection.cs
2013-06-24 12:06:58 +02:00
Sebastiaan Janssen 368954226a Update to not require specific version of MVC4, just 4.0.20710.0 and higher 2013-06-24 12:05:22 +02:00
Sebastiaan Janssen 496d51c2a0 Merge pull request #25 from kipusoep/Duplicate-words-domainHelp
Duplicate words removed
2013-06-24 01:30:04 -07:00
Stefan Kip b01b4f7aa7 Forgot to update XML comments
Signed-off-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2013-06-24 10:29:03 +02:00
Stefan Kip 49a699c858 Added RemovePropertyGroup method
Signed-off-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2013-06-24 10:28:42 +02:00
Morten Christensen f68571ef7c Merge pull request #24 from kipusoep/U4-2421-RemovePropertyGroup
U4-2421 Added RemovePropertyGroup method
2013-06-24 01:18:21 -07:00
Stefan Kip 6cc1735363 Duplicate words removed 2013-06-23 21:49:43 +02:00
Stefan Kip d553dfd4b0 Forgot to update XML comments 2013-06-23 20:24:22 +02:00
Stefan Kip f3e737720b Added RemovePropertyGroup method 2013-06-23 16:38:11 +02:00
Stefan Kip 22cf59345c Removed space before UmbracoModule
Removed space before UmbracoModule
Conflicts:
	src/Umbraco.Web.UI/web.Template.config
2013-06-23 16:02:02 +02:00
Michiel van Oosterhout 16a46a4ea4 Changed default user email address to use the example domain, instead of domain.com 2013-06-23 16:01:04 +02:00
Sebastiaan Janssen 09d9728fb8 Merge branch '6.0.7' into 6.1.2
Conflicts:
	src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
2013-06-23 15:16:44 +02:00
Sebastiaan Janssen c0df3e0202 Match IIS Express port number to Umbraco version so it's easier to use a few copies of the repo locally
(you don't have to re-map your port to the correct folder)
2013-06-23 15:13:27 +02:00
Sebastiaan Janssen d09e283900 Merge branch '6.0.7' into 6.1.2
Conflicts:
	.hgtags
2013-06-23 15:00:14 +02:00
Sebastiaan Janssen 507c6c23b9 If you never had VS2010 installed, the build now works, checking if the Publishing Tasks dll exists now 2013-06-23 14:57:53 +02:00
Sebastiaan Janssen 3daf936623 Remove hgignore files 2013-06-23 14:52:45 +02:00
Sebastiaan Janssen e93c910347 Fix more unit tests 2013-06-22 17:32:22 +02:00
Sebastiaan Janssen 7139e30296 Don't delete the config file directory, it can't sometimes
For now, don't delete umbracoSettings.config either, it makes a lot of tests fail
2013-06-22 15:53:10 +02:00
Sebastiaan Janssen df1940a01c Fix unit test by ensuring config file is copied if it doesn't exist 2013-06-22 15:07:40 +02:00
Sebastiaan Janssen aafb5a0285 Merge branch '6.0.7' into 6.1.2
Conflicts:
	src/Umbraco.Tests/PublishedCache/PublishedContentCacheTests.cs
2013-06-22 14:22:43 +02:00
Sebastiaan Janssen 033f981718 Fix unit test 2013-06-22 14:19:22 +02:00
Sebastiaan Janssen 5bd55bdd09 Merge branch '6.0.7' into 6.1.2 2013-06-21 17:33:42 +02:00
Sebastiaan Janssen 76358e3e13 U4-2374 Mono port to do: dealing with empty string 2013-06-21 17:29:55 +02:00
Sebastiaan Janssen 35c0eb3b0c U4-2377 Mono port to do: Universal currency character does not work as split character unless given in unicode. 2013-06-21 17:22:13 +02:00
Sebastiaan Janssen 7fad8ca98b U4-2378 Mono port to do: TypeFinder needs exclusions for Monodevelop Nunit 2013-06-21 17:15:42 +02:00
Sebastiaan Janssen a2da27121e U4-2335 [Regression] YSOD when editing stylesheet property on 6.0.6 2013-06-21 17:00:40 +02:00
Sebastiaan Janssen 23ec07276a U4-2369 Wrong path for Umbraco/Config/Lang/xx.xml for publish notification mail 2013-06-21 16:56:59 +02:00
Sebastiaan Janssen 96cec0b407 U4-2410 EditRelationType.aspx missing virtual path - 6.0.6 2013-06-21 16:30:44 +02:00
Sebastiaan Janssen 47b94e68e3 Merge branch '6.0.7' of github.com:umbraco/Umbraco-CMS into 6.0.7 2013-06-21 15:26:10 +02:00
Sebastiaan Janssen 0f4b1752e0 U4-2416 Missing colon in file ListChildPagesOrderedByProperty causes Web site not to run 2013-06-21 15:25:46 +02:00
Shannon eac66f5696 Merge branch '6.0.7' into 6.1.2 2013-06-21 13:00:56 +10:00
Shannon b2c604f7b3 updated ignore 2013-06-21 11:26:23 +10:00
Shannon 3f626b444f re-enables CDF logger 2013-06-21 10:55:38 +10:00
Shannon c5b8931aa6 Merge branch '6.0.7' into 6.1.2
Conflicts:
	src/Umbraco.Web.UI/config/ClientDependency.config
2013-06-21 10:50:35 +10:00
Shannon 818d22ba61 updates CDF config examples (#U4-2331) 2013-06-21 10:49:27 +10:00
Shannon f9902964b0 Merge branch '6.0.7' into 6.1.2
Conflicts:
	src/Umbraco.Web.UI/config/Dashboard.config
	src/Umbraco.Web.UI/config/ExamineIndex.config
2013-06-21 09:20:53 +10:00
Shannon 27fdb1ebab removed custom dashboard, re-put back in the external index (must have got removed by accident) 2013-06-21 09:19:50 +10:00
Shannon 1368ba8dc9 Fixes unit tests 2013-06-21 08:47:01 +10:00
Sebastiaan Janssen 1628dfaa2f Update version to 4.11.10 2013-06-20 17:20:17 +02:00
Sebastiaan Janssen 9a3c2bbc5c Merge pull request #19 from michielvoo/master
Changed default email address in the installer
2013-06-20 07:47:50 -07:00
Michiel van Oosterhout 0b0fb92cf1 Changed default user email address to use the example domain, instead of domain.com 2013-06-20 16:01:03 +02:00
Sebastiaan Janssen 6f09da0927 Merge pull request #17 from kipusoep/patch-1
Removed space before UmbracoModule
2013-06-20 06:18:21 -07:00
Stefan Kip febe6ec241 Removed space before UmbracoModule
Removed space before UmbracoModule
2013-06-20 14:56:39 +02:00
Shannon 3ff888f77a Fixes: #U4-2403 2013-06-20 14:47:59 +02:00
Murray@tbpc10.terabyte.co.nz 9af3a10da8 #U4-2326 Added Try Catch for PlatformNotSupportedException
Signed-off-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2013-06-20 14:46:21 +02:00
Sebastiaan Janssen 0470a0ca51 Add gitignore 2013-06-20 14:46:13 +02:00
Shannon 3618722574 Fixed some merging issues. 2013-06-20 15:57:23 +10:00
Shannon 24a76f53b4 Merge branch '6.0.7' into 6.1.2
Conflicts:
	src/Umbraco.Core/Umbraco.Core.csproj
	src/Umbraco.Core/Xml/XmlNodeExtensions.cs
	src/Umbraco.Web.UI/config/ClientDependency.config
	src/Umbraco.Web.UI/config/Dashboard.config
	src/Umbraco.Web/DefaultPublishedContentStore.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/moveOrCopy.aspx.cs
	src/umbraco.businesslogic/BasePages/BasePage.cs
2013-06-20 15:49:55 +10:00
Shannon 86ce48ddc8 Fixes: #U4-2312 - Moving content with the new API (and in the old api when calling library.UpdateDocumentCache(p.Id)) The document is actually moved properly in the content XML structure without republishing it and then rebuilding the entire XML structure, it just does it inline. Have also updated MoveAndCopy.aspx dialog to use the new API which now saves on about 20+ queries that were not needed. Also updated the MoveAndCopy dialog to have the correct code behind structure. 2013-06-20 15:34:57 +10:00
Shannon cb592d687c Merge branch '6.0.7' into 6.1.2 2013-06-20 11:26:01 +10:00
Shannon 2161ec98b0 Fixes: #U4-2324 - Umbraco.Field will now work with custom routed pages. 2013-06-20 11:25:33 +10:00
Shannon 5a6ee168c3 Merge branch '6.0.7' into 6.1.2 2013-06-20 10:08:50 +10:00
Shannon 52292cab60 Fixes: #U4-2403 2013-06-20 10:08:02 +10:00
Stephan 2933c879e1 U4-2327 - fix PublishedContentRequest redirect vs. permanent 2013-06-19 20:30:43 +02:00
Sebastiaan Janssen c8a19dff44 Merge branch '6.0.7' into 6.1.2
Conflicts:
	src/Umbraco.Web/Media/ImageUrl.cs
	src/Umbraco.Web/Media/ImageUrlProviders/ImageUrlProvider.cs
	src/Umbraco.Web/umbraco.presentation/umbraco/uQuery/MediaExtensions.cs
2013-06-19 18:26:45 +02:00
WadeKallhoff a6768263d3 image thumb extension fix 2013-06-19 18:11:28 +02:00
kensykora e66306978a macro rendering fix 2013-06-19 17:59:30 +02:00
Phil Dye 7f22809ebf U4-1478 Create button still visible when not active 2013-06-19 17:55:00 +02:00
Edwin de Koning 302ebde422 Translating the word "or" 2013-06-19 16:28:58 +02:00
Murray@tbpc10.terabyte.co.nz cf5624f377 #U4-2326 Added Try Catch for PlatformNotSupportedException
Signed-off-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2013-06-19 16:24:09 +02:00
Morten Bock f386c9d024 U4-1226 Umbraco:image control 2013-06-19 16:18:15 +02:00
Edwin de Koning 530fcf0ea3 Fixes U4-2261 2013-06-19 16:04:56 +02:00
Sebastiaan Janssen 26e4091f28 Due to previous fix we don't need to sort individually any more
(see changeset 32f86f750e)
2013-06-19 16:01:50 +02:00
Dennis Ravn Pedersen 32f86f750e Query would reverse logic sorting of children. Would make move operations ignore sorting.
Signed-off-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2013-06-19 15:36:08 +02:00
Sebastiaan Janssen ebad631140 Merge branch '6.0.7' into 6.1.2 2013-06-19 15:16:32 +02:00
Sebastiaan Janssen b8304c03ee Merge branch '6.0.7' of https://github.com/bokmadsen/Umbraco-CMS into bokmadsen-6.0.7 2013-06-19 14:50:41 +02:00
Sebastiaan Janssen 556c2d625f Merge branch '6.0.7' into 6.1.2
Conflicts:
	src/umbraco.cms/businesslogic/member/Member.cs
2013-06-19 14:42:14 +02:00
Sebastiaan Janssen 6f85eefd85 updated ignore file with correct case sensitivity
Conflicts:
	.gitignore
2013-06-19 14:39:21 +02:00
Sebastiaan Janssen aaa4469def Merge branch '6.0.7' of github.com:umbraco/Umbraco-CMS into 6.0.7 2013-06-19 14:36:17 +02:00
Sebastiaan Janssen baa0069262 Merge branch 'master' into 6.0.7
Conflicts:
	README.md
2013-06-19 14:22:57 +02:00
Sebastiaan Janssen 9ac4c7aef5 Merge branch 'master' of https://github.com/umbraco/Umbraco-CMS 2013-06-19 14:14:51 +02:00
Sebastiaan Janssen cb2a35594f Merge branch '6.0.6'
Conflicts:
	src/Umbraco.Core/TypeFinder.cs
2013-06-19 14:13:09 +02:00
Sebastiaan Janssen dd501d0198 Merge pull request #16 from darrenferguson/master
Remove obsoletion of Member methods
2013-06-19 05:07:35 -07:00
Sebastiaan Janssen b724d8fb32 Merge pull request #15 from pynej/master
Fix for U4-2384. Author not changed to current user when a node is copied.
2013-06-19 05:06:23 -07:00
Darren Ferguson 7c6aee17e9 Remove obsolete messages from member class
I've removed the obsolete methods from the member class because many of
the suggested alternatives don't work. and some require a lot of
configuration to get working.

Also, the member methods return Members - so they are not obsolete if
you want a reference to a member, you can choose to use System
membership if you want, but for custom properties and groups you need to
fallback to the Umbraco API, so these shouldn't be obsolete! :)
2013-06-19 13:02:58 +01:00
Jeremy Pyne 5e2c3a0a8b Fixed a type on content copy. 2013-06-18 10:38:08 -04:00
Jeremy Pyne f5121bd183 Fix for U4-2384. Author not changed to current user when a node is copied. 2013-06-18 09:35:33 -04:00
Bo Kingo Damgaard 51b5334126 Duplicate e-mail addresses: U4-315, U4-2147, U4-304
- Allows for duplicate e-mail addresses in member section by opt-in
(requiresUniqueEmail="false" in
web.config/membership/providers/"UmbracoMembershipProvider").
- Fixes issues with backoffice not checking for duplicate emails when
changing member after creation.
- Lower cases email addresses upon creating member and when searching to
prevent duplicates.
- Added Member.GetMembersByEmail to get alle members with specific email
2013-06-18 14:23:05 +02:00
Shannon 273c1956ab Fixes: #U4-2343 for api controllers, already fixed for surface controllers 2013-06-18 15:46:36 +10:00
Shannon f7c474ac2c fixed merge issue and ensures UseNamespaceFallback are set for plugin controllers. 2013-06-18 15:24:44 +10:00
Shannon 4143dbd02d Fixed some merge issues 2013-06-18 15:20:18 +10:00
Shannon 768eb3d1ed Merge branch '6.0.7' into 6.1.2
Conflicts:
	src/Umbraco.Web/Mvc/AreaRegistrationExtensions.cs
	src/Umbraco.Web/Mvc/PluginControllerArea.cs
	src/Umbraco.Web/Umbraco.Web.csproj
	src/Umbraco.Web/WebBootManager.cs
2013-06-18 15:13:43 +10:00
Shannon 120bdca9eb removed constraint names on SurfaceControllers, they don't need to be suffixed with SurfaceController, only Controller. 2013-06-18 15:05:13 +10:00
Shannon a5041aa34e Backported changes to use a real Area to do Umbraco area routes and updates our extension methods with the UseNamespaceFallback data token to only check in one namespace. 2013-06-18 14:59:00 +10:00
Shandem 59811c2841 Merge pull request #11 from florisrobbemont/6.1.2
Fix U4-2286 - IFilteredControllerFactory classes are not resolved by Umb...
2013-06-17 21:27:19 -07:00
Shannon 38eee6135e Merge branch '6.0.7' into 6.1.2 2013-06-18 14:21:11 +10:00
Shannon d3780848dc updated ignore file with correct case sensitivity 2013-06-18 14:20:50 +10:00
Shannon 5719820fad Merge branch '6.0.7' into 6.1.2
Conflicts:
	.gitignore
	src/Umbraco.Web/umbraco.presentation/umbraco/Trees/loadPackages.cs
2013-06-18 14:18:17 +10:00
Shannon 9d15228c68 manually applies patch for drag/drop fix in media for vdir 2013-06-17 03:06:24 +02:00
Shannon c9c3623457 updated ignore
Signed-off-by: Shannon <sdeminick@gmail.com>
2013-06-17 02:59:00 +02:00
Floris Robbemont aecc3d28bf Fix U4-2286 - IFilteredControllerFactory classes are not resolved by Umbraco
Simple fix, just made the FilteredCOntrollerFactoriesResolver public. This way developers can add their own on application start
2013-06-15 22:46:01 +02:00
Sebastiaan Janssen b51022575f Merge pull request #8 from mattbrailsford/6.1.2
Updated RenderMvcController to have the view engines test for file existance
2013-06-13 03:42:34 -07:00
Sebastiaan Janssen 6600e9c899 Merge pull request #6 from dpen2000/UserPermisionsFixIn6.1.2
Fix U4-2320 - Error on saving User Permissions (for 6.1.2 release)
2013-06-13 03:18:37 -07:00
Sebastiaan Janssen 68aa2abbc0 Merge pull request #7 from pynej/6.1.2
Fixed Ctl+S on stylesheets editor.
2013-06-13 03:11:57 -07:00
Sebastiaan Janssen e0a483ca48 Merge pull request #5 from tcmorris/patch-1
Update README.md
2013-06-13 02:05:43 -07:00
mattbrailsford 9b78cb3f7c Updated RenderMvcController to have the view engines test for file existance, rather than assuming views will always be razor. This allows alternative MVC view engines to be used. 2013-06-13 09:26:45 +01:00
Jeremy Pyne c6c90fde44 Fixed Ctl+S on stylesheets editor. 2013-06-12 23:41:49 -03:00
david.pendray 773500332b Fix U4-2320 - Error on saving User Permissions
Nodes can be null but NodeIds property always returns a collection and this will return Ids from Nodes if _nodeIds are null and Nodes is not.
2013-06-13 02:50:25 +01:00
Thomas Morris 95eb00a81c Update README.md
Updating link and formatting
2013-06-12 18:24:54 +02:00
Sebastiaan Janssen 3921b0974e Merge pull request #3 from Jayshoe/patch-1
Sitemap provider be gone! Issue #U4-1950
2013-06-12 07:19:56 -07:00
Jayshoe 2cd07c841f Sitemap provider be gone! Issue #U4-1950 2013-06-12 16:19:14 +02:00
Sebastiaan Janssen 8f80f0e95c Merge pull request #2 from Jeavon/patch-1
Update README.md
2013-06-12 06:38:32 -07:00
Jeavon 73ac2c0309 Update README.md
Readme.md corrections and updates
2013-06-12 15:34:26 +02:00
Sebastiaan Janssen a5ddb6c818 Merge pull request #1 from dpen2000/patch-1
Update README.md
2013-06-12 06:10:28 -07:00
dpen2000 458e61e049 Update README.md
Fix link to Umbraco releases page
2013-06-12 14:45:41 +02:00
Sebastiaan Janssen 0815842640 Update README.md 2013-06-12 11:10:18 +03:00
Sebastiaan Janssen 53b31a5c1b Update README.md 2013-06-12 10:04:31 +02:00
Sebastiaan Janssen 292dd9115b Update README.md 2013-06-11 00:57:36 +02:00
Sebastiaan Janssen c6d0a9be00 Update README.md 2013-06-11 00:57:34 +02:00
Sebastiaan Janssen 14c3acc4b7 Create README.md 2013-06-11 00:57:31 +02:00
Sebastiaan Janssen a4098b5d25 Update README.md 2013-06-11 00:57:03 +02:00
Sebastiaan Janssen acdcca0b91 Add missing files 2013-06-11 00:48:29 +02:00
Sebastiaan Janssen 33ff82e766 Add missing files 2013-06-11 00:47:44 +02:00
Sebastiaan Janssen 5fd90e1c13 Update README.md 2013-06-10 19:17:37 +03:00
Sebastiaan Janssen a6eaec9ecb Update README.md 2013-06-10 19:09:03 +03:00
Sebastiaan Janssen f5553bcc06 Create README.md 2013-06-10 18:05:07 +02:00
leekelleher e0c68a8e1c Resolves #U4-184 Upgrade package when installing a newer version.
Multiple package versions can be installed, only the latest version is listed under "Installed Packages".
When the installed package is viewed, a list of previously installed versions (of that package) are listed.
2013-06-10 13:55:58 -01:00
Morten Christensen bc1b2dc5f4 Fixes #U4-2333 2013-06-07 05:19:45 -02:00
Morten Christensen 0bb643672f Adding some minor changes/adjustments to the TypeFinder to make a bit more flexible for external usage. 2013-06-07 05:19:25 -02:00
Shannon Deminick 813d60521c Merge with 6.0.7 2013-06-03 16:27:20 -10:00
Shannon Deminick 5212d17f49 Fixes: #U4-2313 - manually adding a reserved route value in BeginUmbracoForm 2013-06-03 14:56:15 -10:00
Shannon Deminick 932115585e Fixes: #U4-2315 - CDF grouping issue, updated to new version 2013-06-03 13:35:41 -10:00
Sebastiaan Janssen 948ffe4796 Merge with 6.0.7 2013-06-03 15:11:44 -02:00
Sebastiaan Janssen 6b1dd07310 Fixes U4-2254 [Object object] error when selecting media link for content. 2013-06-03 15:11:23 -02:00
Sebastiaan Janssen dc2554c6d0 Fixes U4-2254 [Object object] error when selecting media link for content. 2013-06-03 15:08:56 -02:00
Sebastiaan Janssen 5c6514929e Opening branch 6.1.2 2013-06-03 06:16:19 -02:00
Sebastiaan Janssen 9739b3e2ef Closing branch 6.1.1 2013-06-03 06:15:57 -02:00
Sebastiaan Janssen 0b1f72f139 Added tag release-6.1.1 for changeset 7271ae03cb53 2013-06-03 06:15:31 -02:00
Morten Christensen 2a2e867784 Fxies U4-2257 2013-06-02 11:30:27 -02:00
Sebastiaan Janssen 79e0242468 Show containers in folderbrowser again 2013-06-02 05:03:51 -02:00
Morten Christensen 242443d861 Fixes the EntityRepository for Content and Media, so trees load correctly.
Fixes U4-2306
Fixes loading of MNTP.
FolderBrowser is now able to show multiple images on a single media item.
FolderBrowser only shows images and not containers.
2013-06-01 20:40:51 -02:00
Sebastiaan Janssen 7c066b9ded Merge with 6.0.7 2013-05-31 14:01:21 -02:00
Sebastiaan Janssen 159d605434 U4-2262 Release 6.1.0 Build 2 (Beta) has Razor Errors on scripting files 2013-05-31 13:59:35 -02:00
Sebastiaan Janssen 1971006a48 Merge with 6.0.7 2013-05-31 12:16:09 -02:00
Sebastiaan Janssen 5c0c33a46b Fixes U4-2304 Typo bug in umbraco.cms.businesslogic.packager 2013-05-31 12:14:03 -02:00
Sebastiaan Janssen 9bd255d9a5 Include ExamineManagementIco.png in project so it's included in the build 2013-05-31 11:35:21 -02:00
Sebastiaan Janssen cc7f41d9ee U4-2295 Templates tree doesn't refresh and Master template stays at "None" 2013-05-31 09:15:10 -02:00
Sebastiaan Janssen b4b0a37c2c Fixes U4-2302 Breaking change in 6.1? Macro parameter "contentPicker" no longer
passes an id, but a node
2013-05-31 09:13:25 -02:00
Sebastiaan Janssen 8c841f97cc Merge with 6.0.7 2013-05-31 05:57:18 -02:00
Sebastiaan Janssen a1ee352514 Additional fix for U4-335 Image cropper out of memory 2013-05-31 05:46:10 -02:00
Morten Christensen c25b06b15f Fixes #U4-2296 2013-05-30 14:28:34 -02:00
Sebastiaan Janssen 78bfb6a8cc Fix missing Examine dashboard 2013-05-30 10:26:54 -02:00
Sebastiaan Janssen d8a8bf5f74 Bump version number 2013-05-30 10:26:40 -02:00
Sebastiaan Janssen b70c98ea74 Merge with 6.0.7 2013-05-30 10:25:20 -02:00
Sebastiaan Janssen a8ad8c2a43 Bump version number 2013-05-30 10:23:35 -02:00
Sebastiaan Janssen 96f8cd3d60 Opening branch 6.1.1 2013-05-30 10:21:34 -02:00
Sebastiaan Janssen 91436ad247 Closing branch 6.1.0 2013-05-30 10:20:59 -02:00
Sebastiaan Janssen 678f911ff1 Added tag release-6.1.0 for changeset 8309c3bd6db5 2013-05-30 10:20:36 -02:00
Sebastiaan Janssen afbe3ca3b9 Creating branch 6.0.7 2013-05-30 09:57:33 -02:00
Sebastiaan Janssen 32d6f2e50c Closing branch 6.0.6 2013-05-30 09:57:03 -02:00
Sebastiaan Janssen 9909f5b6be Added tag release-6.0.6 for changeset 953c466faf8f 2013-05-30 09:56:32 -02:00
Sebastiaan Janssen 7b6cda6b44 Closing branch 4.11.9 2013-05-30 09:46:32 -02:00
Sebastiaan Janssen 332d91b6dc Added tag release-4.11.9 for changeset fb8fd83e8e70 2013-05-30 09:46:21 -02:00
Sebastiaan Janssen ddbe15de08 Config file formatting, remove logger from CD for now as it was throwing errors 2013-05-30 08:47:17 -02:00
Sebastiaan Janssen 5c5d63ce9a web.Template.config formatting 2013-05-30 06:26:55 -02:00
Morten Christensen d3916a1d85 Sorting - now it works 2013-05-29 13:37:41 -02:00
Morten Christensen db7cb2dcb4 Merge with 6.0.6 2013-05-29 13:18:40 -02:00
Morten Christensen 6281268954 Updating sort method in Content- and MediaService 2013-05-29 13:18:03 -02:00
Sebastiaan Janssen cd606a7e9e Merge 2013-05-29 05:41:50 -02:00
Sebastiaan Janssen ae9d77a765 Bump version number 2013-05-29 05:40:55 -02:00
Morten Christensen f6e44b4e7c Merge with 6.0.6 2013-05-29 05:38:35 -02:00
Morten Christensen 8e1c45e981 Updating Sort methods to skip items that hasn't been sorted 2013-05-29 05:37:55 -02:00
Sebastiaan Janssen 955282f260 Merge with 6.0.6 2013-05-29 03:49:44 -02:00
Sebastiaan Janssen 4a7ee52d63 Merge with 4.11.9 2013-05-29 03:47:26 -02:00
Sebastiaan Janssen b4d88b0361 U4-2279 TryGetRouteDefinitionFromAncestorViewContexts has infinite loop when
currentContext doesnt contain umbraco-route-def
2013-05-29 03:44:01 -02:00
Sebastiaan Janssen b41cf37dd5 U4-2290 Notifications do not handle fields that have null values. 2013-05-29 03:42:20 -02:00
Shannon Deminick e6fcdc8dc6 Fixes: #U4-2279 2013-05-28 14:16:39 -10:00
Shannon Deminick 547a137b9a Merge 2013-05-28 13:49:17 -10:00
Shannon Deminick 5041e6fcc4 Updated to latest CDF version that has a few bug fixes and added a CDF logger. 2013-05-28 13:24:48 -10:00
Sebastiaan Janssen db0d139a39 Merge with 6.0.6 2013-05-28 15:48:51 -02:00
Sebastiaan Janssen fc32100142 Merge with 4.11.9 2013-05-28 15:45:59 -02:00
Sebastiaan Janssen 7ecbc3b391 Fixes U4-2248 Spelling error in back office 2013-05-28 15:44:59 -02:00
Sebastiaan Janssen c3c44df52e Merge with 4.11.9 2013-05-28 15:43:40 -02:00
Sebastiaan Janssen 13a86624ff Fixes U4-2248 Spelling error in back office 2013-05-28 15:39:12 -02:00
Sebastiaan Janssen 2f61bc27c8 Bump version number 2013-05-28 15:15:32 -02:00
Sebastiaan Janssen f484dbf0fc Fix merge issue 2013-05-28 12:37:29 -02:00
Sebastiaan Janssen 6d0ededd9f Merge with 6.0.6 2013-05-28 12:21:31 -02:00
Sebastiaan Janssen e7d157a209 Merge with 4.11.9 2013-05-28 12:18:49 -02:00
Sebastiaan Janssen d3ed90c23e Some fixes & refactor 2013-05-28 12:10:29 -02:00
Shannon Deminick f6155d8e49 Fixes: #U4-2243 - reverts code to use the legacy API to create a template until the new template service is updated to work as it did. 2013-05-27 17:13:12 -10:00
Sebastiaan Janssen c1cd609325 Merge with 6.0.6 2013-05-27 10:23:03 -02:00
Sebastiaan Janssen b916360771 Merge with 4.11.9 2013-05-27 10:22:20 -02:00
Sebastiaan Janssen db4b93dbc3 Update test because of new added restextension (EmbedMediaService) 2013-05-27 10:21:14 -02:00
Sebastiaan Janssen fa8934f89a Merge with 6.0.6 2013-05-27 10:09:00 -02:00
Sebastiaan Janssen c6940096d3 Merge 2013-05-27 10:08:36 -02:00
Sebastiaan Janssen 40868ac361 Merge 2013-05-27 10:02:01 -02:00
Sebastiaan Janssen f399a9f52b Merge with 4.11.9 2013-05-27 10:00:28 -02:00
Sebastiaan Janssen 562851b93e Possible fix for U4-2251 TreeDataService throws JSON JavaScriptSerializer. The
length of the string exceeds the value set on the maxJsonLength property
2013-05-27 09:59:02 -02:00
Morten Christensen 634e4a6949 Merge with 6.0.6 2013-05-27 08:47:14 -02:00
Morten Christensen e61b567ee1 Fixes #U4-2270 and #U4-2269 2013-05-27 08:45:07 -02:00
Sebastiaan Janssen 7ccae64dd1 Fix merge issue 2013-05-27 08:19:20 -02:00
Sebastiaan Janssen aef44065c5 Merge with 6.0.6 2013-05-27 08:17:49 -02:00
Sebastiaan Janssen 4ce22b836e Merge with 4.11.9 2013-05-27 08:16:18 -02:00
Sebastiaan Janssen 2b8544b4c7 Merge 2013-05-27 07:40:59 -02:00
Sebastiaan Janssen 6afa6a277f Fixes U4-2263 unable to create or save stylesheet content 2013-05-27 07:40:29 -02:00
Sebastiaan Janssen f5bf05a6f5 Move embed media service from webservices dll into it's own /base class 2013-05-27 07:19:42 -02:00
Morten Christensen 469db82f1d Internal creation of backoffice users and unit test to verify 2013-05-27 06:50:14 -02:00
Sebastiaan Janssen e50569597b Minor update to legacy ajax calls 2013-05-27 06:10:04 -02:00
Sebastiaan Janssen 071f3dcc01 Fix javascript error with the speechbubble 2013-05-27 06:05:13 -02:00
Morten Christensen e0bc99af9c Merge 2013-05-24 08:14:07 -02:00
Morten Christensen 232581664b Moving internal membership provider classes.
Adding missing alias to AllowedContentTypes on ContentType.
Adding Package export test.
2013-05-24 08:13:24 -02:00
Shannon Deminick b15e147d6b Removed internal classes relating to property editors that are not used and were initially ported from v5 but we'll be
creating new/different ones for v7.
2013-05-23 21:32:26 -10:00
Morten Christensen c7a4c782e3 Internal work around the creation of users through the new api. 2013-05-23 13:25:14 -02:00
Morten Christensen 780908e24f Fixing merge issues and updating nodeSorter to use EntityService and new Sort method for improved performance.
Fixes #U4-1750
2013-05-23 11:34:06 -02:00
Morten Christensen 3ac7e237c4 Merge with 6.0.6 2013-05-23 10:38:09 -02:00
Morten Christensen 6943a454f3 Implementing Sort-method for the Content/MediaService 2013-05-23 10:29:44 -02:00
Morten Christensen e870db3c29 Fixing MacroTests that had a dependency on the Profiler, which wasn't setup in the fixture. 2013-05-22 11:24:46 -02:00
Morten Christensen 41b17160f7 Excluding a few new classes, which won't make it into 6.1.0. 2013-05-22 11:08:27 -02:00
Morten Christensen b19621c07b Improving tree performance for Content and Media trees using the new EntityService and the thin IUmbracoEntity object.
Updating a few internal overloads as well as adding new ones to ensure backwards compatibility for events used by the tree.
Fixing issue with the Published/Unpublished/Saved/Pending Changes states shown in the content tree.
2013-05-22 11:06:21 -02:00
Morten Christensen 0ff979e814 Adding missing method for retreiving parent or child relations.
Implements #U4-2237
2013-05-22 07:53:16 -02:00
Morten Christensen f26e39f5ce Adding a new extensibility in relation to #U4-2244 which allows consumers of the CoreBootManager to explicitly set the path to the root of an umbraco site/solution.
A bit of cleanup in the IOHelper class.
2013-05-22 07:48:42 -02:00
Morten Christensen 9a6030a3eb Fixes #U4-2244 2013-05-22 07:12:58 -02:00
Morten Christensen 84ef216d57 Merge 2013-05-17 05:51:49 -02:00
Morten Christensen ecfe51134d Updating the internal standalone context, and adding one that is limited to the core assembly to limit dependencies. 2013-05-17 05:51:22 -02:00
Shannon Deminick c8414116ad Merge with 6.0.6 2013-05-14 14:21:15 -10:00
Shannon Deminick 532f407260 Merge with 4.11.9 2013-05-14 14:20:52 -10:00
Shannon Deminick 834d04f8ed Fixes: #U4-1469, #U4-1156 2013-05-14 14:18:41 -10:00
Shannon Deminick 2aa902beaf Fixed up unit test 2013-05-14 13:50:16 -10:00
Shannon Deminick 2f16e6662d updates disposable timer to ensure it also outputs to HttpTrace if there is one. 2013-05-14 13:39:55 -10:00
Shannon Deminick 0c4897d7c1 Changed the trace logger for PublishedContentRequestEngine to be correct. 2013-05-13 22:32:02 -10:00
Shannon Deminick 43dc14fa93 Changed over all direct calls to the profiler to use DisposableTimer.DebugDuration 2013-05-13 22:17:55 -10:00
Shannon Deminick e209aa3c2a Streamlined the profiling in the macro class. 2013-05-13 22:13:52 -10:00
Shannon Deminick 5890fe1849 Upgraded DisposableTimer to wrap the profiler... now we should really just use DisposableTimer for all profiling. 2013-05-13 21:11:03 -10:00
Shannon Deminick b6f52bf782 Changed the profiler over to use resolvers again. We no longer will call MiniProfiler directly.
Added an HtmlHelper extension which is used to render the profiler html output.
Added an HtmlHelper property to the new base page too.
2013-05-13 20:10:28 -10:00
Shannon Deminick 922ebe5411 Started implementing static cache provider for the application cache... centralizing static cache. 2013-05-13 19:31:27 -10:00
dmilic f36ab37f6a Fix for the U4-2229 issue - broken PublishWithSubs method 2013-05-13 15:49:59 -12:00
Sebastiaan Janssen aeff33d0a6 Bump version number 2013-05-28 15:17:55 -02:00
Sebastiaan Janssen 645637d550 Merge with 6.0.6 2013-05-13 13:48:34 -02:00
Sebastiaan Janssen 5cfe9e57ce Merge with 4.11.9 2013-05-13 13:47:01 -02:00
Sebastiaan Janssen 4863e657df Fixes U4-2226 Javascript error "tinyMCE is undefined" in IE - THANKS Adriano Buscema! 2013-05-13 13:42:57 -02:00
Shannon Deminick 2486e75210 Merge with 6.0.6 2013-05-12 23:57:09 -10:00
Shannon Deminick c0e1be4df9 Merge 2013-05-12 23:56:47 -10:00
Sebastiaan Janssen a93e562f14 Fixes U4-2209 6.0.5 - Bug - Empty recycle bin DELETES all content 2013-05-13 07:48:35 -02:00
Shannon Deminick 2201c644f7 Merge with 6.0.6 2013-05-12 21:49:38 -10:00
Shannon Deminick 822cac5d87 Adds test for #U4-2207 which will now pass but it will still fail on the website because of the case
sensitive checking for the default proeprty editor lookup. Need feedback from sebastian before continuing
2013-05-12 21:44:02 -10:00
Shannon Deminick d58487fafc Merge 2013-05-12 21:13:50 -10:00
Shannon Deminick ea9653fa83 patches fix for #U4-2214 2013-05-12 21:12:55 -10:00
Shannon Deminick b38397868e Fixes: #U4-2214 - encrypted cookie value issue when it is invalid 2013-05-12 21:07:16 -10:00
Shannon Deminick 7d1a18638b missing proj checking 2013-05-12 21:06:53 -10:00
Shannon Deminick 748e88c3e8 added web.config files to the root of xslt folders which will disable the ability for people
to publicly download other's xslt files .
2013-05-12 19:29:05 -10:00
Shannon Deminick cb8d080f1d Removes the abstraction on the profiler, no need for a resolver, it will work in unit tests and we can override the provider if needed.
Added better support for MVC profiling by using the built in ProfilingViewEngine and ProfilingActionFilter.
2013-05-12 19:05:49 -10:00
Shannon Deminick 3fd3bf0fda updated extensino method to prefix the type name better. 2013-05-12 18:17:53 -10:00
Shannon Deminick 09a6cdc8b6 Removed all MiniProfile calls that were trying to be simple trace messages (not actually profiling). This doesn't actually
work since MiniProfiler was not meant for that and won't actually output them unless you add Thread.Sleep statements into the using
clauses simply to slow down the application, not ideal. Updated the WebProfiler to log a statement when in medium trust.
2013-05-12 18:06:26 -10:00
Shannon Deminick b2fe35695f Fixes MiniProfile implementation for macros. 2013-05-12 17:38:54 -10:00
Shannon Deminick 67b57dea50 Changes profiler over to use a resolver and uses an interface for it. Changes core over to use a
LogProfiler and the web project to use a web profiler (MiniProfiler). Fixes medium trust implementation,
adds performance check for binding to begin request, changes Web profiler over to be decoupled from the
umbraco application objects (binds to events by itself)
2013-05-12 15:25:46 -10:00
Sebastiaan Janssen 3d6172738f Added tag release-6.1.0-beta2 for changeset 7670bb47a671 2013-05-10 11:00:57 -02:00
Sebastiaan Janssen a43e0eb5b8 Display version comment in installer steps ("beta 2" in this case) 2013-05-10 10:55:55 -02:00
Sebastiaan Janssen 3b05663597 Add MiniProfiler as a requirement for the NuGet package 2013-05-10 10:55:28 -02:00
NielsHartvig@UMBRACORATI.localdomain 191d744ec6 Adds profiling support to MVC views 2013-05-10 10:38:59 -02:00
NielsHartvig@UMBRACORATI.localdomain 980cd20e4c Adjustments to profiling 2013-05-10 10:24:25 -02:00
NielsHartvig@UMBRACORATI.localdomain f04916c9a9 Adds MiniProfiler support 2013-05-10 10:15:30 -02:00
Sebastiaan Janssen 8fde65d417 Merge with 6.0.6 2013-05-10 08:50:28 -02:00
Sebastiaan Janssen 8cca1b77b3 Merge with 4.11.9 2013-05-10 08:47:24 -02:00
Sebastiaan Janssen 53e4308c29 Fixes U4-2205 Log.GetLogItems(LogTypes, DateTime) fails with 'Conversion failed
when converting the nvarchar value 'Custom' to data type int'
2013-05-10 08:44:47 -02:00
Sebastiaan Janssen d10eff04a7 Update version 2013-05-10 07:09:43 -02:00
Sebastiaan Janssen 59c36ad70e Fixed U4-2090 Content not published after installing starterkit on fresh site
(Umbraco 6.1 beta)
Reverts previous "fix" as the actual cause was in Document.cs
2013-05-10 06:59:51 -02:00
Shannon Deminick 7b8d526a8a Fixed up some merge issues. 2013-05-08 18:16:58 -10:00
Shannon Deminick f69a017078 Merge with 6.0.6 2013-05-08 18:11:52 -10:00
Shannon Deminick 6f26f7b57c Patching from 6.1 2013-05-08 18:08:55 -10:00
Shannon Deminick bda2614290 Patching from 6.1 2013-05-08 17:49:48 -10:00
Shannon Deminick efc482511e Patching from 6.1 2013-05-08 17:48:17 -10:00
Shannon Deminick 40b90b8a58 Patching from 6.1 2013-05-08 17:45:53 -10:00
Shannon Deminick a009dfe2a1 Patching from 6.1 2013-05-08 17:39:03 -10:00
Shannon Deminick bc0b419288 Merge 2013-05-08 17:12:09 -10:00
Shannon Deminick 806715594e Fixes up created package tree sync. 2013-05-08 17:11:50 -10:00
Shannon Deminick 41e87fca98 Fixes macro tree syncing 2013-05-08 17:04:51 -10:00
Shannon Deminick f23c6c53cc Fixes up created package tree sync. 2013-05-08 17:11:50 -10:00
Shannon Deminick f2a97326fa Fixes macro tree syncing 2013-05-08 17:04:51 -10:00
Shannon Deminick dd1983dc55 Fixes macro script editor and syncing, changes over editPython to use correct webforms file format. 2013-05-08 17:01:48 -10:00
Shannon Deminick 78cd51d333 Fixed xslt editing and syncing. 2013-05-08 16:33:09 -10:00
Shannon Deminick 28b6c5897f Fixes up script editor and tree syncing. 2013-05-08 16:13:18 -10:00
Shannon Deminick baed852767 Re-fixed up stylesheet editing and syncing, starting fixup for script editor/syncing 2013-05-08 15:15:56 -10:00
Shannon Deminick 0762decd92 Fixes up tree syncing for views, stylesheets and partial views. Now ensures we can actually
sync a tree for a file based node that doesn't have a static id. Also ensures that when we change a
Partial view name that we don't end up duplicating some files when we change it twice in the
same session.
2013-05-08 14:18:18 -10:00
Shannon Deminick 0b58c1c03c Patching from 6.1 2013-05-08 17:34:40 -10:00
Shannon Deminick 38c6a21896 Patching from 6.1 2013-05-08 17:33:48 -10:00
Shannon Deminick 15bff44ec1 Patching from 6.1 2013-05-08 17:24:00 -10:00
Shannon Deminick a626efa9b6 Merge with 4.11.9 2013-05-08 17:15:09 -10:00
Shannon Deminick 1f87470f89 Fixes up tree syncing for views, stylesheets and partial views. Now ensures we can actually
sync a tree for a file based node that doesn't have a static id. Also ensures that when we change a
Partial view name that we don't end up duplicating some files when we change it twice in the
same session.
2013-05-08 14:18:18 -10:00
Hendy 54d2258634 added null checks into the uQuery .ToNameIds() methods 2013-05-08 16:29:29 -01:00
Sebastiaan Janssen 25be0621b2 Whoops, connection string doesn't contain the datalayer here 2013-05-08 13:14:02 -02:00
Sebastiaan Janssen 6fe3507099 Merge with 6.0.6 2013-05-08 08:13:57 -02:00
Sebastiaan Janssen cba09ed817 Merge with 4.11.9 2013-05-08 08:10:48 -02:00
Sebastiaan Janssen d5d00553b4 Fixed U4-2176 MySql Dashboard error for 4.11 as well 2013-05-08 08:09:13 -02:00
Morten Christensen d94772892d Merge 2013-05-08 06:28:13 -02:00
Shannon Deminick 55750b534b Fixed the template editor to ensure that the tree syncs and updated much of it to use correct JavaScript, however
id didn't have time to update the whole thing.
2013-05-07 22:19:42 -10:00
Shannon Deminick a31cb3b1df Fixed stylesheet property tree syncing, updated the stylesheet property page to use
correct web forms structure.
2013-05-07 21:13:30 -10:00
Shannon Deminick fc44138d9e Fixes Stylesheet tree-syncing. Converts editStylesheets over to correct web forms structure and
implements the correct Javascript.
2013-05-07 20:49:58 -10:00
Shannon Deminick 0cda994538 Fixes DataTypeCacheRefresher to be a Json cache refresher since it needs to refresh both by GUID and by Int Ids 2013-05-07 19:37:57 -10:00
Shannon Deminick 4b199a9166 Manually applies fix for #U4-2094 since the class structure has changed in 6.1 2013-05-07 19:02:36 -10:00
Shannon Deminick cfe6ac0486 Merge with 6.0.6 2013-05-07 18:57:39 -10:00
Shannon Deminick c52669fb05 Fixes: #U4-2094 - issue with duplicates in getting Descendants for media in mvc. 2013-05-07 18:56:24 -10:00
Sebastiaan Janssen 753fe411c5 Fixes U4-2090 Content not published after installing starterkit on fresh site
(Umbraco 6.1 beta)
2013-05-07 13:01:18 -02:00
Morten Christensen 50c12a5c35 Merge 2013-05-07 12:35:28 -02:00
Morten Christensen b42fb1c5c1 WIP Related to PackagingService 2013-05-07 12:35:13 -02:00
Shannon Deminick f05c77dc78 Fixed med trust issue with SecuritySafeCritical attributes 2013-05-06 17:23:53 -10:00
Shannon Deminick d1677d9d59 Updates: #U4-2192 - moves method call to be inside of the lock. 2013-05-06 15:54:55 -10:00
Shannon Deminick 137685d883 Updates: #U4-2192 - moves method call to be inside of the lock. 2013-05-06 15:49:51 -10:00
Shannon Deminick 266d8ba69a Merge with 6.0.6 2013-05-06 15:20:26 -10:00
Shannon Deminick c4a071523e Merge with 4.11.9 2013-05-06 15:12:10 -10:00
Shannon Deminick ca99319ead Fixes: #U4-644 - DynamicNode and MVC don't output RTE values for media 2013-05-06 15:09:24 -10:00
Shannon Deminick f808aac4cd Fixes: #U4-644 - DynamicNode and MVC don't output RTE values for media 2013-05-06 14:36:47 -10:00
Shannon Deminick 0553bd1f9f Merge with 6.0.6 2013-05-06 12:54:43 -10:00
Shannon Deminick 81360f629e Merge with 4.11.9 2013-05-06 12:54:28 -10:00
Sebastiaan Janssen 1b3669787b Merge with 6.0.6 2013-05-06 12:27:56 -02:00
Sebastiaan Janssen aa36c66f39 Fixes U4-2176 6.0.5 Dashboard error 2013-05-06 12:27:15 -02:00
Sebastiaan Janssen 950cb1436a Merge with 6.0.6 2013-05-06 12:07:22 -02:00
Sebastiaan Janssen 09e31d6595 Fixes U4-2179 Error with GetChildNodes after upgrade to Umbraco 6.0.5 from
Umbraco 6.0.0
2013-05-06 12:06:45 -02:00
Sebastiaan Janssen f9fc2619fa Fixes U4-2179 Error with GetChildNodes after upgrade to Umbraco 6.0.5 from
Umbraco 6.0.0
2013-05-06 12:06:45 -02:00
Sebastiaan Janssen 004d9ab3e6 Merge with 6.0.6 2013-05-06 11:12:31 -02:00
Sebastiaan Janssen 5d8cfa5efb Merge 2013-05-06 11:06:54 -02:00
Sebastiaan Janssen 297f8e2a0b Remove reference to v4 in text. 2013-05-06 11:06:28 -02:00
Shannon Deminick 83584375c1 Merge with 6.0.6 2013-05-06 02:10:26 -10:00
Shannon Deminick 8ddfb5f6ad Merge 2013-05-06 02:09:44 -10:00
Shannon Deminick 9387544865 Fixes test outcome 2013-05-06 02:08:38 -10:00
Shannon Deminick 66ddb21ef8 Fixes null check 2013-05-06 02:03:24 -10:00
Sebastiaan Janssen d746ec6409 Merge with 6.0.6 2013-05-06 09:34:11 -02:00
Shannon Deminick e08322f6fe Fixes merge issues 2013-05-05 23:45:47 -10:00
Shannon Deminick de52f3ee93 Merge with 6.0.6 2013-05-05 23:39:52 -10:00
Shannon Deminick 9d19ed9463 Fix merge issues 2013-05-05 23:35:51 -10:00
Shannon Deminick df62697477 Merge with 4.11.9 2013-05-05 23:23:24 -10:00
Shannon Deminick f0cacf0d52 Fixed app_code assembly check. 2013-05-05 23:03:31 -10:00
Shannon Deminick d501fcb679 Fixes TypeFinder issue but retains the improved performance. Adds TypeHelper tests. 2013-05-05 22:57:41 -10:00
Stephan 3c15f9b57c Web.Standalone - refactor 2013-05-05 09:07:51 -02:00
Shannon Deminick f5994d8442 Fixes up async methods in ContentTypeControlNew to ensure that the UmbracoContext is current since
the actions might run on different threads and therefore some event handlers might need access to the context.
2013-05-04 19:33:49 -10:00
Shannon Deminick bfe5250138 Fixes issue with async delete webforms method not re-setting the umbraco context. 2013-05-04 18:29:24 -10:00
Shannon Deminick 3fa9219c27 Merge 2013-05-04 18:13:03 -10:00
Shannon Deminick 4295cba915 Updated unit tests for TypeFinder - this shows the issue with the new refactored performance changes. 2013-05-04 18:12:02 -10:00
Robert Stocks 6d66fc6cb8 Remove extra space in name of http module in web.config 2013-05-03 07:24:28 -01:00
Robert Stocks 4484f83caa Remove extra space in name of http module in web.config 2013-05-03 07:24:28 -01:00
Sebastiaan Janssen 3ada1770eb Merge with 4.11.9 2013-05-06 09:32:23 -02:00
Shannon Deminick cbf84566e2 updated casing in proj file to be correct for a couple elements. 2013-05-02 15:57:02 -10:00
Shannon Deminick 294c2f4fba Fixes: #U4-2183 - null check on UmbracoContext and fixes bad merge issue, the UserTypeCacheRefresher got removed from the proj file. 2013-05-02 14:24:27 -10:00
Shannon Deminick 0b6f05e630 Fixes: #U4-2172 - better single threaded supported for the database instance outside http context 2013-05-02 03:48:14 -10:00
Sebastiaan Janssen 85421cf714 Closing branch 4.11.9 as that version number was used for the emergency security fixes 2013-05-01 13:08:21 -02:00
Sebastiaan Janssen 2170380f7b Opening new branch 2013-05-01 13:07:53 -02:00
Sebastiaan Janssen 97dd5433e0 Closing branch 6.0.5 as that version number was used for the emergency security fixes 2013-05-01 13:06:59 -02:00
Sebastiaan Janssen a8ab7e4c35 Open new branch 2013-05-01 13:05:12 -02:00
Sebastiaan Janssen c20c9c638f Merge with 4.11.8 2013-05-01 13:04:06 -02:00
Sebastiaan Janssen 43b2a2185e Fix unit test 2013-05-01 13:02:09 -02:00
Sebastiaan Janssen 2423bdd623 Merge with 4.11.8 2013-05-01 05:33:19 -02:00
Sebastiaan Janssen bcb90d64a5 Fixes U4-1136 Class in MediaPickerDataType.cs wrongly named MemberPickerDataType
+ a bit of code cleanup
2013-05-01 05:32:29 -02:00
Shannon Deminick eca01b845c publicized some ObjectExtensions, added Umbraco.Belle to internals, updated the names in which plugin routes are created,
added HttpUrlHelper extensions for web api
2013-04-30 16:43:59 -10:00
Morten Christensen dc5cf5ef6e Adding strongly typed query POC to test project 2013-04-30 17:41:59 -02:00
Sebastiaan Janssen 7d448d0959 Merge 2013-04-30 05:22:43 -02:00
Sebastiaan Janssen 53fe02db7e And another update for WebPI... 2013-04-30 05:22:21 -02:00
Shannon Deminick af51465a6a Merge 2013-04-29 19:57:44 -10:00
Shannon Deminick b2929ea50a Merge with 6.0.5 2013-04-29 19:56:41 -10:00
Shannon Deminick a03dd7b11e Merge with 4.11.8 2013-04-29 19:56:18 -10:00
Shannon Deminick 6d994f48ac merged in patch for TypeFinder changes 2013-04-29 19:55:44 -10:00
Shannon Deminick 8e1f7170c7 Merged in TypeFinder changes from U4-1187 and wrote benchmark unit tests and other general
tests to confirm it is still finding types.
2013-04-29 19:48:11 -10:00
Shannon Deminick 3fd1c49da7 Merge with 6.0.5 2013-04-29 12:09:36 -10:00
Shannon Deminick f0e8252e38 Merge with 4.11.8 2013-04-29 12:09:12 -10:00
Shannon Deminick ad06aded1b Removed strange old legacy config section that never did anything 2013-04-29 12:08:36 -10:00
Sebastiaan Janssen be049f9093 Fix merge issue 2013-04-29 12:36:03 -02:00
Sebastiaan Janssen 64bbfb8cbc Merge with 6.0.5 2013-04-29 12:31:13 -02:00
Sebastiaan Janssen 0ca52fcc60 Fix merge issues, update version number 2013-04-29 12:29:15 -02:00
Sebastiaan Janssen c53342ba4c Merge with 4.11.8 2013-04-29 12:13:00 -02:00
Sebastiaan Janssen 25eea8d599 Re-add internals visible to umbraco.webservices in case people install the
seperate project.
2013-04-29 11:17:32 -02:00
Sebastiaan Janssen 22498649b1 Merge 2013-04-29 10:36:30 -02:00
Sebastiaan Janssen 25ce7baa7d Removing the umbraco.webservices project 2013-04-29 10:36:11 -02:00
Morten Christensen b4fd2f6d46 Fixing oversight in SaveAndPublish method - content might not have an Id yet, so take that into account. 2013-04-29 07:09:23 -02:00
Shannon Deminick aba4a9b07c oops, removed test code 2013-04-28 16:15:19 -10:00
Shannon Deminick 577d77cfab Fixes: #U4-1760 - allows a developer to set the default RenderMvcController on startup. 2013-04-28 16:09:24 -10:00
Shannon Deminick 7ff50e2652 Merge with 6.0.5 2013-04-28 13:43:38 -10:00
Shannon Deminick e885384678 Merge with 4.11.8 2013-04-28 13:40:06 -10:00
Shannon Deminick 528209f8da instantly improve performance by 45% for regenerating xml structures for documents when a doc type alias changes
or when a doc type property alias is changed or a doc type property is removed.
2013-04-28 13:37:36 -10:00
Shannon Deminick 056696d36f Fixes up more issues with cmsContentXml - got media updating properly now, nearly the same as content and all done with
the new API.
2013-04-25 22:13:05 -10:00
Shannon Deminick 6cffa67518 Fixes merge issues and WebSecurity with the correct encryption (from failed merge along time ago).
Fixes ContentType to ensure that ALL property type values get reset, not just ones assigned to a group.
Fixes logic in ContentTypeService to ensure that xml is re-generated when a property type alias is changed too.
2013-04-25 21:09:07 -10:00
Shannon Deminick d2a285c120 Merge with 6.0.5 2013-04-25 19:43:03 -10:00
Shannon Deminick 153fe248a7 Fixes ContentService fix for issue U4-1772, we don't want to truncate! Plus the truncate term doesn't work in SQLCE anyways. 2013-04-25 19:33:53 -10:00
Shannon Deminick 7fc4822bbe Fixes merge issues. Fixes Fixes for cmsContentXml table since the Content type heirarchy tables are different in v6. 2013-04-25 19:26:06 -10:00
Shannon Deminick d65bee76b2 Merge with 4.11.8 2013-04-25 14:15:09 -10:00
Shannon Deminick 385d6396b0 disables auto-complete on the login page. 2013-04-25 13:28:47 -10:00
Shannon Deminick 46858af1ed Ensures user cookie is encrypted, removes ASP.Net headers from being returned in our response. Ensures
that our auth cookie is httponly.
2013-04-25 13:25:25 -10:00
Shannon Deminick 0ae9a75b32 Close 4.11.7 - cmsContentXml fixes branch 2013-04-25 12:20:27 -10:00
Shannon Deminick 34163625fe Merge with 4.11.7 - cmsContentXml fixes 2013-04-25 12:20:06 -10:00
Sebastiaan Janssen c2057656bc Merge with 6.0.4 2013-04-25 11:23:31 -02:00
Sebastiaan Janssen 09a4e33f3f Closing again.. 2013-04-25 11:20:21 -02:00
Sebastiaan Janssen e53b388a5e Opening new branch 2013-04-25 11:19:06 -02:00
Sebastiaan Janssen 4fb4af0b4f Added tag release-6.0.4 for changeset 0dee9964687e 2013-04-25 11:18:36 -02:00
Sebastiaan Janssen 461f032777 Added tag release-4.11.7 for changeset ce47176bc6b9 2013-04-25 11:17:07 -02:00
Sebastiaan Janssen ab37f9ae35 Closing 6.0.4 2013-04-25 11:16:29 -02:00
Sebastiaan Janssen a3347c0037 Opening new branch 2013-04-25 11:14:46 -02:00
Sebastiaan Janssen f3835d1ca3 Closing branch 4.11.7 2013-04-25 11:14:09 -02:00
Sebastiaan Janssen 8fae55e44e Correct path to Courier 2013-04-25 09:02:58 -02:00
Sebastiaan Janssen a8ca3a89bd Forgot to uncomment some items 2013-04-25 08:51:31 -02:00
Sebastiaan Janssen 765f959f20 Reverting includes removal of courier/contour files 2013-04-25 08:44:37 -02:00
Sebastiaan Janssen 2cf90477ed Make Selenium Contour install work 2013-04-25 08:44:01 -02:00
Sebastiaan Janssen 6ca6a08233 Add RevertToEmptyInstall which installs an empty DB with credentials admin/test
Also deletes all dlls from /bin and rebuilds the project (to remove packages
that have installed dlls).
2013-04-25 07:15:54 -02:00
Sebastiaan Janssen 0119f1eb1b Merge 2013-04-25 06:11:28 -02:00
Sebastiaan Janssen cd4f66e7c5 Making a start on adding Selenium integration/UI tests for the backoffice 2013-04-25 06:10:57 -02:00
Shannon Deminick d30c4791fe fixed a documentation error 2013-04-24 15:46:38 -10:00
Shannon Deminick 7ee9b9ebcc Fixes: #U4-2144 - ensures that the xml is re-gen'd when a content type alias is changed or a content type property is removed.
Also had to change the property type deletion to be async as well since it might be long running to re-gen the xml.
2013-04-24 15:31:36 -10:00
Shannon Deminick b4caf109f7 Working on #U4-2144 - ensures that xml is re-gen'd when a property alias is changed. 2013-04-24 15:17:20 -10:00
Shannon Deminick 0e8ffe528a Fixes: #U4-2149 - updates the logic for changing aliases for any content type. Now if an alias changes for any content type, the
xml is regenerated for any entity that is of that content type. For DocumentType's this is slightly different because we regenerate
the xml for the doc type and any document of the doc type's descendant types.
2013-04-24 14:57:20 -10:00
Shannon Deminick a8029d1dc5 Fixes: #U4-1772 - ensures that when changing a doc type alias that we only rebuild the data in the cmsContentXml table for Document types, not media types or member types, now we need
to fix all of the other bugs assocated with cmsContentXml table and alias changes.
2013-04-24 13:19:30 -10:00
Stephan a1d5b61ae5 PublishedContent - create tests to illustrate issues 2013-04-24 11:56:32 -02:00
Morten Christensen 3fdc0e5361 Fixes #U4-2137 Ensuring that existing templates are updated instead of duplicated when installing packages.
Adds test for installing templates and then updating the same templates through another package install.
2013-04-24 07:41:37 -02:00
Shannon Deminick 6818ac4e50 Fixes merge issues, ensures that the UmbracoContext is set for the async operation since
it is required, previous versions didn't require it to be set. Added the WebSecurity property
to UmbracoUserControl, made ContentTypeControlNew inherit from UmbracoUserControl
2013-04-23 22:39:35 -10:00
Shannon Deminick 710c8aa6ea Merge with 6.0.4 2013-04-23 21:52:07 -10:00
Shannon Deminick 4bfb8569c8 Fixed up merge issues 2013-04-23 21:37:03 -10:00
Shannon Deminick df9a887032 Merge with 4.11.7 2013-04-23 20:50:30 -10:00
Shannon Deminick 1e0a4690fc Added an error log if timed out 2013-04-23 20:31:32 -10:00
Shannon Deminick 52163494db changed the async state object to be a custom class to hold the original values of alias/text 2013-04-23 20:19:48 -10:00
Shannon Deminick 8416764a83 removed the trace from the page 2013-04-23 20:01:26 -10:00
Shannon Deminick 2d3eb8c208 Working on #U4-493, updated ContentTypeControlNew and EditNodeTypeNew to use correct webforms class structures.
Changed the saving logic in ContentTypeControlNew to use the page's async execution and changed the page to support async.
Changed the page's async timeout to be 5 minutes.
2013-04-23 20:00:48 -10:00
Sebastiaan Janssen aa84a3f7f2 Fixes U4-2138 Copying a node reverses sort order in target 2013-04-23 12:49:33 -02:00
agrath 3594693f4b Backported fix for u4-335 from Commit b15d0ab0b879 into 4.11.7 2013-04-22 11:12:03 -12:00
Morten Christensen c573459626 Fixing nuget related issue #U4-2067 and updating version 2013-04-22 06:01:31 -02:00
Sebastiaan Janssen b99de245bf Fixes U4-2052 for new mediatypes as well 2013-04-21 09:44:08 -02:00
Morten Christensen 222723b8fe Fixes #U4-2004 so GetPublishedDescendants retrieves the published version and not the latest version. 2013-04-21 09:06:22 -02:00
Morten Christensen f758b33da5 Properly fixes #U4-2112 and adds option to determine whether or not to import doc type structues. 2013-04-21 07:25:38 -02:00
Morten Christensen eeb0e0026a Making PropertyCollection, PropertyGroupCollection and PropertyTypeCollection return a proper null when FirstOrDefault should return null. 2013-04-20 19:47:30 -02:00
Morten Christensen 082dacf737 Fixes #U4-2029 Finding scripts and stylesheets recursively. 2013-04-20 12:56:43 -02:00
Morten Christensen afc2fd9420 Ensures that CreateDate and UpdateDate is set on both PropertyTypes and Properties for Content and Media.
Fixes #U4-2028
2013-04-20 12:23:14 -02:00
Morten Christensen ff6715d42a Fixes #U4-2013 Localization lost in packaging for DocumentTypes 2013-04-20 11:23:04 -02:00
Morten Christensen b776675ac8 Fixes #U4-2065 Document.AfterMove legacy event handler returns wrong parent. 2013-04-20 11:19:27 -02:00
Morten Christensen 1e21671b62 Fixes #U4-2008 Umbraco.Core.Models.PropertyType -> change ValidationRegExp from internal to public 2013-04-20 11:10:28 -02:00
Morten Christensen 59184981cb Fixes #U4-2009 Delete of media doesnt delete relations 2013-04-20 11:05:48 -02:00
Morten Christensen 0632ffb93d Fixes #U4-2069 2013-04-20 11:03:57 -02:00
Shannon Deminick f8652d98fe Merge with 6.0.4 2013-04-20 04:01:22 +06:00
Shannon Deminick 034aa6d8f9 Fixes merge issue 2013-04-20 03:58:15 +06:00
Shannon Deminick 1484fba1ad Merge with 4.11.7 2013-04-20 03:51:22 +06:00
Shannon Deminick 82fc1a5304 updated proj file 2013-04-20 03:47:57 +06:00
Shannon Deminick f0aab6ae81 Fixes: U4-2089 - sort dialog behavior when clicking on column headers. Updated to latest version of table sorting, had to create a custom sort parser
upgraded the sort.aspx to have the proper code behind structure and updated the page to have proper css and js files instead of inline. Fixes missing images.
2013-04-20 03:42:47 +06:00
Shannon Deminick 174ff44e3b proj file update 2013-04-20 00:50:02 +06:00
Shannon Deminick b3c3e114ad missing images 2013-04-20 00:49:39 +06:00
Shannon Deminick 60481e7e02 Fixes: #U4-2093 stylehsheet property cache refresher had wrong id assigned. 2013-04-20 00:18:45 +06:00
Shannon Deminick 12de5d6ed3 Merge with 6.0.4 2013-04-20 00:12:52 +06:00
Shannon Deminick 9ac325c1a4 Fixes: #U4-2130 - regression bug for handling image uploads 2013-04-20 00:04:39 +06:00
Shannon Deminick 7f5457316a Fixed: #U4-2129 - using new api didn't use the CompositionPropertyTypes instead of just PropertyTypes and fixed up cache invalidation for PublishedContentHelper 2013-04-19 23:47:51 +06:00
Sebastiaan Janssen 671c8715b0 Fix merge issue 2013-04-19 10:18:46 -02:00
Sebastiaan Janssen 8c257d39f9 Fix merge issue 2013-04-19 06:43:58 -02:00
Sebastiaan Janssen 76f040aef4 Merge with 4.11.7 2013-04-19 06:42:33 -02:00
Sebastiaan Janssen 721f813d1e U4-1604 Fix latest edits dashboard control so that it doesn't make a zillion queries - Limit the latestedits query to specified amount of rows 2013-04-19 06:10:58 -02:00
Morten Christensen 7ed5a6f706 Fixes #U4-2068 and #U4-2125
Creating test for verifying path is correctly updated when moving items to the recycle bin.
2013-04-19 06:07:25 -02:00
Shannon Deminick d6d630cb2c Merge with 6.0.4 2013-04-19 04:40:49 +06:00
Shannon Deminick 35a698cdc9 Merge with 4.11.7 2013-04-19 04:40:13 +06:00
Shannon Deminick 6c9e82e735 fixed typo 2013-04-19 04:31:55 +06:00
Shannon Deminick f7ddb1ed49 fixed typo 2013-04-19 04:30:15 +06:00
Shannon Deminick c0fd974cc1 fixes typo on word disallow 2013-04-19 04:20:24 +06:00
Shannon Deminick e9c4a031c9 Fixes up directory browser and removes legacy request params which are prone to xss 2013-04-19 04:10:35 +06:00
Shannon Deminick 988940095c Merge with 6.0.4 2013-04-18 23:03:52 +06:00
Shannon Deminick 123e65c55f Fixes: #U4-2118 - BOM encoding issue 2013-04-18 23:00:57 +06:00
Shannon Deminick 08a049594c Merge 2013-04-18 22:01:53 +06:00
Shannon Deminick a895a2a20a Fixes merge issues, ensures that the tree node is reloaded when publishing. 2013-04-18 22:01:28 +06:00
Shannon Deminick a5e33e1e02 Merge with 6.0.4 2013-04-18 21:45:04 +06:00
Shannon Deminick e5e4e7b685 Fixes another merge issue and improves performance slightly for sorting so that we are not double saving the entity if it is published already. 2013-04-18 21:44:38 +06:00
Shannon Deminick a721f06ac8 Merge with 6.0.4 2013-04-18 21:22:32 +06:00
Shannon Deminick 88795b86fd Updated merge issue, and removed the call to refreshXmlSortOrder since we are already republishing which already writes the updated xml 2013-04-18 21:16:00 +06:00
Shannon Deminick 378a544c1a Merge with 4.11.7 2013-04-18 20:59:42 +06:00
Shannon Deminick a159b50c05 Fixed a couple threading issues. Improved the performance of the nodeSorter but this should be better improved in 6.x 2013-04-18 20:52:49 +06:00
Shannon Deminick 3891e46549 Fixed a couple threading issues. Improved the performance of the nodeSorter but this should be better improved in 6.x 2013-04-18 20:52:30 +06:00
Shannon Deminick e7bcc642a9 fix build error on build server 2013-04-18 19:50:01 +06:00
Morten Christensen 39095b524c Updating test - Inheritance between parent/child ContentType has been updated so the parent doesn't have to be added to the composition afterwards. 2013-04-18 10:46:15 -02:00
Shannon Deminick 4983990d39 Big optimization for content.SortNodes - 92% performance increase for this method which is a big
contributor to CPU time during publishing.
2013-04-18 05:43:05 +06:00
Shannon Deminick 3b1bfe04f2 updates method name 2013-04-18 01:15:25 +06:00
Shannon Deminick 979fe46e9b Updated CDF to 1.6.0.0 2013-04-18 00:55:40 +06:00
Shannon Deminick 0107a10145 Manually merge in changes for previous commits due to the codebase differences in 6.1 2013-04-18 00:06:42 +06:00
Shannon Deminick a38f0af49b Merge with 6.0.4 2013-04-17 23:47:33 +06:00
Shannon Deminick e9a496df4f Merge with 4.11.7 2013-04-17 23:31:52 +06:00
Shannon Deminick 2f6dada481 Fixes issue with ctor not setting default property 2013-04-17 23:20:20 +06:00
Shannon Deminick 580123cb87 fixed merge issues 2013-04-17 23:03:51 +06:00
Shannon Deminick de0e47d7ef Merge with 4.11.7 2013-04-17 22:50:31 +06:00
Shannon Deminick ff5dc324fe Fixes: #U4-227 - ensures data is not persisted to the db for members/media if validation fails.
Fixes up (enables) validation summary for members too.
2013-04-17 22:41:43 +06:00
Shannon Deminick 096c5ad69f Fixes: #U4-485, changes name field from saving to the db if it is empty. cleans up some code. 2013-04-17 22:05:10 +06:00
Thomas Skyldahl Sørensen c12f9d0272 Optimization for issue: U4-1187
Url: http://issues.umbraco.org/issue/U4-1187

Added assembly filtering, to stop scanning of third party assemblies
that doesn't reference the types we are looking for.
this limits the amount of possible missing references we encounter
when checking against the types
2013-04-17 14:03:54 -02:00
Morten Christensen 83d1e9c76f Merge 2013-04-17 11:25:53 -02:00
Sebastiaan Janssen eba7582a97 Eh, yeah, maybe I should start with making a copy of the element first.. d'oh! 2013-04-17 11:16:15 -02:00
Sebastiaan Janssen 0cf2a1fc2a Possible fix for U4-2097 Package import causes template tree to break - modified
closure problem
2013-04-17 10:57:24 -02:00
Sebastiaan Janssen 77ee87178e Merge 2013-04-17 07:04:04 -02:00
Sebastiaan Janssen a6997a5cb7 Revert U4-1922 to resume expected sorting behavior. 2013-04-17 07:03:18 -02:00
Sebastiaan Janssen b40619634d Fix bad merge 2013-04-17 06:36:40 -02:00
Morten Christensen fc84a21f06 Adding a few methods to relate two entities both based on the IUmbracoEntity. 2013-04-17 06:26:59 -02:00
Shannon Deminick 9137ce7cf4 Merge with 6.0.4 2013-04-17 01:57:50 +06:00
Shannon Deminick ff3fc5d825 Merge with 4.11.7 2013-04-17 01:56:20 +06:00
Morten Christensen 9621403f79 Fixes U4-2053 2013-04-16 17:19:46 -02:00
Stephan 3b9bf7b0f9 U4-2117 - fix Ancestor- vs AncestorsOrSelf inconsistencies 2013-04-16 12:58:03 -02:00
Stephan 3882e1984d U4-2117 - fix Ancestor- vs AncestorsOrSelf inconsistencies 2013-04-16 12:29:58 -02:00
Stephan 2245c88396 U4-2117 - fix Ancestor- vs AncestorsOrSelf inconsistencies 2013-04-16 12:29:58 -02:00
Sebastiaan Janssen 2e39c55d56 Merge 2013-04-16 04:27:44 -02:00
Sebastiaan Janssen e4e0bcf642 Correct spelling error 2013-04-16 04:27:03 -02:00
Shannon Deminick 7537e4c6d6 updated DefaultServerMessenger with more ctor options for testing 2013-04-16 04:05:31 +06:00
Shannon Deminick c410b6dc20 Changed UmbracoSettings back to internal, it should not be exposed atm 2013-04-16 02:49:14 +06:00
Shannon Deminick 1e7e670df3 Fixes #U4-2104 - namespace issue with UmbracoApiControllers 2013-04-15 21:44:26 +06:00
Shannon Deminick da53ffe9f2 Merge 2013-04-15 21:36:35 +06:00
Shannon Deminick 47f6401fcd updates unit test to ensure UmbracoContext.Current is nulled, updates dispose on application context to
not dispose the database if it is not configured.
2013-04-15 21:36:24 +06:00
Sebastiaan Janssen 33190ea5e1 Merge 2013-04-15 12:19:11 -02:00
Sebastiaan Janssen a06951afbd Fix MemberAuthorizeAttribute for UmbracoApiControllers 2013-04-15 12:18:40 -02:00
Sebastiaan Janssen b32ea68fd0 Merge with 4.11.7 2013-04-15 07:36:58 -02:00
Sebastiaan Janssen eb2db791b8 Additional fix for U4-2105 Saving a document will make it look like it is unpublished 2013-04-15 07:33:26 -02:00
Sebastiaan Janssen 158f4d0614 Merge 2013-04-15 07:32:00 -02:00
Sebastiaan Janssen 7a38970cf4 U4-2109 Regex text-field in DocTypes > (a type) > Properties (a property) >
Validation + Description lack Trimming
2013-04-15 07:31:24 -02:00
Stephan 43d6c9a46d Core.Strings - bugfix DefaultShortStringHelper 2013-04-12 11:32:37 -02:00
Sebastiaan Janssen 7f6d8b6bdd Fixes U4-2105 Saving a document will make it look like it is unpublished 2013-04-12 06:49:06 -02:00
Stephan 0b3eaf9c77 Core.Strings - refactor DefaultShortStringHelper for better backward compat. 2013-04-12 05:33:39 -02:00
Shannon Deminick 0fe8ff57a1 changes a method to be protected instead of private 2013-04-12 05:04:20 +06:00
Shannon Deminick 2642d74450 adds some logging and fixes sequence of events for distributed cache sending 2013-04-12 04:06:24 +06:00
Shannon Deminick 761b749f37 Merge with 6.0.4 2013-04-12 03:08:11 +06:00
Shannon Deminick 22fb7e1706 Merge 2013-04-12 03:07:53 +06:00
Shannon Deminick 4ef9dbb9b4 Merge 2013-04-12 03:07:30 +06:00
Shannon Deminick f716ba380c Merge with 6.0.4 2013-04-12 03:02:40 +06:00
Shannon Deminick 12b1168de9 Fixes merge issues 2013-04-12 02:59:03 +06:00
Shannon Deminick 01290f8174 Merge with 4.11.7 2013-04-12 02:14:59 +06:00
Shannon Deminick 26a7bf8187 Fixes: #U4-2087 2013-04-12 02:11:01 +06:00
Sebastiaan Janssen 439445aae4 Merge with 6.0.4 2013-04-11 16:39:28 -02:00
Sebastiaan Janssen ba1d0fa193 Improve code for previous fix so we don't need the try/catch any more. 2013-04-11 16:36:26 -02:00
Shannon Deminick 0d79eaf3c5 Merge with 6.0.4 2013-04-12 00:32:19 +06:00
Shannon Deminick e747438a4b Merge 2013-04-12 00:31:28 +06:00
Shannon Deminick 14f71c9059 Fixes #U4-2058 2013-04-12 00:30:45 +06:00
Sebastiaan Janssen 97355bde6f Fixes U4-2091 Inserting image in RTE with mediatype "File" causes YSOD 2013-04-11 13:15:08 -02:00
Sebastiaan Janssen ed35f234de Fixes U4-2100 Media Doesn't Overwrite in 6.0.3 2013-04-11 12:27:11 -02:00
Stephan 5154bcd2e9 Web.Routing - template setter on PublishedContentRequest 2013-04-11 11:55:32 -02:00
Stephan e3af8b4e5f Web.Routing - public, though readonly, UmbracoContext.PublishedContentRequest 2013-04-11 11:44:15 -02:00
Morten Christensen 3e8c1a426c Merge 2013-04-12 03:50:36 -02:00
Morten Christensen d7081dbc6b Implementing new RelationService.
Making EntityService public as it will be used within the RelationService.
2013-04-11 17:12:14 -02:00
Sebastiaan Janssen 1d89702c2c Merge with 6.0.4 2013-04-11 10:21:37 -02:00
Sebastiaan Janssen c874fa6507 Fixes U4-2097 Package import causes template tree to break 2013-04-11 10:20:17 -02:00
Sebastiaan Janssen df26090d63 Fix merge issue 2013-04-11 07:23:13 -02:00
Sebastiaan Janssen 3050258fdc Merge with 6.0.4 2013-04-11 07:20:00 -02:00
Sebastiaan Janssen ba387598ed Merge with 4.11.7 2013-04-11 07:17:23 -02:00
Sebastiaan Janssen 3ff1b01e46 Add DotSettings file for custom code inspections. In this case: Replace
!someBool with an explicit false check (someBool == false) for readability.
2013-04-11 07:15:06 -02:00
Shannon Deminick 36e803713c Fixed up some code in UmbracoEnsuredPage and moveOrCopy 2013-04-11 02:15:48 +06:00
Shannon Deminick a3e7f644de merges changes for UmbracoHelper from 6.0.x to deal with null objects when using Content method (dynamic) 2013-04-10 22:51:19 +06:00
Stephan 84e990c239 Core.Configuration - fix setting that accidentally became public 2013-04-10 14:19:26 -02:00
Stephan 4c3b9c6f35 Close 6.1.0-public branch, merged. 2013-04-10 14:05:11 -02:00
Stephan 911a1cf80b merge 6.1.0-public into 6.1.0 2013-04-10 14:03:47 -02:00
Stephan ef493ef9af fix merge + public 2013-04-10 14:02:16 -02:00
Stephan 76a12f3f33 merge with 6.1.0 2013-04-10 13:56:39 -02:00
Stephan 344a4cc485 merge with 6.1.0 2013-04-10 12:51:49 -02:00
Stephan 5e1115218c Web.Standalone - import initial version
* * *
FOLD 003
2013-04-10 12:50:08 -02:00
Stephan 71a28cbeaa Core.Strings - bugfix error in DefaultShortStringHelper 2013-05-04 14:53:33 -02:00
Stephan 4aa750694a Core - add methods to XmlHelper 2013-05-03 13:56:34 -02:00
Stephan 5d89ab1e2a Web.UI - fix nasty preview bug introduced in 9a92dea49ede 2013-05-03 20:09:15 -02:00
Stephan 262aa3b8fe Web.Routing, Web.Mvc - fix issues with content with no template 2013-05-03 20:09:14 -02:00
Stephan 106d733d08 Web.PublishedCache - support XPathExpression 2013-04-10 12:49:45 -02:00
Sebastiaan Janssen a010448ad1 Merge with 6.0.4 2013-04-10 11:55:36 -02:00
Sebastiaan Janssen 1586f1679a Merge with 4.11.7 2013-04-10 11:54:24 -02:00
Sebastiaan Janssen 809badd1cf Update version to 4.11.7 2013-04-10 08:54:31 -02:00
Sebastiaan Janssen da92ece774 Update version to 4.11.7 2013-04-10 07:57:56 -02:00
Sebastiaan Janssen a531afb819 Don't need IronPython license any more either. 2013-04-10 07:46:05 -02:00
Sebastiaan Janssen 111df761aa Merge with 6.0.4 2013-04-10 07:43:10 -02:00
Sebastiaan Janssen 1d6009e3c7 Merge with 4.11.7 2013-04-10 07:42:21 -02:00
Sebastiaan Janssen 8dfeb1e616 Cleanup solution and folders, removes Linq2Umbraco and IronPython engine from
the project as we don't ship with them any more. Updated readme and docs.
2013-04-10 07:30:14 -02:00
Shannon Deminick 5f9c7bb49c changed DefaultServerMessenger to expose login 2013-04-10 09:41:53 +06:00
Shannon Deminick 0c3b7c27a7 fix merge issues 2013-04-10 04:24:42 +06:00
Shannon Deminick f2293e01fa Merge with 6.0.4 2013-04-10 04:15:26 +06:00
Shannon Deminick 1b086e2267 fixes merge issue 2013-04-10 04:04:33 +06:00
Shannon Deminick 1f86d8c562 fixes merge issues 2013-04-10 03:56:10 +06:00
Shannon Deminick 25b9262cf1 Merge with 4.11.7 2013-04-10 03:51:53 +06:00
Shannon Deminick 1012a4814d updates #U4-2070 for tiny mce plugins 2013-04-10 03:22:11 +06:00
Shannon Deminick bae41cde14 updates #U4-2070 for skin module files in live editing 2013-04-10 03:16:26 +06:00
Shannon Deminick b3260f05c0 updates #U4-2070 for templateskinning.aspx 2013-04-10 03:05:57 +06:00
Shannon Deminick e33a79ac65 updates #U4-2070 for insertMasterpageContent.aspx 2013-04-10 03:02:10 +06:00
Shannon Deminick c4dbabf654 updates #U4-2070 for translation/xml.aspx and translation/preview.aspx 2013-04-10 02:59:47 +06:00
Shannon Deminick 423643d66c updates #U4-2070 for tinymce3/insertmacro.aspx 2013-04-10 02:46:11 +06:00
Shannon Deminick 4ccb655f73 updates #U4-2070 for members/search.aspx 2013-04-10 02:43:03 +06:00
Shannon Deminick c8330d60f9 updates #U4-2070 for sendToTranslation.aspx 2013-04-10 02:41:22 +06:00
Shannon Deminick a9aa3a04b5 updates #U4-2070 for search.aspx 2013-04-10 02:39:32 +06:00
Shannon Deminick 0bffa8e3f4 updates #U4-2070 for preview.aspx 2013-04-10 02:35:31 +06:00
Shannon Deminick 436322f58c updates #U4-2070 for directoryBrowser.aspx 2013-04-10 02:34:44 +06:00
Shannon Deminick e90c46dd78 updates #U4-2070 for canvas.aspx 2013-04-10 02:33:08 +06:00
Shannon Deminick deda2534f8 updates #U4-2070 for SendPublish.aspx 2013-04-10 02:30:53 +06:00
Shannon Deminick 8112c13857 updates #U4-2070 for insertMacro.aspx 2013-04-10 02:28:50 +06:00
Shannon Deminick 57792de185 updates #U4-2070 for imageViewer.aspx 2013-04-10 02:21:59 +06:00
Shannon Deminick e1f93029a5 updates #U4-2070 for assigndomain.aspx 2013-04-10 02:19:29 +06:00
Shannon Deminick f64e0c7eb7 updates #U4-2070 for autodoc.aspx 2013-04-10 02:17:02 +06:00
Shannon Deminick bf024e9011 updates #U4-2070 for assemblyBrowser.aspx 2013-04-10 02:14:13 +06:00
Shannon Deminick 036b888d30 updates #U4-2070 for ShowUmbracoTags.aspx 2013-04-10 02:08:56 +06:00
Shannon Deminick 1838a8dac5 updates #U4-2070 for NewRelationType.aspx 2013-04-10 02:07:16 +06:00
Shannon Deminick 205bf5fe4e updates #U4-2070 for EditRelationType.aspx 2013-04-10 02:05:52 +06:00
Shannon Deminick a50e192ab7 updates #U4-2070 for sort.aspx 2013-04-10 02:03:04 +06:00
Shannon Deminick 9684255e6e ensures validation is correct in editContent, cleans up some code. 2013-04-10 01:58:22 +06:00
Shannon Deminick 72790d74f5 Fixes: #U4-2072 and cleans up some code. 2013-04-10 01:47:17 +06:00
Shannon Deminick bb70bee6ae Fixes: #U4-2071 and cleans up some code. 2013-04-10 01:42:15 +06:00
Shannon Deminick 0430e7966c Fixes: #U4-2074 and cleans up a bit of code 2013-04-10 01:24:06 +06:00
Shannon Deminick 2e9a52b1f8 Fixes: #U4-2075 2013-04-10 00:56:43 +06:00
Shannon Deminick 506d32f353 Merge 2013-04-09 22:11:54 +06:00
Shannon Deminick 16746c8548 Updates authorized web services/http handlers to use WebSecurity and implements the new base class
properties available in 6.1. Updates WebSecurity with a few more helpful methods.
2013-04-09 22:11:12 +06:00
Sebastiaan Janssen fb994bdc11 Merge with 6.0.4 2013-04-09 11:45:04 -02:00
Sebastiaan Janssen db4ed70d70 Merge with 4.11.7 2013-04-09 11:37:37 -02:00
Sebastiaan Janssen e6ccd8a5b5 Fix for U4-2081 tinymce Image picker does not work in 6.03 2013-04-09 11:33:35 -02:00
Sebastiaan Janssen a9781d79e2 Merge with 4.11.7 2013-04-09 10:22:11 -02:00
Sebastiaan Janssen 7ae8b28466 Fix the medium trust error in the about box 2013-04-09 10:20:34 -02:00
Sebastiaan Janssen 29a4cb8b71 Fixes merge issues 2013-04-09 08:34:03 -02:00
Sebastiaan Janssen abee79ca69 Fixes merge issues 2013-04-09 08:08:22 -02:00
Sebastiaan Janssen d8ccf20840 Merge with 6.0.4 2013-04-09 08:04:55 -02:00
Sebastiaan Janssen 9e10694ebb Fixes merge issue, no idea why it's expecting an ApiController.. weird! 2013-04-09 08:03:17 -02:00
Sebastiaan Janssen ffb39de003 Merge with 4.11.7 2013-04-09 07:55:54 -02:00
Sebastiaan Janssen 527375b238 Fixes U4-2052 Creating a new document type has a bin icon by default
Also deals better with pre-existing selected id's before switching the behaviour
2013-04-09 07:49:22 -02:00
Sebastiaan Janssen 1c5cd4e245 Merge with 6.0.4 2013-04-09 07:19:47 -02:00
Sebastiaan Janssen a4ed0e266c Merge with 4.11.7 2013-04-09 07:11:54 -02:00
Sebastiaan Janssen 1929f60ea8 Update the webservices version 2013-04-09 07:10:24 -02:00
Sebastiaan Janssen b9cc2efc8c Add authentication to creating templates in webservices 2013-04-09 07:07:13 -02:00
Shannon Deminick 63cae70ec3 Fixes merge issue 2013-04-09 08:05:31 +06:00
Shannon Deminick dd990b5df4 Merge with 6.0.4 2013-04-09 08:00:10 +06:00
Shannon Deminick eadb1bb194 Fixes merge issues 2013-04-09 07:54:32 +06:00
Shannon Deminick 30be665a40 Merge with 4.11.7 2013-04-09 07:41:55 +06:00
Shannon Deminick bad284515c Fixes: #U4-2076 2013-04-09 07:32:13 +06:00
Shannon Deminick 5b660d95f1 Fixes: #U4-2077 2013-04-09 07:26:21 +06:00
Shannon Deminick 106ac44e64 Fixes: #U4-2073 2013-04-09 07:23:33 +06:00
Shannon Deminick 64bb7e1db0 Fixes up an app check 2013-04-09 07:14:58 +06:00
Shannon Deminick 25b9ca3b0e Works on #U4-2078 - adds new base classes for HttpHandlers just like for web services. 2013-04-09 07:01:43 +06:00
Shannon Deminick b928170103 Works on #U4-2078 2013-04-09 06:40:02 +06:00
Shannon Deminick e25ee246fb Works on #U4-2078 2013-04-09 06:31:26 +06:00
Shannon Deminick 8e8ec41dae Works on #U4-2078 2013-04-09 06:25:47 +06:00
Shannon Deminick fb34c4716a Works on #U4-2078 2013-04-09 06:18:15 +06:00
Shannon Deminick 29bf61b1f2 Starts on #U4-2078, mostly just some initial code cleanup 2013-04-09 06:07:25 +06:00
Shannon Deminick 9803309e34 imports patch from 846d845a5a87 since it belongs in the main dev branch. 2013-04-09 05:04:57 +06:00
Shannon Deminick 3a539629dc imports patch from ed6939e5927f since that fix belongs in the main dev branch 2013-04-09 05:04:21 +06:00
Shannon Deminick 74b970d586 Fixes: #U4-529 - Created 2 base classes for web services - UmbracoWebService and UmbracoAuthorizedWebService for use in
creating asmx classes. This makes it easier to authenticate/authorize per app and also exposes Umbraco standard
objects like UmbracoContext, ApplicationCOntext, etc...
2013-04-09 05:00:22 +06:00
Shannon Deminick 518898b04b Merge 2013-04-09 01:09:27 +06:00
Sebastiaan Janssen d2d1843e03 Fix default branch 2013-04-08 07:03:57 -02:00
Sebastiaan Janssen a773e0a018 Merge with 4.11.7 2013-04-08 06:56:43 -02:00
Sebastiaan Janssen 99fe89addc Fix U4-1864 the same way as in 6.0.x 2013-04-08 06:55:48 -02:00
Sebastiaan Janssen 668d4f9f91 Fixes U4-1864 Publishing document type with Upload field and related
umbracoWidth, umbracoHeight, etc fields added
2013-04-08 05:59:02 -02:00
Morten Christensen efbc461da9 Code cleanup - removing all internal code related to Macros, which was created for v6 but left out for backwards compatibility. 2013-04-07 17:47:10 -02:00
Morten Christensen 97d41f8998 Merge 2013-04-07 16:35:20 -02:00
Morten Christensen 8ef88dc955 Making the topological sorter public 2013-04-07 16:35:02 -02:00
Shannon Deminick 90e73cb89f cleans up some code in codeEditorSave 2013-04-06 01:59:28 +06:00
Shannon Deminick dcd6477030 Removes un-needed ShowUmbracoTags files from legacy files. 2013-04-06 01:54:41 +06:00
Shannon Deminick e50bac7c9f Merge with 6.0.4 2013-04-06 01:46:13 +06:00
Shannon Deminick 13b73231de Merge with 4.11.7 2013-04-06 01:45:45 +06:00
Shannon Deminick 50a70c28df Merge 2013-04-06 01:45:30 +06:00
Shannon Deminick 7d5589118f Merge 2013-04-06 01:43:41 +06:00
Shannon Deminick 01bf0bcfa5 Fixes merge issues 2013-04-06 01:41:06 +06:00
Shannon Deminick 7dcfcaf339 Merge with 6.0.4 2013-04-06 01:23:29 +06:00
Shannon Deminick c39b698d4c Merge with 4.11.7 2013-04-06 00:31:10 +06:00
Shannon Deminick 103efbdc27 removes config check on p.aspx since we need it to show the feeds when installer is done. 2013-04-06 00:30:37 +06:00
Shannon Deminick 3d51dd767b Fixed merge issues. 2013-04-06 00:27:44 +06:00
Shannon Deminick e22988e435 Merged with 4.11.7 2013-04-06 00:21:06 +06:00
Shannon Deminick 9736aaafaa Fixes authorize issue with insertchar.aspx 2013-04-06 00:09:43 +06:00
Shannon Deminick bf3fa20a53 Cleaned up the code fro rsd and wlwmanifest and ensures wlwmanifest actually returns the results in xml format. 2013-04-06 00:04:23 +06:00
Shannon Deminick f936f8b0dd updates install utility to throw exception if the app is configured already. 2013-04-05 23:40:02 +06:00
Shannon Deminick 1bd20c9b06 Fixes: #U4-2059 and removes un-needed ping.aspx files, cleans up some code 2013-04-05 23:28:43 +06:00
Shannon Deminick 099b713947 Fixed ValidateProxyUrl to check for invalid Urls. 2013-04-05 22:29:45 +06:00
Shannon Deminick 165d9c7dff Fixed nonodes to now show version information and updated it so that it redirects to root if there
is actually content so the page is actually not accessible unless you actually have no nodes.
2013-04-05 21:58:13 +06:00
Shannon Deminick 6badfae849 Merge 2013-04-05 20:44:44 +06:00
Shannon Deminick 9d0dbda3bd Fixed merge issue 2013-04-05 20:44:16 +06:00
Shannon Deminick df986c8254 Merge with 6.0.4 2013-04-05 20:43:24 +06:00
Stephan cd823db766 merge with 6.1.0 2013-04-05 10:28:50 -02:00
Stephan 09400be6e0 U4-2030 - failed to update UmbracoContext on some devt webservers 2013-04-05 10:28:19 -02:00
Stephan 7934ba7ec4 U4-2030 - failed to update UmbracoContext on some devt webservers 2013-04-05 10:28:19 -02:00
Stephan 2f9de56968 U4-2030 - failed to update UmbracoContext on some devt webservers 2013-04-05 10:28:19 -02:00
Stephan 49a61c5820 merge with 6.1.0 2013-04-05 06:22:35 -02:00
Shannon Deminick 7edbc34e6c Merge with 4.11.7 2013-04-05 06:46:13 +06:00
Shannon Deminick 60b6608289 patch for fix #U4-2027 2013-04-05 06:42:52 +06:00
Shannon Deminick 2dfdc1050b Updates solution to use latest examine 1.5.1 from official Nuget source. 2013-04-05 06:19:52 +06:00
Shannon Deminick 9e239f135d Fixes: #U4-2027, changes DirectoryBrowser over to use correct webforms file structure, cleans up (a teeny bit)
how this page is structured, at least its not all inline c# code with inline styles.
2013-04-05 06:06:10 +06:00
Sebastiaan Janssen 480b84a223 Added tag release-6.1.0-beta for changeset 87cf618a39e3 2013-04-04 16:59:27 -02:00
Shannon Deminick 635ebcb9be removed error check as this was causing errors 2013-04-05 00:40:03 +06:00
Shannon Deminick 33f7a8477d updated to latest version of Umbraco.Azure via nuget 2013-04-05 00:09:14 +06:00
Shannon Deminick 646194e013 Merge with 6.0.4 2013-04-04 23:36:57 +06:00
Shannon Deminick 425fcf36eb un-reverted changes to UserType cache refresher 2013-04-04 23:36:31 +06:00
Shannon Deminick 31fd05ebca Merge 2013-04-04 23:30:36 +06:00
Shannon Deminick 495b4ed9e0 Refactors the WebSecurity class to not be static and be part of the UmbracoContext. Makes a few methods internal on it so that
it's not relying on the legacy User class. Cleans up the new BasePage and EnsuredUmbracoPage
2013-04-04 23:30:17 +06:00
Stephan e1c810c033 merge with 6.1.0 2013-04-04 14:27:11 -02:00
Shannon Deminick 87c904cc96 Fixes: #U4-2044, #U4-2048 2013-04-04 21:57:41 +06:00
Morten Christensen 792599a42f Minor correct to the doc.SaveAndPublish method. 2013-04-04 12:20:50 -02:00
Morten Christensen 03c65c8eec Updating build version to 6.1.0 beta
Updating nuspec with new references.
2013-04-04 12:13:59 -02:00
Morten Christensen 14aeb55c14 Removing unused ServiceStack.Text reference/nuget package.
Ignore Macro tests for the model and repo as its not used and still internal. Might be an idea to remove it altogether.
2013-04-04 12:02:27 -02:00
Sebastiaan Janssen 7ddbc83731 Merge gone wrong, my bad! 2013-04-04 10:20:13 -02:00
Sebastiaan Janssen 17533c57d3 Merge with 6.0.4 2013-04-04 10:04:29 -02:00
Sebastiaan Janssen 433668e202 Merge 2013-04-04 09:46:34 -02:00
Sebastiaan Janssen 9edcc0c903 Revert UserType caching changes until Shannon can commit UserTypeCacheRefresher 2013-04-04 09:46:20 -02:00
Morten Christensen 7610ee5f8b Adding event proxies to the ContentService for publishing events for easier discoverability.
Fixes U4-2046
2013-04-04 07:16:33 -02:00
Morten Christensen eab9be4ef7 Fixing issue with reimporting document types and the structure of allowed doc types.
Removing old code from Installer.
2013-04-04 06:02:08 -02:00
Stephan 7a1e3b96b8 Web.PublishedCache - IPublishedCaches doesn't return !contextual caches anymore 2013-04-04 05:10:53 -02:00
Shannon Deminick f747f69c62 Merge with 6.0.4 2013-04-04 05:46:25 +06:00
Shannon Deminick e48a030aab Merge 2013-04-04 05:46:01 +06:00
Shannon Deminick e07985439a Fixed up some unit tests 2013-04-04 05:05:52 +06:00
Shannon Deminick 620f21d7d7 Converted over Application.cs to use ApplicationContext.Current 2013-04-04 04:42:36 +06:00
Shannon Deminick 4a13047d5d Converted ApplicationTree to use ApplicationContext.Current.ApplicationCache 2013-04-04 04:34:40 +06:00
Shannon Deminick 446a480f21 converted ui to use ApplicationContext.Current.ApplicationCache 2013-04-04 04:19:05 +06:00
Shannon Deminick b56f8c8fb3 Fixes: #U4-2043 - User Type cache is not invalidated in LB scenarios 2013-04-04 03:43:05 +06:00
Morten Christensen e207b1f1e1 Adds new test case for single doc type imports.
Corrects issue with installing/importing single or multiple doc types, which is not part of the usual complete package xml.
2013-04-03 18:26:54 -02:00
Shannon Deminick 296c24f829 Fixes: #U4-2042 - ensures users cannot continue to user the back office after they've been disabled and
ensures that the user context cache is cleared when users are saved which will work in LB environments.
Changes more HttpRuntime.Cache dependencies to ApplicationContext.Current.ApplicationCache.
2013-04-04 02:11:31 +06:00
Shannon Deminick c5e88ef69f Fixes: #U4-2041, #U4-2040 - user cache is not invalidated when permissions change across LB environments, also streamlined how caching is handled in
these classes which now use the standardized events way to do things. Fixes a performance issue and ensures that the cache is not invalidated for 'micro'
operations during permission changes.
2013-04-04 00:30:28 +06:00
Shannon Deminick 2a7e493c74 Changes all instances of the legacy Cache class to be using ApplicationContext.Current.ApplicationCache.
Fixes: #U4-2039 - ensures macro xslt cache is invalidated in LB scenarios.
2013-04-03 23:39:51 +06:00
Shannon Deminick e14d3fd379 changes all instances accessing cache by key "contentItem" to use CacheKeys.ContentItemCache and replaces
all of it's cache usages with the ApplicationContext.Current.ApplicationCache. Obsoletes a couple of methods
that are not used.
2013-04-03 22:34:40 +06:00
Shannon Deminick fd3540f92d Removes unused private method 2013-04-03 20:40:06 +06:00
Sebastiaan Janssen fa43cfd58f Silly designer file, of course you need to change to. kthxbi 2013-04-03 11:43:28 -02:00
Sebastiaan Janssen 711afe8bb7 Breaking changes reverted 2013-04-03 11:41:53 -02:00
Stephan 4abb9fff3e merge with 6.1.0 2013-04-03 11:19:41 -02:00
Stephan 23525300bb Web.PublishedCache - add XPathNavigator support 2013-04-03 11:19:10 -02:00
Stephan 2490908401 merge with 6.1.0 2013-04-03 08:41:53 -02:00
Stephan b93ea7c69b U4-2033 - fix the tests, now we're returning lower case 2013-04-03 08:40:09 -02:00
Morten Christensen 640be73a66 A few refactoring bits for the FolderBrowserService. 2013-04-03 07:03:57 -02:00
Morten Christensen 32ae88fc81 Merge 2013-04-03 05:25:42 -02:00
Morten Christensen a4c9c3bfd9 Updating EntityService and repository to add content and media specific properties to the UmbracoEntity for performance enhancements.
Adding sample implementation in the BaseMediaTree but keeping it commented out as it won't work with the legacy events.
And a bit of code cleanup
2013-04-03 05:25:26 -02:00
Shannon Deminick 182107286c Fixes merge issues 2013-04-02 23:08:43 +06:00
Shannon Deminick a7e939e71f Merge with 6.0.4 2013-04-02 22:39:39 +06:00
Shannon Deminick b9d7f0c5a5 Fixes merge issues, merge ensures that js error is fixed and that thread-safe caching is in place
in the ContentType.cs class.
2013-04-02 22:06:15 +06:00
Shannon Deminick 3d76614a78 Merge with 4.11.7 2013-04-02 21:31:21 +06:00
Stephan 4217949719 merge with 6.1.0 2013-04-02 11:35:06 -02:00
Stephan 83d05bd01c U4-2033 - url segment is not lower case 2013-04-02 11:34:40 -02:00
Stephan fc68ba69e2 merge with 6.1.0 2013-04-02 09:24:36 -02:00
Stephan 9fb10ea004 presentation.UmbracoContext - get property values from appropriate sources 2013-04-02 09:23:53 -02:00
Stephan c916df0d13 Core.Strings - apply 2551076f571a to 6.1.0 2013-04-02 09:19:49 -02:00
Sebastiaan Janssen de0e6f3179 Merge 2013-04-02 08:08:31 -02:00
Sebastiaan Janssen 39edb9b7e2 Fixes U4-2032 Preview for an RTE field shows published content instead of actual
preview
2013-04-02 08:07:18 -02:00
Stephan 28892a7bb2 merge with 6.1.0 2013-04-01 16:35:52 -02:00
Stephan 99a63a3cdb fix build 2013-04-01 16:35:03 -02:00
Shannon Deminick a638488eb7 Fixes unit tests which require the ApplicationContext.Current singleton to be setup 2013-04-01 23:30:19 +06:00
Shannon Deminick a2a539f7db Merge 2013-04-01 23:12:47 +06:00
Shannon Deminick 6768bb4793 Fixes: #U4-1874 - merges in thread-safe fixes for static object caching from 6.1 and cleans up
a bunch of the code in ContentType.cs. Back ports fixes for Languages.cs from 6.1 and cleans up code.
2013-04-01 23:12:17 +06:00
Sebastiaan Janssen 19c2841576 Fixes U4-535 Stylesheet content gets deleted if you change case 2013-04-01 14:27:20 -02:00
Sebastiaan Janssen 71aa248a4e Fixes U4-535 Stylesheet content gets deleted if you change case 2013-04-01 14:27:20 -02:00
Sebastiaan Janssen eeaef5ac5c Merge 2013-04-01 11:51:48 -02:00
Sebastiaan Janssen bea50f4562 Fixes: U4-662 Most icon for document type can't be shown in 4.8.1. 2013-04-01 11:50:27 -02:00
Sebastiaan Janssen ff337457f8 Fixes: U4-662 Most icon for document type can't be shown in 4.8.1. 2013-04-01 11:31:03 -02:00
Stephan 65cb6fbaff merge with 6.1.0 2013-03-31 19:19:24 -02:00
Stephan 4b49f9779f merge with 6.1.0 2013-03-31 19:05:24 -02:00
Stephan c5b6bb52e0 Web.PublishedCache - refactor how caches manage preview 2013-03-31 18:47:25 -02:00
Stephan efee4d0c0c Web.PublishedCache - IPublishedCaches creates contextual caches 2013-04-04 05:09:26 -02:00
Stephan b89951dd11 Web.PublishedCache - refactor contextual caches & inner caches management 2013-03-31 18:44:29 -02:00
Stephan 70ad3edc1f Web.UmbracoContext - refactor constructor to use IPublishedCaches 2013-04-03 08:40:35 -02:00
Stephan 8d33488923 Web.PublishedCache - make parts of XmlPublishedCache virtual 2013-03-31 18:40:55 -02:00
Stephan 32a6a49077 Macros - bugfix & cleanup macros 2013-03-31 18:47:37 -02:00
Stephan ad52c0f033 Web.Cache - add notes to cache refreshers re. dependencies 2013-03-31 18:40:55 -02:00
Stephan 9982a09826 Web.PublishedCache - merge resolvers so caches can be related 2013-03-31 18:40:55 -02:00
Stephan 83308c3d5f Core.Xml - support XPathExpression 2013-04-10 12:47:11 -02:00
Stephan 495b661263 Core.Xml - refactor 2013-04-10 12:47:09 -02:00
Stephan f2d7e3549d XmlPublishedCache - fix casting exception messages 2013-04-04 15:24:29 -02:00
Stephan 4201d678fa XmlPublishedCache - GetXml() can be private, no need for internal 2013-04-04 15:24:29 -02:00
Stephan ff6ee360da ItemRenderer - cleanup access to Xml cache 2013-04-04 15:24:29 -02:00
Stephan 1f999d7e22 Macros - bugfix & refactor access to Xml cache 2013-04-04 05:02:55 -02:00
Stephan be24075850 presentation.library - get Xml navigator via Web.UmbracoContext 2013-04-04 05:03:01 -02:00
Stephan 6d18d32356 Web.Routing - bugfix PublishedContentRequestEngine
no macro would run when rendering a 404 document
2013-03-31 18:40:54 -02:00
Stephan 75f0f1f4ee Web.UmbracoContext - allow for InPreviewMode override in tests 2013-03-31 18:40:54 -02:00
Stephan 425a9f6a34 Core.Xml - import framework xml tests 2013-03-31 18:40:54 -02:00
Stephan 1d5f7ae822 Core.Strings - handle config. errors in DefaultShortStringHelper 2013-03-31 18:40:54 -02:00
Morten Christensen 49b5ddf850 Refactor of fix for U4-2014 2013-03-31 18:17:01 -02:00
Morten Christensen 3f7a93e0c9 Adding test fixture for the EntityService.
Refactoring sql query used in the EntityRepository.
Correcting a few issues with the UmbracoObjectTypes extensions.
2013-03-30 09:52:37 -01:00
Shannon Deminick b449b8762b Merge 2013-03-29 23:53:08 +06:00
Shannon Deminick 13e555f50b Fixed merge issue based on overlap with class + namespace name. 2013-03-29 23:52:40 +06:00
Shannon Deminick 48c809a797 Merge with 4.11.7 2013-03-29 23:22:18 +06:00
Shannon Deminick 55c7f72d8e Converts create.aspx to have the correct webforms file/class structure, fixed logging for userTask,
fixed issue with last regex fix for xss
2013-03-29 23:14:42 +06:00
Sebastiaan Janssen 8612113fc0 Merge 2013-03-29 15:02:43 -01:00
Sebastiaan Janssen 69b0c7cf09 Fixes: U4-2024 Umbraco 6.0.3 : Error while importing Document Type 2013-03-29 15:01:04 -01:00
Shannon Deminick 72ad9f51c1 Merge with 6.0.4 2013-03-29 21:41:08 +06:00
Shannon Deminick 37a97a2e7c Merge with 4.11.7 2013-03-29 21:34:56 +06:00
Shannon Deminick 5f4eaef4a2 Fixes: #U4-2022 2013-03-29 21:31:27 +06:00
Sebastiaan Janssen 44f5c3a34f Fixes U4-2019 Create new Document Type dialog displays poorly in Chrome 2013-03-29 09:13:44 -01:00
Sebastiaan Janssen a33ae696a2 Fixes U4-2014 Can't install XSLTSearch 3.0.4 with Umbraco 6.0.3
Updated the topological sorter to only add items that exist in the indexes
2013-03-29 08:46:09 -01:00
Sebastiaan Janssen 2705efb809 Updated file for WebPI builds 2013-03-29 08:34:34 -01:00
Shannon Deminick 20fb27f7e1 Fixed server registration ctor and factory to ensure IsActive is correct. 2013-03-28 11:27:13 +06:00
Shannon Deminick c8e20cf64b Fixes: #U4-2012, #U4-2005 2013-03-28 09:07:36 +06:00
Sebastiaan Janssen 648d631151 Opening new branch 2013-03-27 14:48:13 -01:00
Sebastiaan Janssen 27c0c4d64e Opening new branch 2013-03-27 14:47:35 -01:00
Sebastiaan Janssen 52cf559536 Closing 4.11.6 branch 2013-03-27 12:00:18 -01:00
Sebastiaan Janssen a89a122b09 Merge with 6.0.3 2013-03-27 11:56:44 -01:00
Sebastiaan Janssen c9b0362c62 Closed 6.0.3 branch 2013-03-27 11:54:12 -01:00
Sebastiaan Janssen 11e5bdf556 Added tag release-6.0.3 for changeset aed55cba2900 2013-03-27 11:14:18 -01:00
Sebastiaan Janssen 3d0be3836c Added tag release-4.11.6 for changeset 14338b0ab173 2013-03-27 11:13:56 -01:00
Sebastiaan Janssen 2bc33e0115 Merge 2013-03-27 08:58:34 -01:00
Sebastiaan Janssen 8576d9c67e Bump version to 4.11.6 2013-03-27 08:56:30 -01:00
Shannon Deminick 3accecd504 Merge with 6.0.3 2013-03-27 03:09:57 +06:00
Shannon Deminick a0651f4383 Merge with 4.11.6 2013-03-27 03:09:36 +06:00
Shannon Deminick 9452d5fd09 adds patch for #U4-1754 and updates 2013-03-27 03:08:37 +06:00
Shannon Deminick 1f40d726de adds patch for #U4-1754 2013-03-27 02:59:42 +06:00
Shannon Deminick 2699611ba3 adds patch for #U4-1754 2013-03-27 02:58:59 +06:00
Shannon Deminick d9121b4684 fixes merge 2013-03-26 22:12:35 +06:00
Shannon Deminick 132ec1702c Merge with 6.0.3 2013-03-26 22:09:50 +06:00
Shannon Deminick 43795f0007 Merge with 4.11.6 2013-03-26 22:03:23 +06:00
Shannon Deminick b1fa06bfe8 Removes unused code. 2013-03-26 22:02:49 +06:00
Shannon Deminick 4dc22b6ce4 Applies patch for #U4-497 for getting exceptions for xslt 2013-03-26 22:02:08 +06:00
Shannon Deminick a4e3127704 Ensures that xslt can throw exceptions too with the new settings - #U4-497 2013-03-26 21:40:50 +06:00
Sebastiaan Janssen d4ab60f8af Merge with 4.11.6 2013-03-26 13:29:45 -01:00
Sebastiaan Janssen 883277125a Can't use parameters here as the query gets butchered. 2013-03-26 13:27:46 -01:00
Sebastiaan Janssen 2678e23c7d Update Resolves_Assigned_Mappers to make sure the unit tests run 2013-03-26 12:26:08 -01:00
Stephan 6148d63b02 merge with 6.1.0 2013-03-26 11:37:52 -01:00
Sebastiaan Janssen 8edfc0ffdd Merge with 4.11.6 2013-03-26 09:53:59 -01:00
Sebastiaan Janssen ff961abaab Actual fix for U4-1987 Error when attempting to save document type 2013-03-26 09:50:48 -01:00
Sebastiaan Janssen b2414c1ab8 Fixes U4-1987 Error when attempting to save document type 2013-03-26 09:33:08 -01:00
Sebastiaan Janssen 9dde86d591 Fixes U4-1999 When copying content with subcontent, the new subcontent data is a
direct reference to the old.
2013-03-26 08:39:50 -01:00
Sebastiaan Janssen b4ce4fbdef Logging warning when package installer can't create a property due to a missing
datatype for that property
2013-03-26 07:55:43 -01:00
Sebastiaan Janssen 4285484c1b Update code comment 2013-03-26 07:19:39 -01:00
Sebastiaan Janssen 2fd299ebfc Change TinyMCE to use the mediaservice to get the original image + some updates
to the new mediaservice method.
2013-03-26 07:15:22 -01:00
Morten Christensen f545f293b1 Adding GetMediaByUrl method to MediaService cause Sebastiaan needs it for less hacky code. 2013-03-26 05:46:20 -01:00
Morten Christensen 4dc94d1e0b Merge 2013-03-26 05:00:04 -01:00
Morten Christensen b058b1e345 Removing LEFT JOIN from query as its already part of the builder 2013-03-26 04:59:56 -01:00
Morten Christensen dfa1e73ddf Continueing implementation of the EntityRepository and Service. 2013-03-25 18:54:12 -01:00
Sebastiaan Janssen b745c0ae90 If the image is not resized, there's probably not going to be an underscore,
just query for the whole image source then.
2013-03-25 18:18:14 -01:00
Sebastiaan Janssen f2efff5411 Temporary fix until we can fix this properly for U4-1812 - Changing Width or
Height in Insert Picture popup results in NaN in other dimension
2013-03-25 18:09:31 -01:00
Shannon Deminick 390f56a64d Merge with 6.0.3 2013-03-25 20:54:49 +06:00
Shannon Deminick 04c623f19c Merge 2013-03-25 20:54:31 +06:00
Shannon Deminick 633d88c8c4 Changed DefaultServerMessenger to have an overridable method to send the request, added some internals visible to. 2013-03-25 20:54:21 +06:00
Sebastiaan Janssen 9ef5890636 Changing sortorder on tabs now also re-orders the tabs in the contenttype editor 2013-03-25 13:33:32 -01:00
Sebastiaan Janssen bc9fd04a36 Related to U4-1847 - Tabs weren't imported with the correct sort order and when
a datatype can't be found we should silently fail and not create the property
that wants that datatype (that's how v4 did it).
2013-03-25 12:49:43 -01:00
Sebastiaan Janssen 185c5d78f1 Query changed due to fix fe02cef72d87 that uses 1/0 instead of True/False 2013-03-25 11:27:54 -01:00
Brian Powell 3ea9963166 Fixes U4-1904 / U4-1905 2013-03-25 10:39:35 -01:00
Sebastiaan Janssen ab40822a98 Fix merge issue by re-applying Stephen Roberts' patch 2013-03-25 10:30:55 -01:00
Sebastiaan Janssen dffce76e29 Merge with 4.11.6 2013-03-25 10:24:36 -01:00
Stephan 3ed4da19c2 merge with 6.1.0 2013-03-25 09:46:25 -01:00
Sebastiaan Janssen d1e02f506c PropertyGroupId can be null 2013-03-25 07:51:44 -01:00
Morten Christensen 40a9da5ee0 Merge with 6.0.3 2013-03-23 07:24:27 -01:00
Morten Christensen 5e18d13178 Fixing parsing issue with saving boolean values in the Integer column for Members.
Related to issue U4-1989
2013-03-23 07:22:43 -01:00
Shannon Deminick 3b982b80f5 Fixes test issues, needed to disable application cache for these tests since the cache invalidation happens at the CacheRefresher level but for these
tests (any many other ones) we are not 'booting' umbraco with the Boot managers so the CacheRefreshers are not wired up to listen to events to clear
the cache. This puts us another step closer to having a proper global cache solution that will work for everything. At least now, all of the legacy
code is using the ApplicationCache which we can now control from a central location. Changed NiceUrlsProviderWithDomainsTests to only require a new db
schema per fixture.
2013-03-23 04:01:52 +06:00
Shannon Deminick 1cada5aeb5 Merge with 6.0.3 2013-03-23 02:35:21 +06:00
Shannon Deminick 1dfca6836d Merge with 4.11.6 2013-03-23 02:34:59 +06:00
Shannon Deminick dbbdd16bb9 Fixes: #U4-497 2013-03-23 02:34:34 +06:00
Shannon Deminick 64719586dc Merge 2013-03-23 02:32:07 +06:00
Shannon Deminick 63d010f78f Fixes: #U4-497 2013-03-23 02:31:24 +06:00
Shannon Deminick e97a01c75c Fixes: #U4-1992 - Creates DictionaryCacheRefresher to ensure that all cache associated with the dictionary is updated amongst all
servers when it is changed/removed. Removes RemoveByJson as we only actually require RefreshByJson since we can put any sort of parameters
in a custom json string including whether it is a remove operation (if required)
2013-03-23 01:59:25 +06:00
Stephan a9df92b7a3 merge with 6.1.0 2013-03-22 17:45:42 -01:00
Stephan 65ae43918d merge 2013-03-22 17:45:10 -01:00
Stephan 6e4d8b638e merge 2013-03-22 17:40:29 -01:00
Stephan 21c635f61a Core.Strings - Add support for UrlReplaceCharacters to DefaultShortStringHelper 2013-03-22 17:39:35 -01:00
Stephan 6cc747bf76 Core.Strings - fix bug in helper freeze 2013-03-22 17:38:28 -01:00
Shannon Deminick af2693af76 Fixes how language and dictionary items are cached (ConcurrentDictionary), also fixes up how the Language object
is created and how it raises it's new event and fixes thread safety with it. Also fixes how Language was not checking
for invalid culture codes.
2013-03-23 00:24:37 +06:00
Shannon Deminick d95fc0210e Merge with 6.0.3 2013-03-22 22:11:56 +06:00
Shannon Deminick 74362fba23 Merge 2013-03-22 22:11:26 +06:00
Shannon Deminick 00de509478 Merge 2013-03-22 22:11:08 +06:00
Shannon Deminick 1b5139889c Changed event handler to AfterDelete for DataTypeDefinition, fixes merge issue with Entity and changes WasCancelled to be tracked. 2013-03-22 22:10:24 +06:00
Morten Christensen 112502cf18 Fixes U4-547 2013-03-22 15:09:36 -01:00
Shannon Deminick d976fbe4de Merge with 6.0.3 2013-03-22 22:03:50 +06:00
Stephan 47474d31d6 Web.PublishedCache - rename LegacyXmlCache into XmlPublishedCache 2013-03-22 15:02:26 -01:00
Shannon Deminick 1db7f808c9 Merge with 4.11.6 2013-03-22 21:59:52 +06:00
Shannon Deminick 762cca145f Fixes: #U4-1931 - allow empty string in dictionary item. 2013-03-22 21:59:21 +06:00
Shannon Deminick 840a95ba62 Merge 2013-03-22 21:56:43 +06:00
Shannon Deminick e18d8da872 Fixes: #U4-1931 - allow setting an empty string to a dictionary item. 2013-03-22 21:56:25 +06:00
Morten Christensen 65dc5eaeee Corrects incorrect sql query in the ContentTypeBaseRepository and looping through property types in the DataTypeService.
Adds initial test fixture for the DataTypeService.
Fixes U4-1939
2013-03-22 14:54:44 -01:00
Morten Christensen 4f81e06d3d Fixes U4-1894 by ensuring that all overloads of SetValue uses the IOHelper.SafeFileName 2013-03-22 14:18:45 -01:00
Morten Christensen 6b74b75b6f Adding a few checks to ensure that we don't try to bulk save an empty list 2013-03-22 14:08:20 -01:00
Morten Christensen 98e53b3d74 Correcting a few checks for multiple or single item imports in the PackagingService 2013-03-22 13:58:21 -01:00
Morten Christensen a1f01f9d5c re-inverting the check for existing datatypedefinitions in the packaging service 2013-03-22 13:48:51 -01:00
Sebastiaan Janssen f5d8cb0275 Merge 2013-03-22 13:36:26 -01:00
Sebastiaan Janssen 0d8b65caea Merge 2013-03-22 13:36:04 -01:00
Sebastiaan Janssen 70285991bb I think this was an oversight, if a definition is NOT null, then fill it 2013-03-22 13:35:47 -01:00
Sebastiaan Janssen a336eaa4a1 Check all of the elements for null, apparently any kind of installable thing can
be missing from the install xml file
2013-03-22 13:35:19 -01:00
Morten Christensen fdefe993b7 Fixes U4-1990 2013-03-22 12:54:46 -01:00
Morten Christensen ba0e72a1c1 Fixes U4-1937 by calling save when media is updated with new properties. Also uses the incremented folder count instead of the property id. 2013-03-22 12:30:20 -01:00
Morten Christensen c5710277a5 Redoing the fix for U4-1875 2013-03-22 12:13:06 -01:00
leekelleher b6ec364156 Updated references to the new constants for Application and MediaType aliases. 2013-03-22 13:13:05 +00:00
leekelleher 6b07ee83eb Added constants for Application (section aliases), System (node IDs) and MediaType aliases. 2013-03-22 13:11:27 +00:00
Morten Christensen 5cd2d568e3 Fixes U4-1938 by actually calling and checking the Before/AfterDelete events for DataTypeDefinitions.
Backported from 32fb51f603a3
2013-03-22 11:12:32 -01:00
Morten Christensen 9c89a56d8d Fixes U4-1938 by actually calling and checking the Before/AfterDelete events for DataTypeDefinitions. 2013-03-22 10:53:07 -01:00
Morten Christensen 9ba7664f78 Updating repositories to handle sort order upon updating in a consistent manner.
Related to U4-1828
2013-03-22 10:34:05 -01:00
Morten Christensen 4b87a5c2d3 Adding safe alias cast to Templates.
Updating doc type create dialog to verify alias before saving.
Updating ContentTypeRepository to Mandate that the alias is not empty.
Fixes the cause for U4-1976
2013-03-22 09:56:21 -01:00
Shannon Deminick 7e0c1fac36 Fixes: #U4-1717 - UmbracoContext.EnsuresContext is public. 2013-03-22 05:23:11 +06:00
Shannon Deminick 8cdfba42d5 Moves clearing of the routes cache for when domains are changed to the DomainCacheRefresher. 2013-03-22 05:15:58 +06:00
Shannon Deminick e8dd56786b Fixes: #U4-1986 - data type cache is not refreshed in load balanced environments. 2013-03-22 05:04:32 +06:00
Shannon Deminick 2a9309ea38 un-obsoletes a bunch of the Member api since it shouldn't be obsoleted. Ensures that members cache is cleared when a member is updated or deleted using
the API and that this cache is also refreshed on other servers.
2013-03-22 04:34:57 +06:00
Shannon Deminick c732ee6eb2 Fixes: #U4-1982 - removes the RelationType cache 2013-03-22 02:54:59 +06:00
Shannon Deminick ee2f2dfda0 Fixes: #U4-1981 - ensures template cache is properly refreshed amonsgst all servers 2013-03-22 02:08:55 +06:00
Shannon Deminick 9d6b38a1c1 Fixes: #U4-1980 - stylesheet and stylesheet property cache is not refreshed in load balanced environments. 2013-03-22 01:49:34 +06:00
Morten Christensen f0699afb6e Fixes U4-1974 2013-03-21 18:45:06 -01:00
Shannon Deminick f6490a897a Fixes: #U4-1978 - Creates DomainCacheRefresher - domain cache is now refreshed across all servers 2013-03-22 00:49:07 +06:00
Shannon Deminick ce8f5c167c Fixes: #U4-1933 - Adds LanguageCacheRefresher, removes the invalidate cache calls from within the legacy language object. 2013-03-22 00:35:15 +06:00
Morten Christensen b4d5658d45 Fixes U4-1828 by correctly incrementing the sortorder ... doh! 2013-03-21 17:34:08 -01:00
Morten Christensen d485c3da97 Fixes U4-1875 by correcting the Creating events in the ContentService and MediaService, so null is returned if the creation of an object is cancelled.
In the legacy Document and Media classes we check if the created object is null to determine if the event has been cancelled through the new api.
2013-03-21 16:09:45 -01:00
Shannon Deminick 5f242aa3f6 Converts the media cache refresher to be a json cache refresher since it was impossible before to have media cache
cleared when media was deleted. Created base classes for cache refreshers, we now have a new event - CacheUpdated
which can now be used by code to execute on each individual server when any cache refresher is updated. Listening to events
normally only fire on the individual server so if people are wanting to refresh their own cache there was previously no way
to do that.
2013-03-21 22:53:58 +06:00
Morten Christensen 1214082997 Fixes U4-1883 by setting the Document/Media UpdateDate property in the Save/SaveAndPublish methods 2013-03-21 14:56:50 -01:00
Morten Christensen 1a56e6693a Removing dictionary from DataTypeDefinition as it wasn't used.
Updating package xml to include DatabaseType for testing.
2013-03-21 14:50:39 -01:00
Morten Christensen c6b7f20dab Fixes U4-1849 by introducing a new attribute for packaged DataTypes, so it stores information about the database type.
Will still default to Ntext, but seeing as the database type has never been used before it always defaulted to Ntext.
2013-03-21 14:40:17 -01:00
Morten Christensen 5cc55ad6e2 Fixing U4-1948 by setting the Published property when using document.Publish so updating the cache won't be skipped. 2013-03-21 13:51:45 -01:00
Morten Christensen a55fedab0a Adding a few checks to ensure package installation doesn't fail when properties are not present in the xml. 2013-03-21 13:40:54 -01:00
Shannon Deminick ab8b0f4ebb Merge with 6.0.3 2013-03-21 20:39:33 +06:00
Shannon Deminick a57d3f7eba Merge 2013-03-21 20:31:23 +06:00
Shannon Deminick f5a1e41569 missing checkin file 2013-03-21 20:30:32 +06:00
Morten Christensen 0e12f14a4a Making the export method internal until its been properly implemented 2013-03-21 13:10:31 -01:00
Morten Christensen 3e25b71d9e Updating test for adding PropertyType outside a group to use the proper method for doing so. 2013-03-21 12:58:55 -01:00
Morten Christensen 63de9e6691 Refactoring package installer to use the new PackagingService.
Refactoring ImportDocumentType dialog to import through the PackagingService.
Making a few corrections to the ProppertyGroup and PropertyType classes to support bulk saving.
2013-03-21 12:34:10 -01:00
Stephan 8c79977a23 Web - move GetByAlias out of PublishedCache 2013-03-21 08:54:25 -01:00
Shannon Deminick 52f05612ad Adds another method of distributed cache syncing using a custom json payload. this is necessary for things like ContentType cache
updates especially when deleting one since we require all sorts of Ids from the object but the object will be deleted by the time
the request reaches other servers so instead we create a json payload to send to other servers which contains all information necessary
to refresh/clear the cache on the other servers. This will probably be the preferred way going forward to handle cache refreshing.
With this in place, when removing a conent type cache is removed based on events.
This also adds a 'class' generic argument constraint to the repository base classes to guarantee we can do null checks and then we also
fix a null check on RepositoryBase. Updates the Entity class to properly support tracking properties - this now allows us to determine if
an entity was new, which is now used to ensure we don't re-update all of the content cache when a new content type is created.
Have also changed the deletion and creation of document types to use the new API, this allows for a lot less processing and streamlining how
all cache is invalidated. Fixes the construction of a new Template and Content Type in the v6 api and ensures that default values are set - #U4-1972, #U4-1971
2013-03-21 08:38:18 +06:00
Morten Christensen b9ea85d29d Updating Template to have a lazy master template id.
Adding a few new methods to the DataTypeService, which were needed for the import of DataTypes.
Adding bulk saving of templates.
Adding TopologicalSorter for sorting dependencies.
Implementing import of DataTypes and Templates.
Renaming the import test fixture for consistency after having creating the PackagingService.
2013-03-20 20:31:44 -01:00
Shannon Deminick c5a0da6aa5 Updated ContentTypeCacheRefresher to ensure that content xml cache is only refreshed for doc types not
media types, also ensures that the route cache is cleared (#U4-1969). Changes the deletion of media and
doc types to use the new Api - this ensures that cache is refreshed properly.
2013-03-21 01:04:27 +06:00
Shannon Deminick 266aa3423b Merge 2013-03-21 00:06:50 +06:00
Shannon Deminick 7ea87638f7 Updates all Entity models to use SetPropertyValueAndDetectChanges for setting all simple properties so that
tracking changes works the way it is supposed to. Creates a TracksChangesEntityBase class for any other entity
that wants to implement IRememberBeingDirty (now Entity inherits from this). Upgraded a bunch of other entities that
were not tracking changes properly.
2013-03-21 00:05:56 +06:00
Shannon Deminick b96b372400 Ensure ResetDirtyProperties(false); is set where appropriate (any PerformGet and the base Get)
relates to : #U4-1946
2013-03-20 23:13:55 +06:00
Stephan fcb8f0d417 Web.Routing - RoutesCache goes with PublishedCache 2013-03-20 16:01:49 -01:00
Stephan 6e3c4854b9 Web - add extension methods to ContextualContentCache 2013-03-20 16:01:48 -01:00
Stephan ba24deffc9 Core.Configuration - fix version 2013-03-20 16:01:48 -01:00
Shannon Deminick aa7fd7bb2b Removed cache refreshing code from inside of the ascx control as it is now all handled via business logic. 2013-03-20 22:03:35 +06:00
Shannon Deminick e7a6a29e59 Merge 2013-03-20 21:18:24 +06:00
Shannon Deminick c43efbbfc4 Changed the remaining/relavent properties on ContentTypeBase to use the SetPropertyValueAndDetectChanges
to set property values.
2013-03-20 21:03:48 +06:00
Shannon Deminick adedc9b64b Ensures mocked test entities don't have dirty properties on initialization. Ensures content xml structure
is rebuilt when a content type's alias is changed or a property type is removed from it. Adds ability  to rebuild
content xml structures for specified content types, not for all content. Adds ContentTypeExtensions and
more unit tests for ContentTypeTests. Changes RuntimeCacheProvider to use new ConcurrentHashSet instead of a dictionary
with the same key/value. Adds overload to IRepositoryCacheProvider to clear cache by type. Clears the IContent cache when
a Content type is saved.
All relates to fixing #U4-1943
2013-03-20 20:53:12 +06:00
Morten Christensen d0787e92fe Implementing PackagingService and moving Import Export methods to this service to have it specialized and centralized around packaging operations. 2013-03-20 13:51:46 -01:00
Morten Christensen ffe9953c43 Merge 2013-03-19 20:08:40 -01:00
Morten Christensen 99a9f1ab87 Adding note to mediaService regarding issue U4-1937 2013-03-19 20:06:33 -01:00
Morten Christensen 7def26a489 Implementing import methods in the Content- and ContentType services.
Adding tests to verify import is correct.
2013-03-19 20:05:55 -01:00
Stephan 73d77083ae Web.PublishedCache - bugfix & fix tests 2013-03-19 17:54:41 -01:00
Stephan b2a1f67fb4 Web.PublishedCache - move XML away from UmbracoContext 2013-03-19 17:54:41 -01:00
Stephan 3a0d617b14 Web - cleanup UmbracoHelper XPath methods 2013-03-19 17:54:37 -01:00
Stephan ce0c72d9f8 Web.PublishedCache - introduce contextual caches 2013-03-19 17:51:55 -01:00
Stephan cb966ac70b Web.Routing - use UmbracoContext.ContentCache 2013-03-19 17:50:38 -01:00
Shannon Deminick 6c40f32c2a Fixes merge issues. 2013-03-20 00:50:37 +06:00
Stephan cce32f406f Web.PublishedCache - move caches to UmbracoContext 2013-03-19 17:50:36 -01:00
Shannon Deminick 610ff91a9d Merge with 6.0.3 2013-03-20 00:23:24 +06:00
Shannon Deminick a76ffe8daf Backported changes from 6.1 to fix how RePublishAll behaves in the content service to ensure its the same as what was done with
Document.RePublishAll
2013-03-20 00:19:36 +06:00
Shannon Deminick 45f39158ba Merge 2013-03-19 23:55:29 +06:00
Shannon Deminick d7b5d73e62 updated merge 2013-03-19 23:54:56 +06:00
Shannon Deminick 780a9632f0 Merge 2013-03-19 23:49:51 +06:00
Shannon Deminick 603b6c73f7 Adds some notes. 2013-03-19 23:49:20 +06:00
Shannon Deminick 1b66c42c9b Fixes RePublishAll method to ensure it performs the same function as the legacy Document.RePublishAll - it just
re-generates the XML in the cmsContentXml table. Updates the Sql providers to support truncate table. Updates the RepublishAll
unit test. Adds a TruncateTable extension to PetaPoco. Adds locking to certain service methods that perform more than once function.
2013-03-19 23:46:13 +06:00
Morten Christensen 5175fb5188 Updating the EntityService implementation 2013-03-19 09:34:36 -01:00
Shannon Deminick b260769799 Fixes: #U4-1946 - when entities are constructed via the factories (i.e. from the database), ensure that
properties are not tracked as dirty already.
2013-03-19 07:37:33 +06:00
Shannon Deminick 4495fd05c4 Creates IRememberBeingDirty interface to track the properties that we're changed before the last commit for a given entity.
Adds internal property and tracks it's dirty changes to the ContentTypeBase - HasPropertyBeenRemoved.
Fixes: #U4-1942 - ensures content xml cache is refreshed even across servers when a property is removed or when the alias is changed.
2013-03-19 06:38:15 +06:00
Morten Christensen 923653f2b5 Merge 2013-03-18 20:19:09 -01:00
Morten Christensen 083320002b Continueing with the implementation of the EntityRepository 2013-03-18 20:18:12 -01:00
Shannon Deminick 3052c7311f Converts dictionary cache in ContentType to use concurrent dictionary. Changes ContentTypeControlNew to
not call the propertytype.delete() method if it is a DocumentType or MediaType (should only be called for
legacy code like members). Updates ContentTypeCacheRefresher to ensure that all of the content type cache is
cleared properly in the ICacheRefresher.
2013-03-19 02:02:11 +06:00
leekelleher 3af7958940 Updated references for alias conventions constants across the solution. 2013-03-18 17:55:02 +00:00
leekelleher c7498cec03 Added constants for regular conventions within the Umbraco core.
e.g. popular property-type aliases.
2013-03-18 17:51:57 +00:00
Stephan abe4ec6524 Core.Configuration - simplify 2013-03-18 15:49:43 -01:00
Shannon Deminick e3a8b4ac78 Moves some legacy classes into LegacyClasses.cs and un-seals some refreshers with comments to support legacy classes. 2013-03-18 21:18:22 +06:00
Morten Christensen 365dffe2db Merge 2013-03-18 14:15:30 -01:00
Sebastiaan Janssen 259fbcb8f0 Fixed U4-1934 Error in comments of config files 2013-03-18 08:50:24 -01:00
Morten Christensen 381157ac5d Initial implementation of the EntityRepository and Service, which will be used to retrieve a basic object with a minimum set of propreties for the models that have their base in the umbracoNode table.
The intention is to use this for loading trees in the backoffice for faster loading.
2013-03-17 16:25:21 -01:00
Shannon Deminick f993e96547 Seals a bunch of classes that need to be 2013-03-16 09:03:26 +06:00
Shannon Deminick 734f75b3ad Removes completely unnused macro cache key 2013-03-16 08:53:27 +06:00
Shannon Deminick 7ef066f396 Removed erroneous cache flushing for tabs since there is no cache for tabs 2013-03-16 08:51:25 +06:00
Shannon Deminick 23bb0e3ac3 Fixes: #U4-1930, #U4-1928, #U4-1929 - addes ContentTypeCacheRefresher to ensure that content type cache is cleared
in load balanced scenarios. Cleans up a bit of code too.
2013-03-16 08:47:55 +06:00
Shannon Deminick 2dea4a1d70 updates more cache handling, fixes syntax error in examineindex.release.config, fixes the DefaultServerMessenger ctor
to be lazy since the db context isn't initialized yet (will speed up start a bit too), ensures that the macro/xslt caching
clearing is only done on the single server instead or re-posing another distributed call.
2013-03-16 01:37:05 +06:00
Shannon Deminick 07bdd138cc Merge with 6.0.3 2013-03-15 11:31:54 +06:00
Shannon Deminick ee9f91b5cf Merge with 4.11.6 2013-03-15 11:31:34 +06:00
Shannon Deminick db3f21429e Fixes infinite loop bug with string trimming. 2013-03-15 11:31:11 +06:00
Shannon Deminick 2b750843c5 Fixed up base web test, removes RequiresDbSetup in place of new database behavior - NoDatabasePerFixture.
Fixed issue with another test... no idea how it didn't show up failing before.
Fixes issue with string extensions and an infinite loop when the string to strip is empty/null.
2013-03-15 11:28:05 +06:00
Shannon Deminick bd81507ecb Merge with 6.0.3 2013-03-15 08:29:22 +04:00
Shannon Deminick 033692d7ee had some strange issues with unit tests, added error checks. 2013-03-15 08:26:49 +04:00
Shannon Deminick 23146cb12a Merge with 4.11.6 2013-03-15 08:06:26 +04:00
Shannon Deminick 04b9607741 Fixes: #U4-1916 and another issue for vdirs, added unit tests, changed UI web project to always
launch in a VDIR.
2013-03-15 08:03:19 +04:00
Shannon Deminick ea7fb32fb9 Merge with 6.0.3 2013-03-15 06:23:54 +04:00
leekelleher 2cd64dd540 Missed a few TinyMCE GUID references, (due to their string format). 2013-03-14 22:15:39 +00:00
leekelleher 2a058cdbcc Fixed a conflict-references between Constants (in Umbraco.Web.Mvc and Umbraco.Core) 2013-03-14 22:01:09 +00:00
leekelleher 37860b4015 Replaced all hard-coded GUID references to use the new Constants. 2013-03-14 22:00:37 +00:00
leekelleher 0f056b1702 Updated GUID references in editorControls and uQuery to use the new Constants. 2013-03-14 21:58:31 +00:00
leekelleher aa5588bbd3 Added Constants (static class).
Included all GUIDs for PropertyEditors and ObjectTypes.
2013-03-14 21:55:46 +00:00
Stephen Roberts 0e392b398c Fixed Property order for document types with Master document types. 2013-03-14 11:08:02 +00:00
Sebastiaan Janssen 5914690ad8 Allow leading sign in number field so that negative numbers are supported 2013-03-25 10:09:02 -01:00
Shannon Deminick 33c5c41a31 Added better support for clearing the db schema for test. Added more support for different db behaviors for tests, now to update
the behaviors where necessary as this will speed things up quite a lot.
2013-03-14 02:43:17 +04:00
Morten Christensen c4aa9095f2 Fixes U4-1858 by ensuring that the text field is reset before setting or removing a value 2013-03-13 20:24:21 -01:00
Shannon Deminick 8d3c798c6c Changed tests to clear out the current database instead of trying to delete/re-create it. Fixes up
other test inconsistencies and more error checking on the ApplicationContext.Dispose.
2013-03-14 01:07:54 +04:00
Morten Christensen 79ce586c8b Fixes U4-1808 by removing the database lookup from an id that was resolved from the media url 2013-03-13 19:26:22 -01:00
Morten Christensen 8fba03c05d Fixes U4-1863 and U4-1908 by ensuring that content and media are loaded in the same manner through the new api 2013-03-13 18:55:25 -01:00
Shannon Deminick 245591c31f Fixed up another test inconsistency 2013-03-13 18:52:15 +04:00
Shannon Deminick 8fb8fc00b4 Fixes up inheritance structure of BaseTableByTableTests 2013-03-13 18:41:24 +04:00
Shannon Deminick 50b05d25f5 Added BaseUmbracoApplicationTests and fixed up dispose on the ApplicationContext to ensure the db object is disposed and doesn't
reset the PluginManager (as this shouldn't really need to be done). Cleaned up all unit tests so they follow the same structure and
uses this base class where necessary and eliminates a lot of duplicate code.
2013-03-13 18:31:07 +04:00
Shannon Deminick c04ee7bdc7 Removes type check caching from TypeHelper... is actually much slower. 2013-03-13 01:40:34 +04:00
Shannon Deminick 75d218d2e3 Updated how mappers for persistence work with the MapperFor attribute and have made BaseMapper public but have
kept all properties, etc.. internal just so that they can be found so we don't have to register them.
Updates unit test to ensure the plugin manager is init'd properly with the 'false' override. Ensures that the base
db test also initializes the plugin manager properly.
2013-03-13 01:09:29 +04:00
Shannon Deminick 4efa2c9f57 teeny bit of code cleanup 2013-03-12 23:51:53 +04:00
Shannon Deminick 630a44358f ensures cache clearing by search is done with case insensitivity 2013-03-12 23:30:43 +04:00
Shannon Deminick f7015d521b Merge 2013-03-12 22:58:53 +04:00
Shannon Deminick 860c8c1002 Fixes: #U4-482, #U4-549. Macro cache streamlining - ensures it is cleared based on event handling instead of inline everywhere
in code. Unit tests for CacheHelper, unit tests for umbraco.macro, updates to
ObjectExtensions.TryConvertTo + unit tests, enhanced disposable method of ApplicationContext.
2013-03-12 22:58:21 +04:00
Stephan a2120d1c6b Web.Routing - improve domains management 2013-03-12 16:12:38 -01:00
Stephan fc3f9dfeae Web.Routing - hide new wildcard domains from public APIs
only way to get them is through internal methods
+ improve / fix domains handling
+ fix failing tests
2013-03-12 15:16:12 -01:00
Shannon Deminick cf64c0243c MacroCacheRefresher also implements ICacheRefresher<macro> 2013-03-12 17:08:31 +04:00
Stephan ca9f53738b Web.UI - AssignDomain2 dialog (U4-19) 2013-03-12 12:00:34 -01:00
Shannon Deminick 8d2e466e34 Changes MediaCacheRefresher to be ICacheRefresher<T> and updates MacroCacheRefresher to use correct
macro object.
2013-03-12 03:11:35 +04:00
Shannon Deminick ec46d65bb4 Streamlines how macro cache is handled 2013-03-12 03:00:42 +04:00
Shannon Deminick 164f22aa50 Makes ApplicationContext disposable so that 3rd party devs are able to reset their applications (or unit tests), updated
resolution and created a ResolverCollection to track all resolvers created so it's super easy to reset all of them at once
(which is what happens on ApplicationContext.Dispose. ApplicationContext.Dispose is also implicitly implemented as to not
show in intellisense that the Dispose method exists... must be cast to IDisposable to work.
2013-03-12 01:50:56 +04:00
Shannon Deminick cc50003e3e Fixup merge issues 2013-03-12 00:40:37 +04:00
Shannon Deminick 8698deb469 Merge with 6.0.3 2013-03-12 00:21:10 +04:00
Shannon Deminick 738e4f5c46 Merge 2013-03-12 00:20:12 +04:00
Shannon Deminick 2fdcb9164a Fix merge issues 2013-03-12 00:19:06 +04:00
Shannon Deminick 7404a1f93d Merge with 4.11.6 2013-03-12 00:14:50 +04:00
Shannon Deminick c8b8b28e9b applies patch for #U4-1890 2013-03-12 00:10:59 +04:00
Shannon Deminick 5bd2571395 Merge 2013-03-12 00:01:14 +04:00
Shannon Deminick c0cd157e60 applies patch for #U4-1890 2013-03-12 00:00:55 +04:00
Sebastiaan Janssen ac2f9b172c .transformed files are auto-generated and shouldn't be under source control 2013-03-11 17:15:30 -01:00
Sebastiaan Janssen c854ea8a35 .transformed files are auto-generated and shouldn't be under source control 2013-03-11 17:11:59 -01:00
Shannon Deminick 9bd865d259 Fixes: #U4-1890 - allows access to the UmbracoContext during application startup. 2013-03-11 23:46:47 +06:00
Sebastiaan Janssen b8e4a73c3b Revert Casey's mistakenly added files 2013-03-11 15:55:35 -01:00
Shannon Deminick 2d55dda662 Merge with 6.0.3 2013-03-11 22:04:29 +06:00
Shannon Deminick 63192f3a65 Merge 2013-03-11 22:04:06 +06:00
Shannon Deminick 29b2458ef3 Merge 2013-03-11 22:01:54 +06:00
Shannon Deminick 1e6de161e6 Merge with 6.0.3 2013-03-11 22:01:40 +06:00
Shannon Deminick 508886b1ad transormed file changed.... 2013-03-11 22:00:59 +06:00
Stephan 3ab0879a99 Core.Strings - refactor ToSafeFileName 2013-03-11 14:58:07 -01:00
Shannon Deminick 4baecfe833 Merge with 6.0.3 2013-03-11 21:56:47 +06:00
Shannon Deminick 727f62d418 Merge with 4.11.6 2013-03-11 21:49:27 +06:00
Shannon Deminick 68c4255a51 updates proper error handling for razor script macros 2013-03-11 21:49:04 +06:00
Shannon Deminick 187af3e361 Fixed merge issue 2013-03-11 21:23:35 +06:00
Shannon Deminick c6f29a50d6 Merge with 4.11.6 2013-03-11 21:17:57 +06:00
Shannon Deminick d07212c89b Fixed changes with new MacroErrors config and how macros are rendered so it supports all macro types and also fixes up a bit of code
in the umbraco.macro class.
2013-03-11 21:06:02 +06:00
Shannon Deminick 28c55320a1 Updates the pull request for handling macro errors.
Backports fixes for partial view macros from 6.x - U4-1488, U4-1844, U4-1730, U4-1843
2013-03-11 20:11:11 +06:00
Morten Christensen cb0dd70434 Minor change to the SqlSyntaxProvidersResolver in the CoreBootManager as per Shannons review. 2013-03-11 12:44:12 -01:00
Shannon Deminick fd58017e97 imported patches for pull request spudstuff/u4497 2013-03-11 18:49:45 +06:00
Shannon Deminick e5e22f75fc Merge 2013-03-11 18:47:36 +06:00
Morten Christensen 928d92fce4 Making the Sql Syntax Providers public and changing a few names and bits for consistency.
Adding resolver for the syntax providers and wiring it up in the boot manager.
2013-03-09 10:43:34 -01:00
Casey Neehouse 09408b898e Merge 2013-03-08 19:38:33 +05:00
Morten Christensen d1b05332c5 Manually adds fix for U4-1869 from 6.0.3 branch 2013-03-07 20:28:13 -01:00
Morten Christensen 3612f18f3f Merge with 6.0.3 2013-03-07 20:22:37 -01:00
Morten Christensen 836b0f39c2 Additional correction of the implementation for U4-1869 2013-03-07 20:19:39 -01:00
Morten Christensen 1b01386673 Changing the initial fix of U4-1869 to use UrlReplacingCharacters 2013-03-07 19:56:59 -01:00
Morten Christensen 2a09f02afb Fixing incorrect sql syntax when the query contains two expressions. 2013-03-07 19:56:10 -01:00
Morten Christensen ee95434cea Implements U4-1869 by adding the 3 characters to the list of reserved characters. 2013-03-07 19:04:25 -01:00
Shannon Deminick 86852f9815 updated server registrar 2013-03-07 23:23:20 +06:00
Shannon Deminick 9aa44c40ce re-instated the upgrade script and put the server rego back on the service context. 2013-03-07 22:57:42 +06:00
Shannon Deminick da331b7408 Changed how model mappers work for persistence objects so we don't have to statically associate the mapper. 2013-03-07 22:27:47 +06:00
Casey Neehouse caad0afed8 Corrects u4-1870 - Refactor Load Content SQL to check if ID is in published list
versus using a join that can cause duplicate entries.
2013-03-07 21:00:31 +05:00
Shannon Deminick 0230bedeb6 Reinstated server registration repositories and db table 2013-03-07 21:40:00 +06:00
Shannon Deminick bd6aa51397 Merge with 6.0.3 2013-03-07 21:27:54 +06:00
Shannon Deminick 9b85bc0e64 Added installer step to choose rendering engine but have left it disabled, might make a dashboard instead for that. 2013-03-07 21:25:11 +06:00
Morten Christensen fe08e7fc2f Fixes U4-1865 by excluding trashed items from GetByLevel method for both Content and Media 2013-03-07 13:42:14 -01:00
Morten Christensen 4ad96b49e7 Fixes U4-1862 2013-03-07 13:35:17 -01:00
Morten Christensen 9a1bb4a2dd Adding unit test to assert issue with issue with creation of property types outside a property type group.
Fixes U4-1861.
2013-03-07 13:33:22 -01:00
Shannon Deminick 2044d1b5db manually merged in installer changes from 6.0.3 2013-03-07 04:06:30 +06:00
Shannon Deminick 2c05eda899 Merge with 6.0.3 2013-03-07 04:01:04 +06:00
Sebastiaan Janssen c39f902ed5 And one more fix for U4-1845 to make upgrades succeed as well 2013-03-06 14:30:09 -01:00
Sebastiaan Janssen b7dc052cb2 Additional fixes for U4-1845 to maintain compatibility for people using the
wrong connection string
2013-03-06 14:09:01 -01:00
Morten Christensen 0c77114cd5 Fixes U4-1845 by correcting the sql ce connectionstring 2013-03-06 13:36:03 -01:00
Morten Christensen 222a5237b0 Version updated to 6.0.3 2013-03-06 12:03:01 -01:00
Morten Christensen de55cb8392 Correcting fix for U4-1835 2013-03-06 08:32:05 -01:00
Morten Christensen df164ee618 Fixes U4-1835 by checking if the value is null before running the regex validation against the value. 2013-03-06 08:02:09 -01:00
Morten Christensen 21b0687a57 Fixes U4-1837 by syncing tree after saveing DataTypeDefinition 2013-03-06 07:57:00 -01:00
Morten Christensen 9310efa280 Fixes U4-1831 by catching exception if there is no current logged in user. 2013-03-06 07:54:09 -01:00
Morten Christensen a41b55a9e6 Fixes U4-1846 2013-03-06 07:50:20 -01:00
Morten Christensen af2d8a4755 Fix related to U4-1407 but for Media. We already committed this fix for Content. 2013-03-06 07:49:29 -01:00
Shannon Deminick 0852200861 Merge with 6.0.3 2013-03-06 04:12:58 +06:00
Shannon Deminick d48e339b81 Fixes: #U4-1844, #U4-1730, #U4-1843 2013-03-06 04:12:28 +06:00
Shannon Deminick f955955ad8 Merge with 6.0.3 2013-03-06 03:18:11 +06:00
Shannon Deminick 9b6d498cf7 Merge with 4.11.6 2013-03-06 03:17:47 +06:00
Shannon Deminick 62d365573f Back ports fixes for: #U4-1614, #U4-793 - preview working properly in mvc 2013-03-06 03:17:18 +06:00
Shannon Deminick 9042a23de7 Fixes: #U4-1614, #U4-793 - preview working properly in mvc 2013-03-06 03:12:04 +06:00
Shannon Deminick b9eaaa0f29 Merge with 6.0.3 2013-03-05 23:55:41 +06:00
Shannon Deminick 04bf011fcd Merge with 4.11.6 2013-03-05 23:55:09 +06:00
Shannon Deminick f3b7a8a581 Fixes: #U4-1471 - issue with having NewRelic installed and some sort of conflict with shutting down
our logger.
2013-03-05 23:49:45 +06:00
Shannon Deminick 5d62902684 Fixes up the double event for MakeNew on document (#U4-1737) 2013-03-05 22:34:31 +06:00
Shannon Deminick f79d046a87 Merge with 6.0.3 2013-03-05 22:19:31 +06:00
Shannon Deminick 82d645a0f7 Merge with 4.11.6 2013-03-05 22:18:53 +06:00
Shannon Deminick a8936de638 Fixes: #U4-1834 2013-03-05 21:52:22 +06:00
Shannon Deminick a765f36d24 Adds unit tests for DynamicNode and DynamicPublishedContent, fixes both when querying for recursive properties.
Fixes: #U4-1839
2013-03-05 21:00:16 +06:00
Shannon Deminick 737d7d6712 merge issue 2013-03-05 09:13:24 +06:00
Shannon Deminick 4d8ed22206 Merge with 6.0.3 2013-03-05 08:42:43 +06:00
Shannon Deminick 6b691eb461 Merge with 4.11.6 2013-03-05 08:34:14 +06:00
Shannon Deminick 046da1a8ce Fixes: #U4-1824 - issue with razor dynamic node property access performance enhancements. 2013-03-05 07:06:41 +06:00
Shannon Deminick ca7abd6c78 Merge 2013-03-05 06:08:59 +06:00
Shannon Deminick 06dc76496d Merge with 6.0.3 2013-03-05 06:08:02 +06:00
Shannon Deminick 452688b2bb Merge with 4.11.6 2013-03-05 05:57:35 +06:00
Shannon Deminick 7cc0f2a514 Fixes: #U4-1819 2013-03-05 05:56:53 +06:00
Sebastiaan Janssen a2251fe062 Created branch 6.0.3 2013-03-04 10:19:22 -01:00
Sebastiaan Janssen 3d0684eac0 Closing branch 6.0.2 2013-03-04 10:18:18 -01:00
Sebastiaan Janssen a8fafaa194 Added tag Release-6.0.2 for changeset b247b35d8211 2013-03-04 10:18:08 -01:00
Morten Christensen 2b8a6e532e Fixing U4-1820 2013-03-03 11:25:48 -01:00
Morten Christensen d497659f1f Fixes U4-1814 for Document and Media by adding both legacy Before/After Move events 2013-03-03 11:19:15 -01:00
Morten Christensen 0cafeac6eb Fixes U4-1818 2013-03-03 11:11:51 -01:00
Morten Christensen 4516305f3c Fixes U4-1816 2013-03-03 10:34:39 -01:00
Morten Christensen 04c8390a4f Fixes sorting of ContentTypes and Content related to U4-1816.
Updating upgrade code for PropertyTypes / PropertyTypeGroups.
2013-03-02 08:11:47 -01:00
Shannon Deminick 2877b7bda4 Fixes: #U4-1819 2013-03-02 05:46:00 +06:00
Hendy fc94d92b37 Merge 2013-03-01 23:26:00 +00:00
Hendy 84171c6b98 Added Media and Member support to XPath CheckBoxList 2013-03-01 22:53:14 +00:00
Shannon Deminick c137854e01 Merge with 6.0.2 2013-03-02 03:45:06 +06:00
Shannon Deminick 3ff88bc4fa Fixing strange merge issues. 2013-03-02 03:44:43 +06:00
Shannon Deminick fe9f5b224a Fixing really strange merge issues! 2013-03-02 03:34:37 +06:00
Shannon Deminick 45f2cc9a20 Merge with 6.0.2 2013-03-02 02:52:25 +06:00
Shannon Deminick 4b54edf660 Merge 2013-03-02 02:51:05 +06:00
Shannon Deminick f1c680c7e2 Merge with 6.0.2 2013-03-02 02:50:17 +06:00
Shannon Deminick 36108df4d0 Merge with 6.0.2 2013-03-02 02:49:24 +06:00
Shannon Deminick 1bc9d1d9c3 Merge with 4.11.6 2013-03-02 02:45:19 +06:00
Shannon Deminick b5cbe63a4e Back merged from 6.1 the changes required for #U4-1822 and #U4-1797 2013-03-02 02:43:22 +06:00
Shannon Deminick 4882df43bd Back merged from 6.1 the changes required for #U4-1822 and #U4-1797 2013-03-02 01:50:53 +06:00
Shannon Deminick 51ad21302a Merge 2013-03-02 01:03:07 +06:00
Shannon Deminick 010893a73a Fixes: #U4-1822, #U4-1797 - Is helpers and indexes on result collections using IPublishedContent or DynamicPublishedContent were incorrect,
added unit tests to support issues and fixes.
2013-03-02 01:02:38 +06:00
Morten Christensen cb03178d99 Updating version 2013-03-01 15:39:24 -01:00
Morten Christensen 361fa8836b Merge 2013-03-01 15:37:06 -01:00
Morten Christensen 194ebb57b9 Updating migration 2013-03-01 15:36:53 -01:00
Hendy 5effe5015e Added Media and Member support to XPath DropDownList 2013-03-01 15:28:03 +00:00
Stephan 97f3f13aaa Core. and Web.Configuration - go public
UmbracoSettings now public, only static For<> method is not internal, though
2013-03-01 13:56:12 -01:00
Stephan 32e6604cf7 Web.Routing - add InternalRedirectPreservesTemplate setting (U4-1222...) 2013-03-01 13:56:12 -01:00
Stephan b2cedf6380 Web.BaseRest - use new settings & config interface 2013-03-01 13:56:12 -01:00
Stephan 9fc5ee897f Web.Routing - implement UrlProviderMode 2013-03-01 13:56:11 -01:00
Stephan e8e8053063 Web.Configuration - migrate TryIisCustomErrors 2013-03-01 13:56:11 -01:00
Stephan c635ec67d0 Web.Configuration - import WebRouting infrastructure 2013-03-01 13:56:11 -01:00
Stephan 750370d148 Core.Configuration, Tests - refactor settings management 2013-03-12 12:02:04 -01:00
Stephan 2c6daa2918 Core.Configuration - cleanup 2013-03-01 13:56:11 -01:00
Stephan e33c877605 Core.Strings - fix tests 2013-03-01 11:47:02 -01:00
Sebastiaan Janssen ee2943b9fb Created branch 4.11.6 2013-03-01 06:56:34 -01:00
Sebastiaan Janssen a3b03988b3 Created branch 6.0.2 2013-03-01 06:55:54 -01:00
Sebastiaan Janssen cab21e9d48 Merge with 6.0.1 2013-03-01 06:51:38 -01:00
Sebastiaan Janssen a7bd0d97a7 Closing branch 4.11.5 2013-03-01 06:51:01 -01:00
Sebastiaan Janssen 5943c87fc6 Added tag Release-4.11.5 for changeset 74cfea3262f4 2013-03-01 06:50:28 -01:00
Sebastiaan Janssen 2e7c26fcc0 Closing branch 6.0.1 2013-03-01 06:49:59 -01:00
Sebastiaan Janssen 0f6c41679c Added tag Release-6.0.1 for changeset 92410e141d9c 2013-03-01 06:49:45 -01:00
Stephan 85e73df3c8 Web.Routing - refactor & resharp 2013-02-28 20:20:40 -01:00
Shannon Deminick a17a11d50b Fixed: #U4-1810, pretty much finished the examine management dashboard. 2013-03-01 03:04:29 +06:00
Sebastiaan Janssen 6d5f7c4293 Checking the filepath correctly this time 2013-02-28 16:23:43 -01:00
Morten Christensen cc32e73235 Merge 2013-02-28 16:00:49 -01:00
Morten Christensen 92ef4d8055 Adds migration execute method for code, so it'll run in the process method of the migration runner. 2013-02-28 16:00:35 -01:00
Sebastiaan Janssen e57e2f5b5f Migrations should be sorted by version number as well 2013-02-28 15:38:07 -01:00
Sebastiaan Janssen 0b4efe4eeb Merge with 4.11.5 2013-02-28 15:10:31 -01:00
Sebastiaan Janssen c250fa560e Restrict the NuGet .Core dependency to the same version. 2013-02-28 15:08:30 -01:00
Morten Christensen 6eeae52333 Adding the actually migration class 2013-02-28 15:01:50 -01:00
Morten Christensen c38c18fed8 Adding migration for updating PropertyGroups and PropertyTypes 2013-02-28 14:54:42 -01:00
Sebastiaan Janssen 0af47963c6 Merge 2013-02-28 09:56:19 -01:00
Sebastiaan Janssen b017e8690a Fix errors in log caused by no prevalues beind selected. 2013-02-28 09:53:57 -01:00
Sebastiaan Janssen 916e442ee4 Fix errors in log caused by no prevalues beind selected. 2013-02-28 09:53:57 -01:00
Morten Christensen ecae9c47b7 Fixes U4-1798 by adding the current user's id when saving Media, MediaTypes and DocumentTypes. 2013-02-28 09:37:33 -01:00
Morten Christensen 836a99128f Fixes moving PropertyTypes between Tabs/PropertyGroups from inherited doc types.
Adds method to move a PropertyType to another PropertyGroup.
2013-02-28 09:07:15 -01:00
Shannon Deminick 6ead98a51d updated latest examine patch dll. added indexing actions to the dashboard. have optimize working great all
with the new umbraco api framework.
2013-02-28 05:05:06 +06:00
Morten Christensen abefbc7581 Merge 2013-02-27 17:02:10 -01:00
Morten Christensen 365addedf4 Fixes deleting tabs and having the property types move to Generic Properties 2013-02-27 17:01:53 -01:00
Shannon Deminick 7cc12211e1 Fixed unit tests 2013-02-27 23:34:55 +06:00
Shannon Deminick f9b7e1b7fa Merge with 6.0.1 2013-02-27 23:20:34 +06:00
Shannon Deminick 44f5439a2c Merge with 4.11.5 2013-02-27 23:14:50 +06:00
Shannon Deminick 8a9680e75c updated unit test logic 2013-02-27 23:13:48 +06:00
Shannon Deminick ae0991bc67 Fixed unit tests now that we have default values stored in GlobalSettings. 2013-02-27 23:02:12 +06:00
Shannon Deminick 0caaaa500c Merge with 4.11.5 2013-02-27 22:38:46 +06:00
Shannon Deminick 36c66e676a Fixed unit tests 2013-02-27 22:35:27 +06:00
Shannon Deminick 33c5f3fcc7 updating examine dash 2013-02-27 22:21:58 +06:00
Shannon Deminick 47f6924ac3 Fixes: #U4-1790 for 6.1 (slightly different fix than 6.0.1) 2013-02-27 21:59:21 +06:00
Sebastiaan Janssen a14baeb111 Merge 2013-02-27 14:58:47 -01:00
Sebastiaan Janssen 5b4d8ed6f3 U4-1793 YSOD when moving a node back to root 2013-02-27 14:57:42 -01:00
Morten Christensen 25ea4003f9 Merge 2013-02-27 14:42:43 -01:00
Morten Christensen 30cef671dc Removing unused code 2013-02-27 14:42:17 -01:00
Morten Christensen 250e627b1d Fixes saving of RegEx in DocTypes.
Fixes loading and saving of properties on inherited tabs.
Adjusts logic around the creation of tabs/property groups
2013-02-27 14:39:11 -01:00
Shannon Deminick 45b8daa18c Merge with 6.0.1 2013-02-27 21:38:45 +06:00
Sebastiaan Janssen 5b00501d21 trySkipIisCustomErrors was defined twice in the Release config 2013-02-27 14:38:15 -01:00
Shannon Deminick 06e5350c43 Fixes: #U4-1790 - Examine indexing non-published items for indexers that are not supporting non-published items. 2013-02-27 21:35:36 +06:00
Sebastiaan Janssen ba530061a0 Merge 2013-02-27 13:53:14 -01:00
Sebastiaan Janssen 89ae3bc143 Add RevertToCleanInstall.bat to 4.11.5 too, it's handy. 2013-02-27 13:51:58 -01:00
Shannon Deminick 484afccf89 Merge with 4.11.5 2013-02-27 20:46:29 +06:00
Shannon Deminick 3951f59d09 Merge 2013-02-27 20:46:06 +06:00
Shannon Deminick 2589ec8367 Merge 2013-02-27 20:45:25 +06:00
Shannon Deminick a6aeada197 Merge with 4.11.5 2013-02-27 20:44:56 +06:00
Shannon Deminick cd8c998ebf Fixes: U4-1788 - ensures internal reserved paths and urls (that cannot be modified) are stored staticly in code,
Also fixes that the _reservedPathsCache and _reservedUrlsCache actually works, before we were doing an
object.ReferenceEquals comparison which would never have worked and it was also not thread safe.
2013-02-27 20:42:11 +06:00
Shannon Deminick 2a9e32e8fd Fixes: U4-1788 - ensures internal reserved paths and urls (that cannot be modified) are stored staticly in code 2013-02-27 20:13:15 +06:00
Sebastiaan Janssen 603724ddd6 Merge 2013-02-27 12:47:21 -01:00
Sebastiaan Janssen 902cfc5a22 Merge with 4.11.5 2013-02-27 12:43:52 -01:00
Sebastiaan Janssen 2cb544591b Pull in new translations 2013-02-27 12:43:21 -01:00
Morten Christensen db7aa99b85 Fixes PerformGetByQuery related to U4-1783. The query does not need to be version specific. 2013-02-27 11:19:53 -01:00
Morten Christensen 031ceccf5d Removing need to load a Property from within FileHandlerData.
This means that newly created properties based on the upload field can be properly saved.
2013-02-27 11:02:27 -01:00
Morten Christensen 7127706c43 Merge 2013-02-27 10:29:26 -01:00
Morten Christensen d078ef8f5e Minor adjustment to property tracking 2013-02-27 10:28:40 -01:00
Morten Christensen 289b9743c5 Fixes regression issue with installing document types using legacy api. 2013-02-27 10:23:48 -01:00
Sebastiaan Janssen eda9ba07f4 Wrongly doing an append where I meant to just replace the html 2013-02-27 09:53:45 -01:00
Shannon Deminick 1157c11d89 added searcher properties 2013-02-27 06:53:18 +06:00
Shannon Deminick 6815092b62 Changed default api routes to support multiple actions, not strict REST only methods. updated more examine mgmt. 2013-02-27 06:50:26 +06:00
Shannon Deminick 876753cb54 Merge 2013-02-27 05:25:21 +06:00
Shannon Deminick b374dcf2c2 fixed issue with test project's invalid references (for web api). Added UmbracoAuthorizedApiController, change the
examine mgmt tools to use web api, got the dashboard displaying all relavent properties for indexers.
2013-02-27 05:24:45 +06:00
Shannon Deminick f7cfa507d7 fixed bug with attributes 2013-02-27 00:41:24 +06:00
Shannon Deminick 5df0013406 Merge with 6.0.1 2013-02-27 00:37:24 +06:00
Shannon Deminick 30d08bfae1 missing proj file update 2013-02-27 00:34:08 +06:00
Shannon Deminick b0ae03b220 publicly exposes the UmbracoAuthorizeAttribute for MVC and creates one for web api too. 2013-02-27 00:33:59 +06:00
Shannon Deminick ffb9849745 Merge 2013-02-27 00:20:50 +06:00
Shannon Deminick cc55107da3 Added method to WebSecurity to validate members, updated routes for umbraco api controllers 2013-02-27 00:19:48 +06:00
Stephan 6c4ee40b96 Core.Configuration - import infrastructure 2013-02-26 16:52:44 -01:00
Stephan c637c517b8 Web.Routing - better PublishedContentRequest support for redirect & status 2013-02-26 16:52:42 -01:00
Stephan cdf6249a41 Core - add some TypeExtensions 2013-02-28 20:10:47 -01:00
Stephan d9540bcfc5 Core - cleanup UriExtensions, create unit tests, make it public 2013-02-26 16:52:27 -01:00
Stephan 1b1b5c047c U4-1779 - Web.BaseRest supports rest extensions over multiple classes 2013-02-26 16:52:06 -01:00
Sebastiaan Janssen fa5b9e5689 Typo: U4-512 "Memebertype saved" 2013-02-26 17:29:53 -01:00
Stephan 6948d70b75 U4-1779 - Web.BaseRest supports rest extensions over multiple classes 2013-02-26 16:52:06 -01:00
Sebastiaan Janssen 3f9b022ae4 Merge with 4.11.5 2013-02-26 17:30:50 -01:00
Stephan aeb417d3d8 U4-1779 - Web.BaseRest supports rest extensions over multiple classes 2013-02-26 16:52:06 -01:00
Shannon Deminick bcfc7b2507 Adds UrlHelper extensions to get the url of any umbraco web api controller. Updates proj dependencies. 2013-02-26 23:13:32 +06:00
Sebastiaan Janssen 990ab7f87f Merge 2013-02-26 15:52:48 -01:00
Sebastiaan Janssen 861198eec9 Merge with 4.11.5 2013-02-26 15:50:11 -01:00
Sebastiaan Janssen c26df8da6f U4-591 Access bug in dashboard 2013-02-26 15:48:22 -01:00
Shannon Deminick 7c32365bd3 moved web api controllers to namespace Umbraco.Web.WebApi and created web api member authorize attribute 2013-02-26 22:14:32 +06:00
Morten Christensen b5aefdce04 Merge 2013-02-26 14:53:41 -01:00
Morten Christensen adfb7cfaa4 Fixes U4-1756 by ordering the DocumentTypes prior to deleting them 2013-02-26 14:52:55 -01:00
Morten Christensen 0a88ba05c8 Corrected an issue related to the upload field when a Document without any files uploaded was deleted 2013-02-26 14:52:33 -01:00
Shannon Deminick bf6ba727a4 Merge with 6.0.1 2013-02-26 21:42:55 +06:00
Shannon Deminick 9ee295d49e Merge with 4.11.5 2013-02-26 21:35:55 +06:00
Shannon Deminick 1e02d85fca Fixes: #U4-1773 (backport fix from 6.0.1) 2013-02-26 21:35:09 +06:00
Shannon Deminick 7173b44b4f Merge with 4.11.5 2013-02-26 21:18:17 +06:00
Shannon Deminick 69f6edadb3 Merge 2013-02-26 21:17:57 +06:00
Shannon Deminick d1dc2331f8 Merge 2013-02-26 21:15:31 +06:00
Morten Christensen bb2f3a1732 Fixes U4-1784 2013-02-26 14:11:24 -01:00
Shannon Deminick 4b29d7ba2e Merge with 4.11.5 2013-02-26 21:11:20 +06:00
Shannon Deminick d503deb8c5 reverted member index config, for pre 6.1 we will still need to manually set the member fields. 2013-02-26 21:07:59 +06:00
Morten Christensen 0859b92aaf Fixes U4-1781 so Saved is called when saving a DataTypeDefinition in the backoffice 2013-02-26 13:59:08 -01:00
Morten Christensen b409740da5 Merge 2013-02-26 13:35:52 -01:00
Morten Christensen a888e0564c Calling save when creating a DataTypeDefinition related to U4-1781 2013-02-26 13:32:02 -01:00
Morten Christensen fef96e8b43 Fixes issue related to moving PropertyTypes between tabs.
Ensures that the right tabs with the right ids are loaded in the dropdown.
2013-02-26 13:31:29 -01:00
Sebastiaan Janssen 429522a0bc U4-1775 Copying nodes results in same name under sort and in MNTP 2013-02-26 13:08:31 -01:00
Morten Christensen e9b2261aab Fixes the moving of a PropertyType from a named tab to generic properties 2013-02-26 11:30:19 -01:00
Morten Christensen 02adb6e112 Removing the creation of Properties that doesn't exist from within the Content class, as it could cause other issues.
Refactoring how Properties are loaded to ensure that new properties are created for newly added PropertyTypes.
Corrected the saving of PropertyTypes not within a PropertyGroup.
Changed the loading of Content/Document to use the new API to ensure that properties are properly loaded.
2013-02-26 10:57:40 -01:00
Sebastiaan Janssen 695d26434c U4-600 Wrong membersearch.png path in MemberSearch.ascx 2013-02-26 09:48:14 -01:00
Morten Christensen 00d408e6bc Merge 2013-02-26 09:13:34 -01:00
Morten Christensen 0498161367 Fixes U4-1630 by ensuring that PropertyTypes with a changed name or alias aren't deleted from the db upon comparison.
Ensures cache is cleared for updated PropertyTypes.
2013-02-26 09:13:05 -01:00
Shannon Deminick 63159702e3 Implemented UmbracoApiController as a plugin and is auto routed 2013-02-26 03:45:39 +06:00
Shannon Deminick 545a873af2 added code comments 2013-02-26 02:28:22 +06:00
Shannon Deminick db268c6805 renamed to MemberAuthorizeAttribute and changed it to inherit from a AuthorizeAttribute as this happens much further up the chain than
the filter attribute and also contains the correct logic to ensure authorization always happens regardless of if the page is cached. Cleaned
up our other authorize attibutes.
2013-02-26 02:21:51 +06:00
Shannon Deminick 2967075c1f Merge 2013-02-26 01:27:48 +06:00
Shannon Deminick 4761e4bd43 Installs web api (nuget) 2013-02-26 01:23:58 +06:00
Shannon Deminick a27dccd0d9 Fix merge issue 2013-02-26 01:17:57 +06:00
Shannon Deminick 6b8bfc2e2d Manually applies fix for U4-1776 SafeAlias culture problem since the files/class structure has changed in 6.1 2013-02-26 01:13:31 +06:00
Shannon Deminick 5b15218174 Merge with 6.0.1 2013-02-26 01:05:36 +06:00
Shannon Deminick 0d3d4693b4 Merge with 4.11.5 2013-02-26 01:00:44 +06:00
Shannon Deminick a19de645e4 Merge 2013-02-26 00:59:06 +06:00
Shannon Deminick f0a53ea9c0 Merge 2013-02-26 00:58:24 +06:00
Shannon Deminick fbcabc94f2 Merge with 4.11.5 2013-02-26 00:50:58 +06:00
Shannon Deminick de9a27db10 Updates to latest Examine lib (another bug fixed) 2013-02-26 00:45:42 +06:00
Morten Christensen d494b061f3 Merge 2013-02-25 15:00:55 -01:00
Morten Christensen ebc8443e70 Removing unnecessary save from MediaType 2013-02-25 14:58:04 -01:00
Morten Christensen 48ee59b94e Adding check related to U4-1757 2013-02-25 14:57:43 -01:00
Sebastiaan Janssen 560dcad90a Updates for MySQL: Check for case-sensitivity 2013-02-25 14:42:07 -01:00
Morten Christensen 7498b2f994 Merge 2013-02-25 14:37:14 -01:00
Morten Christensen df4f92197a Fixes U4-1764 by reducing the number of times a DocumentType is saved from 3 to 1.
Instead of having the Allowed Templates saved in the EditNodeTypeNew control its now done via a callback.
2013-02-25 14:34:29 -01:00
Sebastiaan Janssen 13b1191aad Additional fixes for U4-1776 SafeAlias culture problem 2013-02-25 13:44:31 -01:00
Sebastiaan Janssen adaec42982 Merge with 4.11.5 2013-02-25 13:35:39 -01:00
Sebastiaan Janssen b6d5b7d603 Fixes U4-1776 SafeAlias culture problem 2013-02-25 13:33:51 -01:00
Sebastiaan Janssen 93d7cf4dc3 Fixes U4-1776 SafeAlias culture problem 2013-02-25 13:28:54 -01:00
Shannon Deminick e9f2546c2a Merge 2013-02-25 20:17:18 +06:00
Shannon Deminick 007c4d5862 Fixes: #U4-1773 2013-02-25 20:17:04 +06:00
Sebastiaan Janssen f3621aa743 MySQL: Check for case-sensitivity 2013-02-25 13:14:26 -01:00
Morten Christensen 46cf4398a0 Fixes issue with the Member editor throwing a YSOD because new API was used in the ContentControl.
The new API is now only used if available, which is the case for Content and Media, but currently not for Members.
2013-02-25 13:13:10 -01:00
Morten Christensen 1599f493fa Fixes U4-1696 2013-02-25 13:11:58 -01:00
Shannon Deminick 894cfb2e85 update to examine details 2013-02-25 20:00:11 +06:00
Morten Christensen b5d79ebb74 Fixes U4-1690 with a proper implementation for removing ContentTypes from a composition. 2013-02-25 11:15:56 -01:00
Morten Christensen 1cc8367fa9 Merge 2013-02-25 10:32:01 -01:00
Morten Christensen 7e5087ae7d Fixing issues related to DocTypes 2013-02-25 10:31:38 -01:00
Sebastiaan Janssen d6f9909bec Merge with 4.11.5 2013-02-25 08:46:22 -01:00
Tom Fulton 0c42596dc8 Fixed: U4-1678 Saving a Media should show a SpeechBubble 2013-02-25 08:39:18 -01:00
Shannon Deminick 7deae8ea37 Update to latest examine (bug fixed), started Examine Management dashboard FF project. 2013-02-23 23:00:31 +06:00
Shannon Deminick 03aa7fd06b Fixes umbraco content service 2013-02-23 22:11:38 +06:00
Shannon Deminick 54ba547c8c Converted ~/Umbraco/MasterPages/Default.Master to use correct web forms code behind structure. 2013-02-23 03:20:05 +06:00
Shannon Deminick c1172b6823 Fixes issue with UmbracoContentService when getting all user property names 2013-02-23 01:59:21 +06:00
Shannon Deminick a91d531db2 Fixes very strange issue of FirstOrDefault not actually returning 'null' when it is actually null, never seen anything like it and
PropertyType is not a value type so should be null. real strange.
2013-02-23 01:50:04 +06:00
Shannon Deminick dd0d4e872f Merge with 6.0.1 2013-02-23 00:24:38 +06:00
Shannon Deminick 9b4da4c8f8 Merge with 4.11.5 2013-02-23 00:21:52 +06:00
Shannon Deminick cfc81d0e84 Merge 2013-02-23 00:21:44 +06:00
Shannon Deminick 265fd6b91c Merge with 6.0.1 2013-02-23 00:19:05 +06:00
Morten Christensen 00e10deecb Merge 2013-02-22 16:42:17 -01:00
Morten Christensen 46e67e4a92 Skipping PropertyTypes that doesn't belong to the current ContentType 2013-02-22 16:42:06 -01:00
Morten Christensen 520a7f238d Refactoring ContentTypeControlNew and ContentControl 2013-02-22 16:25:45 -01:00
Shannon Deminick 3c41871e59 Fixes: #U4-1748 2013-02-22 21:42:38 +06:00
Shannon Deminick 038b4300ba Ensures plugin cache is cleared on install 2013-02-22 21:29:48 +06:00
Sebastiaan Janssen 8cf9c1ba97 Fixes: U4-1769 Dictionary Item with "Illigal" character can not be deleted 2013-02-22 14:15:22 -01:00
Shannon Deminick 958d7940f2 Manually applies changes from 6.0.1 to installer files from revisions 8033aae62d4a, fdeca60cb2c1 2013-02-22 21:02:24 +06:00
Shannon Deminick a3f7ef7002 Merge with 6.0.1 2013-02-22 20:04:57 +06:00
Shannon Deminick e2d806f5d9 Merge with 4.11.5 2013-02-22 20:00:10 +06:00
Shannon Deminick 7a47d63b48 Fixed remaining tests 2013-02-22 19:55:22 +06:00
Sebastiaan Janssen 596c4ac329 Fixes: U4-1721 V6: Publish of a page ends in YSOD when using legacy schema 2013-02-22 12:36:24 -01:00
Sebastiaan Janssen 8ad8a3239a Make sure that the installer doesn't crash if dbSettings are null 2013-02-22 12:01:47 -01:00
Morten Christensen c0fa011cc3 Merge 2013-02-22 11:50:00 -01:00
Sebastiaan Janssen 4648a8c103 Fixes U4-1746 Duplicate image source (src) when inserting resized image in tiny
mce (richtext editor)
2013-02-22 11:41:01 -01:00
Sebastiaan Janssen 2df05da7fc Fixes U4-1746 Duplicate image source (src) when inserting resized image in tiny
mce (richtext editor)
2013-02-22 11:41:01 -01:00
Sebastiaan Janssen 87947871d1 Have to add new Examine version to Web.UI as well, else the build output from
build.bat file will not be able to find it.
2013-02-22 09:57:58 -01:00
Sebastiaan Janssen 87fee572ff Enable nuget package restore for teamcity, upgrade examine dll 2013-02-22 09:47:23 -01:00
Shannon Deminick 36eb340c11 Merge 2013-02-22 10:49:15 +06:00
Shannon Deminick aa929e8091 Merge with 6.0.1 2013-02-22 10:45:04 +06:00
Shannon Deminick e00c0fc447 Another update to examine to fix another issue: 10362 2013-02-22 10:41:42 +06:00
Shannon Deminick 2ebfbd5d08 Fixed one test with merging 2013-02-22 10:34:43 +06:00
Shannon Deminick 567be2aecf Fixed up merge issues 2013-02-22 07:08:45 +06:00
Shannon Deminick 6a6ac99c34 Merge with 6.0.1 2013-02-22 06:58:44 +06:00
Shannon Deminick 7137c57ac9 merge issue with mediaxml file 2013-02-22 06:49:02 +06:00
Shannon Deminick d68b4d97f6 Fixing merge issues 2013-02-22 06:43:52 +06:00
Shannon Deminick 89f7a3ec63 Clearly these files shouldn't be deleted :P 2013-02-22 06:23:03 +06:00
Shannon Deminick 96a62b57fb Merge with 4.11.5 2013-02-22 06:21:12 +06:00
Shannon Deminick 7092a9ccbb Reverted the macro engines and web proj's, it would seem as though 4.x on the build server hasn't
been configured for nuget package restor (or something like that)
2013-02-22 06:05:10 +06:00
Shannon Deminick e9ea9b5e1b Updates DynamicNode with some performance enhancements especially around things like HasProperty and GetProperty.
Also when it returned children, it was actually re-iterating over all children (going to the repo to find them even though
they were already resolved).
2013-02-22 05:44:17 +06:00
Shannon Deminick fd1efb29ec Fixes issue when saving settings to web.config, not sure how this error never came up before. Was missing a "\" between the path and "web.config".
Using Path.Combine is much safer than just string.Concat!
2013-02-22 04:45:20 +06:00
Shannon Deminick cf4781153e Fixes: #U4-873, #U4-888 - fixes media sorting in razor + MVC. Updates Nunit libs and Examine lib. Adds unit tests to
support new sorting fixes. Fixes up a few other issues with the legacy ExamineBackedMedia class, it will now handle all data
stored in Examine. Simplifies the Examine internal index sets to include all data.
2013-02-22 04:12:24 +06:00
Stephan 03fc0c868c Core.Strings - fix more unit tests (resolvers init issues) 2013-02-21 16:53:25 -01:00
Morten Christensen 46687429fb Merge 2013-02-21 16:52:13 -01:00
Morten Christensen ce7aa43aa7 Refactoring ContentTypeControlNew to better work with the new api.
Adding a few helper methods to ContentTypeBase, which should make it easier to work with PropertyTypes and Groups.
2013-02-21 16:48:19 -01:00
Shannon Deminick ebed142cd5 Another fix for file sys test 2013-02-21 23:47:16 +06:00
Shannon Deminick dced287c1c Merge with 6.0.1 2013-02-21 23:08:14 +06:00
Shannon Deminick 76e5304233 Merge with 4.11.5 2013-02-21 23:07:59 +06:00
Shannon Deminick d162aba14a Fix for file system test 2013-02-21 23:07:37 +06:00
Shannon Deminick bcd426092c Merge with 6.0.1 2013-02-21 22:52:49 +06:00
Shannon Deminick 387398b044 Merge 2013-02-21 22:52:29 +06:00
Shannon Deminick 62ed7e0a53 Merge with 6.0.1 2013-02-21 22:48:45 +06:00
Shannon Deminick 635b8bd82e Removes all need of UmbracoSettings.UseLegacyXmlSchema = false; in unit tests since the default is false. 2013-02-21 22:46:50 +06:00
Shannon Deminick f2071379fc Merge with 4.11.5 2013-02-21 22:40:24 +06:00
Shannon Deminick ec075f5807 Merge 2013-02-21 22:38:38 +06:00
Shannon Deminick 566986201f Changes ContentFinderByNiceUrlTests to not require a database by having an overloaded ctor param on
ContentFinderByNiceUrl to not require a domain lookup (up-ported from 6.0.x and 4.x logic). Changes
ContentFinderByAliasTests to not require a database by splitting the two tests, now there is also a
ContentFinderByAliasWithDomainsTests.
2013-02-21 22:32:44 +06:00
Shannon Deminick a9947cda48 Merge with 6.0.1 2013-02-21 22:22:23 +06:00
Shannon Deminick eb8875066c Reverts LookupByNiceUrlTests to not require a database setup 2013-02-21 22:12:30 +06:00
Sebastiaan Janssen dca90e6316 Merge 2013-02-21 15:09:20 -01:00
Sebastiaan Janssen 2a47b384d2 Merge 2013-02-21 15:08:43 -01:00
Sebastiaan Janssen 29e5872a0f Merge with 4.11.5 2013-02-21 15:07:17 -01:00
Sebastiaan Janssen df31fafec5 Update en_us umbracoembed file, had the wrong content 2013-02-21 15:06:37 -01:00
Shannon Deminick 5f28f279e0 Merge with 4.11.5 2013-02-21 22:03:42 +06:00
Shannon Deminick 828dc64035 Backports fix for FullpathToRoot in GlobalSettings... not sure how some unit tests have been working this whole time.
Changes UseLegacySchema default value to false... was set to true!?
un-ignores LookupByNiceUrl tests and still ensures it doesn't require a database to test by passing in an optional parameter
to LookupByNiceUrl to specify if we want to include domain lookups or not (default is true)
2013-02-21 22:02:56 +06:00
Shannon Deminick 1d9e445a42 Merge 2013-02-21 21:34:30 +06:00
Shannon Deminick 271b0691e2 Fixed up merge 2013-02-21 21:33:21 +06:00
Shannon Deminick cf46df441a Merge with 6.0.1 2013-02-21 21:17:47 +06:00
Shannon Deminick 1aa137e9da merge fix 2013-02-21 21:13:21 +06:00
Shannon Deminick 042eb47c17 Merge with 4.11.5 2013-02-21 21:02:11 +06:00
Sebastiaan Janssen a6556d0195 Merge 2013-02-21 14:01:28 -01:00
Shannon Deminick 0b74164a8e New base test class for anything relating to published content/media, un-ignores strongly typed tests. 2013-02-21 21:01:00 +06:00
Sebastiaan Janssen 807b32fb0d Fixed: U4-1676 Renamed node has old name on sort 2013-02-21 14:00:10 -01:00
Shannon Deminick 62be1b1267 un-ignores Can_Get_File_Dates in AbstractFileSystemTests... not sure why it was ignored seems to work properly. 2013-02-21 20:42:49 +06:00
Shannon Deminick aec017e933 Merge with 6.0.1 2013-02-21 20:07:18 +06:00
Shannon Deminick bda3fbc698 Merge with 4.11.5 2013-02-21 20:07:05 +06:00
Sebastiaan Janssen 85ae7e764f Merge 2013-02-21 08:52:48 -01:00
Sebastiaan Janssen c744e47665 Fixes U4-1668 4.11.4 NiceUrl property on dynamicnode does not work until a
property has been requested from the dynamic node
2013-02-21 08:52:23 -01:00
Sebastiaan Janssen 3daa624627 Fixes U4-1668 4.11.4 NiceUrl property on dynamicnode does not work until a
property has been requested from the dynamic node
2013-02-21 08:52:23 -01:00
Shannon Deminick 3727ef54aa Commented out migration tests for 6.1 since we don't have any now that the servers stuff is commented out. 2013-02-21 08:19:07 +06:00
Shannon Deminick 5615f9590b Merge with 6.0.1 2013-02-21 06:18:45 +06:00
Shannon Deminick 9a7894df76 Merge with 4.11.5 2013-02-21 06:18:30 +06:00
Shannon Deminick e084ddeb41 Fixed up some merge issues. 2013-02-21 06:14:01 +06:00
Shannon Deminick f8760b34b8 Merge with 6.0.1 2013-02-21 06:10:25 +06:00
Shannon Deminick 6734420c6f merge issue, had 2 declarations in the proj for SettingsForTests 2013-02-21 06:03:56 +06:00
Shannon Deminick fd795e14c6 Merge with 4.11.5 2013-02-21 05:52:42 +06:00
Shannon Deminick f2d105d8b9 Fixed #U4-814 and got all possible unit tests that were not working for DynamicNode but were working for
DynamicPublishedContent working. And fixed up the DynamicPublishedContent unit tests as these weren't working at all...
but seemed to say they did on the build server. strange.
2013-02-21 05:44:44 +06:00
Shannon Deminick 9d95c04ab6 Fixed #U4-814 and got all possible unit tests that were not working for DynamicNode but were working for
DynamicPublishedContent working.
2013-02-21 05:13:08 +06:00
Shannon Deminick d622f76393 Fixed #U4-814 and got all possible unit tests that were not working for DynamicNode but were working for
DynamicPublishedContent working.
2013-02-21 05:02:06 +06:00
Shannon Deminick d8af1aaf7b Changed logging in unit tests to filter out things we don't need to see 2013-02-21 03:13:16 +06:00
Shannon Deminick c93193c5c8 Changed logging in unit tests to filter out things we don't need to see 2013-02-21 03:13:16 +06:00
Shannon Deminick 62c4713593 Changed logging in unit tests to filter out things we don't need to see 2013-02-21 03:13:16 +06:00
Sebastiaan Janssen d4fc82dae1 Calculate the hash of the WebPI package so it's not such a manual process. 2013-02-20 18:28:07 -01:00
Sebastiaan Janssen d4058bd81f Merge 2013-02-20 15:57:16 -01:00
Sebastiaan Janssen bc824ba66a Updates for WebPI testers: Check if SQL CE file exists when connectionstring is
filled in, make sure the connection string exists in web.config and if it has
empty values, run the installer instead of trying to start the site.
Also never claim the database is configure when the providername is empty.
2013-02-20 15:55:39 -01:00
Shannon Deminick e3ef3dfb32 Fixes events test 2013-02-20 22:27:58 +06:00
Sebastiaan Janssen 4201286038 Don't check for database.windows.net to determine SQL Azure as WebPI sets a
custom server name
2013-02-20 15:03:43 -01:00
Shannon Deminick 7509724e35 Comments out Server registration and db classes for now, we'll revisit this again soon for automatic
distributed cache without the need for xml. This code is nearly there to work in most classic implementations
of a load balanced site where each node has an internal DNS/Hostname entry. Needs some fine tuning but we'll release
this in a later version.
2013-02-20 21:55:02 +06:00
Stephan e333ad2b23 Tests.Routing - fix tests 2013-02-20 14:38:28 -01:00
Sebastiaan Janssen a8eeabb73d Merge 2013-02-20 14:34:49 -01:00
Sebastiaan Janssen b06620f56e Make the SQL Azure connection string support custom domains and all kinds of
ways of entering it.
2013-02-20 14:34:18 -01:00
Shannon Deminick a41e32c068 un-commented out the sort order test for examine 2013-02-20 21:32:57 +06:00
Shannon Deminick 3baf326498 Merge 2013-02-20 21:31:33 +06:00
Shannon Deminick 8ea9627d51 Updated to Examine 1.45, Updated FixedDisplayModes to 1.0.1 2013-02-20 21:29:56 +06:00
Stephan 957feefb2e Tests.Routing - fix tests 2013-02-20 14:23:29 -01:00
Morten Christensen e8524963dd Fixes U4-1716 2013-02-20 11:20:06 -01:00
Stephan 5b0a8c0668 Tests - fix build broken by back-porting 6.x code 2013-02-20 10:12:41 -01:00
Sebastiaan Janssen 5d931d1146 Merge 2013-02-20 08:52:06 -01:00
Stephan 40b7659078 Tests.Routing, Web.Routing - more tests + fix wildcard domains 2013-02-20 08:51:41 -01:00
Stephan 0427ecc7f4 Tests.Routing - add tests for wildcard domains 2013-02-20 08:12:48 -01:00
Stephan 11560a5451 Test.Routing - more umbracoUrlAlias test 2013-02-20 06:47:07 -01:00
Shannon Deminick 879c77c68d Applies same try/catch logic for setup/teardown because I'm still experiencing issues with the SQLCE
db file being locked which mucks up the rest of the setup/teardowns and tests fail.
2013-02-20 07:07:57 +06:00
Shannon Deminick e71dd3008d Merge 2013-02-20 06:39:09 +06:00
Shannon Deminick 597c888d36 Merge 2013-02-20 06:36:21 +06:00
Shannon Deminick 5bef77c0fb Merge 2013-02-20 06:30:39 +06:00
Shannon Deminick 89b85bcf4b Fixed Render route handler tests. 2013-02-20 06:30:06 +06:00
Shannon Deminick 694d252ce5 Fixed base test classes to ensure that if/when an issue goes wrong removing the database file that the class can
continue to TearDown (or force a teardown if it is starting up)
2013-02-20 05:54:41 +06:00
Shannon Deminick 7efc06429c Fixes up index set extensions and now have the Sorting test working. PDF indexer tests working. 2013-02-20 05:01:40 +06:00
Sebastiaan Janssen ef4c02f759 Merge 2013-02-19 20:58:00 -01:00
Sebastiaan Janssen 452a0a43b0 Fixes U4-1561 V6.0 RC - Member Profile property saving doesn't work 2013-02-19 20:57:20 -01:00
Shannon Deminick ad188fab70 More tests fixed. 2013-02-20 03:02:44 +06:00
Shannon Deminick b47f9e87f1 Fixed up merging and unit test structures so taht BaseWebTest uses BaseDatabaseFactoryTests.
Fixed up Examine unit test issues
2013-02-20 02:50:08 +06:00
Stephan c3ccf3a609 Tests - cleanup settings handling for more reliable tests 2013-02-19 18:01:52 -01:00
Stephan 60bbede408 U4-1441 - fix, fix and fix! 2013-02-19 17:49:49 -01:00
Shannon Deminick dddc308167 Merge with 6.0.1 2013-02-20 00:44:04 +06:00
Shannon Deminick 0751aff31f Fixes more of #U4-1706 and adds another unit test. Ensures we never return items from the recycle bin even if the indexes exist. Updated logic to ensure
items don't get indexed even if they are saved and currently exist in the recycle bin and ensures that indexes are removed on both trashed
and deleted.
2013-02-20 00:13:35 +06:00
Shannon Deminick a2ea20de70 un-ignores PublishedMedia tests. Streamlines BaseWebTest so now we only have one place for database init logic (will
enhance this more today). Changed ExamineEvents to not delete indexes on trashed and changed PublishedMediaStore to ignore
nodes in the recycle bin path... and now to write unit tests for that.
2013-02-19 22:46:44 +06:00
Shannon Deminick 5919dca5d5 Merge with 6.0.1 2013-02-19 22:15:16 +06:00
Shannon Deminick 3bfa1be60c Patch applied for #U4-1636 2013-02-19 22:14:08 +06:00
Shannon Deminick 8d38cf3c44 Applying patch for #U4-1636 2013-02-19 22:11:55 +06:00
Shannon Deminick a3a9ab069a Applying patch for #U4-1636 2013-02-19 22:09:55 +06:00
Morten Christensen da908501e5 Merge 2013-02-19 14:58:12 -01:00
Morten Christensen 995ed22401 Comments related to U4-1714 2013-02-19 14:58:02 -01:00
Sebastiaan Janssen c9cd4c721c Merge 2013-02-19 14:52:34 -01:00
Sebastiaan Janssen c059c14d7a Fixes U4-1706 DynamicMedia pulls content from Recyling Bin 2013-02-19 14:51:51 -01:00
Stephan 7493426e25 Core.Strings - fix unit tests 2013-02-19 14:00:17 -01:00
Stephan 04c9771978 U4-1611 - bugfix 2013-02-19 13:58:16 -01:00
Stephan 9c8b5cd97e U4-1441 - fix, fix and fix! 2013-02-19 17:49:49 -01:00
Stephan 8bb447065c Tests - cleanup settings handling for more reliable tests 2013-02-19 17:45:22 -01:00
Stephan 1d0299af89 U4-1611 - bugfix 2013-02-19 13:58:16 -01:00
Morten Christensen 5b8beceea8 Merge 2013-02-19 13:46:45 -01:00
Morten Christensen e4568520a9 Improves performance when working with DocumentTypes in the backoffice - related to U4-1714 2013-02-19 13:45:57 -01:00
Shannon Deminick 1733e876c4 Merge with 6.0.1 2013-02-19 20:19:43 +06:00
Shannon Deminick cbba628eaf Merge with 4.11.5 2013-02-19 20:18:15 +06:00
Shannon Deminick c958422317 Merge 2013-02-19 20:17:48 +06:00
Shannon Deminick c2d0e255df Fixes: #U4-1537 2013-02-19 20:17:17 +06:00
Shannon Deminick e096890400 Fixes: #U4-1537 2013-02-19 20:12:13 +06:00
Shannon Deminick 6a9277a712 Fixes: #U4-1537 2013-02-19 20:04:50 +06:00
Morten Christensen ec4b1c8f70 Fixes U4-1689 and U4-1719.
Refactoring UmbracoImageMediaFactory so it uses the extension method for uploading/setting images, so its a bit more DRY.
2013-02-19 11:06:00 -01:00
Stephan 2d336fde73 Tests - cleanup settings handling for more reliable tests 2013-02-19 10:07:22 -01:00
Morten Christensen 1af904435a Merge 2013-02-19 08:47:04 -01:00
Stephan ac3bec5d9e Web.Routing - refactor domains management 2013-02-19 06:37:25 -01:00
Stephan 7da60e9937 Web.Routing - sanitize DomainAndUri 2013-02-26 16:52:43 -01:00
Stephan eba5fc84c0 Web.Routing - refactor wildcard domains 2013-02-26 16:52:43 -01:00
Stephan 71d8736e7e Web.Routing - refactor & resharp 2013-02-19 06:37:25 -01:00
Stephan ae1ff4c39a Web.Routing - cleanup resolvers 2013-02-19 06:37:24 -01:00
Stephan f9f998e823 Core.Strings - refactor cms.helper.Casing 2013-02-26 18:12:22 -01:00
Stephan e10fc26729 Core.Strings - add arguments checks 2013-02-19 06:34:06 -01:00
Stephan 0d6999292c Core.Strings, Web.UI - refactor UI aliases management (3) 2013-02-19 06:30:19 -01:00
Stephan 3e7681d4d2 Core.Strings, Web.UI - refactor UI aliases management (2) 2013-02-19 06:29:59 -01:00
Stephan c838b8a381 Core.Strings - resharp 2013-02-19 06:27:13 -01:00
Stephan 96a279499b Core.Strings - supports allowUnderscoreInTerm in new DefaultShortStringHelper 2013-02-19 06:27:13 -01:00
Stephan a3f0b7a37f Core.Strings, Web.UI - refactor UI aliases management (1) 2013-02-19 06:26:58 -01:00
Shannon Deminick ec87b951d5 Fixes up merge issue. 2013-02-19 07:45:01 +06:00
Shannon Deminick 2e033b3bb6 Merge 2013-02-19 07:32:57 +06:00
Shannon Deminick d8721197b7 Fixes up pull request so that there is no breaking changes. We now type check for a new base class called
UmbracoControllerFactory to get the controller type. Adds SurfaceRouteHandler to ensure that UmbracoMvcHandler is used for all SurfaceControllers, and updates
all routes accordingly. Streamlines the RenderRouteHandler to then just look up surface routes in the route table
for posted values. This now ensures that UmbracoMvcHandler is used even with plugin surface controllers.
2013-02-19 07:30:46 +06:00
Shannon Deminick 4a05b0ea31 Merge with 6.0.1 2013-02-19 06:20:48 +06:00
Shannon Deminick 7b2f03ba50 Merge with 4.11.5 2013-02-19 06:20:12 +06:00
Shannon Deminick 005d3e7d64 Removes area routing for local surface controllers and BeginUmbracoForm, adds strongly typed Html.Action<T>
method for rendering SurfaceController child actions regardless of area (so you don't have to specify).
All relates to #U4-1727
2013-02-19 06:19:26 +06:00
Shannon Deminick 12f8638223 Fixes: #U4-1727 2013-02-19 06:18:51 +06:00
Shannon Deminick 137b0754d6 Removes area routing for local surface controllers and BeginUmbracoForm, adds strongly typed Html.Action<T>
method for rendering SurfaceController child actions regardless of area (so you don't have to specify).
All relates to #U4-1727
2013-02-19 06:11:58 +06:00
Shannon Deminick 7d1e9cfd72 Fixes: #U4-1727 2013-02-19 06:11:17 +06:00
Shannon Deminick 663fc4f954 Removes area routing for local surface controllers and BeginUmbracoForm, adds strongly typed Html.Action<T>
method for rendering SurfaceController child actions regardless of area (so you don't have to specify).
All relates to #U4-1727
2013-02-19 06:00:40 +06:00
Shannon Deminick 845595b01b Fixes: #U4-1727 2013-02-19 05:39:38 +06:00
Shannon Deminick 2fca8f3444 Fixes more examine initialization checks if the umbraco app is not ready/installed. 2013-02-19 05:06:54 +06:00
Shannon Deminick 9324ab8e0e Merge with 6.0.1 2013-02-19 04:11:30 +06:00
Shannon Deminick d01a39e0c6 Fixes merge issue 2013-02-19 04:10:01 +06:00
Shannon Deminick 73bd0137e3 Merge with 4.11.5 2013-02-19 03:57:24 +06:00
Shannon Deminick e6faf73f4f Fixes: #U4-552 2013-02-19 03:43:37 +06:00
Shannon Deminick e3f9e8c842 Fixes: #U4-552 2013-02-19 03:42:19 +06:00
Shannon Deminick 7a38726b26 Fixes: #U4-552 2013-02-19 03:40:36 +06:00
Shannon Deminick a475f72d50 Fixes: #U4-1695 2013-02-19 02:25:57 +06:00
Shannon Deminick 36cadf39e9 Fixes: #U4-1695 2013-02-19 02:22:00 +06:00
Shannon Deminick 9f301f8cc6 updates some code docs 2013-02-19 02:20:15 +06:00
Shannon Deminick e7c5d1f4f3 Fixes: #U4-1695 2013-02-19 02:19:53 +06:00
Shannon Deminick a559ef9f90 Fixes: #U4-1732 2013-02-19 00:59:21 +06:00
Shannon Deminick b45f6e0393 Fixes: #U4-1732 2013-02-19 00:53:20 +06:00
Shannon Deminick 91ee948b4e Obsolete's requestModule and Singleton 2013-02-19 00:50:38 +06:00
Shannon Deminick c1ed910a51 Fixes: #U4-1732 2013-02-19 00:50:22 +06:00
Morten Christensen b99ff6c981 Merge 2013-02-18 15:48:02 -01:00
Morten Christensen 81021f5821 Part of the fix for U4-1689
Adds an alternative to the naming of the media subfolders instead of using the PropertyId.
2013-02-18 15:46:18 -01:00
Sebastiaan Janssen 29724b352b Fixes U4-1451 2013-02-18 13:22:12 -01:00
Sebastiaan Janssen be83302b14 Fixes U4-1451 2013-02-18 13:22:12 -01:00
Sebastiaan Janssen 83d7ea9ef1 Ignoring wrong unit test for now 2013-02-18 12:53:15 -01:00
Sebastiaan Janssen 95024442de Copy the umbracoSettings for PublishMediaStoreTests as well 2013-02-18 12:22:53 -01:00
Sebastiaan Janssen 69f54b5f22 Copy the umbracoSettings for LibraryTests as well 2013-02-18 11:57:58 -01:00
Sebastiaan Janssen 3404f95b2e Forgot one trailing slash in previous commit 2013-02-18 11:42:45 -01:00
Sebastiaan Janssen e56738481b Adding trailing slash to failing routing tests.
The issue with these tests might again be because of the UmbracoSettings file, which has the trailing slash setting. But with the settings being reset after teardown the tests were still failing, so made these minor corrections which shoudl correspond to the default setting.
2013-02-18 11:38:07 -01:00
Sebastiaan Janssen cb59dc353b Update version to 4.11.5 2013-02-18 10:31:43 -01:00
Sebastiaan Janssen d1b75eac08 Update wrong config path in unit tests 2013-02-18 10:31:17 -01:00
Sebastiaan Janssen 1f7651d0e3 Set version to 6.0.1 2013-02-18 10:16:24 -01:00
Stephan 7414b3596e Core.Strings - fix some tests 2013-02-18 08:31:00 -01:00
Stephan a995c9557c Core.Strings - new IUrlSegmentProvider 2013-02-18 08:31:00 -01:00
Floris Robbemont 55f06a7ca6 Fixed issue: #U4-1726 2013-02-16 16:00:28 -01:00
Shannon Deminick e921dca9d6 Fixed up more unit tests and issue with publishing logic. 2013-02-15 20:53:44 +06:00
Shannon Deminick 9ad813d990 Fixes a couple issues with some routing tests. 2013-02-15 19:38:33 +06:00
Shannon Deminick 9fba3fa673 Fixes some resetting being done in test init... should only be done in teardown. 2013-02-15 19:23:16 +06:00
Sebastiaan Janssen 8fabd4e4ed Merge 2013-02-15 12:05:46 -01:00
Sebastiaan Janssen 564d92bed7 Possible fix for TeamCity 2013-02-15 12:05:25 -01:00
Shannon Deminick d73dd47e7b Merge 2013-02-15 18:56:24 +06:00
Shannon Deminick 95f103ccc2 Merge 2013-02-15 18:55:50 +06:00
Shannon Deminick a00278892a Merge 2013-02-15 18:54:53 +06:00
Shannon Deminick 196357f6c3 WIP - getting sorting search test going. 2013-02-15 18:54:37 +06:00
Stephan 7a736344f9 Core.Strings - reorg StringExtensions (no change to code) 2013-02-15 08:42:08 -01:00
Stephan a36824e796 U4-1441 - fix, fix and fix! 2013-02-19 17:43:13 -01:00
Stephan 6e2dc64001 U4-1611 - bugfix 2013-02-19 13:58:16 -01:00
Shannon Deminick 68d5acbe48 Fix merge issue 2013-02-14 23:55:39 +06:00
Shannon Deminick a6b9ceef7b Merge with 6.0.1 2013-02-14 23:38:59 +06:00
Shannon Deminick c21b232a33 Merge with 4.11.5 2013-02-14 23:34:58 +06:00
Stephan 0ace2fdae7 U4-1611 - fix xpath special chars escaping issues in published content store 2013-02-14 16:31:45 -01:00
Shannon Deminick dfb2a31f26 Fixes up examine config for internal indexes: #U4-1710 2013-02-14 23:29:11 +06:00
Stephan 5da3541584 U4-1441 - bugfix 2013-02-14 16:27:27 -01:00
Shannon Deminick ef86d2f1f1 Manually applies patch for #U4-1718 2013-02-14 23:26:29 +06:00
Stephan be98425956 U4-1611 - fix xpath special chars escaping issues in published content store 2013-02-14 16:23:56 -01:00
Stephan 61d1f87611 U4-1441 - bugfix 2013-02-14 16:34:17 -01:00
Stephan 8de579083c U4-1611 - fix xpath special chars escaping issues in published content store 2013-02-14 16:23:56 -01:00
Stephan 6a6b82d1e8 U4-1441 - bugfix 2013-02-14 16:22:42 -01:00
Shannon Deminick 598d66ac7f Imports patch to fix: #U4-1718 2013-02-14 23:14:43 +06:00
Shannon Deminick ac090c05ae WIP - updating UmbracoExamine to fix sort order sorting. 2013-02-14 23:06:28 +06:00
Shannon Deminick 527ef10cda Fixes: #U4-1718 2013-02-14 23:05:58 +06:00
Sebastiaan Janssen a10a6d1af8 Need to wrap the login javascript in a placeholder for Concorde 2013-02-14 09:06:15 -01:00
Sebastiaan Janssen 7640908781 Need to wrap the login javascript in a placeholder for Concorde 2013-02-14 09:06:15 -01:00
Shannon Deminick 766cf56a3f updated some copy is all and started creating a search test but need more info. 2013-02-14 06:33:48 +06:00
Shannon Deminick 73714c7cef Put legacy examine classes back in. 2013-02-14 06:06:54 +06:00
Shannon Deminick 0485c20331 Updated Examine.dll version with a few more fixes/updates. 2013-02-14 06:02:38 +06:00
Shannon Deminick d104ea1b57 Merge with 6.0.1 2013-02-14 02:37:23 +06:00
Shannon Deminick 41c952a2fa missing change 2013-02-14 02:36:56 +06:00
Shannon Deminick 6c09a58baf temp code 2013-02-14 02:36:32 +06:00
Morten Christensen b101e25e7a Correcting a check related to U4-1690.
Fixes a typo in an internal class and private method.
2013-02-13 08:05:04 -01:00
Shannon Deminick 8d2c5029af Merge 2013-02-13 06:14:04 +06:00
Shannon Deminick 8c97e367a2 Adds DatabaseServerRegistrar and ServerRegistrationEventHandler, we can now ensure that all server add themselves to the
database table automatically.
2013-02-13 06:12:43 +06:00
Shannon Deminick 6423914f01 Creates ServerRegistrationService 2013-02-13 04:22:46 +06:00
Shannon Deminick 3b25214433 Adds new database table + migration + unit test + fixes up unit tests to ensure PluginManager.Current = null; is done on teardown.
Created new ServerRegistrationRepository + unit tests + models
2013-02-13 03:29:32 +06:00
Morten Christensen 35a8c5e980 Merge 2013-02-12 12:49:00 -01:00
Morten Christensen 64031777d8 Corrects sorting in migrations 2013-02-12 12:48:47 -01:00
Shannon Deminick 102bf058bc Fixes failing unit tests due to adding check for if the application is configured and un-ignores a couple. 2013-02-12 18:59:07 +06:00
Shannon Deminick 7f51e01be7 Created strongly typed ICacheRefresher<T> so that now we can have cache refreshers execute against a
real instance object like IContent, this will dramatically increase performance for bulk publishing when not
in a load balanced environment. Updated methods on DistributedCache to refresh many instances at one time, this also
means we're not re-looking it back up again. Need to update media, users, templates, members and macros to use this new feature too.
2013-02-12 07:35:47 +06:00
Shannon Deminick cb3ac17f43 Ensures tree is synced on bulk publish, fixes Dimming on the content node. Starts adding ability to
make distributed calls that are strongly typed and can do more than one at a time.
2013-02-12 04:47:36 +06:00
Shannon Deminick 8dc5092763 Fixes: #U4-1697 - streamlines user cache invalidation/adds new UserCacheRefresher. 2013-02-12 04:13:29 +06:00
Shannon Deminick 4e6bdd1fc7 Fixed some med trust issues with UmbracoExamine. Created new framework for distributed cache providers with unit tests. Still uses the
old ICacheRefresher but now we can plugin 2 new providers - one for resolving a list of servers and the other to notify the servers of changes.
By default we have the configuration based providers which uses the umbracoSettings.
2013-02-12 03:46:27 +06:00
Shannon Deminick f741861014 WIP - refactored some of the lastest changes with publishing based on Morten's feedback. 2013-02-11 20:07:23 +06:00
Shannon Deminick 5e4a23ea84 Replaces all calls of Document.Publish to the lesser obsoleted method Document.SaveAndPublish which is what Publish was calling anyways. 2013-02-11 05:53:44 +06:00
Shannon Deminick ea54997bb7 Updates Document class to ensure that omitCacheRefresh is false for all unpublish operations. Removes all calls in the codebase
to library.UnPublishSingleNode as the logic will be automatically handled by events when un-publishing an item.
Obsoletes library calls - UnPublishSingleNode, UpdateDocumentCache since they are no longer needed to be called
explicitly, cache refreshing will happen automatically with event subscription.
2013-02-11 05:47:25 +06:00
Shannon Deminick da4f51fe2c Reviews all calls to library.RefreshContent(), adds notes where required and streamlines all library calls for
DistributedCache.Instance.RefreshAllPageCache();
2013-02-11 05:32:52 +06:00
Shannon Deminick fc9aa1d231 ensures all publishing occuring in Document class has 'false' set for omitcacherefresh. 2013-02-11 05:01:00 +06:00
Shannon Deminick ac43b40f33 Removes all remaining calls to library.UpdateDocumentCache ... this is handled automatically by events whenever a document is published. 2013-02-11 04:56:34 +06:00
Shannon Deminick 77201f3805 Fix merg issues. 2013-02-11 04:28:18 +06:00
Shannon Deminick 81f7754a45 Merge with 6.0.1 2013-02-11 04:18:33 +06:00
Shannon Deminick 2f9360ac08 Merge 2013-02-11 03:56:58 +06:00
Shannon Deminick c23be1fd96 Fixes #U4-414, #U4-1669 - publish dialog now uses new apis and ensures documents are validated during publishing. This also
enhances many other things in the publishing API including giving a status result for each item, ensuring that child items
do not try to get published when the parent item fails (based on a subset of rules)
2013-02-11 03:55:58 +06:00
Morten Christensen 1c7bb623f1 Implements the retrieval of ancestors, children, descendats and parent IMedia in the MediaService and as extensions to IMedia.
Corresponds to the IMedia implementation of U4-1638.
2013-02-09 11:12:51 -01:00
Morten Christensen 75de4e4e67 Implements the retrieval of ancestors, children, descendats and parent IContent in the ContentService and as extensions to IContent.
Corresponds to the IContent implementation of U4-1638.
2013-02-09 10:58:21 -01:00
Shannon Deminick ded940a757 Updates publishing strategy to allow for validating documents on publishing and reporting on that. Also depending on the
rules set, will not continue publishing it's children either. #U4-414
2013-02-09 06:23:51 +06:00
Shannon Deminick b80415b34e Fixes PublishingStrategy - It will still check if it's expired even if the event isn't cancelled. It now adheres
to some rules about publishing the children if a parent's publishing has failed or was cancelled. Have written unit
tests for these too.
2013-02-09 06:05:35 +06:00
Shannon Deminick 2ecc978591 Got publish strategy working to allow for publishing only descendants that have been previously published, or all descendants.
Added unit tests to support. Changed ServiceContext to accept a BasePublishingStrategy object as default and obsoleted the other
contructor... at least that interface should be easy to obsolete in favor of a base class.
2013-02-09 04:33:56 +06:00
Shannon Deminick de13f7e361 WIP ... Fixes: #U4-1666, Updates documentService to not have to manually
refresh content cache (and fix the unpublishing too since that logic wasn't correct)
Adds DebuggerDisplay support to ContentBase and Entity for better debugging info.
Adds new internal publishing methods to support publishing all children or only children previously published. This also adds new support
for getting a published result back even with bulk publishing.
Updates the publish dialog with new code and to use the new API based on issue #U4-1669.
Adds UmbracoUser property to AuthenticatedUmbracoController, Adds all common properties to the abstract UmbracoController.
Changes the legacy Document to allow content cache to be automatically refreshed (based on events)
2013-02-09 04:05:01 +06:00
Morten Christensen 319f257ee5 Minor change related to U4-1672 2013-02-08 18:54:18 -01:00
Morten Christensen 14d40697b2 Fixes U4-1662 2013-02-08 18:40:52 -01:00
Morten Christensen 6e6b1beffd Fixes U4-1664 2013-02-08 18:37:59 -01:00
Morten Christensen e22de5c9a0 Fixes U4-1666 2013-02-08 18:34:47 -01:00
Morten Christensen 1eea4dab33 Fixes U4-1661 2013-02-08 18:29:59 -01:00
abutland 0af4b3da82 Updated project file 2013-02-08 15:38:52 -01:00
abutland def651d98e Implemented an attribute for surface controllers to provide the restrictions to certain members as available in base. 2013-02-08 15:01:00 -01:00
Morten Christensen 83518de981 Adding no guard for testing purposes 2013-02-08 11:37:50 -01:00
Stephan 6d87174cc1 U4-1441 - improve logging 2013-02-08 07:54:16 -01:00
Stephan 2da18d4500 U4-1441 - improve logging 2013-02-08 07:54:16 -01:00
Stephan a03f5420fa U4-1441 - change trySkipIisCustomError config key 2013-02-08 07:36:35 -01:00
Stephan 9af9c3fe77 U4-1441 - change trySkipIisCustomError config key 2013-02-08 07:36:35 -01:00
Stephan 9cedf5da4c U4-1441 - make trySkipIisCustomError value a setting 2013-02-08 08:08:36 -01:00
Stephan d50396ce68 U4-1441 - change trySkipIisCustomError config key 2013-02-08 07:36:35 -01:00
Stephan f7d4080472 U4-1441 - make trySkipIisCustomError value a setting 2013-02-08 07:51:22 -01:00
Shannon Deminick 4ab14484ba Fixes: #U4-1664, #U4-1661, #U4-1662, #U4-1660
WIP - Updates much logic between editContent and ContentControl to ensure that the above issues are fixed and that we are not
double saving documents each time it is published. This also ensures that the Document.BeforeSave event is not double fired
when saving a document. Have changed over Document.SaveAndPublish to ensure that the cache does get refreshed automatically
when this is called - but now need to go through the rest of the codebase to make sure it's not being double refreshed. once that is
done then we will have streamlined the cache invalidation for content too.
Adds useful properties to the old BasePage like ApplicationContext, Services, etc...
2013-02-08 04:25:31 +06:00
Morten Christensen e24ff1b92b Updating the CreateDatabaseSchema method, so it can't be used if Umbraco is configured. Just to ensure that Richard doesn't accidentally break anything. 2013-02-07 13:56:00 -01:00
Morten Christensen 0c05cbc9db Updating the EmptyRecycleBin method in the services to account for a deleted structure.
Optimizing the CallTheGarbageMan method because it was sooo easy, and it would be stupid not to.
2013-02-07 13:31:39 -01:00
Stephan a0f662c114 Core.Strings - refactor + new IShortStringHelper 2013-02-07 13:30:50 -01:00
Shannon Deminick 975d84f3d0 Started on streamlining Content cache invalidation. 2013-02-07 06:43:49 +06:00
Shannon Deminick c0b708b1f4 Streamlines how Media cache gets invalidated - ensures Save() is called on media where it was needed,
cache now gets invalidated on events.
2013-02-07 05:53:59 +06:00
Shannon Deminick d93ca26181 Streamlines how Template cache gets invalidated - ensures Save() is called on templates where it was needed,
cache now gets invalidated on events.
2013-02-07 05:26:53 +06:00
Shannon Deminick cf8a0728d8 Streamlines how Member cache data gets invalidated 2013-02-07 04:57:44 +06:00
Shannon Deminick ea24e43c90 Changed cache invalidation for macros to be done via events not inline in the editor. 2013-02-07 04:45:05 +06:00
Shannon Deminick 75e747a2d2 Simplifies clearing cache for macro's all is done via the DistributedCache.Instance - hopefully all cache will be invalidated
via this method so that all cache types are simply invalidated with ICacheRefreshers and ApplicationEventHandlers. Currently we
have calls to clear cache in zillions of places and its near impossible to tell where/when it currently happens.
2013-02-07 04:26:48 +06:00
Shannon Deminick be398a4616 Adds a constant id for the macro distributed cache object,
adds extension method to DistrubutedCache to refresh the macro cache,
Changes all distrubuted cache calls for macro to use extension method.
2013-02-07 04:04:51 +06:00
Shannon Deminick 84bd89f00b Adds a constant id for the media distributed cache object,
adds extension method to DistrubutedCache to refresh the media cache,
Changes all distrubuted cache calls for media to use extension method.
2013-02-07 04:01:50 +06:00
Shannon Deminick a1c2352dca Adds a constant id for the member distributed cache object,
adds extension method to DistrubutedCache to refresh the member cache,
Changes all distrubuted cache calls for members to use extension method.
2013-02-07 03:58:47 +06:00
Shannon Deminick b6ec42334b Adds a constant id for the page distributed cache object, adds extension method to DistrubutedCache to refresh the page cache,
Changes all distrubuted cache calls for pages to use extension method.
2013-02-07 03:55:14 +06:00
Shannon Deminick 56fb570267 Adds a constant id for the template distributed cache object, adds extension method to DistrubutedCache to refresh the template cache,
Changes all distrubuted cache calls for templates to use extension method.
2013-02-07 03:49:45 +06:00
Shannon Deminick 510d8b9dda Ensures that all calls to 'dispatcher' are replaced with the new DistributedCache.Instance object. 2013-02-07 03:29:47 +06:00
Shannon Deminick d8e4895daa Moved legacy classes into single file LegacyClasses.cs 2013-02-07 03:24:32 +06:00
Shannon Deminick c20cd907b0 Migrated CacheRefresher and dispatcher to proper namespaces and cleaned up a bit. 2013-02-07 03:22:38 +06:00
Shannon Deminick c72b4f40bd Ensures Examine events is listening to the Trashed of content too with the new API. 2013-02-07 02:23:40 +06:00
Shannon Deminick f8d09a9ac3 Adds patch fixes for #U4-1653 2013-02-07 02:19:51 +06:00
Shannon Deminick 906d675dca Merge 2013-02-07 02:09:32 +06:00
Shannon Deminick 860ef73fab Merge 2013-02-07 02:07:43 +06:00
Shannon Deminick ec6158792a Adds patch fixes for #U4-1653 2013-02-07 02:07:07 +06:00
Shannon Deminick f1b3105202 Patch for #U4-1653 - media library cache refresh issue 2013-02-06 20:56:47 +06:00
Morten Christensen a399a8766d Correcting the order of calls in the test SetUp of StronglyTypedQueryTests 2013-02-06 12:53:47 -01:00
Morten Christensen 7f103724f3 Refactoring PetaPoco uses of ExecuteNon, ExecuteScalar and ExecuteReader to use the new WithRetry extension methods 2013-02-06 12:53:08 -01:00
Shannon Deminick 3ebb213916 Patches installer issue. 2013-02-06 19:18:42 +06:00
Shannon Deminick 97536086c0 Patches installer issue. 2013-02-06 19:14:34 +06:00
Morten Christensen 98ecf0e824 Adding package config file for umbraco.webservices proj 2013-02-06 10:37:32 -01:00
Morten Christensen 5fb11a77e7 Adding Mvc 4 as a nuget reference in the umbraco.webservices proj to get it to build. 2013-02-06 10:35:59 -01:00
Morten Christensen d7c72dc279 Merge with 6.0.1 2013-02-06 09:52:28 -01:00
Morten Christensen 0853f8da85 Fixes U4-1619 so MediaTypes are deleted the same way as DocumentTypes using the legacy api/backoffice. 2013-02-06 09:43:53 -01:00
Morten Christensen 32d36d66c9 Removing unused media events 2013-02-06 09:12:38 -01:00
Morten Christensen 2aef75a70a Fixing SaveAndPublish method related to U4-1624 2013-02-06 09:10:08 -01:00
Morten Christensen fc21d10192 Updating cleanup script 2013-02-06 09:04:56 -01:00
Morten Christensen c6bd94532d Fixing issue U4-1648 caused by incorrect sql statement 2013-02-06 09:04:46 -01:00
Morten Christensen 2c8c88e4b8 Merge 2013-02-06 07:31:44 -01:00
Shannon Deminick 9f7347a4f5 Updated LazyManyObjectsResolverBase to support removal. Moves cache refreshers to proper namespace and obsoletes old ones. Obsoletes
a couple of library cache clearing methods and moves them to CacheHelperExtensions. Fixes #U4-1653 for 6.1 and updates ExamineEvents to
ensure that Examine re-indexes media on all of the correct events (including Trashed). Changes for Caching are being done to begin work with
CD-148
2013-02-06 09:53:13 +06:00
Shannon Deminick 13e5590efa Obsoleted methods in old Casing class and redirects to use StringExtensions. Removes eroneous webforms files not needed in the Umbraco.Web prject
(didn't convert the related UI project ones to have code behinds though... one thing at a time and there's a lot of them to do... over time)
2013-02-06 05:56:49 +06:00
Shannon Deminick 77bffa69fd Couple more changes to DynamicXml 2013-02-06 03:58:53 +06:00
Shannon Deminick 763f8796e0 Merge 2013-02-06 03:37:38 +06:00
Shannon Deminick 3be13f57cf un-breaks #U4-1636 - now we have some different ways to return the raw xml values. will post on the issue. 2013-02-06 03:37:28 +06:00
Stephan a65ca205de U4-1441 - fix issue with IIS taking over custom errors 2013-02-05 16:29:10 -01:00
Stephan c8e08b8ef8 U4-1441 - fix issue with IIS taking over custom errors 2013-02-05 16:29:10 -01:00
Stephan 683d793460 U4-1441 - refactor (fix) legacy NotFoundHandler support 2013-02-06 12:46:54 -01:00
Morten Christensen d430efa7ab Updating logging in DatabaseContext 2013-02-05 14:38:58 -01:00
Morten Christensen 31a5363387 Adding fault handling extensions for IDbCommand.
Adding unit tests to verify retry strategies.
Adding a RetryPolicy factory for our standard configuration.
2013-02-05 14:31:55 -01:00
Morten Christensen ef20f228ec Correcting issue related to MediaXmlTest, which was fixed in v6. 2013-02-05 09:13:21 -01:00
Morten Christensen c828c6ede3 Updating schema result to account for foreign tables when determining the current schema. 2013-02-05 08:41:10 -01:00
Morten Christensen bc08feaa08 Merge 2013-02-05 07:25:41 -01:00
Stephan ef9ce720b2 Web.PublishedCache - create, migrate 2013-02-05 06:31:13 -01:00
Stephan 4c3d2c10ac Web.Routing - clear convoluted .RoutingContext.UmbracoContext.RoutingContext 2013-03-19 17:38:18 -01:00
Stephan 0db781b59f Web.Routing - fix configuration default 2013-03-19 17:37:35 -01:00
Stephan c94eb4328f Core.Xml - document + public XPathVariable 2013-03-19 17:34:28 -01:00
Shannon Deminick 47ab187780 Obsoletes base pages - umbraco.BasePage, etc... which is superceded by Umbraco.Web.UI.Pages classes 2013-02-05 06:05:57 +06:00
Shannon Deminick 020cc54da7 Obsoleted old ping.aspx class, changed the ping.aspx page to not actually have an inherited class. 2013-02-05 06:01:41 +06:00
Shannon Deminick dd0a18cf5b Removed ~/Umbraco/test.aspx - this literally didn't do anything, was never referenced anywhere and threw YSODs when the button was clicked. 2013-02-05 05:51:51 +06:00
Shannon Deminick f726ec740a Converted Umbraco.aspx, TreeInit.aspx to have proper web forms classes and obsoletes old ones.
Obsoletes umbWindow class as its not used in the codebase whatsoever.
2013-02-05 05:43:38 +06:00
Shannon Deminick db79b95d22 Fixes a bunch more unit tests due to resolution issues. 2013-02-05 05:08:43 +06:00
Shannon Deminick bac2b7643f Moves UmbracoUserControl to it's correct home and obsoletes the old one (even though its really new)
Publicizes UmbracoControl.
2013-02-05 05:00:16 +06:00
Shannon Deminick 11449688ba Fixes: #U4-1636 - We still use DynamicXml but we don't make a call to StripDashesInElementOrAttributeNames before creating the DynamicXml object, instead the
DynamicXml object itself will test whether the stripped values match or not. Have updated/created unit tests to confirm this functionality.
2013-02-05 04:29:01 +06:00
Shannon Deminick b080ebf697 Fixes failing unit tests due to not resetting Resolution before resetting the actual resolver classes. Now it is automatically impllied that
when you Reset a resolver class, Resolution is un-frozen.
2013-02-05 03:10:01 +06:00
Stephan 0b0784d40c U4-1441 - fix NotFoundHandler assembly loading 2013-02-04 16:10:43 -01:00
Stephan bfb36cac7c U4-1441 - fix issue with IIS taking over custom errors 2013-02-04 16:10:43 -01:00
Morten Christensen dd2a1207f4 Merge 2013-02-04 13:37:44 -01:00
Shannon Deminick 58b3ce749e Fixed Skinning step to point to correct user control 2013-02-04 20:23:57 +06:00
Morten Christensen 6c693ff7b1 Adding fault handling for sql connections, so we have a retry strategy in place. 2013-02-04 13:21:46 -01:00
Stephan 3e1120612b Update version number 2013-02-04 12:00:58 -01:00
Stephan 8d06d39a62 Create branch for 4.11.5 2013-02-04 11:59:30 -01:00
Morten Christensen f64d4c9272 Updating the get media in recycle bin query as the parent is not necessarily -21 2013-02-04 08:00:31 -01:00
Morten Christensen b2f6620d80 Merge 2013-02-04 07:57:36 -01:00
Morten Christensen 812d38878c Updating the get content in recycle bin query as the parent is not necessarily -20 2013-02-04 07:47:05 -01:00
Stephan da7fea47c6 U4-1441 - refactor (fix) legacy NotFoundHandler support 2013-02-03 14:34:04 -01:00
Stephan 95df864d01 U4-1441 - refactor (fix) legacy NotFoundHandler support 2013-02-03 14:34:04 -01:00
Stephan eaa36a248c datalayer - remove mess introduced in f312bd7ee03b 2013-02-05 14:36:56 -01:00
Shannon Deminick ca7fe6854b Moved all old installer legacy classes into single files called LegacyFiles... much less clutter in the old legacy folders. 2013-02-03 05:16:42 +06:00
Shannon Deminick 1be3af1e31 Working on #U4-1358 - moving Base page classes to their correct location/assembly. Migrated all installation webforms files and associated helper files to
their correct locations/namespaces/assemblies and obsoleted all of the old ones and ensure the old webforms files don't exist where the obsoleted ones were.
Fixes a security issue with the installer ajax service (used to be p.aspx, now is InstallerRestService.aspx)
2013-02-03 05:06:11 +06:00
Stephan b8bcb3820a Web.Routing - if setting template fails, keep the previous one 2013-02-02 13:29:02 -01:00
Stephan 571849f211 Tests.Routing - fix RenderRouteHandlerTests 2013-02-07 20:27:46 -01:00
Stephan c8bcbdb3e1 U4-1441 - improve logging 2013-02-07 19:24:33 -01:00
Stephan 32c187f023 U4-1441 - make trySkipIisCustomError value a setting 2013-02-07 13:30:06 -01:00
Stephan dda9519e5e Core.Models - fix typo in Template 2013-02-06 13:33:04 -01:00
Stephan 91ff702cf2 Core.IO - add 'verify' methods to complement 'validate' methods 2013-02-06 13:25:27 -01:00
Stephan f7f269aa79 Core.Resolution - minor doc + renaming (being picky...) 2013-02-06 13:03:44 -01:00
Sebastiaan Janssen 71ddaf04b9 Put in an explicit comment to not disable useAspNetMasterPages when switching to
MVC as the default render engine
2013-02-02 09:49:21 -01:00
Shannon Deminick 0d34b203d5 Merge 2013-02-02 07:06:51 +06:00
Shannon Deminick 34975183d2 Changed PublishedContentHelper to use 6.0 APIs instead of relying on the WebBootManager hack to set a delegate.
Fixed up a heap of failing unit tests.
2013-02-02 07:06:27 +06:00
Shannon Deminick 545a156942 Got most of #U4-1503 - External UmbracoExamine libraries built separately from the web app with the Build.bat command. Now
just need to get the output zipped up and then create some Nuget packages with dependencies.
2013-02-02 06:08:14 +06:00
Paul@PaulSony f9d5b28372 Updates to WPI XML paramters and manifest, handles connectionStrings 2013-02-02 06:21:20 +08:00
Shannon Deminick 8df7812165 Adds Examine xslt extensions to config by default. 2013-02-02 03:49:16 +06:00
Shannon Deminick d1ac2f11d1 Fixed naming conventions: TypedContentAtRoot and TypedMediaAtRoot instead of TypedContentsAtRoot and TypedMediasAtRoot. 2013-02-02 03:22:30 +06:00
Shannon Deminick 5d681c18fe Converted UmbracoExamine UmbracoContentService to use new data APIs and added a unit test for one of the converted methods. 2013-02-02 03:21:06 +06:00
Shannon Deminick a66d651c07 Converted over other IApplicationEventHandlers to use the simpler ApplicationEventHandler 2013-02-02 02:43:02 +06:00
Shannon Deminick e541995e01 Fixes: #U4-1623 and changes over ExamineEvents to use ApplicationEventHandler instead of IApplicationEventHandler. 2013-02-02 02:38:39 +06:00
Shannon Deminick 6ee17dad03 Updated configs to ensure that the correct (non-obsoleted) config section definition is used for Examine.
Updates Examine index configs to be simplified, don't need all of that config there!
Updates UmbracoExamine indexers to not initialize if the app/database is not ready.
Updates Examine event binders to not bind if the app/database is not ready.
Updates Examine events to use new 6.0+ events and removes binding entirely to the old api events (where we could)
2013-02-02 02:16:44 +06:00
Shannon Deminick e8d924cd2c Merge with 6.0.1 2013-02-01 19:43:10 +06:00
Shannon Deminick 6e1316cb95 Fixes up some merge issues. 2013-02-01 19:41:23 +06:00
Shannon Deminick f2442b25f6 Close 4.11.4 branch 2013-02-01 19:25:12 +06:00
Shannon Deminick bfb8912518 Merge with 4.11.4 2013-02-01 19:23:56 +06:00
Stephan fa2ea78bda Fix build after merge 2013-02-01 10:47:53 -01:00
Sebastiaan Janssen 300d3ff09b Added tag Release-4.11.4 for changeset e02f5aebb87e 2013-02-01 08:41:26 -01:00
Sebastiaan Janssen e6337b8f14 Properly reference uGoLive MyGet package 2013-02-01 08:38:13 -01:00
Morten Christensen 39d45ba4b0 Fixes U4-1618 2013-02-01 08:21:44 -01:00
Sebastiaan Janssen 2be785ace3 Merge 2013-02-01 08:16:18 -01:00
Sebastiaan Janssen 5e2d991fab Update uGoLive 2013-02-01 08:16:10 -01:00
Morten Christensen 536cb4caf1 Fixes U4-1571 2013-02-01 07:42:51 -01:00
Morten Christensen 27745ea141 Fixes U4-1483 2013-02-01 07:35:48 -01:00
Sebastiaan Janssen 5289c55740 Translation updates 2013-02-01 07:24:21 -01:00
Sebastiaan Janssen 791773fc8a Add some more translations 2013-02-01 07:23:33 -01:00
Stephan 1989a44d4f Web.UmbracoHelper - add ContentAtRoot, MediaAtRoot methods 2013-02-01 06:28:54 -01:00
Shannon Deminick 6b3de00e08 Merge with 6.0.1 2013-02-01 06:52:27 +06:00
Shannon Deminick 3179b2794b Merge with 4.11.4 2013-02-01 06:46:00 +06:00
Shannon Deminick 1da27e6c2b Removes all upgrade script stuff since we've deployed the fix in a package. 2013-02-01 06:42:42 +06:00
Shannon Deminick bea6031de1 Removes UpgradeScripts stuff from 4.11.4 ... now to go remove it from there too since I've moved the script to a package. 2013-02-01 06:34:28 +06:00
Shannon Deminick 3608242b25 Merge with 4.11.4 2013-02-01 06:22:28 +06:00
Shannon Deminick 5602701645 Fixes uGoLive id and changes dashboard ascx to use CDF to load scripts/styles and using the knockout version shipped in the core.
Removes duplicate tree from the config.
2013-02-01 06:05:39 +06:00
Shannon Deminick a909b7904e Fixes uGoLive ascx 2013-02-01 05:29:54 +06:00
Sebastiaan Janssen 6e0af6827e Fix weird merge issues 2013-01-31 14:35:18 -01:00
Sebastiaan Janssen 51ff861e44 Merge with 6.0.0 2013-01-31 14:09:24 -01:00
Sebastiaan Janssen 777d397ae7 Merge with 6.0.0 2013-01-31 14:07:05 -01:00
Sebastiaan Janssen aa092ab3f3 Closing 6.0.0 2013-01-31 11:41:34 -01:00
Sebastiaan Janssen aaaace8dd3 Added tag Release-6.0.0 for changeset 1719fbd857f2 2013-01-31 11:32:05 -01:00
Morten Christensen 44012398bf Merge 2013-01-31 11:23:19 -01:00
Morten Christensen f18c557fb4 Fixes bug related to U4-1460 - template was incorrectly updated when sorting nodes. 2013-01-31 11:22:54 -01:00
Morten Christensen 1249761ecd Fixes U4-1610 2013-01-31 11:22:15 -01:00
Sebastiaan Janssen db6da95421 Move script back up, there was no need to move it down :) 2013-01-31 10:50:56 -01:00
NielsHartvig@UMBRACORATI.localdomain 8473601f03 Fixes issue with db detection in install logger 2013-01-31 10:39:30 -01:00
Stephan 8b00e72bf6 Web.Routing - refactor url providing (U4-1321...) + new IUrlProvider 2013-01-31 10:06:25 -01:00
Sebastiaan Janssen ac2c3ff321 Move the install stats call down in the page so it doesn't block page load 2013-01-31 09:16:49 -01:00
Sebastiaan Janssen 7300686f34 Update to WebPI parameters 2013-01-31 08:53:55 -01:00
Sebastiaan Janssen 7e288f657b Pull in the latest translations 2013-01-31 08:29:55 -01:00
Sebastiaan Janssen ca44094a37 Remove RC from the version number 2013-01-31 08:23:58 -01:00
Morten Christensen c72b6d7ae5 Minor Typo 2013-01-31 08:04:20 -01:00
Morten Christensen 99c880a4c9 Added additional logging to migration runner. 2013-01-31 07:27:13 -01:00
Shannon Deminick 1b1abce7da Merge 2013-01-31 04:48:29 +06:00
Shannon Deminick fbc10be381 Reverted logic of Document to be what it used to be... Published and HasPublishedVersion() are the same and will
return the same thing, though we've kept the lazy loading and optimizations.
2013-01-31 04:46:51 +06:00
Shannon Deminick 61f2647b62 missing file 2013-01-31 04:26:47 +06:00
Shannon Deminick a5bea7fc59 Added the ability to automate any c# scripts for an upgrade process. I realize this is superceded already in 6.0
but we need a way to do this in 4.x too especially for this release since we need to run a script to fix some db
issues. I've added a framework using an UpgradeScriptManager and another install step + unit tests for some of the
UpgradeScriptManager methods.
2013-01-31 04:26:37 +06:00
NielsHartvig@UMBRACORATI.localdomain 00cf20a8d0 Adds support for install statistics 2013-01-30 19:41:36 -01:00
Morten Christensen b20bb7a5a2 Fixes unit tests using the ContentService.Save method. Because we are using .ToXml in the save method to save preview xml we need to setup the DataTypesResolver in the test setup. 2013-01-30 16:23:33 -01:00
Sebastiaan Janssen b9be5c2561 Also implement optimization in fdfa687e6f41 to v4: no need to try and republish
the child pages if the page you are trying to publish was already published
2013-01-30 15:01:38 -01:00
Stephan 56281d64b0 Tests.Routing - fix tests that were failing
due to Models.ITemplate, Resolution, database constraints...
2013-01-30 14:46:38 -01:00
Stephan 024a4ed8d0 Tests.Resolvers - add tests to ManyResolver 2013-02-02 10:34:20 -01:00
Stephan 789927a043 Web.Routing - fix resolvers naming 2013-02-02 10:22:19 -01:00
Stephan cc0ad0b089 Web.Routing - PublishedContentRequest template naming 2013-02-05 06:37:36 -01:00
Stephan a94f3b6211 Web - RoutesCache belongs to RoutingContext 2013-01-30 14:45:13 -01:00
Stephan 1340cc0b2e Web.Routing - published content request Is404 visibility 2013-01-30 14:45:11 -01:00
Stephan c8aedb381b Core.ObjectsResolution - add insert at beginning of list in many resolver 2013-01-30 14:45:08 -01:00
Morten Christensen a82c5c332a Merge 2013-01-30 14:22:53 -01:00
Morten Christensen 19869e6d5f Possible fix for U4-1539 Removing SaveXmlPreview from the Document class save methods.
The Save and SaveAndPublish methods in the ContentService now handle the saving of preview xml to the database.
2013-01-30 14:22:07 -01:00
Shannon Deminick 861d4a1b22 Merge 2013-01-30 19:16:18 +06:00
Shannon Deminick b722bce2ed Fixes: #U4-1593 - ensures that the content tree checks for the Published property not HasPublishedVersion() 2013-01-30 19:15:16 +06:00
Morten Christensen 0c19307fa3 Making a few optimizations based on the findings in v.4.11.4. 2013-01-30 12:11:10 -01:00
Shannon Deminick 97556de447 Changed methods created yesterday to internal so we can port to 6+ nicely. 2013-01-30 18:58:42 +06:00
Morten Christensen bd12cb3ae5 Merge 2013-01-30 11:19:49 -01:00
netaddicts ceb561c113 Makes sure preview is not using cached versions of any macro 2013-01-30 09:41:00 -01:00
Morten Christensen 14c0e9e149 Fixes U4-1584 so property types and related property data is deleted in a way that works for both Document, Media and Member. 2013-01-30 09:33:17 -01:00
Sebastiaan Janssen 1d6587bb6b Fixing U4-359 Previewing new nested pages doesn't work 2013-01-30 09:21:43 -01:00
Morten Christensen a2a925fd7a Fixes U4-1590 so members with a Date picker will save without errors.
Improves the saving of date values.
2013-01-30 08:43:23 -01:00
Morten Christensen 29ef529c57 Fixes U4-1592 so its possible to clear values when saving 2013-01-30 08:42:26 -01:00
Shannon Deminick 30fe0ecaf4 Fixes unit tests and logic for Umbraco_Route_User_Defined_Controller_Action 2013-01-30 05:55:40 +06:00
Stephan 64692e0041 Fix build after merge 2013-01-29 19:10:58 -01:00
Stephan f1039a18e4 Merge with 6.0.1 2013-01-29 18:51:58 -01:00
Stephan ea805a7af8 Merge with 6.0.0 2013-01-29 18:49:05 -01:00
Shannon Deminick 350bea7798 Merge 2013-01-29 21:26:36 +06:00
Shannon Deminick f9977a9fd8 Fixes: #U4-1170 - template with hyphen or dash 2013-01-29 21:19:16 +06:00
Morten Christensen ea4f89701c Merge 2013-01-29 12:59:14 -01:00
Morten Christensen f3bfe0177d Implementing the Media part of U4-1568 2013-01-29 12:58:02 -01:00
Sebastiaan@SEBVIRTUAL.SSG5-Serial 5dc80c55b2 Fixed some issues with the mysql syntax provider 2013-01-29 12:55:55 -01:00
Morten Christensen 14d5c9bee5 An extra fail safe check in the database step. We verify whether its an install or upgrade when a connectionstring is present. 2013-01-29 12:49:15 -01:00
Morten Christensen 1c08921f55 Implements U4-1568 so raising events for save methods is optional. 2013-01-29 12:45:42 -01:00
Morten Christensen 01bd247831 Correcting HasIdentity check for implementors of File, as the previous check only applies to Script and Stylesheet and not Template. 2013-01-29 12:16:13 -01:00
Morten Christensen a1c39171a5 Fixed CoreBootManagerTests to not initialize all resolvers for this specific test. 2013-01-29 12:15:21 -01:00
Sebastiaan Janssen bb430ddacd Fix MySQL connectionstring detection and rewrite 2013-01-29 11:30:20 -01:00
Sebastiaan Janssen 2fdb485203 Fix spelling error in membertype speechbubble 2013-01-29 10:50:54 -01:00
Morten Christensen 1e8b82f5df Fixes U4-1576. Ensures that structure is kept when moving content and media to and from the recycle bin.
Path and Level are updated accordingly.
2013-01-29 10:26:18 -01:00
Stephan 23b6cf1c24 fix build after merge 2013-01-29 08:27:03 -01:00
Morten Christensen c63f8bc3bd Fixes U4-1578 2013-01-29 08:04:27 -01:00
Shannon Deminick c9d55a4a5e Merge with 6.0.0 - Ensures 6.1 is in sync with 6.0 too 2013-01-29 10:15:49 +06:00
Shannon Deminick 9ae962492a Imports patch for PublishWithResult not being thread safe, removes the giant unnused SQL constants (we have them in history) 2013-01-29 10:11:06 +06:00
Shannon Deminick d404970c74 Fixes up minor merge issues, removes the unused giant SQL constants (we have them in our history) 2013-01-29 10:07:30 +06:00
Shannon Deminick 66bf667100 Merge with 4.11.4 2013-01-29 09:58:47 +06:00
Shannon Deminick 65980e8c76 Fixes: #U4-1546 - Moves IApplicationEventHandler to Umbraco.Core and creates UmbracoApplicationBase object in the Core. Changes
signatures of IApplicationEventHandler methods to accept an UmbracoApplicationBase object instead of UmbracoApplication. This allows
us to execute all IApplicationEventHandler's outside of the web context. Added unit test to support booting the application outside of the
web context.
2013-01-29 09:45:12 +06:00
Shannon Deminick a2b5b13432 Fixes missing 'using' reference 2013-01-29 08:38:34 +06:00
Shannon Deminick c5d1439422 Fixes: #U4-1458 - due to a null check on PublishedContentRequest on UmbracoContext 2013-01-29 08:35:09 +06:00
Shannon Deminick 7ffb3cfb7f Fixes: #U4-1458 - due to a null check on PublishedContentRequest on UmbracoContext 2013-01-29 08:35:09 +06:00
Shannon Deminick df1cfaba28 Applies patch for #U4-1536 2013-01-29 07:50:55 +06:00
Shannon Deminick 5e9f4559b6 Fixes: #U4-1536 2013-01-29 07:49:14 +06:00
Shannon Deminick 4bbb0441a6 Merge 2013-01-29 05:50:50 +06:00
Shannon Deminick 4cf1d7d9a4 Fixes: #U4-1577 - HasPublishedVersion checks for trashed 2013-01-29 05:48:18 +06:00
Shannon Deminick a6a3ddca75 Fixes: #U4-1580 - m_SQLOptimizedMany includes the 'trashed' flag which can be used by business logic. 2013-01-29 05:37:14 +06:00
Shannon Deminick 27cfa85d3a Fixes: #U4-1579 - moving a node doesn't update the descendants of that node's level or path. 2013-01-29 04:39:44 +06:00
Shannon Deminick a9e1e7b634 Updating: #U4-1491 - Updated HasPublishedVersion() to ensure it checks for 'newest' 2013-01-29 03:42:58 +06:00
Stephan 09f50da821 Web.Routing - migrate to Models.ITemplate, cleanup template logic 2013-01-28 18:36:58 -01:00
leekelleher 9f5f920c81 MNTP: Corrected a typo in the example XPath (additional apostrophe) 2013-01-28 17:18:20 +00:00
leekelleher 93bdfc8915 Fixed U4-1562 YSOD saving a Slider property editor set to DB type Nvarchar.
If the Int DbType isn't selected, the DataType will save as string/Nvarchar.
2013-01-28 17:13:18 +00:00
Morten Christensen d91019c9fe Merge 2013-01-28 15:38:27 -01:00
Morten Christensen bc99a6f6c0 Possible fix for U4-1466 which surfaced with the Standard MVC Starterkit package. 2013-01-28 15:37:18 -01:00
Sebastiaan Janssen 463c3cf1d5 Improve variable name and make it use camel case. 2013-01-28 15:03:05 -01:00
Sebastiaan Janssen 1e1d7ce1cd Fixes U4-1566 6.0.0-RC Exception when assigning HttpPostedFileBase type posted
file object to a property
2013-01-28 14:54:51 -01:00
Sebastiaan Janssen dfaebd8f5c Merge 2013-01-28 14:42:43 -01:00
Sebastiaan Janssen 0dfe8c08b9 Add App_Code, App_Data and App_Plugins folders to be created during app startup 2013-01-28 14:41:36 -01:00
Morten Christensen 0dbebaf12e Fixes U4-1557 so the name of a Media item is properly saved.
This has also be tested and verified for content.
2013-01-28 14:31:40 -01:00
Morten Christensen 72097c3ebc Merge 2013-01-28 14:03:52 -01:00
Morten Christensen 5d0aced9a7 Giving the install/upgrade a bit of TLC.
Fixes U4-1520
2013-01-28 14:01:38 -01:00
Shannon Deminick 2f00fa0791 Fixes: #U4-1547 - duplicate trees on upgrade in rare cases. 2013-01-28 19:36:06 +06:00
Sebastiaan Janssen 0689b928c2 Fixes U4-1510 Missing content in Umbraco 6 beta after publish 2013-01-28 11:15:30 -01:00
Morten Christensen 3907ea435a Merge 2013-01-28 08:14:51 -01:00
Stephan 09c19512d9 fix build 2013-01-27 13:32:04 -01:00
Stephan 212b86d8f6 merge from 4.11.4 2013-01-27 12:59:41 -01:00
Stephan a86b831735 Create 6.0.1 branch 2013-01-27 12:39:59 -01:00
Sebastiaan Janssen a11d924736 Fixes U4-1553 - YSOD when umbracoUrlName value is null 2013-01-26 15:50:53 -01:00
Sebastiaan Janssen 59c844eb8f Upgrade to MySQL connector 6.6.4.0 to fix U4-1519 2013-01-26 15:10:02 -01:00
Morten Christensen d0c5357625 Adding initialize call to the legacy conn.string being reconfigured. 2013-01-25 15:17:05 -01:00
Morten Christensen 7aabf459ea Adding schema validation to the DatabaseSchemaCreation class.
Helps determine if valid database exists and which version it corresponds to.
On startup the legacy connectionstring is used if one exists, so its not ignore but rather reconfigured.
Relates to U4-1520.
2013-01-25 15:05:42 -01:00
Morten Christensen 309f337461 Fixes U4-1549 2013-01-25 08:58:21 -01:00
Morten Christensen a17759f759 Fixes U4-1542 2013-01-25 07:50:22 -01:00
Morten Christensen 2374a7a167 Merge 2013-01-25 07:30:40 -01:00
Morten Christensen 086a0811cb Refactoring GetCreator/WriterProfile extension methods to use the service rather then repository, as it seems to cause threading issues per our threading test. 2013-01-25 07:30:25 -01:00
Shannon Deminick 427fff0c53 Fixes: #U4-1527 - imports patch rom 4.11.4 2013-01-25 06:13:47 +03:00
Shannon Deminick f9a0d91299 Fixes: #U4-1527 - Creates a public property on UmbracoHelper to return the currently assigned IPublishedContent of the UmbracoHelper. 2013-01-25 06:04:10 +03:00
Shannon Deminick 4351bd8b50 updated test proj file to re-include MediaXmlTest - but this is failing due to recent
changes.
2013-01-24 23:34:04 +03:00
Shannon Deminick da8dc72908 Merge 2013-01-24 23:31:17 +03:00
Shannon Deminick 2c96188775 Added missing MediaXmlTest 2013-01-24 23:31:07 +03:00
Morten Christensen d3f9e13eae Adding ncrunch ignore 2013-01-24 14:59:58 -01:00
Morten Christensen 82455136bb Missing files 2013-01-24 14:59:03 -01:00
Morten Christensen f6e354314b Minor optimization to SaveAndPublish method in ContentService. 2013-01-24 14:47:44 -01:00
Morten Christensen b7fedb664b Refactoring DatabaseSchemaCreation to allow for schema validation. 2013-01-24 14:47:24 -01:00
Morten Christensen 25f91cc0da Fixes U4-1534 so documents containing the tag datatype is properly copied.
Copying a document with a Tags datatype on it would only work if a new TagRelationship is created.
2013-01-24 13:49:41 -01:00
Morten Christensen 23141e1e8c Fixing broken media tests after having added ToXml and saving of xml to ContentXml table in the MediaService 2013-01-24 12:25:48 -01:00
netaddicts d5bde0d8df Makes sure preview is not using cached versions of any macro 2013-01-24 11:00:15 -01:00
Sebastiaan Janssen cc5ca0b5fe Fixing U4-359 Previewing new nested pages doesn't work 2013-01-30 09:21:43 -01:00
Shannon Deminick 0cb9cc6840 just cleaned up some code formatting. 2013-01-30 07:59:15 +06:00
Shannon Deminick d38d7b1ff4 Updates all code calling UnPublishSingleNode & UpdateDocumentCache to pass in the already existing Document object if there is one
instead of the ID... this'll save a another ton of SQL calls.
2013-01-30 07:59:03 +06:00
Shannon Deminick 2d87f933d5 Updates Document's Published property to return true if the document is 100% published (viewable on the front-end)
Reverts Document's HasPublishedVersion() to return true if the document has any published version (may or may not be viewable on the front-end)
Updates the Document's new UpdatePublishedOnDescendants to set both the Published and PathPublished fields.
Reverts some stuff in the editContent to use HasPublishedContent() to set the _documentHasPublishedVersion field.
Reverts the BaseContentTree to use the Published property now that it returns the correct value.
Updates the editContent method to use the UpdateDocumentCache overload accepting an object so there's not another N+1 SQL call made.
2013-01-30 07:57:31 +06:00
Shannon Deminick a734a0cff7 Fixes unit tests for Umbraco_Route_User_Defined_Controller_Action 2013-01-30 05:37:32 +06:00
Shannon Deminick d0ace55d03 Fixes: #U4-1593 - Content tree doesn't check for correct publish state. 2013-01-30 05:04:31 +06:00
Shannon Deminick 3fda0308ac Fixes: #U4-1594 - SQL for SqlOptimizedSingle not correct for published state
Fixes: #U4-1596 - new GetPathPublishedDescendants method on Document for optimizations
Fixes: #U4-1595 - Obsoletes HasPublishedVersion() method and ensures lazy loading of Published property,
as well as ensuring that the backing property is set correctly on first load (optmization)
Fixes: #U4-1597 - PathPublished property should be set in an optimized way and/or lazy loaded if it cannot be
2013-01-30 04:56:28 +06:00
Shannon Deminick d796b2afc1 Fixes: #U4-1170 - template with hyphen or dash 2013-01-29 21:19:16 +06:00
Shannon Deminick f95cfc2ee0 Changes v4.x config transforms 2013-01-29 21:18:17 +06:00
Morten Christensen b17dcd2b56 Fixes U4-1516 by ensuring that referenced templates are deleted prior to deleting the actual template.
Removing uncommented code from the Media class as well as from the ContentExtension class.
Added saving of Media Xml to MediaService upon saving.
Removing referenced media test from csproj as cs file was missing.
2013-01-24 09:50:27 -01:00
Stephan 5110e0ec0e Web.Routing - go public 2013-01-24 08:51:27 -01:00
Stephan edb84b3c97 Core.Strings - go public 2013-02-19 06:37:24 -01:00
Stephan 197ab6357f Web.Routing - expose PublishedContentRequest.Template as a string 2013-01-24 08:51:27 -01:00
Morten Christensen e485c471cb Merge 2013-01-24 08:36:08 -01:00
Morten Christensen f00e8b4efc Adding update statement to template repository, so templates can be properly removed. 2013-01-24 08:18:22 -01:00
Shannon Deminick d45ba48b37 Removes unused directives for ExamineEvents. 2013-01-24 06:19:21 +03:00
Shannon Deminick c8807c3798 Fixes: #U4-1530. Backports ContentExtension changes from 6.1 required for Examine and media. Added unit tests to support and enhanced old unit test for ToXml for content
to test for more values to ensure nothing is broken. Updates ExamineEvents to ensure that no event binding occurs until the application is configured and the
database is ready. Updates ExamineEvents to ensure that data is indexed using the new 6.0 APIs, though this is a temporary fix and a better one will be implemented
in 6.1 since UmbracoExamine is in the source.
2013-01-24 06:16:44 +03:00
Stephan b3e3855931 Core.ObjectsResolution - cleanup 2013-01-23 16:44:38 -01:00
Shannon Deminick 82c2560822 Ensures all resolvers are sealed. Changes CacheRefreshersResolver, DataTypesResolver, MacroFieldEditorsResolver, PackageActionsResolver, ActionsResolver
to all be lazy resolvers as they are not needed instantly on app startup (not needed by the front-end) This will
make app startup a lot quicker. Fixes ActionsResolver to not use the PluginManager to resolve the types when it
is instantiating them since these are passed in the ctor. Updates all unit tests to use lazy delegate for these resolvers
and they are all passing.
2013-01-23 18:40:40 +03:00
Stephan f466bc7cfb Web.Routing - cleanup PublishedContentRequest 2013-01-23 14:08:17 -01:00
Stephan b77521cbc5 Web.Routing - cleanup template / rendering engine lookup 2013-01-23 14:08:15 -01:00
Stephan 58b91fe6a0 Web.Routing - reorganize finders for better backward compat. with pre-4.10 2013-01-23 14:08:14 -01:00
Stephan a95fbff597 Core.ObjectsResolution - create temp. dirty access to resolution for legacy code 2013-01-23 14:08:13 -01:00
Stephan 80ee18ee95 Core.ObjectsResolution - add unit tests 2013-01-23 14:07:02 -01:00
Shannon Deminick f467b8cb6c Adds more functionality for LazyManyObjectsResolverBase - adding type list delegates for lazy resolution. 2013-01-23 17:39:07 +03:00
Stephan 6146a0576c Core.ObjectsResolution - add unit tests, fix some bugs 2013-01-23 09:41:01 -01:00
Stephan 73df3ec0de Tests.Routing - get all tests to pass 2013-01-23 09:41:00 -01:00
Stephan d24e4834aa datalayer - bugfix SqlCE dababase clear & initialize 2013-01-23 09:41:00 -01:00
Stephan 38593ea36c Tests.Routing - rename some tests 2013-01-23 09:41:00 -01:00
Shannon Deminick aea1a03453 Updates ManyObjectsResolverBase to properly check for resolution freezing and fixes a few issues found regarding
inheritance in complex situations like the new LazyManyObjectsResolverBase.
Creates the new LazyManyObjectsResolverBase to lazily resolve types in order to create them. This is for
work item : #U4-1522
Adds unit test to support.
2013-01-23 07:45:00 +03:00
Shannon Deminick 1568e5f19c updated comments. 2013-01-23 01:44:01 +03:00
Shannon Deminick 8dff47db78 Merge 2013-01-23 01:39:45 +03:00
Shannon Deminick 987e48733a Merge 2013-01-23 01:39:25 +03:00
Morten Christensen a95c129116 Refactoring a few methods in the ContentService, so the omitCacheRefresh parameter isn't exposed in the new api, as its only relevant to the old api.
Correcting the calls from Document to the internal methods in the ContentService, which ensures that the cache isn't refreshed as its handled elsewhere.
Correcting broken unit test after having changed the GetDescendents method.
2013-01-22 11:23:33 -01:00
Morten Christensen 72ff03f142 Fixes U4-1512 by using the same safe alias method as in the legacy code base.
This should ensure that published content aliases has the same format as in v4.
2013-01-22 08:44:06 -01:00
Sebastiaan Janssen f4574b6014 Merge 2013-01-21 15:42:08 -01:00
Morten Christensen 2dde71abb3 Moving the sql ce binaries from the UmbracoCms.Core to UmbracoCms package as Lee K. has a point.
The Sql Ce binaries located in the Content/bin folder are only relevant when setting up a site.
2013-01-21 15:35:39 -01:00
Morten Christensen e55593fc34 Merge 2013-01-21 15:27:42 -01:00
Sebastiaan Janssen 1c6346233e Added tag Release-6.0.0-RC for changeset 56015ac26f5a 2013-01-21 15:27:38 -01:00
Morten Christensen 00e316b5bd Minor update to AssemblyInfo 2013-01-21 15:27:22 -01:00
Stephan 1b232f3214 Web.Routing - remove some unused legacy code 2013-01-18 16:08:01 -01:00
Stephan aa1ded5f1a Web.Routing - backward compatibility with legacy NotFoundHandler 2013-01-18 14:03:11 -01:00
Stephan e5a20f0c1b Web.Routing - rename things 2013-01-18 13:20:08 -01:00
Stephan 9d701cabf6 Web.Routing - sanitize PublishedContentRequest & pipeline 2013-01-18 13:13:06 -01:00
Stephan c6c522da04 Web.Routing - begin sanitizing PublishedContentRequest 2013-01-16 15:01:43 -01:00
Stephan 2251f39fcf Web.Routing - naming & cleanup, prepare for going public 2013-01-16 14:45:04 -01:00
Stephan 01b4e8d59c Core.ObjectsResolution - refactor, cleanup, sanitize, ensure we properly freeze 2013-01-16 13:31:04 -01:00
Stephan bfd8e96f71 Core.ObjectsResolution - cleanup + start making things public 2013-01-16 13:10:34 -01:00
Stephan e7b84b1637 Merge with 6.0.1 2013-01-29 06:46:07 -01:00
Stephan b8ac74a05d fix merges 2013-01-28 09:02:28 -01:00
Stephan 38624b1e59 fix build 2013-01-27 18:34:16 -01:00
Stephan a699d9e1de merge from 6.0.1 2013-01-27 16:02:59 -01:00
Shannon Deminick cda7a66ec8 updated 6.1 with the correct ExamineEvents class ... issue after up-merging from 6.0 2013-01-25 06:32:00 +03:00
Shannon Deminick 36a5313336 Merge with 6.0.0 2013-01-25 06:19:14 +03:00
Shannon Deminick fedcdcfcd5 Manually re-merged latest changes to ContentExtensions from 6.0 branch to include changes to check for
UseLegacyXmlSchema
2013-01-23 19:00:28 +03:00
Shannon Deminick 11964401c8 Merge 2013-01-23 18:54:42 +03:00
Shannon Deminick 48202cfa09 Merge with 6.0.0 2013-01-23 18:50:44 +03:00
Stephan 8cac3e9c5c merge with 6.0.0 2013-01-23 09:37:40 -01:00
Stephan 25c481b3ca merge with 6.0.0 2013-01-23 09:33:26 -01:00
Adam Nelson 41258104f6 U4-497 - Razor errors should be completely silent when UmbracoDebug=false.
Modified implementation to have a single global setting in UmbracoSettings.config
which can now be overridden when the umbraco.macro.Error event is handled on a
per-macro basis if desired.
2013-01-16 00:45:18 -11:00
pcw@pcw-PC.shout.local ac5142443a Fixed EncryptWithMachineKey to handle values longer than FormsAuthentication.Encrypt max length limit
http://issues.umbraco.org/issue/U4-1455
2013-01-15 20:40:28 +00:00
pcw@pcw-PC.shout.local 44360d83aa Fixed EncryptWithMachineKey to handle values longer than FormsAuthentication.Encrypt max length limit
http://issues.umbraco.org/issue/U4-1455
2013-01-15 20:20:05 +00:00
pcw@pcw-PC.shout.local 021cb817d4 Fixed EncryptWithMachineKey to handle values longer than FormsAuthentication.Encrypt max length limit
http://issues.umbraco.org/issue/U4-1455
2013-01-15 20:17:12 +00:00
pcw@pcw-PC.shout.local f4f91fba78 Fixed EncryptWithMachineKey to handle values longer than FormsAuthentication.Encrypt max length limit
http://issues.umbraco.org/issue/U4-1455
2013-01-15 20:09:29 +00:00
pcw@pcw-PC.shout.local dec5e8ad6c Fixed EncryptWithMachineKey to handle values longer than FormsAuthentication.Encrypt max length limit
http://issues.umbraco.org/issue/U4-1455
2013-01-15 20:07:07 +00:00
Max Rotvel 4321c8d24e Fix part of U4-1355 by making umbracoembed translatable and supply da lang files 2013-01-15 14:33:25 -01:00
Adam Nelson 08a8e6b816 U4-497 : Razor errors should be completely silent when UmbracoDebug=false.
Optionally requires macroErrors.config to define macro error behaviour.
See http://issues.umbraco.org/issue/U4-497.
2013-01-14 00:48:54 -11:00
Stephan 6cb3fcf9ad U4-1411 - fix post-4.9 regression in NotFoundHandler url 2013-01-08 16:41:31 -01:00
Sebastiaan Janssen e5878554bd Fixes U4-1482 Regression - RTE unable to edit hyperlink on image 2013-01-21 14:21:29 -01:00
Sebastiaan Janssen 44c8c4b5b8 Revert 024896ba7bcf as it's a breaking change 2013-01-18 08:47:38 -01:00
Shannon Deminick 6b254e1a20 Merge with 6.0.0 2013-01-07 16:42:27 +03:00
Shannon Deminick a00ceb24e1 Merge with 6.0.0 2013-01-07 04:46:34 +03:00
Shannon Deminick c587632ea0 Adds UmbracoExamine.PDF.Azure library 2013-01-07 04:45:23 +03:00
Shannon Deminick 8f2c662f27 Adds Examine.Azure and required nuget dependencies. 2013-01-07 03:06:33 +03:00
Shannon Deminick dc06e303fc Updated to new Examine version on MyGet, should fix build errors 2013-01-06 02:46:19 +03:00
Shannon Deminick dbf38fbeb8 Changed BaseWebTest to use same logic as BaseDatabaseFactoryTests since we need the ServiceContext now. Fixed a bunch of failing tests... still have some more to fix though. 2013-01-05 23:36:38 +03:00
Shannon Deminick 97ffed5ee7 Changes the web.config template over to use the correct (non-obsoleted) examine classes. These have been obsolete for quite some time
and no longer exist in the new UmbracoExamine codebase. This is a 'breaking' change however it only requres a config file update when upgrading.
2013-01-05 22:48:45 +03:00
Shannon Deminick 8b49d2d377 Removes all MyGet dependencies for UmbracoExamine (since it is in the core now).
Converts UmbracoContextService and UmbracoMediaService for UmbracoExamine to use the new data api's
to extract latest data. Currently had to hack a bit with a new class called LegacyLibrary because at the moment
we'll have a circular dependency with Umbraco.Web which needs to be fixed. Moves all Examine event management to
Umbraco.Web (again mainly because of circular dependencies, but makes sense to have it there). Fixes the ExamineEvents
to implement IApplicationEventHandler instead of IApplicationStartupHandler to ensure that all resolvers have been
initialized before attempting to initialize examine indexes. Updates Examine ILogService to use the LogHelper.
Adds some new ContentExtensions for IMedia since currently Examine needs xml structures, but have kept it internal.
2013-01-05 22:46:50 +03:00
Shannon Deminick 6513097d38 Added UmbracoExamine.PDF library and unit tests. 2013-01-05 04:43:15 +03:00
Shannon Deminick d1bf2c0ad7 More unit tests ported over for UmbracoExamine 2013-01-05 04:20:25 +03:00
Shannon Deminick 59152cbe80 Started migrating over unit tests for UmbracoExamine 2013-01-05 03:28:47 +03:00
Shannon Deminick 027f76af96 Working on #U4-1356 - Moving UmbracoExamine to core 2013-01-05 03:01:29 +03:00
Shannon Deminick eece4c194a Creating 6.1.0 branch 2013-01-04 05:50:00 +03:00
Sebastiaan Janssen ac9d6431f4 Close 6.0.0-LegacyApi-Refactor branch 2012-12-28 08:56:41 -01:00
Morten Christensen a6b16b4878 Closing branch after having merged the changes to events to the main 6.0.0 branch. 2012-12-21 08:29:45 -01:00
Shannon Deminick 6abca67fc4 Close 4.10.1 branch 2012-11-14 21:19:00 +05:00
sitereactor 2738f45d14 Closing feature branch 2012-10-18 12:25:46 -02:00
sebastiaan 34bbf95146 Closing branch 2012-09-10 07:53:20 -02:00
sebastiaan ecd6c42924 Closing branch 2012-09-10 07:53:03 -02:00
sebastiaan 03e34cde87 Closing branch 2012-09-10 07:52:35 -02:00
sebastiaan 7d69e859f9 Closing branch 2012-09-10 07:52:15 -02:00
sebastiaan 661e92218a Closing branch 2012-09-10 07:51:28 -02:00
sebastiaan 3a2ac6c4d3 Closing old branch 2012-09-10 07:19:22 -02:00
shannon@ShandemVaio.home f62b8a604e Close 4.8-solutioncleanup-wip branch 2012-06-27 23:33:10 +04:00
2261 changed files with 150606 additions and 65889 deletions
+88
View File
@@ -0,0 +1,88 @@
*.obj
*.pdb
*.user
*.aps
*.pch
*.vspscc
[Bb]in
[Db]ebug*/
obj/
[Rr]elease*/
_ReSharper*/
_NCrunch_*/
*.ncrunchsolution
*.ncrunchsolution.user
*.ncrunchproject
*.crunchsolution.cache
[Tt]est[Rr]esult*
[Bb]uild[Ll]og.*
*.[Pp]ublish.xml
*.suo
[sS]ource
[sS]andbox
umbraco.config
*.vs10x
App_Data/TEMP/*
[Uu]mbraco/[Pp]resentation/[Uu]mbraco/[Pp]lugins/*
[Uu]mbraco/[Pp]resentation/[Uu]ser[Cc]ontrols/*
[Uu]mbraco/[Pp]resentation/[Ss]cripts/*
[Uu]mbraco/[Pp]resentation/[Ff]onts/*
[Uu]mbraco/[Pp]resentation/[Cc]ss/*
src/Umbraco.Web.UI/[Cc]ss/*
src/Umbraco.Web.UI/App_Code/*
src/Umbraco.Web.UI/App_Data/*
src/Umbraco.Tests/App_Data/*
src/Umbraco.Web.UI/[Mm]edia/*
src/Umbraco.Web.UI/[Mm]aster[Pp]ages/*
src/Umbraco.Web.UI/[Mm]acro[Ss]cripts/*
src/Umbraco.Web.UI/[Xx]slt/*
src/Umbraco.Web.UI/[Ii]mages/*
src/Umbraco.Web.UI/[Ss]cripts/*
src/Umbraco.Web.UI/Web.*.config.transformed
umbraco/presentation/umbraco/plugins/uComponents/uComponentsInstaller.ascx
umbraco/presentation/packages/uComponents/MultiNodePicker/CustomTreeService.asmx
_BuildOutput/*
build/UmbracoCms.AllBinaries*zip
build/UmbracoCms.WebPI*zip
build/UmbracoCms*zip
build/*.nupkg
src/Umbraco.Tests/config/applications.config
src/Umbraco.Tests/config/trees.config
src/Umbraco.Web.UI/web.config
*.orig
src/Umbraco.Tests/config/404handlers.config
src/Umbraco.Web.UI/[Vv]iews/*.cshtml
src/Umbraco.Web.UI/[Vv]iews/*.vbhtml
src/Umbraco.Tests/[Cc]onfig/umbracoSettings.config
src/Umbraco.Web.UI/[Vv]iews/*
src/packages/
src/packages/repositories.config
src/Umbraco.Web.UI/[Ww]eb.config
*.transformed
webpihash.txt
node_modules
src/Umbraco.Web.UI/[Uu]mbraco/[Ll]ib/*
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/umbraco.*
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/routes.js
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/main.js
src/Umbraco.Web.UI/[Uu]mbraco/[Jj]s/app.js
src/Umbraco.Web.UI/[Uu]mbraco/[Vv]iews/**/*.js
src/Umbraco.Web.UI/[Uu]mbraco/[Vv]iews/**/*.css
src/Umbraco.Web.UI/[Uu]mbraco/[Vv]iews/**/*.html
src/Umbraco.Web.UI/[Uu]mbraco/[Aa]ssets/*
src/Umbraco.Web.UI.Client/[Bb]uild/*
src/Umbraco.Web.UI.Client/[Bb]uild/[Bb]elle/
src/Umbraco.Web.UI/[Uu]ser[Cc]ontrols/
build/_BuildOutput/
tools/NDepend/
src/*.vspx
src/*.psess
NDependOut/*
*.ndproj
QueryResult.htm
*.ndproj
src/Umbraco.Tests/Views/web.config
-68
View File
@@ -1,68 +0,0 @@
syntax: regexp
^src/packages/(?!repositories.config$)
web.Template.[a-zA-Z0-9]*.Debug.config
syntax: glob
*.obj
*.pdb
*.user
*.aps
*.pch
*.vspscc
[Bb]in
[Db]ebug*/
obj/
[Rr]elease*/
_ReSharper*/
*.ncrunchsolution
*.ncrunchsolution.user
*.ncrunchproject
*.crunchsolution.cache
[Tt]est[Rr]esult*
[Bb]uild[Ll]og.*
*.[Pp]ublish.xml
*.suo
[sS]ource
[sS]andbox
umbraco.config
*.vs10x
App_Data\TEMP\*
umbraco\presentation\umbraco\plugins\*
umbraco\presentation\usercontrols\*
umbraco\presentation\scripts\*
umbraco\presentation\fonts\*
umbraco\presentation\css\*
src\Umbraco.Web.UI\[Cc]ss\*
src\Umbraco.Web.UI\App_Code\*
src\Umbraco.Web.UI\App_Data\*
src\Umbraco.Tests\App_Data\*
src\Umbraco.Web.UI\[Mm]edia\*
src\Umbraco.Web.UI\[Mm]aster[Pp]ages\*
src\Umbraco.Web.UI\[Mm]acro[Ss]cripts\*
src\Umbraco.Web.UI\[Xx]slt\*
src\Umbraco.Web.UI\[Ii]mages\*
src\Umbraco.Web.UI\[Ss]cripts\*
umbraco\presentation\umbraco\plugins\uComponents\uComponentsInstaller.ascx
umbraco\presentation\packages\uComponents\MultiNodePicker\CustomTreeService.asmx
_BuildOutput/*
*.ncrunchsolution
build/UmbracoCms.AllBinaries*zip
build/UmbracoCms.WebPI*zip
build/UmbracoCms*zip
build/*.nupkg
src/Umbraco.Tests/config/applications.config
src/Umbraco.Tests/config/trees.config
src/Umbraco.Web.UI/web.config
*.orig
src/Umbraco.Tests/config/404handlers.config
src/Umbraco.Web.UI/Views/*.cshtml
src/Umbraco.Web.UI/Views/*.vbhtml
src/Umbraco.Tests/config/umbracoSettings.config
src/Umbraco.Web.UI/App_Plugins/*
src/Umbraco.Web.UI/Views/*
src/packages/
src\Umbraco.Web.UI\[W]eb.config
*.transformed
-25
View File
@@ -1,25 +0,0 @@
d0aba247db91d1b70c39c6397b965ca370a67497 Sprint-Juno-A
0b8f67be2ca8faf008151d87f232c698de69e735 Release-4.5.0
5960c073250926d202861a09472f5f334da6e283 Sprint-Juno-B
f15d4ff81a8368e9d42788f7e0ae726f7a70a3b1 Release-4.0.3
283065df4d3c27245267709dd2644a479c4f62a5 Release-4.0.4.2
ffc34b23e1a03785e4098afa4290d8c03cf10115 Release-4.5.2
d03fcffb8834a9583a56813bb44b6abbd9f042cc Release-4.6.0
1809f7b2593270c192cd47bdcfdb392100686f79 4.7.2
488779dec0ceb1d2874bcef906241b919325c904 4.8.0-beta
096f20bb0575d6199f20fcb3147b63554e765a74 Release-4.8.0
8f8a203857886b373148af29edd57460a42940be Release-4.8.1
de73e687ddf6086ed52b6554676c1632865d07f2 Release-4.9.0
8d7d8609e2e4b971da99cd97f72132ce85ce3333 Release-4.9.1
f6da531fbb4c251ff61d314e2a7effb13c71e74a Release-4.10.0
20e4dff821d8ac2527a5353618fa1a23ea1d8b34 Release-4.11.0
7f827760cb49d749616859f528d19dde64807947 Release-4.11.1
7f827760cb49d749616859f528d19dde64807947 Release-4.11.1
6eb5f2fb5a88aa29ea544499df9160a1b31b5638 Release-4.11.1
73711b806a4044dbf0d7d7c095ddfdda23b09932 4.11.2
73711b806a4044dbf0d7d7c095ddfdda23b09932 4.11.2
0000000000000000000000000000000000000000 4.11.2
73711b806a4044dbf0d7d7c095ddfdda23b09932 Release-4.11.2
77db220b89e166b3c0736ed321ecfd6416cddbcd Release-4.11.2.1
54cde33b809dcb3a1f7e7ae0d5375f6dd0d89c8d Release-4.11.2.2
ff3bb24ea0c915878396a6ae27f1ff164e8ac150 Release-6.0.0-beta
+9
View File
@@ -0,0 +1,9 @@
# The MIT License (MIT) #
Copyright (c) 2013 Umbraco
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+33
View File
@@ -0,0 +1,33 @@
Umbraco CMS
===========
## Watch a five minute introduction video ##
[![ScreenShot](http://umbraco.com/images/whatisumbraco.png)](http://umbraco.org/help-and-support/video-tutorials/getting-started/what-is-umbraco)
## Umbraco - the simple, flexible and friendly ASP.NET CMS ##
**More than 177,000 sites trust Umbraco**
For the first time on the Microsoft platform a free user and developer friendly CMS that makes it quick and easy to create websites - or a breeze to build complex web applications. Umbraco has award-winning integration capabilities and supports ASP.NET MVC or Web Forms, including User and Custom Controls, out of the box. It's a developers dream and your users will love it too.
Used by more than 177,000 active websites including [http://daviscup.com](http://daviscup.com), [http://heinz.com](http://heinz.com), [http://peugeot.com](http://peugeot.com), [http://www.hersheys.com/](http://www.hersheys.com/) and **The Official ASP.NET and IIS.NET website from Microsoft** ([http://asp.net](http://asp.net) / [http://iis.net](http://iis.net)) you can be sure that the technology is proven, stable and scales.
To view more examples please visit [http://umbraco.com/why-umbraco/#caseStudies](http://umbraco.com/why-umbraco/#caseStudies)
## Downloading ##
The downloadable Umbraco releases live at [http://our.umbraco.org/download](http://our.umbraco.org/download).
## Forums ##
We have a forum running on [http://our.umbraco.org](http://our.umbraco.org). The discussions group on [Google Groups](https://groups.google.com/forum/#!forum/umbraco-dev) is for discussions on developing the core, and not on Umbraco-implementations or extensions in general. For those topics, please use [http://our.umbraco.org](http://our.umbraco.org).
## Contribute to Umbraco ##
If you want to contribute back to Umbraco you should check out our [guide to contributing](http://our.umbraco.org/contribute).
## Found a bug? ##
Another way you can contribute to Umbraco is by providing issue reports, for information on how to submit an issue report refer to our [online guide for reporting issues](http://our.umbraco.org/contribute/report-an-issue-or-request-a-feature).
To view existing issues please visit [http://issues.umbraco.org](http://issues.umbraco.org)
+6 -2
View File
@@ -1,10 +1,12 @@
@ECHO OFF
SET release=6.0.0
SET comment=RC
SET release=6.2.0
SET comment=beta
SET version=%release%
IF [%comment%] EQU [] (SET version=%release%) ELSE (SET version=%release%-%comment%)
ReplaceIISExpressPortNumber.exe ..\src\Umbraco.Web.UI\Umbraco.Web.UI.csproj %release%
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe "Build.proj" /p:BUILD_RELEASE=%release% /p:BUILD_COMMENT=%comment%
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
@@ -16,6 +18,8 @@ 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\media\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\scripts\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\usercontrols\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\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 This file is only here so that the containing folder will be included in the NuGet package, it is safe to delete. > .\_BuildOutput\WebApp\xslt\dummy.txt
..\src\.nuget\NuGet.exe pack NuSpecs\UmbracoCms.Core.nuspec -Version %version%
+263 -146
View File
@@ -1,189 +1,306 @@
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
<!--
****************************************************
INCLUDES
*****************************************************
-->
<PropertyGroup>
<MSBuildCommunityTasksPath>..\MSBuildCommunityTasks</MSBuildCommunityTasksPath>
<UmbracoMSBuildTasksPath>..\UmbracoMSBuildTasks</UmbracoMSBuildTasksPath>
</PropertyGroup>
<Import Project="..\tools\UmbracoMSBuildTasks\Umbraco.MSBuild.Tasks.Targets" />
<Import Project="..\tools\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<PropertyGroup>
<MSBuildCommunityTasksPath>..\MSBuildCommunityTasks</MSBuildCommunityTasksPath>
<UmbracoMSBuildTasksPath>..\UmbracoMSBuildTasks</UmbracoMSBuildTasksPath>
</PropertyGroup>
<!--
<Import Project="..\tools\UmbracoMSBuildTasks\Umbraco.MSBuild.Tasks.Targets" />
<Import Project="..\tools\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets" />
<UsingTask TaskName="GenerateHash" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<InputFiles ParameterType="Microsoft.Build.Framework.ITaskItem[]" Required="true" />
<OutputFile ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Using Namespace="System.IO" />
<Using Namespace="System.Linq" />
<Using Namespace="System.Security.Cryptography" />
<Code Type="Fragment" Language="cs">
<![CDATA[
using (var ms = new MemoryStream())
{
foreach (var item in InputFiles)
{
string path = item.ItemSpec;
using (FileStream stream = new FileStream(path, FileMode.Open))
{
using (var cryptoProvider = new SHA1CryptoServiceProvider())
{
var fileHash = cryptoProvider.ComputeHash(stream);
using (TextWriter w = new StreamWriter(OutputFile, false))
{
w.WriteLine(string.Join("", fileHash.Select(b => b.ToString("x2"))));
}
}
}
}
}
]]>
</Code>
</Task>
</UsingTask>
<!--
****************************************************
VARIABLES
*****************************************************
-->
<!-- NB: BUILD_NUMBER is passed in by the build server -->
<PropertyGroup Condition="'$(BUILD_NUMBER)'!=''">
<DECIMAL_BUILD_NUMBER>.$(BUILD_NUMBER)</DECIMAL_BUILD_NUMBER>
</PropertyGroup>
<PropertyGroup Condition="'$(BUILD_RELEASE)'!=''">
<DECIMAL_BUILD_NUMBER>.$(BUILD_RELEASE)</DECIMAL_BUILD_NUMBER>
</PropertyGroup>
<PropertyGroup Condition="'$(BUILD_RELEASE)'!='' AND '$(BUILD_COMMENT)'!=''">
<DECIMAL_BUILD_NUMBER>.$(BUILD_RELEASE)-$(BUILD_COMMENT)</DECIMAL_BUILD_NUMBER>
</PropertyGroup>
<PropertyGroup>
<BuildConfiguration>Release</BuildConfiguration>
<BuildFolder>_BuildOutput\</BuildFolder>
<BuildZipFileName>UmbracoCms$(DECIMAL_BUILD_NUMBER).zip</BuildZipFileName>
<BuildZipFileNameBin>UmbracoCms.AllBinaries$(DECIMAL_BUILD_NUMBER).zip</BuildZipFileNameBin>
<BuildZipFileNameWebPi>UmbracoCms.WebPI$(DECIMAL_BUILD_NUMBER).zip</BuildZipFileNameWebPi>
<IncludeSymbols>False</IncludeSymbols>
<BuildFolderRelativeToProjects>..\..\build\$(BuildFolder)</BuildFolderRelativeToProjects>
<BuildFolderAbsolutePath>$(MSBuildProjectDirectory)\$(BuildFolder)</BuildFolderAbsolutePath>
<SolutionBinFolder>$(BuildFolder)bin\</SolutionBinFolder>
<WebAppFolder>$(BuildFolder)WebApp\</WebAppFolder>
<WebPiFolder>$(BuildFolder)WebPi\</WebPiFolder>
<SolutionBinFolderRelativeToProjects>$(BuildFolderRelativeToProjects)bin\</SolutionBinFolderRelativeToProjects>
<SolutionBinFolderAbsolutePath>$(BuildFolderAbsolutePath)bin\</SolutionBinFolderAbsolutePath>
<WebAppFolderRelativeToProjects>$(BuildFolderRelativeToProjects)WebApp\</WebAppFolderRelativeToProjects>
<WebAppFolderAbsolutePath>$(BuildFolderAbsolutePath)WebApp\</WebAppFolderAbsolutePath>
<WebPiFolderRelativeToProjects>$(BuildFolderRelativeToProjects)WebPi\</WebPiFolderRelativeToProjects>
<WebPiFolderAbsolutePath>$(BuildFolderAbsolutePath)WebPi\</WebPiFolderAbsolutePath>
</PropertyGroup>
<!-- NB: BUILD_NUMBER is passed in by the build server -->
<PropertyGroup Condition="'$(BUILD_NUMBER)'!=''">
<DECIMAL_BUILD_NUMBER>.$(BUILD_NUMBER)</DECIMAL_BUILD_NUMBER>
</PropertyGroup>
<PropertyGroup Condition="'$(BUILD_RELEASE)'!=''">
<DECIMAL_BUILD_NUMBER>.$(BUILD_RELEASE)</DECIMAL_BUILD_NUMBER>
</PropertyGroup>
<PropertyGroup Condition="'$(BUILD_RELEASE)'!='' AND '$(BUILD_COMMENT)'!=''">
<DECIMAL_BUILD_NUMBER>.$(BUILD_RELEASE)-$(BUILD_COMMENT)</DECIMAL_BUILD_NUMBER>
</PropertyGroup>
<ItemGroup>
<SystemFolders Include="$(WebAppFolder)App_Plugins" />
<SystemFolders Include="$(WebAppFolder)App_Code" />
<SystemFolders Include="$(WebAppFolder)App_Data" />
<SystemFolders Include="$(WebAppFolder)media" />
<SystemFolders Include="$(WebAppFolder)masterpages" />
<SystemFolders Include="$(WebAppFolder)scripts" />
<SystemFolders Include="$(WebAppFolder)css" />
<SystemFolders Include="$(WebAppFolder)macroScripts" />
<SystemFolders Include="$(WebAppFolder)xslt" />
<SystemFolders Include="$(WebAppFolder)usercontrols" />
<SystemFolders Include="$(WebAppFolder)Views" />
</ItemGroup>
<PropertyGroup>
<BuildConfiguration>Release</BuildConfiguration>
<BuildFolder>_BuildOutput\</BuildFolder>
<BuildZipFileName>UmbracoCms$(DECIMAL_BUILD_NUMBER).zip</BuildZipFileName>
<BuildZipFileNameBin>UmbracoCms.AllBinaries$(DECIMAL_BUILD_NUMBER).zip</BuildZipFileNameBin>
<BuildZipFileNameWebPi>UmbracoCms.WebPI$(DECIMAL_BUILD_NUMBER).zip</BuildZipFileNameWebPi>
<IncludeSymbols>False</IncludeSymbols>
<BuildFolderRelativeToProjects>..\..\build\$(BuildFolder)</BuildFolderRelativeToProjects>
<BuildFolderAbsolutePath>$(MSBuildProjectDirectory)\$(BuildFolder)</BuildFolderAbsolutePath>
<SolutionBinFolder>$(BuildFolder)bin\</SolutionBinFolder>
<WebAppFolder>$(BuildFolder)WebApp\</WebAppFolder>
<WebPiFolder>$(BuildFolder)WebPi\</WebPiFolder>
<ConfigsFolder>$(BuildFolder)Configs\</ConfigsFolder>
<SolutionBinFolderRelativeToProjects>$(BuildFolderRelativeToProjects)bin\</SolutionBinFolderRelativeToProjects>
<SolutionBinFolderAbsolutePath>$(BuildFolderAbsolutePath)bin\</SolutionBinFolderAbsolutePath>
<WebAppFolderRelativeToProjects>$(BuildFolderRelativeToProjects)WebApp\</WebAppFolderRelativeToProjects>
<WebAppFolderAbsolutePath>$(BuildFolderAbsolutePath)WebApp\</WebAppFolderAbsolutePath>
<WebPiFolderRelativeToProjects>$(BuildFolderRelativeToProjects)WebPi\</WebPiFolderRelativeToProjects>
<WebPiFolderAbsolutePath>$(BuildFolderAbsolutePath)WebPi\</WebPiFolderAbsolutePath>
<ExaminePDFPath>$(BuildFolderAbsolutePath)UmbracoExamine.PDF\</ExaminePDFPath>
<ExamineAzurePath>$(BuildFolderAbsolutePath)UmbracoExamine.Azure\</ExamineAzurePath>
<ExaminePDFAzurePath>$(BuildFolderAbsolutePath)UmbracoExamine.PDF.Azure\</ExaminePDFAzurePath>
</PropertyGroup>
<!--
<ItemGroup>
<SystemFolders Include="$(WebAppFolder)App_Plugins" />
<SystemFolders Include="$(WebAppFolder)App_Code" />
<SystemFolders Include="$(WebAppFolder)App_Data" />
<SystemFolders Include="$(WebAppFolder)Media" />
<SystemFolders Include="$(WebAppFolder)Masterpages" />
<SystemFolders Include="$(WebAppFolder)Scripts" />
<SystemFolders Include="$(WebAppFolder)Css" />
<SystemFolders Include="$(WebAppFolder)MacroScripts" />
<SystemFolders Include="$(WebAppFolder)Xslt" />
<SystemFolders Include="$(WebAppFolder)UserControls" />
<SystemFolders Include="$(WebAppFolder)Views" />
</ItemGroup>
<!--
****************************************************
TARGETS
*****************************************************
-->
<Target Name="Build" DependsOnTargets="ZipWebPiApp">
<Message Text="Build finished" />
<Target Name="Build" DependsOnTargets="GenerateWebPiHash">
<Message Text="Build finished" />
</Target>
<Target Name="CleanUp" DependsOnTargets="ZipWebPiApp">
<Message Text="Deleting $(BuildFolder)" Importance="high" />
<RemoveDir Directories="$(BuildFolder)" />
<Message Text="Finished deleting $(BuildFolder)" Importance="high" />
</Target>
<Target Name="ZipWebPiApp" DependsOnTargets="ZipWebApp" >
<!-- Clean folders -->
<RemoveDir Directories="$(WebPiFolder)" />
<MakeDir Directories="$(WebPiFolder)" />
<MakeDir Directories="$(WebPiFolder)umbraco" />
<!-- Copy fresh built umbraco files -->
<Exec Command="xcopy %22$(WebAppFolderAbsolutePath)*%22 %22$(WebPiFolderAbsolutePath)umbraco%22 /S /E /Y /I" />
<!-- Copy Web Pi template files -->
<Target Name="GenerateWebPiHash" DependsOnTargets="ZipWebPiApp">
<ItemGroup>
<WebPiFiles Include="..\src\WebPi\**\*.*" />
<WebPiFile Include="$(BuildZipFileNameWebPi)" />
</ItemGroup>
<Message Text="Calculating hash for $(BuildZipFileNameWebPi)" />
<GenerateHash InputFiles="@(WebPiFile)" OutputFile="webpihash.txt" />
</Target>
<Copy SourceFiles="@(WebPiFiles)"
DestinationFiles="@(WebPiFiles->'$(WebPiFolder)%(RecursiveDir)%(Filename)%(Extension)')" />
<Target Name="CleanUp" DependsOnTargets="ZipWebPiApp">
<Message Text="Deleting $(BuildFolder)" Importance="high" />
<RemoveDir Directories="$(BuildFolder)" />
<Message Text="Finished deleting $(BuildFolder)" Importance="high" />
</Target>
<!-- Zip the files -->
<Exec Command="..\tools\7zip\7za.exe a -r %22$(BuildZipFileNameWebPi)%22 %22$(WebPiFolderAbsolutePath)*%22" />
</Target>
<Target Name="ZipWebApp" DependsOnTargets="CreateSystemFolders" >
<Message Text="Starting to zip to $(buildDate)-$(BuildZipFileName)" Importance="high" />
<Target Name="ZipWebPiApp" DependsOnTargets="ZipWebApp" >
<!-- Clean folders -->
<RemoveDir Directories="$(WebPiFolder)" />
<MakeDir Directories="$(WebPiFolder)" />
<MakeDir Directories="$(WebPiFolder)umbraco" />
<Exec Command="..\tools\7zip\7za.exe a -r %22$(BuildZipFileNameBin)%22 %22$(SolutionBinFolderAbsolutePath)*%22" />
<Exec Command="..\tools\7zip\7za.exe a -r %22$(BuildZipFileName)%22 %22$(WebAppFolderAbsolutePath)*%22" />
<Message Text="Finished zipping to build\$(BuildFolder)\$(buildDate)-$(BuildZipFileName)" Importance="high" />
</Target>
<!-- Copy fresh built umbraco files -->
<Exec Command="xcopy %22$(WebAppFolderAbsolutePath)*%22 %22$(WebPiFolderAbsolutePath)umbraco%22 /S /E /Y /I" />
<Target Name="CreateSystemFolders" DependsOnTargets="CopyLibraries" Inputs="@(SystemFolders)" Outputs="%(Identity).Dummy">
<MakeDir Directories="@(SystemFolders)" />
</Target>
<Target Name="CopyLibraries" DependsOnTargets="OffsetTimestamps" >
<!-- Copy SQL CE -->
<ItemGroup>
<SQLCE4Files
Include="..\src\packages\SqlServerCE.4.0.0.0\**\*.*"
Exclude="..\src\packages\SqlServerCE.4.0.0.0\lib\**\*;..\src\packages\SqlServerCE.4.0.0.0\**\*.nu*"
<!-- Copy Web Pi template files -->
<ItemGroup>
<WebPiFiles Include="..\src\WebPi\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(WebPiFiles)"
DestinationFiles="@(WebPiFiles->'$(WebPiFolder)%(RecursiveDir)%(Filename)%(Extension)')" />
<!-- Zip the files -->
<Exec Command="..\tools\7zip\7za.exe a -r %22$(BuildZipFileNameWebPi)%22 %22$(WebPiFolderAbsolutePath)*%22" />
</Target>
<Target Name="ZipWebApp" DependsOnTargets="CreateSystemFolders" >
<Message Text="Starting to zip to $(buildDate)-$(BuildZipFileName)" Importance="high" />
<Exec Command="..\tools\7zip\7za.exe a -r %22$(BuildZipFileNameBin)%22 %22$(SolutionBinFolderAbsolutePath)*%22" />
<Exec Command="..\tools\7zip\7za.exe a -r %22$(BuildZipFileName)%22 %22$(WebAppFolderAbsolutePath)*%22" />
<Message Text="Finished zipping to build\$(BuildFolder)\$(buildDate)-$(BuildZipFileName)" Importance="high" />
</Target>
<Target Name="CreateSystemFolders" DependsOnTargets="CopyLibraries" Inputs="@(SystemFolders)" Outputs="%(Identity).Dummy">
<MakeDir Directories="@(SystemFolders)" />
</Target>
<Target Name="CopyLibraries" DependsOnTargets="OffsetTimestamps" >
<!-- Copy SQL CE -->
<ItemGroup>
<SQLCE4Files
Include="..\src\packages\SqlServerCE.4.0.0.0\**\*.*"
Exclude="..\src\packages\SqlServerCE.4.0.0.0\lib\**\*;..\src\packages\SqlServerCE.4.0.0.0\**\*.nu*"
/>
</ItemGroup>
</ItemGroup>
<Copy SourceFiles="@(SQLCE4Files)"
DestinationFiles="@(SQLCE4Files->'$(SolutionBinFolder)%(RecursiveDir)%(Filename)%(Extension)')"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
<Copy SourceFiles="@(SQLCE4Files)"
DestinationFiles="@(SQLCE4Files->'$(SolutionBinFolder)%(RecursiveDir)%(Filename)%(Extension)')"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
<Copy SourceFiles="@(SQLCE4Files)"
DestinationFiles="@(SQLCE4Files->'$(WebAppFolder)bin\%(RecursiveDir)%(Filename)%(Extension)')"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
</Target>
<Copy SourceFiles="@(SQLCE4Files)"
DestinationFiles="@(SQLCE4Files->'$(WebAppFolder)bin\%(RecursiveDir)%(Filename)%(Extension)')"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
<!-- Offset the modified timestamps on all umbraco dlls, as WebResources break if date is in the future, which, due to timezone offsets can happen. -->
<Target Name="OffsetTimestamps" DependsOnTargets="CopyTransformedWebConfig">
<CreateItem Include="$(BuildFolder)**\umbraco.*.dll">
<Output TaskParameter="Include" ItemName="FilesToOffsetTimestamp" />
</CreateItem>
<Message Text="Starting to offset timestamps" Importance="high" />
<Umbraco.MSBuild.Tasks.TimestampOffset Files="@(FilesToOffsetTimestamp)" Offset="-11" />
<Message Text="Finished offsetting timestamps" Importance="high" />
</Target>
<!-- Offset the modified timestamps on all umbraco dlls, as WebResources break if date is in the future, which, due to timezone offsets can happen. -->
<Target Name="OffsetTimestamps" DependsOnTargets="CopyTransformedWebConfig">
<CreateItem Include="$(BuildFolder)**\umbraco.*.dll">
<Output TaskParameter="Include" ItemName="FilesToOffsetTimestamp" />
</CreateItem>
<Message Text="Starting to offset timestamps" Importance="high" />
<Umbraco.MSBuild.Tasks.TimestampOffset Files="@(FilesToOffsetTimestamp)" Offset="-11" />
<Message Text="Finished offsetting timestamps" Importance="high" />
</Target>
<!-- Copy the transformed web.config file to the root -->
<Target Name="CopyTransformedWebConfig" DependsOnTargets="CopyTransformedConfig">
<ItemGroup>
<WebConfigFile Include="..\src\Umbraco.Web.UI\web.$(BuildConfiguration).Config.transformed" />
</ItemGroup>
<Copy SourceFiles="@(WebConfigFile)"
DestinationFiles="$(WebAppFolder)Web.config"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
</Target>
<!-- Copy the transformed web.config file to the root -->
<Target Name="CopyTransformedWebConfig" DependsOnTargets="CopyXmlDocumentation">
<ItemGroup>
<WebConfigFile Include="..\src\Umbraco.Web.UI\web.$(BuildConfiguration).Config.transformed" />
<!-- Copy the config files and rename them to *.config.transform -->
<Target Name="CopyTransformedConfig" DependsOnTargets="CopyXmlDocumentation">
<ItemGroup>
<ConfigFiles Include="$(WebAppFolder)config\*.config" />
<WebConfigTransformFile Include="$(WebAppFolder)Web.config" />
</ItemGroup>
<Copy SourceFiles="@(WebConfigFile)"
DestinationFiles="$(WebAppFolder)Web.config"
<Copy SourceFiles="@(ConfigFiles)"
DestinationFiles="@(ConfigFiles->'$(ConfigsFolder)\%(RecursiveDir)%(Filename)%(Extension)')"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
</Target>
<!-- Copy the xml documentation to the bin folder -->
<Target Name="CopyXmlDocumentation" DependsOnTargets="CompileProjects">
<ItemGroup>
<XmlDocumentationFiles Include="$(SolutionBinFolder)*.xml" />
</ItemGroup>
<Copy SourceFiles="@(XmlDocumentationFiles)"
DestinationFiles="@(XmlDocumentationFiles->'$(WebAppFolder)bin\%(RecursiveDir)%(Filename)%(Extension)')"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
<Message Text="CopyXmlDocumentation" />
</Target>
<Target Name="CompileProjects" DependsOnTargets="SetVersionNumber">
<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 -->
<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>
<Copy SourceFiles="@(WebConfigTransformFile)"
DestinationFiles="$(ConfigsFolder)Web.config.transform"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
</Target>
<!-- DONE -->
<Message Text="Finished compiling projects" Importance="high" />
</Target>
<!-- Copy the xml documentation to the bin folder -->
<Target Name="CopyXmlDocumentation" DependsOnTargets="CleanupPresentation">
<ItemGroup>
<XmlDocumentationFiles Include="$(SolutionBinFolder)*.xml" />
</ItemGroup>
<Target Name="SetVersionNumber" Condition="'$(BUILD_RELEASE)'!=''">
<Copy SourceFiles="@(XmlDocumentationFiles)"
DestinationFiles="@(XmlDocumentationFiles->'$(WebAppFolder)bin\%(RecursiveDir)%(Filename)%(Extension)')"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
<Message Text="CopyXmlDocumentation" />
</Target>
<!-- Unlike 2010, the VS2012 build targets file doesn't clean up the umbraco.presentation dir, do it manually -->
<!-- Also, it places umbraco.XmlSerializers.dll in the root, even though it's also in the bin folder. Kill! -->
<Target Name="CleanupPresentation" DependsOnTargets="CompileProjects">
<ItemGroup>
<PresentationFolderToDelete Include="$(WebAppFolder)umbraco.presentation" />
<XmlSerializersDll Include="$(WebAppFolder)umbraco.XmlSerializers.dll" />
</ItemGroup>
<RemoveDir Directories="@(PresentationFolderToDelete)" />
<Delete Files="@(XmlSerializersDll)" />
</Target>
<Target Name="CompileProjects" DependsOnTargets="CompileExternalExamineProjects">
<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>
<!-- DONE -->
<Message Text="Finished compiling projects" Importance="high" />
</Target>
<Target Name="CompileExternalExamineProjects" DependsOnTargets="SetVersionNumber">
<Message Text="Building externally shipped examine projects" Importance="high" />
<!-- First remove old files from the examine builds -->
<ItemGroup>
<FilesToDeleteBeforeBuild Include="$(ExaminePDFPath)*;$(ExamineAzurePath)*"/>
</ItemGroup>
<Delete Files="@(FilesToDeleteBeforeBuild)" />
<!--
Build the UmbracoExamine.PDF.Azure library ... this builds the 3 projects that we want to bundle separately so no need to build each one separately .
We'll just build this one and then manually copy the DLLs to where we want them.
-->
<MSBuild Projects="..\src\UmbracoExamine.PDF.Azure\UmbracoExamine.PDF.Azure.csproj" Properties="WarningLevel=0;Configuration=$(BuildConfiguration);PipelineDependsOnBuild=False;OutDir=$(ExaminePDFAzurePath);" Targets="Clean;Build;" BuildInParallel="False" ToolsVersion="4.0" UnloadProjectsOnCompletion="False">
</MSBuild>
<ItemGroup>
<ExaminePDFFiles Include="$(ExaminePDFAzurePath)**\UmbracoExamine.PDF.dll;$(ExaminePDFAzurePath)**\UmbracoExamine.PDF.pdf;$(ExaminePDFAzurePath)**\UmbracoExamine.PDF.xml;$(ExaminePDFAzurePath)**\itextsharp.dll" />
<ExamineAzureFiles Include="$(ExaminePDFAzurePath)**\UmbracoExamine.Azure.dll;$(ExaminePDFAzurePath)**\UmbracoExamine.Azure.pdb;$(ExaminePDFAzurePath)**\UmbracoExamine.Azure.xml" />
<ExaminePDFAzureFiles Include="$(ExaminePDFAzurePath)**\UmbracoExamine.Azure.PDF.dll;$(ExaminePDFAzurePath)**\UmbracoExamine.Azure.PDF.pdb;$(ExaminePDFAzurePath)**\UmbracoExamine.Azure.PDF.xml" />
</ItemGroup>
<!-- Now copy the built files to their correct deployment folders-->
<Copy SourceFiles="@(ExaminePDFFiles)"
DestinationFolder="$(ExaminePDFPath)"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
<Copy SourceFiles="@(ExamineAzureFiles)"
DestinationFolder="$(ExamineAzurePath)"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
<!-- Then just delete the files we don't want to ship in the UmbracoExamine.Azure.PDF folder -->
<ItemGroup>
<FilesToDeleteAfterBuild Include="$(ExaminePDFAzurePath)*" Exclude="$(ExaminePDFAzurePath)UmbracoExamine.PDF.Azure.dll;$(ExaminePDFAzurePath)UmbracoExamine.PDF.Azure.pdb;$(ExaminePDFAzurePath)UmbracoExamine.PDF.Azure.xml"/>
</ItemGroup>
<Delete Files="@(FilesToDeleteAfterBuild)" />
</Target>
<Target Name="SetVersionNumber" Condition="'$(BUILD_RELEASE)'!=''">
<!-- Match & replace 3 and 4 digit version numbers and -beta (if it's there) -->
<FileUpdate
<FileUpdate
Files="..\src\Umbraco.Core\Configuration\UmbracoVersion.cs"
Regex="(\d+)\.(\d+)\.(\d+)(.(\d+))?"
ReplacementText="$(BUILD_RELEASE)"/>
@@ -191,5 +308,5 @@
<FileUpdate Files="..\src\Umbraco.Core\Configuration\UmbracoVersion.cs"
Regex="CurrentComment { get { return &quot;([a-zA-Z]+)?&quot;"
ReplacementText="CurrentComment { get { return &quot;$(BUILD_COMMENT)&quot;"/>
</Target>
</Target>
</Project>
+53 -57
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-16"?>
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>UmbracoCms.Core</id>
<version>6.0.0-alpha</version>
<version>6.2.0</version>
<title>Umbraco Cms Core Binaries</title>
<authors>Morten Christensen</authors>
<owners>Umbraco HQ</owners>
@@ -14,61 +14,57 @@
<summary>Contains the core assemblies needed to run Umbraco Cms</summary>
<language>en-US</language>
<tags>umbraco</tags>
<dependencies>
<dependency id="Microsoft.AspNet.Mvc" version="[4.0.20710.0]" />
<dependency id="ServiceStack.Text" version="3.9.21" />
<dependency id="Microsoft.AspNet.Mvc.FixedDisplayModes" version="1.0.0" />
<dependencies>
<dependency id="Microsoft.AspNet.Mvc" version="4.0" />
<dependency id="Microsoft.AspNet.WebApi" version="4.0" />
<dependency id="Microsoft.AspNet.Mvc.FixedDisplayModes" version="1.0.0" />
<dependency id="MiniProfiler" version="[2.1.0, 3.0.0)" />
<dependency id="HtmlAgilityPack" version="[1.4.6, 2.0.0)" />
<dependency id="Lucene.Net" version="[2.9.4.1, 3.0.0.0)" />
<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-Mvc" version="[1.7.0, 2.0.0)" />
</dependencies>
</metadata>
<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\ClientDependency.Core.Mvc.dll" target="lib\ClientDependency.Core.Mvc.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" />
<file src="..\_BuildOutput\WebApp\bin\controls.xml" target="lib\controls.xml" />
<file src="..\_BuildOutput\WebApp\bin\CookComputing.XmlRpcV2.dll" target="lib\CookComputing.XmlRpcV2.dll" />
<file src="..\_BuildOutput\WebApp\bin\Examine.dll" target="lib\Examine.dll" />
<file src="..\_BuildOutput\WebApp\bin\HtmlAgilityPack.dll" target="lib\HtmlAgilityPack.dll" />
<file src="..\_BuildOutput\WebApp\bin\ICSharpCode.SharpZipLib.dll" target="lib\ICSharpCode.SharpZipLib.dll" />
<file src="..\_BuildOutput\WebApp\bin\interfaces.dll" target="lib\interfaces.dll" />
<file src="..\_BuildOutput\WebApp\bin\interfaces.xml" target="lib\interfaces.xml" />
<file src="..\_BuildOutput\WebApp\bin\log4net.dll" target="lib\log4net.dll" />
<file src="..\_BuildOutput\WebApp\bin\Lucene.Net.dll" target="lib\Lucene.Net.dll" />
<file src="..\_BuildOutput\WebApp\bin\Lucene.Net.xml" target="lib\Lucene.Net.xml" />
<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\MySql.Data.dll" target="lib\MySql.Data.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" />
<file src="..\_BuildOutput\WebApp\bin\TidyNet.dll" target="lib\TidyNet.dll" />
<file src="..\_BuildOutput\WebApp\bin\Umbraco.Core.dll" target="lib\Umbraco.Core.dll" />
<file src="..\_BuildOutput\WebApp\bin\Umbraco.Core.xml" target="lib\Umbraco.Core.xml" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.DataLayer.dll" target="lib\umbraco.DataLayer.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.DataLayer.xml" target="lib\umbraco.DataLayer.xml" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.dll" target="lib\umbraco.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.xml" target="lib\umbraco.xml" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.editorControls.dll" target="lib\umbraco.editorControls.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.editorControls.xml" target="lib\umbraco.editorControls.xml" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.MacroEngines.dll" target="lib\umbraco.MacroEngines.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.MacroEngines.xml" target="lib\umbraco.MacroEngines.xml" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.macroRenderings.dll" target="lib\umbraco.macroRenderings.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.macroRenderings.xml" target="lib\umbraco.macroRenderings.xml" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.providers.dll" target="lib\umbraco.providers.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.providers.xml" target="lib\umbraco.providers.xml" />
<file src="..\_BuildOutput\WebApp\bin\Umbraco.Web.UI.dll" target="lib\Umbraco.Web.UI.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.webservices.dll" target="lib\umbraco.webservices.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.webservices.xml" target="lib\umbraco.webservices.xml" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.XmlSerializers.dll" target="lib\umbraco.XmlSerializers.dll" />
<file src="..\_BuildOutput\WebApp\bin\UmbracoExamine.dll" target="lib\UmbracoExamine.dll" />
<file src="..\_BuildOutput\WebApp\bin\UrlRewritingNet.UrlRewriter.dll" target="lib\UrlRewritingNet.UrlRewriter.dll" />
<file src="..\_BuildOutput\WebApp\bin\amd64\**" target="Content\bin\amd64" />
<file src="..\_BuildOutput\WebApp\bin\x86\**" target="Content\bin\x86" />
</files>
<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\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" />
<file src="..\_BuildOutput\WebApp\bin\controls.xml" target="lib\controls.xml" />
<file src="..\_BuildOutput\WebApp\bin\Examine.dll" target="lib\Examine.dll" />
<file src="..\_BuildOutput\WebApp\bin\interfaces.dll" target="lib\interfaces.dll" />
<file src="..\_BuildOutput\WebApp\bin\interfaces.xml" target="lib\interfaces.xml" />
<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" />
<file src="..\_BuildOutput\WebApp\bin\TidyNet.dll" target="lib\TidyNet.dll" />
<file src="..\_BuildOutput\WebApp\bin\Umbraco.Core.dll" target="lib\Umbraco.Core.dll" />
<file src="..\_BuildOutput\WebApp\bin\Umbraco.Core.xml" target="lib\Umbraco.Core.xml" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.DataLayer.dll" target="lib\umbraco.DataLayer.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.DataLayer.xml" target="lib\umbraco.DataLayer.xml" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.dll" target="lib\umbraco.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.xml" target="lib\umbraco.xml" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.editorControls.dll" target="lib\umbraco.editorControls.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.editorControls.xml" target="lib\umbraco.editorControls.xml" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.MacroEngines.dll" target="lib\umbraco.MacroEngines.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.MacroEngines.xml" target="lib\umbraco.MacroEngines.xml" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.macroRenderings.dll" target="lib\umbraco.macroRenderings.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.macroRenderings.xml" target="lib\umbraco.macroRenderings.xml" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.providers.dll" target="lib\umbraco.providers.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.providers.xml" target="lib\umbraco.providers.xml" />
<file src="..\_BuildOutput\WebApp\bin\Umbraco.Web.UI.dll" target="lib\Umbraco.Web.UI.dll" />
<file src="..\_BuildOutput\WebApp\bin\umbraco.XmlSerializers.dll" target="lib\umbraco.XmlSerializers.dll" />
<file src="..\_BuildOutput\WebApp\bin\UmbracoExamine.dll" target="lib\UmbracoExamine.dll" />
<file src="..\_BuildOutput\WebApp\bin\UrlRewritingNet.UrlRewriter.dll" target="lib\UrlRewritingNet.UrlRewriter.dll" />
</files>
</package>
+11 -8
View File
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-16"?>
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>UmbracoCms</id>
<version>6.0.0-alpha</version>
<version>6.1.2</version>
<title>Umbraco Cms</title>
<authors>Morten Christensen</authors>
<owners>Umbraco HQ</owners>
@@ -10,23 +10,25 @@
<projectUrl>http://umbraco.com/</projectUrl>
<iconUrl>http://umbraco.com/media/357769/100px_transparent.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Installs Umbraco Cms in your Visual Studio ASP.NET Webforms project</description>
<summary>Installs Umbraco Cms in your Visual Studio ASP.NET Webforms project</summary>
<description>Installs Umbraco Cms in your Visual Studio ASP.NET project</description>
<summary>Installs Umbraco Cms in your Visual Studio ASP.NET project</summary>
<language>en-US</language>
<tags>umbraco</tags>
<dependencies>
<dependency id="UmbracoCms.Core" version="$version$" />
<dependency id="UmbracoCms.Core" version="[$version$]" />
</dependencies>
</metadata>
<files>
<file src="..\_BuildOutput\WebApp\config\*.config" target="Content\config" />
<file src="..\_BuildOutput\WebApp\bin\amd64\**" target="Content\bin\amd64" />
<file src="..\_BuildOutput\WebApp\bin\x86\**" target="Content\bin\x86" />
<file src="..\_BuildOutput\Configs\**" target="Content\config" exclude="..\_BuildOutput\Configs\Web.config.transform" />
<file src="..\_BuildOutput\WebApp\css\**" target="Content\css" />
<file src="..\_BuildOutput\WebApp\macroScripts\**" target="Content\macroScripts" />
<file src="..\_BuildOutput\WebApp\masterpages\**" target="Content\masterpages" />
<file src="..\_BuildOutput\WebApp\media\**" target="Content\media" />
<file src="..\_BuildOutput\WebApp\scripts\**" target="Content\scripts" />
<file src="..\_BuildOutput\WebApp\usercontrols\**" target="Content\usercontrols" />
<file src="..\_BuildOutput\WebApp\Views\**" target="Content\Views" />
<file src="..\_BuildOutput\WebApp\Views\**" target="Content\Views" exclude="..\_BuildOutput\WebApp\Views\Web.config" />
<file src="..\_BuildOutput\WebApp\xslt\**" target="Content\xslt" />
<file src="..\_BuildOutput\WebApp\default.aspx" target="Content\default.aspx" />
<file src="..\_BuildOutput\WebApp\Web.config" target="Content\Web.config" />
@@ -34,7 +36,7 @@
<file src="..\_BuildOutput\WebApp\App_Code\**" target="UmbracoFiles\App_Code" />
<file src="..\_BuildOutput\WebApp\App_Data\**" target="UmbracoFiles\App_Data" />
<file src="..\_BuildOutput\WebApp\App_Plugins\**" target="UmbracoFiles\App_Plugins" />
<file src="..\_BuildOutput\WebApp\config\**" target="UmbracoFiles\config" />
<file src="..\_BuildOutput\WebApp\config\splashes\**" target="UmbracoFiles\config\splashes" />
<file src="..\_BuildOutput\WebApp\install\**" target="UmbracoFiles\install" />
<file src="..\_BuildOutput\WebApp\umbraco\**" target="UmbracoFiles\umbraco" />
<file src="..\_BuildOutput\WebApp\umbraco_client\**" target="UmbracoFiles\umbraco_client" />
@@ -42,5 +44,6 @@
<file src="..\_BuildOutput\WebApp\Web.config" target="UmbracoFiles\Web.config" />
<file src="tools\install.ps1" target="tools\install.ps1" />
<file src="tools\Readme.txt" target="tools\Readme.txt" />
<file src="build\**" target="build" />
</files>
</package>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>
AddUmbracoFilesToOutput;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
<CopyAllFilesToSingleFolderForMsdeployDependsOn>
AddUmbracoFilesToOutput;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForMsdeployDependsOn>
</PropertyGroup>
</Project>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="AddUmbracoFilesToOutput">
<ItemGroup>
<UmbracoFiles Include=".\umbraco\**\*;" />
<UmbracoClientFiles Include=".\umbraco_client\**\*;" />
<AppBrowsersFiles Include=".\App_Browsers\**\*" />
<FilesForPackagingFromProject Include="%(UmbracoFiles.Identity)">
<DestinationRelativePath>umbraco\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(UmbracoClientFiles.Identity)">
<DestinationRelativePath>umbraco_client\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(AppBrowsersFiles.Identity)">
<DestinationRelativePath>App_Browsers\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
</Project>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>
AddUmbracoFilesToOutput;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
<CopyAllFilesToSingleFolderForMsdeployDependsOn>
AddUmbracoFilesToOutput;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForMsdeployDependsOn>
</PropertyGroup>
</Project>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="AddUmbracoFilesToOutput">
<ItemGroup>
<UmbracoFiles Include=".\umbraco\**\*;" />
<UmbracoClientFiles Include=".\umbraco_client\**\*;" />
<AppBrowsersFiles Include=".\App_Browsers\**\*" />
<FilesForPackagingFromProject Include="%(UmbracoFiles.Identity)">
<DestinationRelativePath>umbraco\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(UmbracoClientFiles.Identity)">
<DestinationRelativePath>umbraco_client\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(AppBrowsersFiles.Identity)">
<DestinationRelativePath>App_Browsers\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
</Project>
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CopyAllFilesToSingleFolderForPackageDependsOn>
AddUmbracoFilesToOutput;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForPackageDependsOn>
<CopyAllFilesToSingleFolderForMsdeployDependsOn>
AddUmbracoFilesToOutput;
$(CopyAllFilesToSingleFolderForPackageDependsOn);
</CopyAllFilesToSingleFolderForMsdeployDependsOn>
</PropertyGroup>
</Project>
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="AddUmbracoFilesToOutput">
<ItemGroup>
<UmbracoFiles Include=".\umbraco\**\*;" />
<UmbracoClientFiles Include=".\umbraco_client\**\*;" />
<AppBrowsersFiles Include=".\App_Browsers\**\*" />
<FilesForPackagingFromProject Include="%(UmbracoFiles.Identity)">
<DestinationRelativePath>umbraco\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(UmbracoClientFiles.Identity)">
<DestinationRelativePath>umbraco_client\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
<FilesForPackagingFromProject Include="%(AppBrowsersFiles.Identity)">
<DestinationRelativePath>App_Browsers\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
</Project>
+13 -9
View File
@@ -1,15 +1,19 @@
A note about running Umbraco from Visual Studio.
When upgrading your website using nuget a backup of config files and web.config will be created and the files will
be overwritten with those from the current release. This means that you'll have to merge the files if you made any
changes to the previous config files.
When upgrading your website using nuget a backup of config files and web.config will be created. Only the web.config will
be overwritten by default to ensure that it has the necessary settings from the current release. This means that you'll
have to merge the files if you made any changes to the previous config files.
The config files found in the config folder will usually not be changed for patch releases, so they can usually be skipped,
but the web.config will have to have its previous "umbracoConfigurationStatus"-appsetting and "umbracoDbDSN" connection string
copied over (as a minimum).
It's not possible to create a deploy package from Visual Studio, which contains everything out of the box. This is
due to a number of files and folders that are not added to the Visual Studio project. These folders include:
install, umbraco and umbraco_client.
A custom deploy script will be added in a later release.
This nuget package includes build targets that extends the creation of a deploy package, which is generated by
Publishing from Visual Studio. The targets will only work once Publishing is configured, so if you don't use
Publish this won't affect you.
These folders will now be automatically included when creating a deploy package or publishing to the file system:
umbraco and umbraco_client.
Please read the release notes on Codeplex:
http://umbraco.codeplex.com/releases
Please read the release notes on our.umbraco.org:
http://our.umbraco.org/contribute/releases
- Umbraco
+3
View File
@@ -21,4 +21,7 @@ if ($project) {
$projectDestinationPath = Split-Path $project.FullName -Parent
$umbracoFilesPath = Join-Path $rootPath "UmbracoFiles\*"
Copy-Item $umbracoFilesPath $projectDestinationPath -recurse -force
# Open readme.txt file
$DTE.ItemOperations.OpenFile($toolsPath + '\Readme.txt')
}
Binary file not shown.
+41 -11
View File
@@ -21,29 +21,44 @@ echo ^<?xml version="1.0" encoding="utf-8"?^>^<packages^>^</packages^> >..\src\U
echo Removing plugin cache files
del ..\src\Umbraco.Web.UI\App_Data\TEMP\PluginCache\*.*
echo Removing cache files and examine index
del ..\src\Umbraco.Web.UI\App_Data\TEMP\*.*
echo Removing log files
del ..\src\Umbraco.Web.UI\App_Data\Logs\*.*
echo Removing packages
del ..\src\Umbraco.Web.UI\App_Data\packages\*.*
echo Removing previews
del ..\src\Umbraco.Web.UI\App_Data\preview\*.*
echo Removing app code files (typically added by starterkits)
del ..\src\Umbraco.Web.UI\App_Code\*.*
echo Removing xslt files
del ..\src\Umbraco.Web.UI\Xslt\*.*
del ..\src\Umbraco.Web.UI\xslt\*.*
echo Removing user control files
del ..\src\Umbraco.Web.UI\UserControls\*.*
echo Removing masterpage files
del ..\src\Umbraco.Web.UI\masterpages\*.*
echo Removing view files
del ..\src\Umbraco.Web.UI\Views\*.*
echo Removing razor files
del ..\src\Umbraco.Web.UI\MacroScripts\*.*
del ..\src\Umbraco.Web.UI\macroScripts\*.*
echo Removing media files
del ..\src\Umbraco.Web.UI\Media\*.*
del ..\src\Umbraco.Web.UI\media\*.*
echo Removing script files
del ..\src\Umbraco.Web.UI\Scripts\*.*
del ..\src\Umbraco.Web.UI\scripts\*.*
echo Removing css files
del ..\src\Umbraco.Web.UI\Css\*.*
del ..\src\Umbraco.Web.UI\css\*.*
echo "Umbraco install reverted to clean install"
pause
@@ -64,29 +79,44 @@ echo ^<?xml version="1.0" encoding="utf-8"?^>^<packages^>^</packages^> >..\src\U
echo Removing plugin cache files
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\TEMP\PluginCache\*.*) DO DEL %%A
echo Removing cache files and examine index
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\TEMP\*.*) DO DEL %%A
echo Removing log files
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\Logs\*.*) DO DEL %%A
echo Removing packages
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\packages\*.*) DO DEL %%A
echo Removing previews
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\preview\*.*) DO DEL %%A
echo Removing app code files (typically added by starterkits)
FOR %%A IN (..\src\Umbraco.Web.UI\App_Code\*.*) DO DEL %%A
echo Removing xslt files
FOR %%A IN (..\src\Umbraco.Web.UI\Xslt\*.*) DO DEL %%A
FOR %%A IN (..\src\Umbraco.Web.UI\xslt\*.*) DO DEL %%A
echo Removing masterpage files
FOR %%A IN (..\src\Umbraco.Web.UI\masterpages\*.*) DO DEL %%A
echo Removing user control files
FOR %%A IN (..\src\Umbraco.Web.UI\UserControls\*.*) DO DEL %%A
FOR %%A IN (..\src\Umbraco.Web.UI\usercontrols\*.*) DO DEL %%A
echo Removing view files
FOR %%A IN (..\src\Umbraco.Web.UI\Views\*.*) DO DEL %%A
echo Removing razor files
FOR %%A IN (..\src\Umbraco.Web.UI\MacroScripts\*.*) DO DEL %%A
FOR %%A IN (..\src\Umbraco.Web.UI\macroScripts\*.*) DO DEL %%A
echo Removing media files
FOR %%A IN (..\src\Umbraco.Web.UI\Media\*.*) DO DEL %%A
FOR %%A IN (..\src\Umbraco.Web.UI\media\*.*) DO DEL %%A
echo Removing script files
FOR %%A IN (..\src\Umbraco.Web.UI\Scripts\*.*) DO DEL %%A
FOR %%A IN (..\src\Umbraco.Web.UI\scripts\*.*) DO DEL %%A
echo Removing css files
FOR %%A IN (..\src\Umbraco.Web.UI\Css\*.*) DO DEL %%A
FOR %%A IN (..\src\Umbraco.Web.UI\css\*.*) DO DEL %%A
echo "Umbraco install reverted to clean install"
pause
+161
View File
@@ -0,0 +1,161 @@
@ECHO OFF
:choice
set /P c=WARNING! Are you sure you want to continue, this will remove all package files, view files, sqlce database, etc... Press 'Y' to auto-remove all files/folders, 'N' to cancel or 'C' to prompt for each folder removal?
if /I "%c%" EQU "C" goto :prompt
if /I "%c%" EQU "Y" goto :auto
if /I "%c%" EQU "N" goto :exit
goto :choice
:prompt
echo Current folder: %CD%
echo Regenerating SQL CE database
SET buildfolder=%CD%
CD ..\tools\RegenerateUmbracoSQLCEDatabase\
RegenerateUmbracoSQLCEDatabase.exe %CD%\..\..\src\Umbraco.Web.UI
CD %buildfolder%
echo Removing bin files
del ..\src\Umbraco.Web.UI\bin\*.*
echo Building solution
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe ..\src\umbraco.sln /t:Clean,Build
echo Resetting installedPackages.config
echo ^<?xml version="1.0" encoding="utf-8"?^>^<packages^>^</packages^> >..\src\Umbraco.Web.UI\App_Data\packages\installed\installedPackages.config
echo Removing plugin cache files
del ..\src\Umbraco.Web.UI\App_Data\TEMP\PluginCache\*.*
echo Removing cache files and examine index
del ..\src\Umbraco.Web.UI\App_Data\TEMP\*.*
echo Removing log files
del ..\src\Umbraco.Web.UI\App_Data\Logs\*.*
echo Removing packages
del ..\src\Umbraco.Web.UI\App_Data\packages\*.*
echo Removing previews
del ..\src\Umbraco.Web.UI\App_Data\preview\*.*
echo Removing app code files (typically added by starterkits)
del ..\src\Umbraco.Web.UI\App_Code\*.*
echo Removing xslt files
del ..\src\Umbraco.Web.UI\xslt\*.*
echo Removing user control files
del ..\src\Umbraco.Web.UI\UserControls\*.*
echo Removing masterpage files
del ..\src\Umbraco.Web.UI\masterpages\*.*
echo Removing view files
del ..\src\Umbraco.Web.UI\Views\*.*
echo Removing razor files
del ..\src\Umbraco.Web.UI\macroScripts\*.*
echo Removing media files
del ..\src\Umbraco.Web.UI\media\*.*
echo Removing script files
del ..\src\Umbraco.Web.UI\scripts\*.*
echo Removing css files
del ..\src\Umbraco.Web.UI\css\*.*
echo "Umbraco install reverted to clean install"
pause
exit
:auto
echo Current folder: %CD%
echo Regenerating SQL CE database
SET buildfolder=%CD%
CD ..\tools\RegenerateUmbracoSQLCEDatabase\
RegenerateUmbracoSQLCEDatabase.exe %CD%\..\..\src\Umbraco.Web.UI
CD %buildfolder%
echo Removing bin files
FOR %%A IN (..\src\Umbraco.Web.UI\bin\*.*) DO DEL %%A
echo Building solution
%windir%\Microsoft.NET\Framework\v4.0.30319\msbuild.exe ..\src\umbraco.sln /t:Clean,Build
echo Resetting installedPackages.config
echo ^<?xml version="1.0" encoding="utf-8"?^>^<packages^>^</packages^> >..\src\Umbraco.Web.UI\App_Data\packages\installed\installedPackages.config
echo Removing plugin cache files
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\TEMP\PluginCache\*.*) DO DEL %%A
echo Removing cache files and examine index
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\TEMP\*.*) DO DEL %%A
echo Removing log files
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\Logs\*.*) DO DEL %%A
echo Removing packages
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\packages\*.*) DO DEL %%A
echo Removing previews
FOR %%A IN (..\src\Umbraco.Web.UI\App_Data\preview\*.*) DO DEL %%A
echo Removing app code files (typically added by starterkits)
FOR %%A IN (..\src\Umbraco.Web.UI\App_Code\*.*) DO DEL %%A
echo Removing xslt files
FOR %%A IN (..\src\Umbraco.Web.UI\xslt\*.*) DO DEL %%A
echo Removing masterpage files
FOR %%A IN (..\src\Umbraco.Web.UI\masterpages\*.*) DO DEL %%A
echo Removing user control files
FOR %%A IN (..\src\Umbraco.Web.UI\usercontrols\*.*) DO DEL %%A
echo Removing view files
FOR %%A IN (..\src\Umbraco.Web.UI\Views\*.*) DO DEL %%A
echo Removing razor files
FOR %%A IN (..\src\Umbraco.Web.UI\macroScripts\*.*) DO DEL %%A
echo Removing media files
FOR %%A IN (..\src\Umbraco.Web.UI\media\*.*) DO DEL %%A
echo Removing script files
FOR %%A IN (..\src\Umbraco.Web.UI\scripts\*.*) DO DEL %%A
echo Removing css files
FOR %%A IN (..\src\Umbraco.Web.UI\css\*.*) DO DEL %%A
echo Removing Courier files
del ..\src\Umbraco.Web.UI\config\courier.config
del ..\src\Umbraco.Web.UI\umbraco\images\tray\courier.jpg
rmdir "..\src\Umbraco.Web.UI\umbraco\plugins\courier\" /S /Q
echo Removing Contour files
del ..\src\Umbraco.Web.UI\umbraco\images\tray\contour.png
FOR %%A IN (..\src\Umbraco.Web.UI\umbraco\images\umbraco\icon_*.*) DO DEL %%A
rmdir "..\src\Umbraco.Web.UI\umbraco\plugins\umbracoContour\" /S /Q
del ..\src\Umbraco.Web.UI\umbraco\xslt\templates\UmbracoContour*.* /S /Q
rmdir "..\src\Umbraco.Web.UI\usercontrols\umbracoContour\" /S /Q
echo Start with a clean web.config
copy ..\src\Umbraco.Web.UI\web.Template.config ..\src\Umbraco.Web.UI\web.config /Y
echo "Umbraco install reverted to clean install"
pause
exit
:exit
exit
Binary file not shown.
-24
View File
@@ -1,24 +0,0 @@
Hi! Thanks for grabbing the Umbraco sourcecode.
===========================================
NOTE - DEFAULT BRANCH EMPTY - December 2010
===========================================
- With the help of CodePlex we have migrated much of our previous changesets (as of Dec 13th 2010) from TFS to Mercurial.
- However, not everything could be migrated to our new branching workflow. So for each nominal group of 4.x changes, we've created named branches. For upcoming 5.x changesets, we'll adhere to our new workflow which we'll describe on the Wiki for contributors.
- FOR THE MOMENT, the 'default' branch is empty - pending the addition of the 5.0 changesets
- To switch to the codebase on which you want to work, 'hg update' to the named branch (e.g. "4.6.0") or tag (e.g. "Release-4.5.2") and browse or work from that point.
Thanks to Matt Hawley at CodePlex for his help in our migration!
Cheers,
The Umbraco Team
http://umbraco.org
http://our.umbraco.org
http://umbraco.codeplex.com
-82
View File
@@ -1,82 +0,0 @@
{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f36\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Tahoma;}
{\f39\froman\fcharset238\fprq2 Times New Roman CE;}{\f40\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f42\froman\fcharset161\fprq2 Times New Roman Greek;}{\f43\froman\fcharset162\fprq2 Times New Roman Tur;}
{\f44\froman\fcharset177\fprq2 Times New Roman (Hebrew);}{\f45\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f46\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f47\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}
{\f399\fswiss\fcharset238\fprq2 Tahoma CE;}{\f400\fswiss\fcharset204\fprq2 Tahoma Cyr;}{\f402\fswiss\fcharset161\fprq2 Tahoma Greek;}{\f403\fswiss\fcharset162\fprq2 Tahoma Tur;}{\f404\fswiss\fcharset177\fprq2 Tahoma (Hebrew);}
{\f405\fswiss\fcharset178\fprq2 Tahoma (Arabic);}{\f406\fswiss\fcharset186\fprq2 Tahoma Baltic;}{\f407\fswiss\fcharset163\fprq2 Tahoma (Vietnamese);}{\f408\fswiss\fcharset222\fprq2 Tahoma (Thai);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;
\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;
\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive
\ssemihidden Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{\s15\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0
\f36\fs16\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext15 \ssemihidden \styrsid668380 Balloon Text;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\listtable{\list\listtemplateid130696116{\listlevel\levelnfc0\levelnfcn0\leveljc0
\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'00.;}{\levelnumbers\'01;}\fi-360\li720\jclisttab\tx720\lin720 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
{\leveltext\'02\'01.;}{\levelnumbers\'01;}\fi-360\li1440\jclisttab\tx1440\lin1440 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'02.;}{\levelnumbers\'01;}\fi-360\li2160
\jclisttab\tx2160\lin2160 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'03.;}{\levelnumbers\'01;}\fi-360\li2880\jclisttab\tx2880\lin2880 }{\listlevel\levelnfc0\levelnfcn0\leveljc0
\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'04.;}{\levelnumbers\'01;}\fi-360\li3600\jclisttab\tx3600\lin3600 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0
{\leveltext\'02\'05.;}{\levelnumbers\'01;}\fi-360\li4320\jclisttab\tx4320\lin4320 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'06.;}{\levelnumbers\'01;}\fi-360\li5040
\jclisttab\tx5040\lin5040 }{\listlevel\levelnfc0\levelnfcn0\leveljc0\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'07.;}{\levelnumbers\'01;}\fi-360\li5760\jclisttab\tx5760\lin5760 }{\listlevel\levelnfc0\levelnfcn0\leveljc0
\leveljcn0\levelfollow0\levelstartat1\levelspace0\levelindent0{\leveltext\'02\'08.;}{\levelnumbers\'01;}\fi-360\li6480\jclisttab\tx6480\lin6480 }{\listname ;}\listid723138990}}{\*\listoverridetable{\listoverride\listid723138990\listoverridecount0\ls1}}
{\*\pgptbl {\pgp\ipgp2\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp4\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}{\pgp\ipgp0\itap0\li0\ri0\sb0\sa0}}{\*\rsidtbl \rsid288726\rsid668380\rsid1077358\rsid1250157\rsid1778664
\rsid2232581\rsid3018318\rsid3766585\rsid4417501\rsid4531485\rsid4807452\rsid5341002\rsid7018004\rsid7880391\rsid10749719\rsid12150908\rsid12939982\rsid13596669\rsid15149892\rsid15551579\rsid16128754\rsid16674677}{\*\generator Microsoft Word 11.0.6359;}
{\info{\title Shared Source License for Software included in Workspaces}{\author suev}{\operator Martin Maly}{\creatim\yr2005\mo3\dy22\hr10\min45}{\revtim\yr2005\mo3\dy22\hr15\min54}{\printim\yr2002\mo9\dy20\hr15\min39}{\version3}{\edmins1}{\nofpages1}
{\nofwords672}{\nofchars3837}{\*\company Microsoft}{\nofcharsws4501}{\vern24703}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\formshade\horzdoc\dgmargin\dghspace180\dgvspace180\dghorigin1701\dgvorigin1984
\dghshow1\dgvshow1\jexpand\viewkind5\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\nobrkwrptbl\snaptogridincell\allowfieldendsel\wrppunct
\asianbrkrule\nojkernpunct\rsidroot15149892 \fet0\sectd \linex0\endnhere\sectlinegrid360\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3
\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}
{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain
\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs28\insrsid1250157\charrsid1250157 Shared Source License for }{\b\fs28\insrsid16674677 IronPython}{
\b\fs28\insrsid1250157
\par }{\b\fs28\insrsid5341002
\par }{\b\insrsid5341002\charrsid5341002 This license governs use of the accompanying software}{\b\insrsid5341002 (\'93Software\'94)}{\b\insrsid5341002\charrsid5341002 , and your use of the }{\b\insrsid5341002 S}{\b\insrsid5341002\charrsid5341002
oftware constitutes acceptance of this license.
\par }{\insrsid1250157\charrsid5341002
\par }{\b\insrsid1250157\charrsid1250157 You }{\b\insrsid5341002 may}{\b\insrsid1250157\charrsid1250157 use }{\b\insrsid5341002 the}{\b\insrsid1250157\charrsid1250157 Software for any }{\b\insrsid1250157 commercial or }{\b\insrsid1250157\charrsid1250157
noncommercial purpose, including distributing derivative}{\b\insrsid4417501 work}{\b\insrsid1250157\charrsid1250157 s}{\b\insrsid1250157 .
\par }{\insrsid1250157
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid1250157 {\insrsid1250157\charrsid1250157 In return, we simply require that you agree:
\par {\listtext\pard\plain\insrsid1250157\charrsid1250157 \hich\af0\dbch\af0\loch\f0 1.\tab}}\pard \ql \fi-360\li720\ri0\widctlpar\jclisttab\tx720\aspalpha\aspnum\faauto\ls1\adjustright\rin0\lin720\itap0\pararsid1250157 {\insrsid1250157\charrsid1250157
Not to remove any copyright}{\insrsid5341002 or other}{\insrsid1250157\charrsid1250157 notices from the Software.
\par {\listtext\pard\plain\insrsid1250157\charrsid1250157 \hich\af0\dbch\af0\loch\f0 2.\tab}That if you distribute the Software in source code form you do so only under this }{\insrsid5341002 l}{\insrsid1250157\charrsid1250157
icense (i.e. you must include a complete copy of this }{\insrsid5341002 l}{\insrsid1250157\charrsid1250157 icense with your distribution), and if you distribute the Software solely in object form you only do so under a license that complies with this }{
\insrsid5341002 l}{\insrsid1250157\charrsid1250157 icense.
\par {\listtext\pard\plain\b\insrsid1250157\charrsid1250157 \hich\af0\dbch\af0\loch\f0 3.\tab}}{\b\insrsid1250157\charrsid1250157
That the Software comes "as is", with no warranties. None whatsoever. This means no express, implied or statutory warranty, including without limitation, warranties of merchantability or fitness for a particular purpose or any warranty of }{
\b\insrsid5341002 title or }{\b\insrsid1250157\charrsid1250157 non}{\b\insrsid5341002 -}{\b\insrsid1250157\charrsid1250157 infringement. Also, you must pass this disclaimer on whenever you distribute the Software}{\b\insrsid5341002 or derivative works}{
\b\insrsid1250157\charrsid1250157 .}{\insrsid1250157\charrsid1250157
\par {\listtext\pard\plain\b\insrsid1250157\charrsid1250157 \hich\af0\dbch\af0\loch\f0 4.\tab}}{\b\insrsid1250157\charrsid1250157 That neither Microsoft nor }{\b\insrsid1250157 any contributor to the Software}{\b\insrsid1250157\charrsid1250157
will be liable for any of those types of damages known as}{\b\insrsid5341002 }{\b\insrsid1250157\charrsid1250157 indirect, special, consequential, or incidental related to the Software or this }{\b\insrsid5341002 l}{\b\insrsid1250157\charrsid1250157
icense, to the maximum extent the law permits, no matter what legal theory it\rquote s based on. Also, you must pass this limitation of liability on whenever you distribute the Software}{\b\insrsid5341002 or derivative works}{
\b\insrsid1250157\charrsid1250157 .}{\insrsid1250157\charrsid1250157
\par {\listtext\pard\plain\insrsid1250157\charrsid1250157 \hich\af0\dbch\af0\loch\f0 5.\tab}That if you sue anyone over patents that you think may apply to the Software for a person's use of the Software, your license to the Software ends automatically.
\par {\listtext\pard\plain\insrsid1250157 \hich\af0\dbch\af0\loch\f0 6.\tab}}{\insrsid1250157 That the patent rights, if any, }{\insrsid288726 granted in this license}{\insrsid1250157\charrsid1250157 only apply to the Software, not to any derivative}{
\insrsid4417501 work}{\insrsid1250157\charrsid1250157 s you make.}{\insrsid3018318
\par {\listtext\pard\plain\insrsid3018318\charrsid3018318 \hich\af0\dbch\af0\loch\f0 7.\tab}}{\insrsid3018318\charrsid3018318 That if you are an agency of the U.S. Government, (i) Software provided pursuant to a solicitation issued on or after Dece
mber 1, 1995, is provided with the commercial license rights set forth in this license, and (ii) Software provided pursuant to a solicitation issued prior to December 1, 1995, is provided with \'93Restricted Rights\'94
as set forth in FAR, 48 C.F.R. 52.227-14 (June 1987) or DFAR, 48 C.F.R. 252.227-7013 (Oct 1988), as applicable.}{\insrsid1250157
\par {\listtext\pard\plain\insrsid1250157 \hich\af0\dbch\af0\loch\f0 8.\tab}That your rights under this License end automatically if you breach it in any way.
\par {\listtext\pard\plain\insrsid5341002 \hich\af0\dbch\af0\loch\f0 9.\tab}}{\insrsid5341002 That all rights not expressly granted to you in this license are reserved.
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid1778664 {\insrsid1778664
\par }{\insrsid12150908 Read below}{\insrsid1778664 for answers to frequently asked questions about this license.
\par }{\insrsid12150908
\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\pararsid12150908 {\b\insrsid12150908\charrsid12150908 Q: Is this license OSI compliant?
\par }{\insrsid12150908
A: This license has not been submitted to OSI, but it allows developers to take full advantage of a dynamic language on the CLR and to have the freedom to distribute their works for the benefit of the community at large. The license is half of a
page long and very straight forward. We believe it stands up to what developers demand of an "open" license.
\par
\par }{\b\insrsid12150908\charrsid12150908 Q: What copyright rights does the license grant me?
\par }{\insrsid12150908 A: The license grants you a copyright license to make unlimited copies of the Software in sour
ce or object code form, as well as to create Derivative Works (as that term is defined under US copyright law). This means that in addition to making unlimited copies of the Software, you have a copyright license to modify the Software and to use all or p
art of the Software to create a Derivative Work.
\par
\par }{\b\insrsid12150908\charrsid12150908 Q: What patent rights does the license grant me?
\par }{\insrsid12150908 A: This license grants you a patent license to use and distribute the Software under any Microsoft patent claims that read on the Software itself. In other wo
rds, if you create a modified version of the Software, you still retain the patent license to use and distribute the original portions of the Software under the specific Microsoft patent claims that read on the Software, but you do not have a patent licen
s
e as to the new functionality you may have added by modifying the Software. This result is typical of many common open source licenses, including the Common Public License (CPL) and the Mozilla Public License (MPL). In addition, this license grants no rig
h
ts to any Microsoft patents that read on other components or files not included in the Software. This means that no patent license is granted to use or distribute any other software or technology that may be needed to use the Software or was created from
t
he Software (for example, any compiled output of the Software, the combination of the Software with other hardware or other software, or any additional enabling technologies that may be necessary to make or use the Software or any final product that inclu
des the Software).}{\insrsid12150908
\par }{\insrsid12150908\charrsid1250157
\par }}
+30 -6
View File
@@ -1,9 +1,33 @@
!! Umbraco - the simple, flexible and friendly ASP.NET CMS
Umbraco - the simple, flexible and friendly ASP.NET CMS
=======================================================
For the first time on the Microsoft platform a free user and developer friendly cms that makes it quick and easy to create websites - or a breeze to build complex web applications. umbraco got award-winning integration capabilities and supports your ASP.NET User and Custom Controls out of the box. It's a developers dream and your users will love it too. Used by more than 57.000 active websites including Heinz.com, Peugeot.com, NAIAS.com and Microsofts documentinteropinitiative.org website you can be sure that the technology is proven, stable and scales.
[url:More info at http://umbraco.org|http://umbraco.org]
!! Forums
We have a forum running on [url:http://our.umbraco.org]. The discussions area on CodePlex will be for discussions on developing the core, and not on Umbraco-implementations or extensions in general. For those topics, please use [url:http://our.umbraco.org].
More info at http://umbraco.com
!! Submitting Issues
Another way you can contribute to Umbraco is by providing issue reports, for information on how to submit an issue report refer to our [url:online guide|http://our.umbraco.org/wiki/how-tos/submitting-bug-reports].
Exploring the repository
========================
Most contributors will work on their own fork and should pick the branch in which they need their fix. For more information see:
http://our.umbraco.org/contribute/guidelines-for-core-contribution
Exploring the source
====================
The Umbraco source code is never required for you to start building sites. If you are not using the source code for debugging purposes or to contribute to the source then please download the binaries listed at http://umbraco.codeplex.com
With that said, the Umbraco solution can be opened in Visual Studio 2010 with SP1 installed or Visual Studio 2012.
Contributing
============
Umbraco is Open Source which means you can contribute to make it great!
Read all about it at http://our.umbraco.org/contribute
Forums
======
We have a forum running on http://our.umbraco.org for friendly community support.
Documentation
=============
Our documentation section provides help on installing and using Umbraco including API reference documentation: http://our.umbraco.org/documentation
Submitting Issues
=================
Another way you can contribute to Umbraco is by providing issue reports, for information on how to submit an issue report refer to our online guide at http://our.umbraco.org/contribute/report-an-issue-or-request-a-feature
Binary file not shown.
+6 -5
View File
@@ -17,7 +17,8 @@
</PropertyGroup>
<ItemGroup Condition=" '$(PackageSources)' == '' ">
<!-- Package sources used to restore packages. By default will used the registered sources under %APPDATA%\NuGet\NuGet.Config -->
<!-- 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 -->
<!--
<PackageSource Include="https://nuget.org/api/v2/" />
<PackageSource Include="https://my-nuget-source/nuget/" />
@@ -54,10 +55,10 @@
<BuildCommand>$(NuGetCommand) pack "$(ProjectPath)" -p Configuration=$(Configuration) -o "$(PackageOutputDir)" -symbols</BuildCommand>
<!-- We need to ensure packages are restored prior to assembly resolve -->
<ResolveReferencesDependsOn Condition="$(RestorePackages) == 'true'">
<BuildDependsOn Condition="$(RestorePackages) == 'true'">
RestorePackages;
$(ResolveReferencesDependsOn);
</ResolveReferencesDependsOn>
$(BuildDependsOn);
</BuildDependsOn>
<!-- Make the build depend on restore packages -->
<BuildDependsOn Condition="$(BuildPackage) == 'true'">
@@ -75,7 +76,7 @@
This effectively acts as a lock that makes sure that the download operation will only happen once and all
parallel builds will have to wait for it to complete.
-->
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT" />
<MsBuild Targets="_DownloadNuGet" Projects="$(MSBuildThisFileFullPath)" Properties="Configuration=NOT_IMPORTANT;DownloadNuGetExe=$(DownloadNuGetExe)" />
</Target>
<Target Name="_DownloadNuGet">
+75 -18
View File
@@ -50,35 +50,90 @@ namespace SqlCE4Umbraco
/// </summary>
internal void ClearDatabase()
{
// drop constraints before tables to avoid exceptions
// looping on try/catching exceptions was not really nice
// http://stackoverflow.com/questions/536350/drop-all-the-tables-stored-procedures-triggers-constriants-and-all-the-depend
var localConnection = new SqlCeConnection(ConnectionString);
if (System.IO.File.Exists(ReplaceDataDirectory(localConnection.Database)))
{
var tables = new List<string>();
using (var reader = ExecuteReader("select table_name from information_schema.tables where TABLE_TYPE <> 'VIEW'"))
List<string> tables;
// drop foreign keys
// SQL may need "where constraint_catalog=DB_NAME() and ..."
tables = new List<string>();
using (var reader = ExecuteReader("select table_name from information_schema.table_constraints where constraint_type = 'FOREIGN KEY' order by table_name"))
{
while (reader.Read())
while (reader.Read()) tables.Add(reader.GetString("table_name").Trim());
}
foreach (var table in tables)
{
var constraints = new List<string>();
using (var reader = ExecuteReader("select constraint_name from information_schema.table_constraints where constraint_type = 'FOREIGN KEY' and table_name = '" + table + "' order by constraint_name"))
{
tables.Add(reader.GetString("TABLE_NAME"));
while (reader.Read()) constraints.Add(reader.GetString("constraint_name").Trim());
}
foreach (var constraint in constraints)
{
// SQL may need "[dbo].[table]"
ExecuteNonQuery("alter table [" + table + "] drop constraint [" + constraint + "]");
}
}
while(tables.Any())
// drop primary keys
// SQL may need "where constraint_catalog=DB_NAME() and ..."
tables = new List<string>();
using (var reader = ExecuteReader("select table_name from information_schema.table_constraints where constraint_type = 'PRIMARY KEY' order by table_name"))
{
for (var i = 0; i < tables.Count; i++)
{
var dropTable = "DROP TABLE " + tables[i];
while (reader.Read()) tables.Add(reader.GetString("table_name").Trim());
}
try
{
ExecuteNonQuery(dropTable);
tables.Remove(tables[i]);
}
catch (SqlHelperException ex)
{
//this will occur because there is no cascade option, so we just wanna try the next one
}
foreach (var table in tables)
{
var constraints = new List<string>();
using (var reader = ExecuteReader("select constraint_name from information_schema.table_constraints where constraint_type = 'PRIMARY KEY' and table_name = '" + table + "' order by constraint_name"))
{
while (reader.Read()) constraints.Add(reader.GetString("constraint_name").Trim());
}
foreach (var constraint in constraints)
{
// SQL may need "[dbo].[table]"
ExecuteNonQuery("alter table [" + table + "] drop constraint [" + constraint + "]");
}
}
// drop tables
tables = new List<string>();
using (var reader = ExecuteReader("select table_name from information_schema.tables where table_type <> 'VIEW' order by table_name"))
{
while (reader.Read()) tables.Add(reader.GetString("table_name").Trim());
}
foreach (var table in tables)
{
ExecuteNonQuery("drop table [" + table + "]");
}
}
}
/// <summary>
/// Drops all foreign keys on a table.
/// </summary>
/// <param name="table">The name of the table.</param>
/// <remarks>To be used in unit tests.</remarks>
internal void DropForeignKeys(string table)
{
var constraints = new List<string>();
using (var reader = ExecuteReader("select constraint_name from information_schema.table_constraints where constraint_type = 'FOREIGN KEY' and table_name = '" + table + "' order by constraint_name"))
{
while (reader.Read()) constraints.Add(reader.GetString("constraint_name").Trim());
}
foreach (var constraint in constraints)
{
// SQL may need "[dbo].[table]"
ExecuteNonQuery("alter table [" + table + "] drop constraint [" + constraint + "]");
}
}
@@ -94,7 +149,9 @@ namespace SqlCE4Umbraco
var dataDirectory = AppDomain.CurrentDomain.GetData("DataDirectory") as string;
if (!string.IsNullOrEmpty(dataDirectory))
{
path = path.Replace("|DataDirectory|", dataDirectory + System.IO.Path.DirectorySeparatorChar);
path = path.Contains(@"|\")
? path.Replace("|DataDirectory|", dataDirectory)
: path.Replace("|DataDirectory|", dataDirectory + System.IO.Path.DirectorySeparatorChar);
}
}
+4 -4
View File
@@ -9,14 +9,14 @@ namespace Umbraco.Core
/// <summary>
/// A resolver to return all IAction objects
/// </summary>
internal sealed class ActionsResolver : ManyObjectsResolverBase<ActionsResolver, IAction>
internal sealed class ActionsResolver : LazyManyObjectsResolverBase<ActionsResolver, IAction>
{
/// <summary>
/// Constructor
/// </summary>
/// <param name="packageActions"></param>
internal ActionsResolver(IEnumerable<Type> packageActions)
internal ActionsResolver(Func<IEnumerable<Type>> packageActions)
: base(packageActions)
{
@@ -34,9 +34,9 @@ namespace Umbraco.Core
}
protected override IEnumerable<IAction> CreateInstances()
{
{
var actions = new List<IAction>();
var foundIActions = PluginManager.Current.ResolveActions();
var foundIActions = InstanceTypes;
foreach (var type in foundIActions)
{
IAction typeInstance;
+227 -115
View File
@@ -1,69 +1,121 @@
using System;
using System.Configuration;
using System.Threading;
using System.Web;
using System.Web.Caching;
using Umbraco.Core.Cache;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.ObjectResolution;
using Umbraco.Core.Services;
namespace Umbraco.Core
{
/// <summary>
/// <summary>
/// the Umbraco Application context
/// </summary>
/// <remarks>
/// one per AppDomain, represents the global Umbraco application
/// </remarks>
public class ApplicationContext
public class ApplicationContext : IDisposable
{
/// <summary>
/// <summary>
/// Constructor
/// </summary>
internal ApplicationContext(DatabaseContext dbContext, ServiceContext serviceContext)
:this()
{
if (dbContext == null) throw new ArgumentNullException("dbContext");
if (serviceContext == null) throw new ArgumentNullException("serviceContext");
/// </summary>
/// <param name="dbContext"></param>
/// <param name="serviceContext"></param>
/// <param name="cache"></param>
public ApplicationContext(DatabaseContext dbContext, ServiceContext serviceContext, CacheHelper cache)
{
if (dbContext == null) throw new ArgumentNullException("dbContext");
if (serviceContext == null) throw new ArgumentNullException("serviceContext");
if (cache == null) throw new ArgumentNullException("cache");
_databaseContext = dbContext;
_services = serviceContext;
ApplicationCache = cache;
}
_databaseContext = dbContext;
_services = serviceContext;
}
/// <summary>
/// Creates a basic app context
/// </summary>
/// <param name="cache"></param>
public ApplicationContext(CacheHelper cache)
{
ApplicationCache = cache;
}
/// <summary>
/// Empty constructor normally reserved for unit tests when a DatabaseContext or a ServiceContext is not
/// necessarily required or needs to be set after construction.
/// </summary>
internal ApplicationContext()
{
//create a new application cache from the HttpRuntime.Cache
ApplicationCache = HttpRuntime.Cache == null
? new CacheHelper(new Cache())
: new CacheHelper(HttpRuntime.Cache);
}
/// <summary>
/// A method used to set and/or ensure that a global ApplicationContext singleton is created.
/// </summary>
/// <param name="appContext">
/// The instance to set on the global application singleton
/// </param>
/// <param name="replaceContext">If set to true and the singleton is already set, it will be replaced</param>
/// <returns></returns>
/// <remarks>
/// This is NOT thread safe
/// </remarks>
public static ApplicationContext EnsureContext(ApplicationContext appContext, bool replaceContext)
{
if (ApplicationContext.Current != null)
{
if (!replaceContext)
return ApplicationContext.Current;
}
ApplicationContext.Current = appContext;
return ApplicationContext.Current;
}
/// <summary>
/// Singleton accessor
/// </summary>
public static ApplicationContext Current { get; internal set; }
/// <summary>
/// A method used to create and ensure that a global ApplicationContext singleton is created.
/// </summary>
/// <param name="cache"></param>
/// <param name="replaceContext">
/// If set to true will replace the current singleton instance - This should only be used for unit tests or on app
/// startup if for some reason the boot manager is not the umbraco boot manager.
/// </param>
/// <param name="dbContext"></param>
/// <param name="serviceContext"></param>
/// <returns></returns>
/// <remarks>
/// This is NOT thread safe
/// </remarks>
public static ApplicationContext EnsureContext(DatabaseContext dbContext, ServiceContext serviceContext, CacheHelper cache, bool replaceContext)
{
if (ApplicationContext.Current != null)
{
if (!replaceContext)
return ApplicationContext.Current;
}
var ctx = new ApplicationContext(dbContext, serviceContext, cache);
ApplicationContext.Current = ctx;
return ApplicationContext.Current;
}
/// <summary>
/// Returns the application wide cache accessor
/// </summary>
/// <remarks>
/// Any caching that is done in the application (app wide) should be done through this property
/// </remarks>
public CacheHelper ApplicationCache { get; private set; }
/// <summary>
/// Singleton accessor
/// </summary>
public static ApplicationContext Current { get; internal set; }
// IsReady is set to true by the boot manager once it has successfully booted
/// <summary>
/// Returns the application wide cache accessor
/// </summary>
/// <remarks>
/// Any caching that is done in the application (app wide) should be done through this property
/// </remarks>
public CacheHelper ApplicationCache { get; private set; }
// IsReady is set to true by the boot manager once it has successfully booted
// note - the original umbraco module checks on content.Instance in umbraco.dll
// now, the boot task that setup the content store ensures that it is ready
bool _isReady = false;
readonly System.Threading.ManualResetEventSlim _isReadyEvent = new System.Threading.ManualResetEventSlim(false);
private DatabaseContext _databaseContext;
private ServiceContext _services;
readonly ManualResetEventSlim _isReadyEvent = new ManualResetEventSlim(false);
private DatabaseContext _databaseContext;
private ServiceContext _services;
public bool IsReady
public bool IsReady
{
get
{
@@ -73,14 +125,14 @@ namespace Umbraco.Core
{
AssertIsNotReady();
_isReady = value;
_isReadyEvent.Set();
_isReadyEvent.Set();
}
}
public bool WaitForReady(int timeout)
{
return _isReadyEvent.WaitHandle.WaitOne(timeout);
}
public bool WaitForReady(int timeout)
{
return _isReadyEvent.WaitHandle.WaitOne(timeout);
}
// notes
@@ -89,57 +141,68 @@ namespace Umbraco.Core
// the system is configured if they match
// if they don't, install runs, updates web.config (presumably) and updates GlobalSettings.ConfiguredStatus
//
// then there is Application["umbracoNeedConfiguration"] which makes no sense... getting rid of it...
// then there is Application["umbracoNeedConfiguration"] which makes no sense... getting rid of it... SD: I have actually remove that now!
//
public bool IsConfigured
{
// fixme - let's do this for the time being
// todo - we should not do this - ok for now
get
{
return Configured;
return Configured;
}
}
private bool Configured
{
get
{
try
{
string configStatus = ConfigurationStatus;
string currentVersion = UmbracoVersion.Current.ToString(3);
/// <summary>
/// The original/first url that the web application executes
/// </summary>
/// <remarks>
/// we need to set the initial url in our ApplicationContext, this is so our keep alive service works and this must
/// exist on a global context because the keep alive service doesn't run in a web context.
/// we are NOT going to put a lock on this because locking will slow down the application and we don't really care
/// if two threads write to this at the exact same time during first page hit.
/// see: http://issues.umbraco.org/issue/U4-2059
/// </remarks>
internal string OriginalRequestUrl { get; set; }
private bool Configured
{
get
{
try
{
string configStatus = ConfigurationStatus;
string currentVersion = UmbracoVersion.Current.ToString(3);
if (currentVersion != configStatus)
{
LogHelper.Info<ApplicationContext>("CurrentVersion different from configStatus: '" + currentVersion + "','" + configStatus + "'");
}
if (currentVersion != configStatus)
{
LogHelper.Info<ApplicationContext>("CurrentVersion different from configStatus: '" + currentVersion + "','" + configStatus + "'");
}
return (configStatus == currentVersion);
}
catch
{
return false;
}
}
}
private string ConfigurationStatus
{
get
{
try
{
return ConfigurationManager.AppSettings["umbracoConfigurationStatus"];
}
catch
{
return String.Empty;
}
}
}
return (configStatus == currentVersion);
}
catch
{
return false;
}
}
}
private string ConfigurationStatus
{
get
{
try
{
return ConfigurationManager.AppSettings["umbracoConfigurationStatus"];
}
catch
{
return String.Empty;
}
}
}
private void AssertIsReady()
{
@@ -153,38 +216,87 @@ namespace Umbraco.Core
throw new Exception("ApplicationContext has already been initialized.");
}
/// <summary>
/// Gets the current DatabaseContext
/// </summary>
/// <remarks>
/// Internal set is generally only used for unit tests
/// </remarks>
public DatabaseContext DatabaseContext
{
get
{
if (_databaseContext == null)
throw new InvalidOperationException("The DatabaseContext has not been set on the ApplicationContext");
return _databaseContext;
}
internal set { _databaseContext = value; }
}
/// <summary>
/// Gets the current ServiceContext
/// </summary>
/// <remarks>
/// Internal set is generally only used for unit tests
/// </remarks>
public ServiceContext Services
{
get
{
if (_services == null)
throw new InvalidOperationException("The ServiceContext has not been set on the ApplicationContext");
return _services;
}
internal set { _services = value; }
}
/// <summary>
/// Gets the current DatabaseContext
/// </summary>
/// <remarks>
/// Internal set is generally only used for unit tests
/// </remarks>
public DatabaseContext DatabaseContext
{
get
{
if (_databaseContext == null)
throw new InvalidOperationException("The DatabaseContext has not been set on the ApplicationContext");
return _databaseContext;
}
internal set { _databaseContext = value; }
}
/// <summary>
/// Gets the current ServiceContext
/// </summary>
/// <remarks>
/// Internal set is generally only used for unit tests
/// </remarks>
public ServiceContext Services
{
get
{
if (_services == null)
throw new InvalidOperationException("The ServiceContext has not been set on the ApplicationContext");
return _services;
}
internal set { _services = value; }
}
private volatile bool _disposed;
private readonly ReaderWriterLockSlim _disposalLocker = new ReaderWriterLockSlim();
/// <summary>
/// This will dispose and reset all resources used to run the application
/// </summary>
/// <remarks>
/// IMPORTANT: Never dispose this object if you require the Umbraco application to run, disposing this object
/// is generally used for unit testing and when your application is shutting down after you have booted Umbraco.
/// </remarks>
void IDisposable.Dispose()
{
// Only operate if we haven't already disposed
if (_disposed) return;
using (new WriteLock(_disposalLocker))
{
// Check again now we're inside the lock
if (_disposed) return;
//clear the cache
if (ApplicationCache != null)
{
ApplicationCache.ClearAllCache();
}
//reset all resolvers
ResolverCollection.ResetAll();
//reset resolution itself (though this should be taken care of by resetting any of the resolvers above)
Resolution.Reset();
//reset the instance objects
this.ApplicationCache = null;
if (_databaseContext != null) //need to check the internal field here
{
if (DatabaseContext.IsDatabaseConfigured)
{
DatabaseContext.Database.Dispose();
}
}
this.DatabaseContext = null;
this.Services = null;
this._isReady = false; //set the internal field
// Indicate that the instance has been disposed.
_disposed = true;
}
}
}
}
+119
View File
@@ -0,0 +1,119 @@
namespace Umbraco.Core
{
/// <summary>
/// A plugin type that allows developers to execute code during the Umbraco bootup process
/// </summary>
/// <remarks>
/// Allows you to override the methods that you would like to execute code for: ApplicationInitialized, ApplicationStarting, ApplicationStarted.
///
/// By default none of these methods will execute if the Umbraco application is not configured or if the Umbraco database is not configured, however
/// if you need these methods to execute even if either of these are not configured you can override the properties:
/// ExecuteWhenApplicationNotConfigured and ExecuteWhenDatabaseNotConfigured
/// </remarks>
public abstract class ApplicationEventHandler : IApplicationEventHandler
{
public void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
if (ShouldExecute(applicationContext))
{
ApplicationInitialized(umbracoApplication, applicationContext);
}
}
public void OnApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
if (ShouldExecute(applicationContext))
{
ApplicationStarting(umbracoApplication, applicationContext);
}
}
public void OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
if (ShouldExecute(applicationContext))
{
ApplicationStarted(umbracoApplication, applicationContext);
}
}
/// <summary>
/// Overridable method to execute when the ApplicationContext is created and other static objects that require initialization have been setup
/// </summary>
/// <param name="umbracoApplication"></param>
/// <param name="applicationContext"></param>
protected virtual void ApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
}
/// <summary>
/// OVerridable method to execute when All resolvers have been initialized but resolution is not frozen so they can be modified in this method
/// </summary>
/// <param name="umbracoApplication"></param>
/// <param name="applicationContext"></param>
protected virtual void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
}
/// <summary>
/// Overridable method to execute when Bootup is completed, this allows you to perform any other bootup logic required for the application.
/// Resolution is frozen so now they can be used to resolve instances.
/// </summary>
/// <param name="umbracoApplication"></param>
/// <param name="applicationContext"></param>
protected virtual void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
}
/// <summary>
/// Determine if the methods should execute based on the configuration status of the application.
/// </summary>
/// <param name="applicationContext"></param>
/// <returns></returns>
private bool ShouldExecute(ApplicationContext applicationContext)
{
if (applicationContext.IsConfigured && applicationContext.DatabaseContext.IsDatabaseConfigured)
{
return true;
}
if (!applicationContext.IsConfigured && ExecuteWhenApplicationNotConfigured)
{
return true;
}
if (!applicationContext.DatabaseContext.IsDatabaseConfigured && ExecuteWhenDatabaseNotConfigured)
{
return true;
}
return false;
}
/// <summary>
/// A flag to determine if the overridable methods for this class will execute even if the
/// Umbraco application is not configured
/// </summary>
/// <remarks>
/// An Umbraco Application is not configured when it requires a new install or upgrade. When the latest version in the
/// assembly does not match the version in the config.
/// </remarks>
protected virtual bool ExecuteWhenApplicationNotConfigured
{
get { return false; }
}
/// <summary>
/// A flag to determine if the overridable methods for this class will execute even if the
/// Umbraco database is not configured
/// </summary>
/// <remarks>
/// The Umbraco database is not configured when we cannot connect to the database or when the database tables are not installed.
/// </remarks>
protected virtual bool ExecuteWhenDatabaseNotConfigured
{
get { return false; }
}
}
}
+35 -1
View File
@@ -19,7 +19,41 @@ namespace Umbraco.Core
return new FileInfo(path);
}
/// <summary>
/// <summary>
/// Returns true if the assembly is the App_Code assembly
/// </summary>
/// <param name="assembly"></param>
/// <returns></returns>
public static bool IsAppCodeAssembly(this Assembly assembly)
{
if (assembly.FullName.StartsWith("App_Code"))
{
try
{
Assembly.Load("App_Code");
return true;
}
catch (FileNotFoundException)
{
//this will occur if it cannot load the assembly
return false;
}
}
return false;
}
/// <summary>
/// Returns true if the assembly is the compiled global asax.
/// </summary>
/// <param name="assembly"></param>
/// <returns></returns>
public static bool IsGlobalAsaxAssembly(this Assembly assembly)
{
//only way I can figure out how to test is by the name
return assembly.FullName.StartsWith("App_global.asax");
}
/// <summary>
/// Returns the file used to load the assembly
/// </summary>
/// <param name="assemblyName"></param>
+155 -55
View File
@@ -2,65 +2,165 @@ using System;
namespace Umbraco.Core
{
/// <summary>
/// Represents the result of an operation attempt
/// </summary>
/// <typeparam name="T"></typeparam>
/// <remarks></remarks>
[Serializable]
public struct Attempt<T>
{
private readonly bool _success;
private readonly T _result;
private readonly Exception _error;
/// <summary>
/// Provides ways to create attempts.
/// </summary>
public static class Attempt
{
/// <summary>
/// Creates a successful attempt with a result.
/// </summary>
/// <typeparam name="T">The type of the attempted operation result.</typeparam>
/// <param name="result">The result of the attempt.</param>
/// <returns>The successful attempt.</returns>
public static Attempt<T> Succeed<T>(T result)
{
return Attempt<T>.Succeed(result);
}
/// <summary>
/// Gets a value indicating whether this <see cref="Attempt{T}"/> represents a successful operation.
/// </summary>
/// <remarks></remarks>
public bool Success
{
get { return _success; }
}
/// <summary>
/// Creates a failed attempt with a result.
/// </summary>
/// <typeparam name="T">The type of the attempted operation result.</typeparam>
/// <param name="result">The result of the attempt.</param>
/// <returns>The failed attempt.</returns>
public static Attempt<T> Fail<T>(T result)
{
return Attempt<T>.Fail(result);
}
/// <summary>
/// Gets the error associated with an unsuccessful attempt.
/// </summary>
/// <value>The error.</value>
public Exception Error { get { return _error; } }
/// <summary>
/// Creates a failed attempt with a result and an exception.
/// </summary>
/// <typeparam name="T">The type of the attempted operation result.</typeparam>
/// <param name="result">The result of the attempt.</param>
/// <param name="exception">The exception causing the failure of the attempt.</param>
/// <returns>The failed attempt.</returns>
public static Attempt<T> Fail<T>(T result, Exception exception)
{
return Attempt<T>.Fail(result, exception);
}
/// <summary>
/// Gets the parse result.
/// </summary>
/// <remarks></remarks>
public T Result
{
get { return _result; }
}
/// <summary>
/// Creates a successful or a failed attempt, with a result.
/// </summary>
/// <typeparam name="T">The type of the attempted operation result.</typeparam>
/// <param name="success">A value indicating whether the attempt is successful.</param>
/// <param name="result">The result of the attempt.</param>
/// <returns>The attempt.</returns>
public static Attempt<T> If<T>(bool success, T result)
{
return Attempt<T>.SucceedIf(success, result);
}
/// <summary>
/// Represents an unsuccessful parse operation
/// </summary>
public static readonly Attempt<T> False = new Attempt<T>(false, default(T));
/// <summary>
/// Initializes a new instance of the <see cref="Attempt{T}"/> struct.
/// </summary>
/// <param name="success">If set to <c>true</c> this tuple represents a successful parse result.</param>
/// <param name="result">The parse result.</param>
/// <remarks></remarks>
public Attempt(bool success, T result)
{
_success = success;
_result = result;
_error = null;
}
/// <summary>
/// Executes an attempt function, with callbacks.
/// </summary>
/// <typeparam name="T">The type of the attempted operation result.</typeparam>
/// <param name="attempt">The attempt returned by the attempt function.</param>
/// <param name="onSuccess">An action to execute in case the attempt succeeds.</param>
/// <param name="onFail">An action to execute in case the attempt fails.</param>
/// <returns>The outcome of the attempt.</returns>
/// <remarks>Runs <paramref name="onSuccess"/> or <paramref name="onFail"/> depending on the
/// whether the attempt function reports a success or a failure.</remarks>
public static Outcome Try<T>(Attempt<T> attempt, Action<T> onSuccess, Action<Exception> onFail = null)
{
if (attempt.Success)
{
onSuccess(attempt.Result);
return Outcome.Success;
}
public Attempt(Exception error)
{
_success = false;
_result = default(T);
_error = error;
}
}
if (onFail != null)
{
onFail(attempt.Exception);
}
return Outcome.Failure;
}
/// <summary>
/// Represents the outcome of an attempt.
/// </summary>
/// <remarks>Can be a success or a failure, and allows for attempts chaining.</remarks>
public struct Outcome
{
private readonly bool _success;
/// <summary>
/// Gets an outcome representing a success.
/// </summary>
public static readonly Outcome Success = new Outcome(true);
/// <summary>
/// Gets an outcome representing a failure.
/// </summary>
public static readonly Outcome Failure = new Outcome(false);
private Outcome(bool success)
{
_success = success;
}
/// <summary>
/// Executes another attempt function, if the previous one failed, with callbacks.
/// </summary>
/// <typeparam name="T">The type of the attempted operation result.</typeparam>
/// <param name="nextFunction">The attempt function to execute, returning an attempt.</param>
/// <param name="onSuccess">An action to execute in case the attempt succeeds.</param>
/// <param name="onFail">An action to execute in case the attempt fails.</param>
/// <returns>If it executes, returns the outcome of the attempt, else returns a success outcome.</returns>
/// <remarks>
/// <para>Executes only if the previous attempt failed, else does not execute and return a success outcome.</para>
/// <para>If it executes, then runs <paramref name="onSuccess"/> or <paramref name="onFail"/> depending on the
/// whether the attempt function reports a success or a failure.</para>
/// </remarks>
public Outcome OnFailure<T>(Func<Attempt<T>> nextFunction, Action<T> onSuccess, Action<Exception> onFail = null)
{
return _success
? Success
: ExecuteNextFunction(nextFunction, onSuccess, onFail);
}
/// <summary>
/// Executes another attempt function, if the previous one succeeded, with callbacks.
/// </summary>
/// <typeparam name="T">The type of the attempted operation result.</typeparam>
/// <param name="nextFunction">The attempt function to execute, returning an attempt.</param>
/// <param name="onSuccess">An action to execute in case the attempt succeeds.</param>
/// <param name="onFail">An action to execute in case the attempt fails.</param>
/// <returns>If it executes, returns the outcome of the attempt, else returns a failed outcome.</returns>
/// <remarks>
/// <para>Executes only if the previous attempt succeeded, else does not execute and return a success outcome.</para>
/// <para>If it executes, then runs <paramref name="onSuccess"/> or <paramref name="onFail"/> depending on the
/// whether the attempt function reports a success or a failure.</para>
/// </remarks>
public Outcome OnSuccess<T>(Func<Attempt<T>> nextFunction, Action<T> onSuccess, Action<Exception> onFail = null)
{
return _success
? ExecuteNextFunction(nextFunction, onSuccess, onFail)
: Failure;
}
private static Outcome ExecuteNextFunction<T>(Func<Attempt<T>> nextFunction, Action<T> onSuccess, Action<Exception> onFail = null)
{
var attempt = nextFunction();
if (attempt.Success)
{
onSuccess(attempt.Result);
return Success;
}
if (onFail != null)
{
onFail(attempt.Exception);
}
return Failure;
}
}
}
}
+174
View File
@@ -0,0 +1,174 @@
using System;
using Umbraco.Core.Dynamics;
namespace Umbraco.Core
{
/// <summary>
/// Represents the result of an operation attempt.
/// </summary>
/// <typeparam name="T">The type of the attempted operation result.</typeparam>
[Serializable]
public struct Attempt<T>
{
private readonly bool _success;
private readonly T _result;
private readonly Exception _exception;
/// <summary>
/// Gets a value indicating whether this <see cref="Attempt{T}"/> was successful.
/// </summary>
public bool Success
{
get { return _success; }
}
/// <summary>
/// Gets the exception associated with an unsuccessful attempt.
/// </summary>
public Exception Exception { get { return _exception; } }
/// <summary>
/// Gets the exception associated with an unsuccessful attempt.
/// </summary>
/// <remarks>Keep it for backward compatibility sake.</remarks>
[Obsolete(".Error is obsolete, you should use .Exception instead.", false)]
public Exception Error { get { return _exception; } }
/// <summary>
/// Gets the attempt result.
/// </summary>
public T Result
{
get { return _result; }
}
// optimize, use a singleton failed attempt
private static readonly Attempt<T> Failed = new Attempt<T>(false, default(T), null);
/// <summary>
/// Represents an unsuccessful attempt.
/// </summary>
/// <remarks>Keep it for backward compatibility sake.</remarks>
[Obsolete(".Failed is obsolete, you should use Attempt<T>.Fail() instead.", false)]
public static readonly Attempt<T> False = Failed;
// private - use Succeed() or Fail() methods to create attempts
private Attempt(bool success, T result, Exception exception)
{
_success = success;
_result = result;
_exception = exception;
}
/// <summary>
/// Initialize a new instance of the <see cref="Attempt{T}"/> struct with a result.
/// </summary>
/// <param name="success">A value indicating whether the attempt is successful.</param>
/// <param name="result">The result of the attempt.</param>
/// <remarks>Keep it for backward compatibility sake.</remarks>
[Obsolete("Attempt ctors are obsolete, you should use Attempt<T>.Succeed(), Attempt<T>.Fail() or Attempt<T>.If() instead.", false)]
public Attempt(bool success, T result)
: this(success, result, null)
{ }
/// <summary>
/// Initialize a new instance of the <see cref="Attempt{T}"/> struct representing a failed attempt, with an exception.
/// </summary>
/// <param name="exception">The exception causing the failure of the attempt.</param>
/// <remarks>Keep it for backward compatibility sake.</remarks>
[Obsolete("Attempt ctors are obsolete, you should use Attempt<T>.Succeed(), Attempt<T>.Fail() or Attempt<T>.If() instead.", false)]
public Attempt(Exception exception)
: this(false, default(T), exception)
{ }
/// <summary>
/// Creates a successful attempt.
/// </summary>
/// <returns>The successful attempt.</returns>
public static Attempt<T> Succeed()
{
return new Attempt<T>(true, default(T), null);
}
/// <summary>
/// Creates a successful attempt with a result.
/// </summary>
/// <param name="result">The result of the attempt.</param>
/// <returns>The successful attempt.</returns>
public static Attempt<T> Succeed(T result)
{
return new Attempt<T>(true, result, null);
}
/// <summary>
/// Creates a failed attempt.
/// </summary>
/// <returns>The failed attempt.</returns>
public static Attempt<T> Fail()
{
return Failed;
}
/// <summary>
/// Creates a failed attempt with an exception.
/// </summary>
/// <param name="exception">The exception causing the failure of the attempt.</param>
/// <returns>The failed attempt.</returns>
public static Attempt<T> Fail(Exception exception)
{
return new Attempt<T>(false, default(T), exception);
}
/// <summary>
/// Creates a failed attempt with a result.
/// </summary>
/// <param name="result">The result of the attempt.</param>
/// <returns>The failed attempt.</returns>
public static Attempt<T> Fail(T result)
{
return new Attempt<T>(false, result, null);
}
/// <summary>
/// Creates a failed attempt with a result and an exception.
/// </summary>
/// <param name="result">The result of the attempt.</param>
/// <param name="exception">The exception causing the failure of the attempt.</param>
/// <returns>The failed attempt.</returns>
public static Attempt<T> Fail(T result, Exception exception)
{
return new Attempt<T>(false, result, exception);
}
/// <summary>
/// Creates a successful or a failed attempt.
/// </summary>
/// <param name="condition">A value indicating whether the attempt is successful.</param>
/// <returns>The attempt.</returns>
public static Attempt<T> SucceedIf(bool condition)
{
return condition ? new Attempt<T>(true, default(T), null) : Failed;
}
/// <summary>
/// Creates a successful or a failed attempt, with a result.
/// </summary>
/// <param name="condition">A value indicating whether the attempt is successful.</param>
/// <param name="result">The result of the attempt.</param>
/// <returns>The attempt.</returns>
public static Attempt<T> SucceedIf(bool condition, T result)
{
return new Attempt<T>(condition, result, null);
}
/// <summary>
/// Implicity operator to check if the attempt was successful without having to access the 'success' property
/// </summary>
/// <param name="a"></param>
/// <returns></returns>
public static implicit operator bool(Attempt<T> a)
{
return a.Success;
}
}
}
+57
View File
@@ -0,0 +1,57 @@
using System;
namespace Umbraco.Core.Cache
{
/// <summary>
/// Constants storing cache keys used in caching
/// </summary>
public static class CacheKeys
{
public const string ApplicationTreeCacheKey = "ApplicationTreeCache";
public const string ApplicationsCacheKey = "ApplicationCache";
[Obsolete("This is no longer used and will be removed from the codebase in the future")]
public const string UserTypeCacheKey = "UserTypeCache";
public const string ContentItemCacheKey = "contentItem";
public const string MediaCacheKey = "UL_GetMedia";
public const string MacroXsltCacheKey = "macroXslt_";
public const string MacroCacheKey = "UmbracoMacroCache";
public const string MacroHtmlCacheKey = "macroHtml_";
public const string MacroControlCacheKey = "macroControl_";
public const string MacroHtmlDateAddedCacheKey = "macroHtml_DateAdded_";
public const string MacroControlDateAddedCacheKey = "macroControl_DateAdded_";
public const string MemberLibraryCacheKey = "UL_GetMember";
public const string MemberBusinessLogicCacheKey = "MemberCacheItem_";
public const string TemplateFrontEndCacheKey = "template";
public const string TemplateBusinessLogicCacheKey = "UmbracoTemplateCache";
public const string UserContextCacheKey = "UmbracoUserContext";
public const string UserContextTimeoutCacheKey = "UmbracoUserContextTimeout";
[Obsolete("This is no longer used and will be removed from the codebase in the future")]
public const string UserCacheKey = "UmbracoUser";
public const string UserPermissionsCacheKey = "UmbracoUserPermissions";
public const string ContentTypeCacheKey = "UmbracoContentType";
public const string ContentTypePropertiesCacheKey = "ContentType_PropertyTypes_Content:";
public const string PropertyTypeCacheKey = "UmbracoPropertyTypeCache";
public const string LanguageCacheKey = "UmbracoLanguageCache";
public const string DomainCacheKey = "UmbracoDomainList";
public const string StylesheetCacheKey = "UmbracoStylesheet";
public const string StylesheetPropertyCacheKey = "UmbracoStylesheetProperty";
public const string DataTypeCacheKey = "UmbracoDataTypeDefinition";
}
}
@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Caching;
namespace Umbraco.Core.Cache
{
/// <summary>
/// Extensions for strongly typed access
/// </summary>
internal static class CacheProviderExtensions
{
public static T GetCacheItem<T>(this IRuntimeCacheProvider provider,
string cacheKey,
Func<T> getCacheItem,
TimeSpan? timeout,
bool isSliding = false,
CacheItemPriority priority = CacheItemPriority.Normal,
CacheItemRemovedCallback removedCallback = null,
string[] dependentFiles = null)
{
var result = provider.GetCacheItem(cacheKey, () => getCacheItem(), timeout, isSliding, priority, removedCallback, dependentFiles);
return result == null ? default(T) : result.TryConvertTo<T>().Result;
}
public static void InsertCacheItem<T>(this IRuntimeCacheProvider provider,
string cacheKey,
Func<T> getCacheItem,
TimeSpan? timeout = null,
bool isSliding = false,
CacheItemPriority priority = CacheItemPriority.Normal,
CacheItemRemovedCallback removedCallback = null,
string[] dependentFiles = null)
{
provider.InsertCacheItem(cacheKey, () => getCacheItem(), timeout, isSliding, priority, removedCallback, dependentFiles);
}
public static IEnumerable<T> GetCacheItemsByKeySearch<T>(this ICacheProvider provider, string keyStartsWith)
{
var result = provider.GetCacheItemsByKeySearch(keyStartsWith);
return result.Select(x => x.TryConvertTo<T>().Result);
}
public static T GetCacheItem<T>(this ICacheProvider provider, string cacheKey)
{
var result = provider.GetCacheItem(cacheKey);
if (result == null)
{
return default(T);
}
return result.TryConvertTo<T>().Result;
}
public static T GetCacheItem<T>(this ICacheProvider provider, string cacheKey, Func<T> getCacheItem)
{
var result = provider.GetCacheItem(cacheKey, () => getCacheItem());
if (result == null)
{
return default(T);
}
return result.TryConvertTo<T>().Result;
}
}
}
@@ -0,0 +1,67 @@
using System;
using Umbraco.Core.Events;
using Umbraco.Core.Sync;
using umbraco.interfaces;
namespace Umbraco.Core.Cache
{
/// <summary>
/// A base class for cache refreshers to inherit from that ensures the correct events are raised
/// when cache refreshing occurs.
/// </summary>
/// <typeparam name="TInstanceType">The real cache refresher type, this is used for raising strongly typed events</typeparam>
public abstract class CacheRefresherBase<TInstanceType> : ICacheRefresher
where TInstanceType : ICacheRefresher
{
/// <summary>
/// An event that is raised when cache is updated on an individual server
/// </summary>
/// <remarks>
/// This event will fire on each server configured for an Umbraco project whenever a cache refresher
/// is updated.
/// </remarks>
public static event TypedEventHandler<TInstanceType, CacheRefresherEventArgs> CacheUpdated;
/// <summary>
/// Raises the event
/// </summary>
/// <param name="sender"></param>
/// <param name="args"></param>
protected static void OnCacheUpdated(TInstanceType sender, CacheRefresherEventArgs args)
{
if (CacheUpdated != null)
{
CacheUpdated(sender, args);
}
}
/// <summary>
/// Returns the real instance of the object ('this') for use in strongly typed events
/// </summary>
protected abstract TInstanceType Instance { get; }
public abstract Guid UniqueIdentifier { get; }
public abstract string Name { get; }
public virtual void RefreshAll()
{
OnCacheUpdated(Instance, new CacheRefresherEventArgs(null, MessageType.RefreshAll));
}
public virtual void Refresh(int id)
{
OnCacheUpdated(Instance, new CacheRefresherEventArgs(id, MessageType.RefreshById));
}
public virtual void Remove(int id)
{
OnCacheUpdated(Instance, new CacheRefresherEventArgs(id, MessageType.RemoveById));
}
public virtual void Refresh(Guid id)
{
OnCacheUpdated(Instance, new CacheRefresherEventArgs(id, MessageType.RefreshById));
}
}
}
@@ -0,0 +1,19 @@
using System;
using Umbraco.Core.Sync;
namespace Umbraco.Core.Cache
{
/// <summary>
/// Event args for cache refresher updates
/// </summary>
public class CacheRefresherEventArgs : EventArgs
{
public CacheRefresherEventArgs(object msgObject, MessageType type)
{
MessageType = type;
MessageObject = msgObject;
}
public object MessageObject { get; private set; }
public MessageType MessageType { get; private set; }
}
}
@@ -0,0 +1,198 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading;
namespace Umbraco.Core.Cache
{
internal abstract class DictionaryCacheProviderBase : ICacheProvider
{
protected static readonly ReaderWriterLockSlim Locker = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
protected abstract DictionaryCacheWrapper DictionaryCache { get; }
/// <summary>
/// Clears everything in umbraco's runtime cache
/// </summary>
/// <remarks>
/// Does not clear other stuff the user has put in httpruntime.cache!
/// </remarks>
public virtual void ClearAllCache()
{
using (new WriteLock(Locker))
{
var keysToRemove = DictionaryCache.Cast<object>()
.Select(item => new DictionaryItemWrapper(item))
.Where(c => c.Key is string && ((string)c.Key).StartsWith(CacheItemPrefix) && DictionaryCache[c.Key.ToString()] != null)
.Select(c => c.Key)
.ToList();
foreach (var k in keysToRemove)
{
DictionaryCache.Remove(k);
}
}
}
/// <summary>
/// Clears the item in umbraco's runtime cache with the given key
/// </summary>
/// <param name="key">Key</param>
public virtual void ClearCacheItem(string key)
{
using (new WriteLock(Locker))
{
if (DictionaryCache[GetCacheKey(key)] == null) return;
DictionaryCache.Remove(GetCacheKey(key)); ;
}
}
/// <summary>
/// Clears all objects in the System.Web.Cache with the System.Type name as the
/// input parameter. (using [object].GetType())
/// </summary>
/// <param name="typeName">The name of the System.Type which should be cleared from cache ex "System.Xml.XmlDocument"</param>
public virtual void ClearCacheObjectTypes(string typeName)
{
using (new WriteLock(Locker))
{
var keysToRemove = DictionaryCache
.Cast<object>()
.Select(item => new DictionaryItemWrapper(item))
.Where(c =>
{
var k = c.Key.ToString();
var v = DictionaryCache[k];
return v != null && v.GetType().ToString().InvariantEquals(typeName);
})
.Select(c => c.Key)
.ToList();
foreach (var k in keysToRemove)
DictionaryCache.Remove(k);
}
}
public virtual void ClearCacheObjectTypes<T>()
{
using (new WriteLock(Locker))
{
var typeOfT = typeof(T);
var keysToRemove = DictionaryCache
.Cast<object>()
.Select(item => new DictionaryItemWrapper(item))
.Where(c =>
{
var k = c.Key.ToString();
var v = DictionaryCache[k];
return v != null && v.GetType() == typeOfT;
})
.Select(c => c.Key)
.ToList();
foreach (var k in keysToRemove)
DictionaryCache.Remove(k);
}
}
public virtual void ClearCacheObjectTypes<T>(Func<string, T, bool> predicate)
{
using (new WriteLock(Locker))
{
var typeOfT = typeof(T);
var keysToRemove = DictionaryCache
.Cast<object>()
.Select(item => new DictionaryItemWrapper(item))
.Where(c =>
{
var k = c.Key.ToString();
var v = DictionaryCache[k];
return v != null && v.GetType() == typeOfT && predicate(k, (T)v);
})
.Select(c => c.Key)
.ToList();
foreach (var k in keysToRemove)
DictionaryCache.Remove(k);
}
}
/// <summary>
/// Clears all cache items that starts with the key passed.
/// </summary>
/// <param name="keyStartsWith">The start of the key</param>
public virtual void ClearCacheByKeySearch(string keyStartsWith)
{
var keysToRemove = DictionaryCache.Cast<object>()
.Select(item => new DictionaryItemWrapper(item))
.Where(c => c.Key is string && ((string)c.Key).InvariantStartsWith(string.Format("{0}-{1}", CacheItemPrefix, keyStartsWith)))
.Select(c => c.Key)
.ToList();
foreach (var k in keysToRemove)
{
DictionaryCache.Remove(k);
}
}
/// <summary>
/// Clears all cache items that have a key that matches the regular expression
/// </summary>
/// <param name="regexString"></param>
public virtual void ClearCacheByKeyExpression(string regexString)
{
var keysToRemove = new List<object>();
foreach (var item in DictionaryCache)
{
var c = new DictionaryItemWrapper(item);
var s = c.Key as string;
if (s != null)
{
var withoutPrefix = s.TrimStart(string.Format("{0}-", CacheItemPrefix));
if (Regex.IsMatch(withoutPrefix, regexString))
{
keysToRemove.Add(c.Key);
}
}
}
foreach (var k in keysToRemove)
{
DictionaryCache.Remove(k);
}
}
public virtual IEnumerable<object> GetCacheItemsByKeySearch(string keyStartsWith)
{
return (from object item in DictionaryCache
select new DictionaryItemWrapper(item)
into c
where c.Key is string && ((string) c.Key).InvariantStartsWith(string.Format("{0}-{1}", CacheItemPrefix, keyStartsWith))
select c.Value).ToList();
}
/// <summary>
/// Returns a cache item by key, does not update the cache if it isn't there.
/// </summary>
/// <param name="cacheKey"></param>
/// <returns></returns>
public virtual object GetCacheItem(string cacheKey)
{
var result = DictionaryCache.Get(GetCacheKey(cacheKey));
return result;
}
public abstract object GetCacheItem(string cacheKey, Func<object> getCacheItem);
/// <summary>
/// We prefix all cache keys with this so that we know which ones this class has created when
/// using the HttpRuntime cache so that when we clear it we don't clear other entries we didn't create.
/// </summary>
protected const string CacheItemPrefix = "umbrtmche";
protected string GetCacheKey(string key)
{
return string.Format("{0}-{1}", CacheItemPrefix, key);
}
}
}
@@ -0,0 +1,45 @@
using System;
using System.Collections;
namespace Umbraco.Core.Cache
{
internal class DictionaryCacheWrapper : IEnumerable
{
private readonly IEnumerable _inner;
private readonly Func<object, object> _get;
private readonly Action<object> _remove;
public DictionaryCacheWrapper(
IEnumerable inner,
Func<object, object> get,
Action<object> remove)
{
_inner = inner;
_get = get;
_remove = remove;
}
public object this[object key]
{
get
{
return Get(key);
}
}
public object Get(object key)
{
return _get(key);
}
public void Remove(object key)
{
_remove(key);
}
public IEnumerator GetEnumerator()
{
return _inner.GetEnumerator();
}
}
}
@@ -0,0 +1,14 @@
namespace Umbraco.Core.Cache
{
internal class DictionaryItemWrapper
{
public DictionaryItemWrapper(dynamic item)
{
Key = item.Key;
Value = item.Value;
}
public object Key { get; private set; }
public object Value { get; private set; }
}
}
@@ -0,0 +1,47 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Web;
namespace Umbraco.Core.Cache
{
/// <summary>
/// A cache provider that caches items in the HttpContext.Items
/// </summary>
internal class HttpRequestCacheProvider : DictionaryCacheProviderBase
{
private readonly Func<HttpContextBase> _context;
public HttpRequestCacheProvider(HttpContext context)
{
_context = () => new HttpContextWrapper(context);
}
public HttpRequestCacheProvider(Func<HttpContextBase> context)
{
_context = context;
}
protected override DictionaryCacheWrapper DictionaryCache
{
get
{
var ctx = _context();
return new DictionaryCacheWrapper(
ctx.Items,
o => ctx.Items[o],
o => ctx.Items.Remove(o));
}
}
public override object GetCacheItem(string cacheKey, Func<object> getCacheItem)
{
var ctx = _context();
var ck = GetCacheKey(cacheKey);
return ctx.Items[ck] ?? (ctx.Items[ck] = getCacheItem());
}
}
}
@@ -0,0 +1,148 @@
using System;
using System.Collections;
using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Caching;
using Umbraco.Core.Logging;
using CacheItemPriority = System.Web.Caching.CacheItemPriority;
namespace Umbraco.Core.Cache
{
/// <summary>
/// A CacheProvider that wraps the logic of the HttpRuntime.Cache
/// </summary>
internal class HttpRuntimeCacheProvider : DictionaryCacheProviderBase, IRuntimeCacheProvider
{
private readonly System.Web.Caching.Cache _cache;
private readonly DictionaryCacheWrapper _wrapper;
public HttpRuntimeCacheProvider(System.Web.Caching.Cache cache)
{
_cache = cache;
_wrapper = new DictionaryCacheWrapper(_cache, s => _cache.Get(s.ToString()), o => _cache.Remove(o.ToString()));
}
protected override DictionaryCacheWrapper DictionaryCache
{
get { return _wrapper; }
}
/// <summary>
/// Clears all objects in the System.Web.Cache with the System.Type specified that satisfy the predicate
/// </summary>
public override void ClearCacheObjectTypes<T>(Func<string, T, bool> predicate)
{
try
{
lock (Locker)
{
foreach (DictionaryEntry c in _cache)
{
var key = c.Key.ToString();
if (_cache[key] != null
&& _cache[key] is T
&& predicate(key, (T)_cache[key]))
{
_cache.Remove(c.Key.ToString());
}
}
}
}
catch (Exception e)
{
LogHelper.Error<CacheHelper>("Cache clearing error", e);
}
}
/// <summary>
/// Gets (and adds if necessary) an item from the cache with all of the default parameters
/// </summary>
/// <param name="cacheKey"></param>
/// <param name="getCacheItem"></param>
/// <returns></returns>
public override object GetCacheItem(string cacheKey, Func<object> getCacheItem)
{
return GetCacheItem(cacheKey, getCacheItem, null, dependentFiles: null);
}
/// <summary>
/// This overload is here for legacy purposes
/// </summary>
/// <param name="cacheKey"></param>
/// <param name="getCacheItem"></param>
/// <param name="timeout"></param>
/// <param name="isSliding"></param>
/// <param name="priority"></param>
/// <param name="removedCallback"></param>
/// <param name="dependency"></param>
/// <returns></returns>
internal object GetCacheItem(string cacheKey, Func<object> getCacheItem, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, CacheDependency dependency = null)
{
cacheKey = GetCacheKey(cacheKey);
using (var lck = new UpgradeableReadLock(Locker))
{
var result = DictionaryCache.Get(cacheKey);
if (result == null)
{
lck.UpgradeToWriteLock();
result = getCacheItem();
if (result != null)
{
var absolute = isSliding ? System.Web.Caching.Cache.NoAbsoluteExpiration : (timeout == null ? System.Web.Caching.Cache.NoAbsoluteExpiration : DateTime.Now.Add(timeout.Value));
var sliding = isSliding == false ? System.Web.Caching.Cache.NoSlidingExpiration : (timeout ?? System.Web.Caching.Cache.NoSlidingExpiration);
_cache.Insert(cacheKey, result, dependency, absolute, sliding, priority, removedCallback);
}
}
return result;
}
}
public object GetCacheItem(string cacheKey, Func<object> getCacheItem, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null)
{
CacheDependency dependency = null;
if (dependentFiles != null && dependentFiles.Any())
{
dependency = new CacheDependency(dependentFiles);
}
return GetCacheItem(cacheKey, getCacheItem, timeout, isSliding, priority, removedCallback, dependency);
}
/// <summary>
/// This overload is here for legacy purposes
/// </summary>
/// <param name="cacheKey"></param>
/// <param name="getCacheItem"></param>
/// <param name="timeout"></param>
/// <param name="isSliding"></param>
/// <param name="priority"></param>
/// <param name="removedCallback"></param>
/// <param name="dependency"></param>
internal void InsertCacheItem(string cacheKey, Func<object> getCacheItem, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, CacheDependency dependency = null)
{
var result = getCacheItem();
if (result == null) return;
cacheKey = GetCacheKey(cacheKey);
var absolute = isSliding ? System.Web.Caching.Cache.NoAbsoluteExpiration : (timeout == null ? System.Web.Caching.Cache.NoAbsoluteExpiration : DateTime.Now.Add(timeout.Value));
var sliding = isSliding == false ? System.Web.Caching.Cache.NoSlidingExpiration : (timeout ?? System.Web.Caching.Cache.NoSlidingExpiration);
_cache.Insert(cacheKey, result, dependency, absolute, sliding, priority, removedCallback);
}
public void InsertCacheItem(string cacheKey, Func<object> getCacheItem, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null)
{
CacheDependency dependency = null;
if (dependentFiles != null && dependentFiles.Any())
{
dependency = new CacheDependency(dependentFiles);
}
InsertCacheItem(cacheKey, getCacheItem, timeout, isSliding, priority, removedCallback, dependency);
}
}
}
+22
View File
@@ -0,0 +1,22 @@
using System;
using System.Collections.Generic;
namespace Umbraco.Core.Cache
{
/// <summary>
/// An abstract class for implementing a basic cache provider
/// </summary>
public interface ICacheProvider
{
void ClearAllCache();
void ClearCacheItem(string key);
void ClearCacheObjectTypes(string typeName);
void ClearCacheObjectTypes<T>();
void ClearCacheObjectTypes<T>(Func<string, T, bool> predicate);
void ClearCacheByKeySearch(string keyStartsWith);
void ClearCacheByKeyExpression(string regexString);
IEnumerable<object> GetCacheItemsByKeySearch(string keyStartsWith);
object GetCacheItem(string cacheKey);
object GetCacheItem(string cacheKey, Func<object> getCacheItem);
}
}
+18
View File
@@ -0,0 +1,18 @@
using umbraco.interfaces;
namespace Umbraco.Core.Cache
{
/// <summary>
/// Strongly type cache refresher that is able to refresh cache of real instances of objects as well as IDs
/// </summary>
/// <typeparam name="T"></typeparam>
/// <remarks>
/// This is much better for performance when we're not running in a load balanced environment so we can refresh the cache
/// against a already resolved object instead of looking the object back up by id.
/// </remarks>
interface ICacheRefresher<T> : ICacheRefresher
{
void Refresh(T instance);
void Remove(T instance);
}
}
@@ -0,0 +1,16 @@
using umbraco.interfaces;
namespace Umbraco.Core.Cache
{
/// <summary>
/// A cache refresher that supports refreshing or removing cache based on a custom Json payload
/// </summary>
interface IJsonCacheRefresher : ICacheRefresher
{
/// <summary>
/// Refreshes, clears, etc... any cache based on the information provided in the json
/// </summary>
/// <param name="jsonPayload"></param>
void Refresh(string jsonPayload);
}
}
@@ -0,0 +1,35 @@
using System;
using System.Runtime.Caching;
using System.Text;
using System.Web.Caching;
using CacheItemPriority = System.Web.Caching.CacheItemPriority;
namespace Umbraco.Core.Cache
{
/// <summary>
/// An abstract class for implementing a runtime cache provider
/// </summary>
/// <remarks>
/// </remarks>
public interface IRuntimeCacheProvider : ICacheProvider
{
object GetCacheItem(
string cacheKey,
Func<object> getCacheItem,
TimeSpan? timeout,
bool isSliding = false,
CacheItemPriority priority = CacheItemPriority.Normal,
CacheItemRemovedCallback removedCallback = null,
string[] dependentFiles = null);
void InsertCacheItem(
string cacheKey,
Func<object> getCacheItem,
TimeSpan? timeout = null,
bool isSliding = false,
CacheItemPriority priority = CacheItemPriority.Normal,
CacheItemRemovedCallback removedCallback = null,
string[] dependentFiles = null);
}
}
@@ -0,0 +1,20 @@
using Umbraco.Core.Sync;
using umbraco.interfaces;
namespace Umbraco.Core.Cache
{
/// <summary>
/// A base class for json cache refreshers that ensures the correct events are raised when
/// cache refreshing occurs.
/// </summary>
/// <typeparam name="TInstanceType">The real cache refresher type, this is used for raising strongly typed events</typeparam>
public abstract class JsonCacheRefresherBase<TInstanceType> : CacheRefresherBase<TInstanceType>, IJsonCacheRefresher
where TInstanceType : ICacheRefresher
{
public virtual void Refresh(string jsonPayload)
{
OnCacheUpdated(Instance, new CacheRefresherEventArgs(jsonPayload, MessageType.RefreshByJson));
}
}
}
@@ -0,0 +1,66 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.Caching;
namespace Umbraco.Core.Cache
{
internal class NullCacheProvider : IRuntimeCacheProvider
{
public virtual void ClearAllCache()
{
}
public virtual void ClearCacheItem(string key)
{
}
public virtual void ClearCacheObjectTypes(string typeName)
{
}
public virtual void ClearCacheObjectTypes<T>()
{
}
public virtual void ClearCacheObjectTypes<T>(Func<string, T, bool> predicate)
{
}
public virtual void ClearCacheByKeySearch(string keyStartsWith)
{
}
public virtual void ClearCacheByKeyExpression(string regexString)
{
}
public virtual IEnumerable<object> GetCacheItemsByKeySearch(string keyStartsWith)
{
return Enumerable.Empty<object>();
}
public virtual object GetCacheItem(string cacheKey)
{
return default(object);
}
public virtual object GetCacheItem(string cacheKey, Func<object> getCacheItem)
{
return getCacheItem();
}
public object GetCacheItem(string cacheKey, Func<object> getCacheItem, TimeSpan? timeout, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null)
{
return getCacheItem();
}
public void InsertCacheItem(string cacheKey, Func<object> getCacheItem, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null)
{
}
}
}
@@ -0,0 +1,213 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Caching;
using System.Text.RegularExpressions;
using System.Threading;
using System.Web.Caching;
using Umbraco.Core.Logging;
using CacheItemPriority = System.Web.Caching.CacheItemPriority;
namespace Umbraco.Core.Cache
{
/// <summary>
/// A cache provider that wraps the logic of a System.Runtime.Caching.ObjectCache
/// </summary>
internal class ObjectCacheRuntimeCacheProvider : IRuntimeCacheProvider
{
private static readonly ReaderWriterLockSlim Locker = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);
internal ObjectCache MemoryCache;
public ObjectCacheRuntimeCacheProvider()
{
MemoryCache = new MemoryCache("in-memory");
}
public virtual void ClearAllCache()
{
using (new WriteLock(Locker))
{
MemoryCache.DisposeIfDisposable();
MemoryCache = new MemoryCache("in-memory");
}
}
public virtual void ClearCacheItem(string key)
{
using (new WriteLock(Locker))
{
if (MemoryCache[key] == null) return;
MemoryCache.Remove(key);
}
}
public virtual void ClearCacheObjectTypes(string typeName)
{
using (new WriteLock(Locker))
{
var keysToRemove = MemoryCache
.Where(c => c.Value != null && c.Value.GetType().ToString().InvariantEquals(typeName))
.Select(c => c.Key)
.ToArray();
foreach (var k in keysToRemove)
MemoryCache.Remove(k);
}
}
public virtual void ClearCacheObjectTypes<T>()
{
using (new WriteLock(Locker))
{
var typeOfT = typeof (T);
var keysToRemove = MemoryCache
.Where(c => c.Value != null && c.Value.GetType() == typeOfT)
.Select(c => c.Key)
.ToArray();
foreach (var k in keysToRemove)
MemoryCache.Remove(k);
}
}
public virtual void ClearCacheObjectTypes<T>(Func<string, T, bool> predicate)
{
using (new WriteLock(Locker))
{
var typeOfT = typeof(T);
var keysToRemove = MemoryCache
.Where(c => c.Value != null && c.Value.GetType() == typeOfT && predicate(c.Key, (T)c.Value))
.Select(c => c.Key)
.ToArray();
foreach (var k in keysToRemove)
MemoryCache.Remove(k);
}
}
public virtual void ClearCacheByKeySearch(string keyStartsWith)
{
using (new WriteLock(Locker))
{
var keysToRemove = (from c in MemoryCache where c.Key.InvariantStartsWith(keyStartsWith) select c.Key).ToList();
foreach (var k in keysToRemove)
{
MemoryCache.Remove(k);
}
}
}
public virtual void ClearCacheByKeyExpression(string regexString)
{
using (new WriteLock(Locker))
{
var keysToRemove = (from c in MemoryCache where Regex.IsMatch(c.Key, regexString) select c.Key).ToList();
foreach (var k in keysToRemove)
{
MemoryCache.Remove(k);
}
}
}
public virtual IEnumerable<object> GetCacheItemsByKeySearch(string keyStartsWith)
{
return (from c in MemoryCache
where c.Key.InvariantStartsWith(keyStartsWith)
select c.Value).ToList();
}
public virtual object GetCacheItem(string cacheKey)
{
var result = MemoryCache.Get(cacheKey);
return result;
}
public virtual object GetCacheItem(string cacheKey, Func<object> getCacheItem)
{
return GetCacheItem(cacheKey, getCacheItem, null);
}
public object GetCacheItem(
string cacheKey,
Func<object> getCacheItem,
TimeSpan? timeout,
bool isSliding = false,
CacheItemPriority priority = CacheItemPriority.Normal,
CacheItemRemovedCallback removedCallback = null,
string[] dependentFiles = null)
{
using (var lck = new UpgradeableReadLock(Locker))
{
var result = MemoryCache.Get(cacheKey);
if (result == null)
{
lck.UpgradeToWriteLock();
result = getCacheItem();
if (result != null)
{
var policy = GetPolicy(timeout, isSliding, removedCallback, dependentFiles);
MemoryCache.Set(cacheKey, result, policy);
}
}
return result;
}
}
public void InsertCacheItem(string cacheKey, Func<object> getCacheItem, TimeSpan? timeout = null, bool isSliding = false, CacheItemPriority priority = CacheItemPriority.Normal, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null)
{
object result = getCacheItem();
if (result != null)
{
var policy = GetPolicy(timeout, isSliding, removedCallback, dependentFiles);
MemoryCache.Set(cacheKey, result, policy);
}
}
private static CacheItemPolicy GetPolicy(TimeSpan? timeout = null, bool isSliding = false, CacheItemRemovedCallback removedCallback = null, string[] dependentFiles = null)
{
var absolute = isSliding ? ObjectCache.InfiniteAbsoluteExpiration : (timeout == null ? ObjectCache.InfiniteAbsoluteExpiration : DateTime.Now.Add(timeout.Value));
var sliding = isSliding == false ? ObjectCache.NoSlidingExpiration : (timeout ?? ObjectCache.NoSlidingExpiration);
var policy = new CacheItemPolicy
{
AbsoluteExpiration = absolute,
SlidingExpiration = sliding
};
if (dependentFiles != null && dependentFiles.Any())
{
policy.ChangeMonitors.Add(new HostFileChangeMonitor(dependentFiles.ToList()));
}
if (removedCallback != null)
{
policy.RemovedCallback = arguments =>
{
//convert the reason
var reason = CacheItemRemovedReason.Removed;
switch (arguments.RemovedReason)
{
case CacheEntryRemovedReason.Removed:
reason = CacheItemRemovedReason.Removed;
break;
case CacheEntryRemovedReason.Expired:
reason = CacheItemRemovedReason.Expired;
break;
case CacheEntryRemovedReason.Evicted:
reason = CacheItemRemovedReason.Underused;
break;
case CacheEntryRemovedReason.ChangeMonitorChanged:
reason = CacheItemRemovedReason.Expired;
break;
case CacheEntryRemovedReason.CacheSpecificEviction:
reason = CacheItemRemovedReason.Underused;
break;
}
//call the callback
removedCallback(arguments.CacheItem.Key, arguments.CacheItem.Value, reason);
};
}
return policy;
}
}
}
@@ -0,0 +1,74 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using System.Web.Caching;
namespace Umbraco.Core.Cache
{
/// <summary>
/// A cache provider that statically caches everything in an in memory dictionary
/// </summary>
internal class StaticCacheProvider : ICacheProvider
{
internal readonly ConcurrentDictionary<string, object> StaticCache = new ConcurrentDictionary<string, object>();
public virtual void ClearAllCache()
{
StaticCache.Clear();
}
public virtual void ClearCacheItem(string key)
{
object val;
StaticCache.TryRemove(key, out val);
}
public virtual void ClearCacheObjectTypes(string typeName)
{
StaticCache.RemoveAll(kvp => kvp.Value != null && kvp.Value.GetType().ToString().InvariantEquals(typeName));
}
public virtual void ClearCacheObjectTypes<T>()
{
var typeOfT = typeof(T);
StaticCache.RemoveAll(kvp => kvp.Value != null && kvp.Value.GetType() == typeOfT);
}
public virtual void ClearCacheObjectTypes<T>(Func<string, T, bool> predicate)
{
var typeOfT = typeof(T);
StaticCache.RemoveAll(kvp => kvp.Value != null && kvp.Value.GetType() == typeOfT && predicate(kvp.Key, (T)kvp.Value));
}
public virtual void ClearCacheByKeySearch(string keyStartsWith)
{
StaticCache.RemoveAll(kvp => kvp.Key.InvariantStartsWith(keyStartsWith));
}
public virtual void ClearCacheByKeyExpression(string regexString)
{
StaticCache.RemoveAll(kvp => Regex.IsMatch(kvp.Key, regexString));
}
public virtual IEnumerable<object> GetCacheItemsByKeySearch(string keyStartsWith)
{
return (from KeyValuePair<string, object> c in StaticCache
where c.Key.InvariantStartsWith(keyStartsWith)
select c.Value).ToList();
}
public virtual object GetCacheItem(string cacheKey)
{
var result = StaticCache[cacheKey];
return result;
}
public virtual object GetCacheItem(string cacheKey, Func<object> getCacheItem)
{
return StaticCache.GetOrAdd(cacheKey, key => getCacheItem());
}
}
}
@@ -0,0 +1,25 @@
using Umbraco.Core.Sync;
using umbraco.interfaces;
namespace Umbraco.Core.Cache
{
/// <summary>
/// A base class for cache refreshers to inherit from that ensures the correct events are raised
/// when cache refreshing occurs.
/// </summary>
/// <typeparam name="TInstanceType">The real cache refresher type, this is used for raising strongly typed events</typeparam>
/// <typeparam name="TEntityType">The entity type that this refresher can update cache for</typeparam>
public abstract class TypedCacheRefresherBase<TInstanceType, TEntityType> : CacheRefresherBase<TInstanceType>, ICacheRefresher<TEntityType>
where TInstanceType : ICacheRefresher
{
public virtual void Refresh(TEntityType instance)
{
OnCacheUpdated(Instance, new CacheRefresherEventArgs(instance, MessageType.RefreshByInstance));
}
public virtual void Remove(TEntityType instance)
{
OnCacheUpdated(Instance, new CacheRefresherEventArgs(instance, MessageType.RemoveByInstance));
}
}
}
+460 -90
View File
@@ -3,41 +3,145 @@ using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Web.Caching;
using Umbraco.Core.Cache;
using Umbraco.Core.Logging;
namespace Umbraco.Core
{
/// <summary>
/// Class that is exposed by the ApplicationContext for application wide caching purposes
/// </summary>
/// <remarks>
/// This class may be opened publicly at some point but needs a review of what is absoletely necessary.
/// </remarks>
public class CacheHelper
{
private readonly Cache _cache;
public CacheHelper(System.Web.Caching.Cache cache)
{
_cache = cache;
}
private static readonly object Locker = new object();
/// <summary>
/// Class that is exposed by the ApplicationContext for application wide caching purposes
/// </summary>
public class CacheHelper
{
private readonly bool _enableCache;
private readonly ICacheProvider _requestCache;
private readonly ICacheProvider _nullRequestCache = new NullCacheProvider();
private readonly ICacheProvider _staticCache;
private readonly ICacheProvider _nullStaticCache = new NullCacheProvider();
private readonly IRuntimeCacheProvider _httpCache;
private readonly IRuntimeCacheProvider _nullHttpCache = new NullCacheProvider();
/// <summary>
/// Clears everything in umbraco's runtime cache, which means that not only
/// umbraco content is removed, but also other cache items from pages running in
/// the same application / website. Use with care :-)
/// Creates a cache helper with disabled caches
/// </summary>
public void ClearAllCache()
{
var cacheEnumerator = _cache.GetEnumerator();
while (cacheEnumerator.MoveNext())
/// <returns></returns>
/// <remarks>
/// Good for unit testing
/// </remarks>
public static CacheHelper CreateDisabledCacheHelper()
{
return new CacheHelper(null, null, null, false);
}
/// <summary>
/// Initializes a new instance for use in the web
/// </summary>
public CacheHelper()
: this(
new HttpRuntimeCacheProvider(HttpRuntime.Cache),
new StaticCacheProvider(),
new HttpRequestCacheProvider(() => new HttpContextWrapper(HttpContext.Current)))
{
}
/// <summary>
/// Initializes a new instance for use in the web
/// </summary>
/// <param name="cache"></param>
public CacheHelper(System.Web.Caching.Cache cache)
: this(
new HttpRuntimeCacheProvider(cache),
new StaticCacheProvider(),
new HttpRequestCacheProvider(() => new HttpContextWrapper(HttpContext.Current)))
{
}
/// <summary>
/// Initializes a new instance based on the provided providers
/// </summary>
/// <param name="httpCacheProvider"></param>
/// <param name="staticCacheProvider"></param>
/// <param name="requestCacheProvider"></param>
public CacheHelper(
IRuntimeCacheProvider httpCacheProvider,
ICacheProvider staticCacheProvider,
ICacheProvider requestCacheProvider)
: this(httpCacheProvider, staticCacheProvider, requestCacheProvider, true)
{
}
/// <summary>
/// Private ctor used for creating a disabled cache helper
/// </summary>
/// <param name="httpCacheProvider"></param>
/// <param name="staticCacheProvider"></param>
/// <param name="requestCacheProvider"></param>
/// <param name="enableCache"></param>
private CacheHelper(
IRuntimeCacheProvider httpCacheProvider,
ICacheProvider staticCacheProvider,
ICacheProvider requestCacheProvider,
bool enableCache)
{
if (enableCache)
{
_cache.Remove(cacheEnumerator.Key.ToString());
_httpCache = httpCacheProvider;
_staticCache = staticCacheProvider;
_requestCache = requestCacheProvider;
}
else
{
_httpCache = null;
_staticCache = null;
_requestCache = null;
}
_enableCache = enableCache;
}
/// <summary>
/// Returns the current Request cache
/// </summary>
public ICacheProvider RequestCache
{
get { return _enableCache ? _requestCache : _nullRequestCache; }
}
/// <summary>
/// Returns the current Runtime cache
/// </summary>
public ICacheProvider StaticCache
{
get { return _enableCache ? _staticCache : _nullStaticCache; }
}
/// <summary>
/// Returns the current Runtime cache
/// </summary>
public IRuntimeCacheProvider RuntimeCache
{
get { return _enableCache ? _httpCache : _nullHttpCache; }
}
#region Legacy Runtime/Http Cache accessors
/// <summary>
/// Clears the item in umbraco's runtime cache
/// </summary>
[Obsolete("Do not use this method, access the runtime cache from the RuntimeCache property")]
public void ClearAllCache()
{
if (_enableCache == false)
{
_nullHttpCache.ClearAllCache();
}
else
{
_httpCache.ClearAllCache();
}
}
@@ -45,14 +149,16 @@ namespace Umbraco.Core
/// Clears the item in umbraco's runtime cache with the given key
/// </summary>
/// <param name="key">Key</param>
[Obsolete("Do not use this method, access the runtime cache from the RuntimeCache property")]
public void ClearCacheItem(string key)
{
// NH 10 jan 2012
// Patch by the always wonderful Stéphane Gay to avoid cache null refs
lock (Locker)
if (_enableCache == false)
{
if (_cache[key] == null) return;
_cache.Remove(key);;
_nullHttpCache.ClearCacheItem(key);
}
else
{
_httpCache.ClearCacheItem(key);
}
}
@@ -62,21 +168,32 @@ namespace Umbraco.Core
/// input parameter. (using [object].GetType())
/// </summary>
/// <param name="typeName">The name of the System.Type which should be cleared from cache ex "System.Xml.XmlDocument"</param>
[Obsolete("Do not use this method, access the runtime cache from the RuntimeCache property")]
public void ClearCacheObjectTypes(string typeName)
{
try
if (_enableCache == false)
{
lock (Locker)
{
foreach (var c in from DictionaryEntry c in _cache where _cache[c.Key.ToString()] != null && _cache[c.Key.ToString()].GetType().ToString() == typeName select c)
{
_cache.Remove(c.Key.ToString());
}
}
_nullHttpCache.ClearCacheObjectTypes(typeName);
}
catch (Exception e)
else
{
LogHelper.Error<CacheHelper>("Cache clearing error", e);
_httpCache.ClearCacheObjectTypes(typeName);
}
}
/// <summary>
/// Clears all objects in the System.Web.Cache with the System.Type specified
/// </summary>
[Obsolete("Do not use this method, access the runtime cache from the RuntimeCache property")]
public void ClearCacheObjectTypes<T>()
{
if (_enableCache == false)
{
_nullHttpCache.ClearCacheObjectTypes<T>();
}
else
{
_httpCache.ClearCacheObjectTypes<T>();
}
}
@@ -84,81 +201,334 @@ namespace Umbraco.Core
/// Clears all cache items that starts with the key passed.
/// </summary>
/// <param name="keyStartsWith">The start of the key</param>
[Obsolete("Do not use this method, access the runtime cache from the RuntimeCache property")]
public void ClearCacheByKeySearch(string keyStartsWith)
{
foreach (var c in from DictionaryEntry c in _cache where c.Key is string && ((string)c.Key).StartsWith(keyStartsWith) select c)
{
ClearCacheItem((string)c.Key);
}
if (_enableCache == false)
{
_nullHttpCache.ClearCacheByKeySearch(keyStartsWith);
}
else
{
_httpCache.ClearCacheByKeySearch(keyStartsWith);
}
}
/// <summary>
/// Clears all cache items that have a key that matches the regular expression
/// </summary>
/// <param name="regexString"></param>
[Obsolete("Do not use this method, access the runtime cache from the RuntimeCache property")]
public void ClearCacheByKeyExpression(string regexString)
{
if (_enableCache == false)
{
_nullHttpCache.ClearCacheByKeyExpression(regexString);
}
else
{
_httpCache.ClearCacheByKeyExpression(regexString);
}
}
[Obsolete("Do not use this method, access the runtime cache from the RuntimeCache property")]
public IEnumerable<T> GetCacheItemsByKeySearch<T>(string keyStartsWith)
{
if (_enableCache == false)
{
return _nullHttpCache.GetCacheItemsByKeySearch<T>(keyStartsWith);
}
else
{
return _httpCache.GetCacheItemsByKeySearch<T>(keyStartsWith);
}
}
/// <summary>
/// Returns a cache item by key, does not update the cache if it isn't there.
/// </summary>
/// <typeparam name="TT"></typeparam>
/// <param name="cacheKey"></param>
/// <returns></returns>
[Obsolete("Do not use this method, access the runtime cache from the RuntimeCache property")]
public TT GetCacheItem<TT>(string cacheKey)
{
if (_enableCache == false)
{
return _nullHttpCache.GetCacheItem<TT>(cacheKey);
}
else
{
return _httpCache.GetCacheItem<TT>(cacheKey);
}
}
/// <summary>
/// Gets (and adds if necessary) an item from the cache with all of the default parameters
/// </summary>
/// <typeparam name="TT"></typeparam>
/// <param name="cacheKey"></param>
/// <param name="getCacheItem"></param>
/// <returns></returns>
[Obsolete("Do not use this method, access the runtime cache from the RuntimeCache property")]
public TT GetCacheItem<TT>(string cacheKey, Func<TT> getCacheItem)
{
if (_enableCache == false)
{
return _nullHttpCache.GetCacheItem<TT>(cacheKey, getCacheItem);
}
else
{
return _httpCache.GetCacheItem<TT>(cacheKey, getCacheItem);
}
}
/// <summary>
/// Gets (and adds if necessary) an item from the cache with the specified absolute expiration date (from NOW)
/// </summary>
/// <typeparam name="TT"></typeparam>
/// <param name="cacheKey"></param>
/// <param name="timeout">This will set an absolute expiration from now until the timeout</param>
/// <param name="getCacheItem"></param>
/// <returns></returns>
[Obsolete("Do not use this method, access the runtime cache from the RuntimeCache property")]
public TT GetCacheItem<TT>(string cacheKey,
TimeSpan timeout, Func<TT> getCacheItem)
{
return GetCacheItem(cacheKey, null, timeout, getCacheItem);
if (_enableCache == false)
{
return _nullHttpCache.GetCacheItem<TT>(cacheKey, getCacheItem, timeout);
}
else
{
return _httpCache.GetCacheItem<TT>(cacheKey, getCacheItem, timeout);
}
}
/// <summary>
/// Gets (and adds if necessary) an item from the cache with the specified absolute expiration date (from NOW)
/// </summary>
/// <typeparam name="TT"></typeparam>
/// <param name="cacheKey"></param>
/// <param name="refreshAction"></param>
/// <param name="timeout">This will set an absolute expiration from now until the timeout</param>
/// <param name="getCacheItem"></param>
/// <returns></returns>
[Obsolete("Do not use this method, access the runtime cache from the RuntimeCache property")]
public TT GetCacheItem<TT>(string cacheKey,
CacheItemRemovedCallback refreshAction, TimeSpan timeout,
Func<TT> getCacheItem)
{
return GetCacheItem(cacheKey, CacheItemPriority.Normal, refreshAction, timeout, getCacheItem);
if (!_enableCache)
{
return _nullHttpCache.GetCacheItem<TT>(cacheKey, getCacheItem, timeout, removedCallback: refreshAction);
}
else
{
return _httpCache.GetCacheItem<TT>(cacheKey, getCacheItem, timeout, removedCallback: refreshAction);
}
}
/// <summary>
/// Gets (and adds if necessary) an item from the cache with the specified absolute expiration date (from NOW)
/// </summary>
/// <typeparam name="TT"></typeparam>
/// <param name="cacheKey"></param>
/// <param name="priority"></param>
/// <param name="refreshAction"></param>
/// <param name="timeout">This will set an absolute expiration from now until the timeout</param>
/// <param name="getCacheItem"></param>
/// <returns></returns>
[Obsolete("Do not use this method, access the runtime cache from the RuntimeCache property")]
public TT GetCacheItem<TT>(string cacheKey,
CacheItemPriority priority, CacheItemRemovedCallback refreshAction, TimeSpan timeout,
Func<TT> getCacheItem)
{
return GetCacheItem(cacheKey, priority, refreshAction, null, timeout, getCacheItem);
if (_enableCache == false)
{
return _nullHttpCache.GetCacheItem<TT>(cacheKey, getCacheItem, timeout, false, priority, refreshAction);
}
else
{
return _httpCache.GetCacheItem<TT>(cacheKey, getCacheItem, timeout, false, priority, refreshAction);
}
}
/// <summary>
/// Gets (and adds if necessary) an item from the cache with the specified absolute expiration date (from NOW)
/// </summary>
/// <typeparam name="TT"></typeparam>
/// <param name="cacheKey"></param>
/// <param name="priority"></param>
/// <param name="refreshAction"></param>
/// <param name="cacheDependency"></param>
/// <param name="timeout">This will set an absolute expiration from now until the timeout</param>
/// <param name="getCacheItem"></param>
/// <returns></returns>
[Obsolete("Do not use this method, we no longer support the caching overloads with references to CacheDependency, use the overloads specifying a file collection instead")]
public TT GetCacheItem<TT>(string cacheKey,
CacheItemPriority priority,
CacheItemRemovedCallback refreshAction,
CacheDependency cacheDependency,
TimeSpan timeout,
Func<TT> getCacheItem)
CacheItemPriority priority,
CacheItemRemovedCallback refreshAction,
CacheDependency cacheDependency,
TimeSpan timeout,
Func<TT> getCacheItem)
{
return GetCacheItem(cacheKey, priority, refreshAction, cacheDependency, timeout, getCacheItem, Locker);
if (_enableCache == false)
{
return _nullHttpCache.GetCacheItem<TT>(cacheKey, getCacheItem, timeout, false, priority, refreshAction, null);
}
else
{
var cache = _httpCache as HttpRuntimeCacheProvider;
if (cache != null)
{
var result = cache.GetCacheItem(cacheKey, () => getCacheItem(), timeout, false, priority, refreshAction, cacheDependency);
return result == null ? default(TT) : result.TryConvertTo<TT>().Result;
}
throw new InvalidOperationException("Cannot use this obsoleted overload when the current provider is not of type " + typeof(HttpRuntimeCacheProvider));
}
}
/// <summary>
/// This is used only for legacy purposes as I did not want to change all of the locking to one lock found on this object,
/// however, the reason this is used for legacy purposes is because I see zero reason to use different sync locks, just the one
/// lock (Locker) on this class should be sufficient.
/// </summary>
/// <typeparam name="TT"></typeparam>
/// <param name="cacheKey"></param>
/// <param name="priority"></param>
/// <param name="refreshAction"></param>
/// <param name="cacheDependency"></param>
/// <param name="timeout"></param>
/// <param name="getCacheItem"></param>
/// <param name="syncLock"></param>
/// <returns></returns>
internal TT GetCacheItem<TT>(string cacheKey,
CacheItemPriority priority, CacheItemRemovedCallback refreshAction,
CacheDependency cacheDependency, TimeSpan timeout, Func<TT> getCacheItem, object syncLock)
{
var result = _cache.Get(cacheKey);
if (result == null)
{
lock (syncLock)
{
result = _cache.Get(cacheKey);
if (result == null)
{
result = getCacheItem();
if (result != null)
{
//we use Insert instead of add if for some crazy reason there is now a cache with the cache key in there, it will just overwrite it.
_cache.Insert(cacheKey, result, cacheDependency, DateTime.Now.Add(timeout), TimeSpan.Zero, priority, refreshAction);
}
}
}
}
return (TT)result;
}
/// <summary>
/// Gets (and adds if necessary) an item from the cache
/// </summary>
/// <typeparam name="TT"></typeparam>
/// <param name="cacheKey"></param>
/// <param name="priority"></param>
/// <param name="cacheDependency"></param>
/// <param name="getCacheItem"></param>
/// <returns></returns>
[Obsolete("Do not use this method, we no longer support the caching overloads with references to CacheDependency, use the overloads specifying a file collection instead")]
public TT GetCacheItem<TT>(string cacheKey,
CacheItemPriority priority,
CacheDependency cacheDependency,
Func<TT> getCacheItem)
{
if (!_enableCache)
{
return _nullHttpCache.GetCacheItem<TT>(cacheKey, getCacheItem, null, false, priority, null, null);
}
else
{
var cache = _httpCache as HttpRuntimeCacheProvider;
if (cache != null)
{
var result = cache.GetCacheItem(cacheKey, () => getCacheItem(), null, false, priority, null, cacheDependency);
return result == null ? default(TT) : result.TryConvertTo<TT>().Result;
}
throw new InvalidOperationException("Cannot use this obsoleted overload when the current provider is not of type " + typeof(HttpRuntimeCacheProvider));
}
}
/// <summary>
/// Inserts an item into the cache, if it already exists in the cache it will be replaced
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="cacheKey"></param>
/// <param name="priority"></param>
/// <param name="getCacheItem"></param>
public void InsertCacheItem<T>(string cacheKey,
CacheItemPriority priority,
Func<T> getCacheItem)
{
if (_enableCache == false)
{
_nullHttpCache.InsertCacheItem<T>(cacheKey, getCacheItem, priority: priority);
}
else
{
_httpCache.InsertCacheItem<T>(cacheKey, getCacheItem, priority: priority);
}
}
/// <summary>
/// Inserts an item into the cache, if it already exists in the cache it will be replaced
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="cacheKey"></param>
/// <param name="priority"></param>
/// <param name="timeout">This will set an absolute expiration from now until the timeout</param>
/// <param name="getCacheItem"></param>
public void InsertCacheItem<T>(string cacheKey,
CacheItemPriority priority,
TimeSpan timeout,
Func<T> getCacheItem)
{
if (_enableCache == false)
{
_nullHttpCache.InsertCacheItem<T>(cacheKey, getCacheItem, timeout, priority: priority);
}
else
{
_httpCache.InsertCacheItem<T>(cacheKey, getCacheItem, timeout, priority: priority);
}
}
/// <summary>
/// Inserts an item into the cache, if it already exists in the cache it will be replaced
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="cacheKey"></param>
/// <param name="priority"></param>
/// <param name="cacheDependency"></param>
/// <param name="timeout">This will set an absolute expiration from now until the timeout</param>
/// <param name="getCacheItem"></param>
[Obsolete("Do not use this method, we no longer support the caching overloads with references to CacheDependency, use the overloads specifying a file collection instead")]
public void InsertCacheItem<T>(string cacheKey,
CacheItemPriority priority,
CacheDependency cacheDependency,
TimeSpan timeout,
Func<T> getCacheItem)
{
if (_enableCache == false)
{
_nullHttpCache.InsertCacheItem<T>(cacheKey, getCacheItem, timeout, priority: priority, dependentFiles: null);
}
else
{
var cache = _httpCache as HttpRuntimeCacheProvider;
if (cache != null)
{
cache.InsertCacheItem(cacheKey, () => getCacheItem(), timeout, false, priority, null, cacheDependency);
}
throw new InvalidOperationException("Cannot use this obsoleted overload when the current provider is not of type " + typeof(HttpRuntimeCacheProvider));
}
}
/// <summary>
/// Inserts an item into the cache, if it already exists in the cache it will be replaced
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="cacheKey"></param>
/// <param name="priority"></param>
/// <param name="refreshAction"></param>
/// <param name="cacheDependency"></param>
/// <param name="timeout">This will set an absolute expiration from now until the timeout</param>
/// <param name="getCacheItem"></param>
[Obsolete("Do not use this method, we no longer support the caching overloads with references to CacheDependency, use the overloads specifying a file collection instead")]
public void InsertCacheItem<T>(string cacheKey,
CacheItemPriority priority,
CacheItemRemovedCallback refreshAction,
CacheDependency cacheDependency,
TimeSpan? timeout,
Func<T> getCacheItem)
{
if (_enableCache == false)
{
_nullHttpCache.InsertCacheItem<T>(cacheKey, getCacheItem, timeout, false, priority, refreshAction, null);
}
else
{
var cache = _httpCache as HttpRuntimeCacheProvider;
if (cache != null)
{
cache.InsertCacheItem(cacheKey, () => getCacheItem(), timeout, false, priority, refreshAction, cacheDependency);
}
throw new InvalidOperationException("Cannot use this obsoleted overload when the current provider is not of type " + typeof(HttpRuntimeCacheProvider));
}
}
#endregion
}
}
+3 -3
View File
@@ -17,7 +17,7 @@ namespace Umbraco.Core
/// Constructor
/// </summary>
/// <param name="refreshers"></param>
internal CacheRefreshersResolver(IEnumerable<Type> refreshers)
internal CacheRefreshersResolver(Func<IEnumerable<Type>> refreshers)
: base(refreshers)
{
@@ -27,11 +27,11 @@ namespace Umbraco.Core
/// <summary>
/// Gets the <see cref="ICacheRefresher"/> implementations.
/// </summary>
public IEnumerable<ICacheRefresher> CacheResolvers
public IEnumerable<ICacheRefresher> CacheRefreshers
{
get
{
EnsureIdsAreTracked();
EnsureIsInitialized();
return Values;
}
}
@@ -0,0 +1,35 @@
using System;
namespace Umbraco.Core.CodeAnnotations
{
/// <summary>
/// Attribute to add a Friendly Name string with an UmbracoObjectType enum value
/// </summary>
[AttributeUsage(AttributeTargets.All, AllowMultiple = false, Inherited = false)]
internal class FriendlyNameAttribute : Attribute
{
/// <summary>
/// friendly name value
/// </summary>
private readonly string _friendlyName;
/// <summary>
/// Initializes a new instance of the FriendlyNameAttribute class
/// Sets the friendly name value
/// </summary>
/// <param name="friendlyName">attribute value</param>
public FriendlyNameAttribute(string friendlyName)
{
this._friendlyName = friendlyName;
}
/// <summary>
/// Gets the friendly name
/// </summary>
/// <returns>string of friendly name</returns>
public override string ToString()
{
return this._friendlyName;
}
}
}
@@ -0,0 +1,26 @@
using System;
namespace Umbraco.Core.CodeAnnotations
{
/// <summary>
/// Attribute to associate a GUID string and Type with an UmbracoObjectType Enum value
/// </summary>
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false, Inherited = false)]
internal class UmbracoObjectTypeAttribute : Attribute
{
public UmbracoObjectTypeAttribute(string objectId)
{
ObjectId = new Guid(objectId);
}
public UmbracoObjectTypeAttribute(string objectId, Type modelType)
{
ObjectId = new Guid(objectId);
ModelType = modelType;
}
public Guid ObjectId { get; private set; }
public Type ModelType { get; private set; }
}
}
+167
View File
@@ -0,0 +1,167 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
namespace Umbraco.Core
{
/// <summary>
/// A thread-safe representation of a <see cref="HashSet{T}"/>.
/// Enumerating this collection is thread-safe and will only operate on a clone that is generated before returning the enumerator.
/// </summary>
/// <typeparam name="T"></typeparam>
[Serializable]
public class ConcurrentHashSet<T> : ICollection<T>
{
private readonly HashSet<T> _innerSet = new HashSet<T>();
private readonly ReaderWriterLockSlim _instanceLocker = new ReaderWriterLockSlim(LockRecursionPolicy.NoRecursion);
/// <summary>
/// Returns an enumerator that iterates through the collection.
/// </summary>
/// <returns>
/// A <see cref="T:System.Collections.Generic.IEnumerator`1"/> that can be used to iterate through the collection.
/// </returns>
/// <filterpriority>1</filterpriority>
public IEnumerator<T> GetEnumerator()
{
return GetThreadSafeClone().GetEnumerator();
}
/// <summary>
/// Returns an enumerator that iterates through a collection.
/// </summary>
/// <returns>
/// An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection.
/// </returns>
/// <filterpriority>2</filterpriority>
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
/// <summary>
/// Removes the first occurrence of a specific object from the <see cref="T:System.Collections.Generic.ICollection`1"/>.
/// </summary>
/// <returns>
/// true if <paramref name="item"/> was successfully removed from the <see cref="T:System.Collections.Generic.ICollection`1"/>; otherwise, false. This method also returns false if <paramref name="item"/> is not found in the original <see cref="T:System.Collections.Generic.ICollection`1"/>.
/// </returns>
/// <param name="item">The object to remove from the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.</exception>
public bool Remove(T item)
{
using (new WriteLock(_instanceLocker))
{
return _innerSet.Remove(item);
}
}
/// <summary>
/// Gets the number of elements contained in the <see cref="T:System.Collections.ICollection"/>.
/// </summary>
/// <returns>
/// The number of elements contained in the <see cref="T:System.Collections.ICollection"/>.
/// </returns>
/// <filterpriority>2</filterpriority>
public int Count
{
get { return GetThreadSafeClone().Count; }
}
/// <summary>
/// Gets a value indicating whether the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.
/// </summary>
/// <returns>
/// true if the <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only; otherwise, false.
/// </returns>
public bool IsReadOnly
{
get { return false; }
}
/// <summary>
/// Adds an item to the <see cref="T:System.Collections.Generic.ICollection`1"/>.
/// </summary>
/// <param name="item">The object to add to the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param><exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only.</exception>
public void Add(T item)
{
using (new WriteLock(_instanceLocker))
{
_innerSet.Add(item);
}
}
/// <summary>
/// Attempts to add an item to the collection
/// </summary>
/// <param name="item"></param>
/// <returns></returns>
public bool TryAdd(T item)
{
var clone = GetThreadSafeClone();
if (clone.Contains(item)) return false;
using (new WriteLock(_instanceLocker))
{
//double check
if (_innerSet.Contains(item)) return false;
_innerSet.Add(item);
return true;
}
}
/// <summary>
/// Removes all items from the <see cref="T:System.Collections.Generic.ICollection`1"/>.
/// </summary>
/// <exception cref="T:System.NotSupportedException">The <see cref="T:System.Collections.Generic.ICollection`1"/> is read-only. </exception>
public void Clear()
{
using (new WriteLock(_instanceLocker))
{
_innerSet.Clear();
}
}
/// <summary>
/// Determines whether the <see cref="T:System.Collections.Generic.ICollection`1"/> contains a specific value.
/// </summary>
/// <returns>
/// true if <paramref name="item"/> is found in the <see cref="T:System.Collections.Generic.ICollection`1"/>; otherwise, false.
/// </returns>
/// <param name="item">The object to locate in the <see cref="T:System.Collections.Generic.ICollection`1"/>.</param>
public bool Contains(T item)
{
return GetThreadSafeClone().Contains(item);
}
/// <summary>
/// Copies the elements of the <see cref="T:System.Collections.Concurrent.IProducerConsumerCollection`1"/> to an <see cref="T:System.Array"/>, starting at a specified index.
/// </summary>
/// <param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the elements copied from the <see cref="T:System.Collections.Concurrent.IProducerConsumerCollection`1"/>. The array must have zero-based indexing.</param><param name="index">The zero-based index in <paramref name="array"/> at which copying begins.</param><exception cref="T:System.ArgumentNullException"><paramref name="array"/> is a null reference (Nothing in Visual Basic).</exception><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is less than zero.</exception><exception cref="T:System.ArgumentException"><paramref name="index"/> is equal to or greater than the length of the <paramref name="array"/> -or- The number of elements in the source <see cref="T:System.Collections.Concurrent.ConcurrentQueue`1"/> is greater than the available space from <paramref name="index"/> to the end of the destination <paramref name="array"/>.</exception>
public void CopyTo(T[] array, int index)
{
var clone = GetThreadSafeClone();
clone.CopyTo(array, index);
}
private HashSet<T> GetThreadSafeClone()
{
HashSet<T> clone = null;
using (new WriteLock(_instanceLocker))
{
clone = new HashSet<T>(_innerSet, _innerSet.Comparer);
}
return clone;
}
/// <summary>
/// Copies the elements of the <see cref="T:System.Collections.ICollection"/> to an <see cref="T:System.Array"/>, starting at a particular <see cref="T:System.Array"/> index.
/// </summary>
/// <param name="array">The one-dimensional <see cref="T:System.Array"/> that is the destination of the elements copied from <see cref="T:System.Collections.ICollection"/>. The <see cref="T:System.Array"/> must have zero-based indexing. </param><param name="index">The zero-based index in <paramref name="array"/> at which copying begins. </param><exception cref="T:System.ArgumentNullException"><paramref name="array"/> is null. </exception><exception cref="T:System.ArgumentOutOfRangeException"><paramref name="index"/> is less than zero. </exception><exception cref="T:System.ArgumentException"><paramref name="array"/> is multidimensional.-or- The number of elements in the source <see cref="T:System.Collections.ICollection"/> is greater than the available space from <paramref name="index"/> to the end of the destination <paramref name="array"/>. </exception><exception cref="T:System.ArgumentException">The type of the source <see cref="T:System.Collections.ICollection"/> cannot be cast automatically to the type of the destination <paramref name="array"/>. </exception><filterpriority>2</filterpriority>
public void CopyTo(Array array, int index)
{
var clone = GetThreadSafeClone();
Array.Copy(clone.ToArray(), 0, array, index, clone.Count);
}
}
}
@@ -0,0 +1,32 @@
using System;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Configuration;
namespace Umbraco.Core.Configuration
{
/// <summary>
/// A case-insensitive configuration converter for enumerations.
/// </summary>
/// <typeparam name="T">The type of the enumeration.</typeparam>
public class CaseInsensitiveEnumConfigConverter<T> : ConfigurationConverterBase
where T : struct
{
public override object ConvertFrom(ITypeDescriptorContext ctx, CultureInfo ci, object data)
{
if (data == null)
throw new ArgumentNullException("data");
//return Enum.Parse(typeof(T), (string)data, true);
T value;
if (Enum.TryParse((string)data, true, out value))
return value;
throw new Exception(string.Format("\"{0}\" is not valid {1} value. Valid values are: {2}.",
data, typeof(T).Name,
string.Join(", ", Enum.GetValues(typeof(T)).Cast<T>())));
}
}
}
@@ -16,7 +16,7 @@ namespace Umbraco.Core.Configuration
}
/// <summary>
/// Increases the version number in ClientDependency.config by 1
/// Changes the version number in ClientDependency.config to a random value to avoid stale caches
/// </summary>
internal bool IncreaseVersionNumber()
{
@@ -28,9 +28,9 @@ namespace Umbraco.Core.Configuration
var versionAttribute = clientDependencyConfigXml.Root.Attribute("version");
int oldVersion;
int.TryParse(versionAttribute.Value, out oldVersion);
var newVersion = oldVersion + 1;
//Set the new version to the hashcode of now
var oldVersion = versionAttribute.Value;
var newVersion = Math.Abs(DateTime.UtcNow.GetHashCode());
versionAttribute.SetValue(newVersion);
clientDependencyConfigXml.Save(_fileName, SaveOptions.DisableFormatting);
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Umbraco.Core.Configuration
{
/// <summary>
/// Indicates the configuration key for a section or a group.
/// </summary>
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
public sealed class ConfigurationKeyAttribute : Attribute
{
/// <summary>
/// Initializes a new instance of the <see cref="ConfigurationKeyAttribute"/> class with a configuration key.
/// </summary>
/// <param name="configurationKey">The configurationkey.</param>
public ConfigurationKeyAttribute(string configurationKey)
{
ConfigurationKey = configurationKey;
}
/// <summary>
/// Gets or sets the configuration key.
/// </summary>
public string ConfigurationKey { get; private set; }
}
}
+188 -42
View File
@@ -7,6 +7,7 @@ using System.Web.Configuration;
using System.Web.Routing;
using System.Xml;
using System.Xml.Linq;
using System.Xml.XPath;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
@@ -28,24 +29,58 @@ namespace Umbraco.Core.Configuration
#region Private static fields
private static Version _version;
private static string _reservedUrlsCache;
private static readonly object Locker = new object();
//make this volatile so that we can ensure thread safety with a double check lock
private static volatile string _reservedUrlsCache;
private static string _reservedPathsCache;
private static StartsWithContainer _reservedList = new StartsWithContainer();
private static string _reservedPaths;
private static string _reservedUrls;
//ensure the built on (non-changeable) reserved paths are there at all times
private const string StaticReservedPaths = "~/app_plugins/,~/install/,";
private const string StaticReservedUrls = "~/config/splashes/booting.aspx,~/install/default.aspx,~/config/splashes/noNodes.aspx,~/VSEnterpriseHelper.axd,";
#endregion
/// <summary>
/// Used in unit testing to reset all config items that were set with property setters (i.e. did not come from config)
/// </summary>
private static void ResetInternal()
{
_reservedUrlsCache = null;
_reservedPaths = null;
_reservedUrls = null;
}
/// <summary>
/// Resets settings that were set programmatically, to their initial values.
/// </summary>
/// <remarks>To be used in unit tests.</remarks>
internal static void Reset()
{
ResetInternal();
}
/// <summary>
/// Gets the reserved urls from web.config.
/// </summary>
/// <value>The reserved urls.</value>
public static string ReservedUrls
{
get
{
return ConfigurationManager.AppSettings.ContainsKey("umbracoReservedUrls")
? ConfigurationManager.AppSettings["umbracoReservedUrls"]
: string.Empty;
{
if (_reservedUrls == null)
{
var urls = ConfigurationManager.AppSettings.ContainsKey("umbracoReservedUrls")
? ConfigurationManager.AppSettings["umbracoReservedUrls"]
: string.Empty;
//ensure the built on (non-changeable) reserved paths are there at all times
_reservedUrls = StaticReservedUrls + urls;
}
return _reservedUrls;
}
internal set { _reservedUrls = value; }
}
/// <summary>
@@ -56,10 +91,25 @@ namespace Umbraco.Core.Configuration
{
get
{
return ConfigurationManager.AppSettings.ContainsKey("umbracoReservedPaths")
? ConfigurationManager.AppSettings["umbracoReservedPaths"]
: string.Empty;
if (_reservedPaths == null)
{
var reservedPaths = StaticReservedPaths;
//always add the umbraco path to the list
if (ConfigurationManager.AppSettings.ContainsKey("umbracoPath")
&& !ConfigurationManager.AppSettings["umbracoPath"].IsNullOrWhiteSpace())
{
reservedPaths += ConfigurationManager.AppSettings["umbracoPath"].EnsureEndsWith(',');
}
var allPaths = ConfigurationManager.AppSettings.ContainsKey("umbracoReservedPaths")
? ConfigurationManager.AppSettings["umbracoReservedPaths"]
: string.Empty;
_reservedPaths = reservedPaths + allPaths;
}
return _reservedPaths;
}
internal set { _reservedPaths = value; }
}
/// <summary>
@@ -114,6 +164,9 @@ namespace Umbraco.Core.Configuration
/// This will return the MVC area that we will route all custom routes through like surface controllers, etc...
/// We will use the 'Path' (default ~/umbraco) to create it but since it cannot contain '/' and people may specify a path of ~/asdf/asdf/admin
/// we will convert the '/' to '-' and use that as the path. its a bit lame but will work.
///
/// We also make sure that the virtual directory (SystemDirectories.Root) is stripped off first, otherwise we'd end up with something
/// like "MyVirtualDirectory-Umbraco" instead of just "Umbraco".
/// </remarks>
internal static string UmbracoMvcArea
{
@@ -123,7 +176,10 @@ namespace Umbraco.Core.Configuration
{
throw new InvalidOperationException("Cannot create an MVC Area path without the umbracoPath specified");
}
return Path.TrimStart('~').TrimStart('/').Replace('/', '-').Trim();
var path = Path;
if (path.StartsWith(SystemDirectories.Root)) // beware of TrimStart, see U4-2518
path = path.Substring(SystemDirectories.Root.Length);
return path.TrimStart('~').TrimStart('/').Replace('/', '-').Trim().ToLower();
}
}
@@ -145,7 +201,7 @@ namespace Umbraco.Core.Configuration
/// Gets the database connection string
/// </summary>
/// <value>The database connection string.</value>
[Obsolete("Use System.ConfigurationManager.ConnectionStrings to get the connection with the key Umbraco.Core.Configuration.GlobalSettings.UmbracoConnectionName instead")]
[Obsolete("Use System.Configuration.ConfigurationManager.ConnectionStrings[\"umbracoDbDSN\"] instead")]
public static string DbDsn
{
get
@@ -157,7 +213,7 @@ namespace Umbraco.Core.Configuration
{
connectionString = settings.ConnectionString;
// The SqlCe connectionString is formatted slightly differently, so we need to updat it
// The SqlCe connectionString is formatted slightly differently, so we need to update it
if (settings.ProviderName.Contains("SqlServerCe"))
connectionString = string.Format("datalayer=SQLCE4Umbraco.SqlCEHelper,SQLCE4Umbraco;{0}", connectionString);
}
@@ -170,7 +226,7 @@ namespace Umbraco.Core.Configuration
{
if (value.ToLower().Contains("SQLCE4Umbraco.SqlCEHelper".ToLower()))
{
ApplicationContext.Current.DatabaseContext.ConfigureDatabaseConnection();
ApplicationContext.Current.DatabaseContext.ConfigureEmbeddedDatabaseConnection();
}
else
{
@@ -200,7 +256,39 @@ namespace Umbraco.Core.Configuration
SaveSetting("umbracoConfigurationStatus", value);
}
}
/// <summary>
/// Gets or sets the Umbraco members membership providers' useLegacyEncoding state. This will return a boolean
/// </summary>
/// <value>The useLegacyEncoding status.</value>
public static bool UmbracoMembershipProviderLegacyEncoding
{
get
{
return ConfiguredMembershipProvidersLegacyEncoding(Constants.Conventions.Member.UmbracoMemberProviderName);
}
set
{
SetMembershipProvidersLegacyEncoding(Constants.Conventions.Member.UmbracoMemberProviderName, value);
}
}
/// <summary>
/// Gets or sets the Umbraco users membership providers' useLegacyEncoding state. This will return a boolean
/// </summary>
/// <value>The useLegacyEncoding status.</value>
public static bool UmbracoUsersMembershipProviderLegacyEncoding
{
get
{
return ConfiguredMembershipProvidersLegacyEncoding(Constants.Conventions.User.UmbracoUsersProviderName);
}
set
{
SetMembershipProvidersLegacyEncoding(Constants.Conventions.User.UmbracoUsersProviderName, value);
}
}
/// <summary>
/// Saves a setting into the configuration file.
/// </summary>
@@ -259,6 +347,43 @@ namespace Umbraco.Core.Configuration
return fileName;
}
private static void SetMembershipProvidersLegacyEncoding(string providerName, bool useLegacyEncoding)
{
var webConfigFilename = GetFullWebConfigFileName();
var webConfigXml = XDocument.Load(webConfigFilename, LoadOptions.PreserveWhitespace);
var membershipConfigs = webConfigXml.XPathSelectElements("configuration/system.web/membership/providers/add").ToList();
if (membershipConfigs.Any() == false)
return;
var provider = membershipConfigs.SingleOrDefault(c => c.Attribute("name") != null && c.Attribute("name").Value == providerName);
if (provider == null)
return;
provider.SetAttributeValue("useLegacyEncoding", useLegacyEncoding);
webConfigXml.Save(webConfigFilename, SaveOptions.DisableFormatting);
}
private static bool ConfiguredMembershipProvidersLegacyEncoding(string providerName)
{
var webConfigFilename = GetFullWebConfigFileName();
var webConfigXml = XDocument.Load(webConfigFilename, LoadOptions.PreserveWhitespace);
var membershipConfigs = webConfigXml.XPathSelectElements("configuration/system.web/membership/providers/add").ToList();
var provider = membershipConfigs.SingleOrDefault(c => c.Attribute("name") != null && c.Attribute("name").Value == providerName);
var useLegacyEncodingAttribute = provider.Attribute("useLegacyEncoding");
bool useLegacyEncoding;
bool.TryParse(useLegacyEncodingAttribute.Value, out useLegacyEncoding);
return useLegacyEncoding;
}
/// <summary>
/// Gets the full path to root.
/// </summary>
@@ -531,6 +656,16 @@ namespace Umbraco.Core.Configuration
return context.Request.Path.ToLower().IndexOf(SystemDirectories.Umbraco.ToLower() + "/liveediting.aspx") > -1;
}
public static bool RequestIsInUmbracoApplication(HttpContextBase context)
{
return context.Request.Path.ToLower().IndexOf(IOHelper.ResolveUrl(SystemDirectories.Umbraco).ToLower()) > -1;
}
public static bool RequestIsLiveEditRedirector(HttpContextBase context)
{
return context.Request.Path.ToLower().IndexOf(SystemDirectories.Umbraco.ToLower() + "/liveediting.aspx") > -1;
}
/// <summary>
/// Gets a value indicating whether umbraco should force a secure (https) connection to the backoffice.
/// </summary>
@@ -622,38 +757,49 @@ namespace Umbraco.Core.Configuration
/// </returns>
public static bool IsReservedPathOrUrl(string url)
{
// check if GlobalSettings.ReservedPaths and GlobalSettings.ReservedUrls are unchanged
if (!object.ReferenceEquals(_reservedPathsCache, GlobalSettings.ReservedPaths)
|| !object.ReferenceEquals(_reservedUrlsCache, GlobalSettings.ReservedUrls))
if (_reservedUrlsCache == null)
{
// store references to strings to determine changes
_reservedPathsCache = GlobalSettings.ReservedPaths;
_reservedUrlsCache = GlobalSettings.ReservedUrls;
string _root = SystemDirectories.Root.Trim().ToLower();
// add URLs and paths to a new list
StartsWithContainer _newReservedList = new StartsWithContainer();
foreach (string reservedUrl in _reservedUrlsCache.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries))
lock (Locker)
{
//resolves the url to support tilde chars
string reservedUrlTrimmed = IOHelper.ResolveUrl(reservedUrl).Trim().ToLower();
if (reservedUrlTrimmed.Length > 0)
_newReservedList.Add(reservedUrlTrimmed);
if (_reservedUrlsCache == null)
{
// store references to strings to determine changes
_reservedPathsCache = GlobalSettings.ReservedPaths;
_reservedUrlsCache = GlobalSettings.ReservedUrls;
string _root = SystemDirectories.Root.Trim().ToLower();
// add URLs and paths to a new list
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()).Trim().ToLower();
if (reservedUrlTrimmed.Length > 0)
_newReservedList.Add(reservedUrlTrimmed);
}
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()).Trim().ToLower();
if (reservedPathTrimmed.Length > 0)
_newReservedList.Add(reservedPathTrimmed + (reservedPathTrimmed.EndsWith("/") ? "" : "/"));
}
// use the new list from now on
_reservedList = _newReservedList;
}
}
foreach (string reservedPath in _reservedPathsCache.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries))
{
bool trimEnd = !reservedPath.EndsWith("/");
//resolves the url to support tilde chars
string reservedPathTrimmed = IOHelper.ResolveUrl(reservedPath).Trim().ToLower();
if (reservedPathTrimmed.Length > 0)
_newReservedList.Add(reservedPathTrimmed + (reservedPathTrimmed.EndsWith("/") ? "" : "/"));
}
// use the new list from now on
_reservedList = _newReservedList;
}
//The url should be cleaned up before checking:
@@ -0,0 +1,190 @@
using System.Configuration;
namespace Umbraco.Core.Configuration.InfrastructureSettings
{
public class Infrastructure : ConfigurationSection
{
private const string InfrastructureSectionName = "umbraco/infrastructure";
public static Infrastructure Instance
{
get { return (Infrastructure) ConfigurationManager.GetSection(InfrastructureSectionName); }
}
#region RepositoriesSection Property
internal const string RepositoriesPropertyName = "repositories";
[ConfigurationProperty(RepositoriesPropertyName, IsRequired = true, IsKey = false, IsDefaultCollection = false)]
public Repositories Repositories
{
get { return ((Repositories)base[RepositoriesPropertyName]); }
set { base[RepositoriesPropertyName] = value; }
}
#endregion
#region PublishingStrategy Property
internal const string PublishingStrategyPropertyName = "publishingStrategy";
[ConfigurationProperty(PublishingStrategyPropertyName, IsRequired = true, IsKey = false, IsDefaultCollection = false)]
public PublishingProvider PublishingStrategy
{
get { return ((PublishingProvider)base[PublishingStrategyPropertyName]); }
set { base[PublishingStrategyPropertyName] = value; }
}
#endregion
}
public class Repositories : ConfigurationElement
{
[ConfigurationProperty("", IsDefaultCollection = true, IsRequired = true)]
public RepositoryElementCollection Repository
{
get { return ((RepositoryElementCollection)(base[""])); }
}
}
[ConfigurationCollection(typeof(Repository), CollectionType = ConfigurationElementCollectionType.BasicMapAlternate, AddItemName = RepositoryPropertyName)]
public class RepositoryElementCollection : ConfigurationElementCollection
{
internal const string RepositoryPropertyName = "repository";
public override ConfigurationElementCollectionType CollectionType
{
get
{
return ConfigurationElementCollectionType.BasicMapAlternate;
}
}
protected override string ElementName
{
get
{
return RepositoryPropertyName;
}
}
protected override bool IsElementName(string elementName)
{
return elementName == RepositoryPropertyName;
}
protected override object GetElementKey(ConfigurationElement element)
{
return ((Repository)element).InterfaceShortTypeName;
}
protected override ConfigurationElement CreateNewElement()
{
return new Repository();
}
#region Indexer
public Repository this[int index]
{
get { return (Repository)base.BaseGet(index); }
}
public Repository this[string interfaceShortTypeName]
{
get { return (Repository)base.BaseGet(interfaceShortTypeName); }
}
#endregion
#region Add
public void Add(Repository repository)
{
BaseAdd(repository);
}
#endregion
#region Remove
public void Remove(Repository repository)
{
BaseRemove(repository);
}
#endregion
#region GetItem
public Repository GetItemAt(int index)
{
return (Repository)BaseGet(index);
}
public Repository GetItemByKey(string interfaceShortTypeName)
{
return (Repository)BaseGet(interfaceShortTypeName);
}
#endregion
public bool ContainsKey(string interfaceShortName)
{
bool result = false;
object[] keys = this.BaseGetAllKeys();
foreach (object key in keys)
{
if ((string)key == interfaceShortName)
{
result = true;
break;
}
}
return result;
}
}
public class Repository : ConfigurationElement
{
internal const string InterfaceShortTypeNamePropertyName = "interfaceShortTypeName";
[ConfigurationPropertyAttribute(InterfaceShortTypeNamePropertyName, IsRequired = true, IsKey = true, IsDefaultCollection = false)]
public string InterfaceShortTypeName
{
get { return (string) base[InterfaceShortTypeNamePropertyName]; }
set { base[InterfaceShortTypeNamePropertyName] = value; }
}
internal const string RepositoryFullTypeNamePropertyName = "repositoryFullTypeName";
[ConfigurationPropertyAttribute(RepositoryFullTypeNamePropertyName, IsRequired = true, IsKey = false, IsDefaultCollection = false)]
public string RepositoryFullTypeName
{
get { return (string)base[RepositoryFullTypeNamePropertyName]; }
set { base[RepositoryFullTypeNamePropertyName] = value; }
}
internal const string CacheProviderFullTypeNamePropertyName = "cacheProviderFullTypeName";
[ConfigurationPropertyAttribute(CacheProviderFullTypeNamePropertyName, IsRequired = true, IsKey = false, IsDefaultCollection = false)]
public string CacheProviderFullTypeName
{
get { return (string)base[CacheProviderFullTypeNamePropertyName]; }
set { base[CacheProviderFullTypeNamePropertyName] = value; }
}
}
public class PublishingProvider : ConfigurationElement
{
internal const string TypePropertyName = "type";
[ConfigurationPropertyAttribute(TypePropertyName, IsRequired = true, IsKey = false, IsDefaultCollection = false)]
public string Type
{
get { return (string)base[TypePropertyName]; }
set { base[TypePropertyName] = value; }
}
}
}
@@ -0,0 +1,33 @@
using System.Configuration;
namespace Umbraco.Core.Configuration
{
// note - still must work on how to support read-only and ResetSection for collections
// note - still must work on how to spread config over files (aka DeepConfig in v5)
/// <summary>
/// Represents an Umbraco section within the configuration file.
/// </summary>
/// <remarks>
/// <para>The requirement for these sections is to be read-only.</para>
/// <para>However for unit tests purposes it is internally possible to override some values, and
/// then calling <c>>ResetSection</c> should cancel these changes and bring the section back to
/// what it was originally.</para>
/// <para>The <c>UmbracoSettings.For{T}</c> method will return a section, either one that
/// is in the configuration file, or a section that was created with default values.</para>
/// </remarks>
public abstract class UmbracoConfigurationSection : ConfigurationSection
{
/// <summary>
/// Gets a value indicating whether the section actually is in the configuration file.
/// </summary>
protected bool IsPresent { get { return ElementInformation.IsPresent; } }
/// <summary>
/// Resets settings that were set programmatically, to their initial values.
/// </summary>
/// <remarks>>To be used in unit tests.</remarks>
internal protected virtual void ResetSection()
{ }
}
}
+380 -173
View File
@@ -5,10 +5,13 @@ using System.Linq;
using System.Threading;
using System.Web;
using System.Web.Caching;
using System.Web.Security;
using System.Xml;
using System.Configuration;
using System.Collections.Generic;
using Umbraco.Core.Logging;
using Umbraco.Core.CodeAnnotations;
namespace Umbraco.Core.Configuration
@@ -20,22 +23,48 @@ namespace Umbraco.Core.Configuration
//TODO: Re-enable logging !!!!
//TODO: We need to convert this to a real section, it's currently using HttpRuntime.Cache to detect cahnges, this is real poor, especially in a console app
/// <summary>
/// The UmbracoSettings Class contains general settings information for the entire Umbraco instance based on information from the /config/umbracoSettings.config file
/// </summary>
internal class UmbracoSettings
{
/// <summary>
private static bool GetKeyValue(string key, bool defaultValue)
{
bool value;
string stringValue = GetKey(key);
if (string.IsNullOrWhiteSpace(stringValue))
return defaultValue;
if (bool.TryParse(stringValue, out value))
return value;
return defaultValue;
}
private static int GetKeyValue(string key, int defaultValue)
{
int value;
string stringValue = GetKey(key);
if (string.IsNullOrWhiteSpace(stringValue))
return defaultValue;
if (int.TryParse(stringValue, out value))
return value;
return defaultValue;
}
/// <summary>
/// Used in unit testing to reset all config items that were set with property setters (i.e. did not come from config)
/// </summary>
internal static void ResetSetters()
private static void ResetInternal()
{
_addTrailingSlash = null;
_forceSafeAliases = null;
_useLegacySchema = null;
_useDomainPrefixes = null;
_umbracoLibraryCacheDuration = null;
SettingsFilePath = null;
SettingsFilePath = null;
}
internal const string TempFriendlyXmlChildContainerNodename = ""; // "children";
@@ -107,7 +136,7 @@ namespace Umbraco.Core.Configuration
/// </summary>
/// <param name="key">The xpath query to the specific node.</param>
/// <returns>If found, it returns the specific configuration xml node.</returns>
public static XmlNode GetKeyAsNode(string key)
internal static XmlNode GetKeyAsNode(string key)
{
if (key == null)
throw new ArgumentException("Key cannot be null");
@@ -122,15 +151,36 @@ namespace Umbraco.Core.Configuration
/// </summary>
/// <param name="key">The key.</param>
/// <returns></returns>
public static string GetKey(string key)
internal static string GetKey(string key)
{
EnsureSettingsDocument();
string attrName = null;
var pos = key.IndexOf('@');
if (pos > 0)
{
attrName = key.Substring(pos + 1);
key = key.Substring(0, pos - 1);
}
var node = UmbracoSettingsXmlDoc.DocumentElement.SelectSingleNode(key);
if (node == null || node.FirstChild == null || node.FirstChild.Value == null)
return string.Empty;
return node.FirstChild.Value;
}
if (node == null)
return string.Empty;
if (pos < 0)
{
if (node.FirstChild == null || node.FirstChild.Value == null)
return string.Empty;
return node.FirstChild.Value;
}
else
{
var attr = node.Attributes[attrName];
if (attr == null)
return string.Empty;
return attr.Value;
}
}
/// <summary>
/// Gets a value indicating whether the media library will create new directories in the /media directory.
@@ -138,7 +188,7 @@ namespace Umbraco.Core.Configuration
/// <value>
/// <c>true</c> if new directories are allowed otherwise, <c>false</c>.
/// </value>
public static bool UploadAllowDirectories
internal static bool UploadAllowDirectories
{
get { return bool.Parse(GetKey("/settings/content/UploadAllowDirectories")); }
}
@@ -165,7 +215,7 @@ namespace Umbraco.Core.Configuration
/// Gets a value indicating whether logging is enabled in umbracoSettings.config (/settings/logging/enableLogging).
/// </summary>
/// <value><c>true</c> if logging is enabled; otherwise, <c>false</c>.</value>
public static bool EnableLogging
internal static bool EnableLogging
{
get
{
@@ -180,7 +230,7 @@ namespace Umbraco.Core.Configuration
/// Gets a value indicating whether logging happens async.
/// </summary>
/// <value><c>true</c> if async logging is enabled; otherwise, <c>false</c>.</value>
public static bool EnableAsyncLogging
internal static bool EnableAsyncLogging
{
get
{
@@ -195,7 +245,7 @@ namespace Umbraco.Core.Configuration
/// <summary>
/// Gets the assembly of an external logger that can be used to store log items in 3rd party systems
/// </summary>
public static string ExternalLoggerAssembly
internal static string ExternalLoggerAssembly
{
get
{
@@ -203,10 +253,11 @@ namespace Umbraco.Core.Configuration
return value != null ? value.Attributes["assembly"].Value : "";
}
}
/// <summary>
/// Gets the type of an external logger that can be used to store log items in 3rd party systems
/// </summary>
public static string ExternalLoggerType
internal static string ExternalLoggerType
{
get
{
@@ -218,7 +269,7 @@ namespace Umbraco.Core.Configuration
/// <summary>
/// Long Audit Trail to external log too
/// </summary>
public static bool ExternalLoggerLogAuditTrail
internal static bool ExternalLoggerLogAuditTrail
{
get
{
@@ -237,7 +288,7 @@ namespace Umbraco.Core.Configuration
/// <summary>
/// Keep user alive as long as they have their browser open? Default is true
/// </summary>
public static bool KeepUserLoggedIn
internal static bool KeepUserLoggedIn
{
get
{
@@ -249,10 +300,36 @@ namespace Umbraco.Core.Configuration
}
}
internal static string AuthCookieName
{
get
{
var value = GetKey("/settings/security/authCookieName");
if (string.IsNullOrEmpty(value) == false)
{
return value;
}
return Constants.Web.AuthCookieName;
}
}
internal static string AuthCookieDomain
{
get
{
var value = GetKey("/settings/security/authCookieDomain");
if (string.IsNullOrEmpty(value) == false)
{
return value;
}
return FormsAuthentication.CookieDomain;
}
}
/// <summary>
/// Enables the experimental canvas (live) editing on the frontend of the website
/// </summary>
public static bool EnableCanvasEditing
internal static bool EnableCanvasEditing
{
get
{
@@ -267,7 +344,7 @@ namespace Umbraco.Core.Configuration
/// <summary>
/// Show disabled users in the tree in the Users section in the backoffice
/// </summary>
public static bool HideDisabledUsersInBackoffice
internal static bool HideDisabledUsersInBackoffice
{
get
{
@@ -283,7 +360,7 @@ namespace Umbraco.Core.Configuration
/// Gets a value indicating whether the logs will be auto cleaned
/// </summary>
/// <value><c>true</c> if logs are to be automatically cleaned; otherwise, <c>false</c></value>
public static bool AutoCleanLogs
internal static bool AutoCleanLogs
{
get
{
@@ -298,7 +375,7 @@ namespace Umbraco.Core.Configuration
/// <summary>
/// Gets the value indicating the log cleaning frequency (in miliseconds)
/// </summary>
public static int CleaningMiliseconds
internal static int CleaningMiliseconds
{
get
{
@@ -310,7 +387,7 @@ namespace Umbraco.Core.Configuration
}
}
public static int MaxLogAge
internal static int MaxLogAge
{
get
{
@@ -326,7 +403,7 @@ namespace Umbraco.Core.Configuration
/// Gets the disabled log types.
/// </summary>
/// <value>The disabled log types.</value>
public static XmlNode DisabledLogTypes
internal static XmlNode DisabledLogTypes
{
get { return GetKeyAsNode("/settings/logging/disabledLogTypes"); }
}
@@ -335,7 +412,7 @@ namespace Umbraco.Core.Configuration
/// Gets the package server url.
/// </summary>
/// <value>The package server url.</value>
public static string PackageServer
internal static string PackageServer
{
get { return "packages.umbraco.org"; }
}
@@ -346,29 +423,17 @@ namespace Umbraco.Core.Configuration
/// Gets a value indicating whether umbraco will use domain prefixes.
/// </summary>
/// <value><c>true</c> if umbraco will use domain prefixes; otherwise, <c>false</c>.</value>
// TODO rename as EnforceAbsoluteUrls
public static bool UseDomainPrefixes
internal static bool UseDomainPrefixes
{
get
{
try
{
if (_useDomainPrefixes.HasValue)
return _useDomainPrefixes.Value;
bool result;
if (bool.TryParse(GetKey("/settings/requestHandler/useDomainPrefixes"), out result))
return result;
return false;
}
catch
{
return false;
}
// default: false
return _useDomainPrefixes ?? GetKeyValue("/settings/requestHandler/useDomainPrefixes", false);
}
// for unit tests only
internal set
/*internal*/ set
{
_useDomainPrefixes = value;
// for unit tests only
_useDomainPrefixes = value;
}
}
@@ -378,35 +443,18 @@ namespace Umbraco.Core.Configuration
/// This will add a trailing slash (/) to urls when in directory url mode
/// NOTICE: This will always return false if Directory Urls in not active
/// </summary>
public static bool AddTrailingSlash
internal static bool AddTrailingSlash
{
get
{
try
{
if (GlobalSettings.UseDirectoryUrls)
{
if (_addTrailingSlash.HasValue)
return _addTrailingSlash.Value;
bool result;
if (bool.TryParse(GetKey("/settings/requestHandler/addTrailingSlash"), out result))
return result;
return false;
}
else
{
return false;
}
}
catch
{
return false;
}
// default: false
return GlobalSettings.UseDirectoryUrls
&& (_addTrailingSlash ?? GetKeyValue("/settings/requestHandler/addTrailingSlash", false));
}
// for unit tests only
internal set
/*internal*/ set
{
_addTrailingSlash = value;
// for unit tests only
_addTrailingSlash = value;
}
}
@@ -414,7 +462,7 @@ namespace Umbraco.Core.Configuration
/// Gets a value indicating whether umbraco will use ASP.NET MasterPages for rendering instead of its propriatary templating system.
/// </summary>
/// <value><c>true</c> if umbraco will use ASP.NET MasterPages; otherwise, <c>false</c>.</value>
public static bool UseAspNetMasterPages
internal static bool UseAspNetMasterPages
{
get
{
@@ -436,7 +484,7 @@ namespace Umbraco.Core.Configuration
/// Gets a value indicating whether umbraco will attempt to load any skins to override default template files
/// </summary>
/// <value><c>true</c> if umbraco will override templates with skins if present and configured <c>false</c>.</value>
public static bool EnableTemplateFolders
internal static bool EnableTemplateFolders
{
get
{
@@ -454,24 +502,26 @@ namespace Umbraco.Core.Configuration
}
}
//TODO: I"m not sure why we need this, need to ask Gareth what the deal is, pretty sure we can remove it or change it, seems like
// massive overkill.
// we have that one because we auto-discover when a property is "xml" and should be returned by Razor as
// dynamic xml. But, stuff such as "<p>hello</p>" can be parsed into xml and would be returned as xml,
// unless <p> has been defined in the exclusion list... this is dirty and not-efficient, we should at least
// cache the list somewhere!
//
// TODO get rid of that whole dynamic xml mess
/// <summary>
/// razor DynamicNode typecasting detects XML and returns DynamicXml - Root elements that won't convert to DynamicXml
/// </summary>
public static IEnumerable<string> NotDynamicXmlDocumentElements
internal static IEnumerable<string> NotDynamicXmlDocumentElements
{
get
{
try
{
List<string> items = new List<string>();
XmlNode root = GetKeyAsNode("/settings/scripting/razor/notDynamicXmlDocumentElements");
foreach (XmlNode element in root.SelectNodes(".//element"))
{
items.Add(element.InnerText);
}
var items = new List<string>();
var root = GetKeyAsNode("/settings/scripting/razor/notDynamicXmlDocumentElements");
if (root != null)
items.AddRange(root.SelectNodes(".//element").Cast<XmlNode>().Select(n => n.InnerText));
return items;
}
catch
@@ -484,7 +534,7 @@ namespace Umbraco.Core.Configuration
private static IEnumerable<RazorDataTypeModelStaticMappingItem> _razorDataTypeModelStaticMapping;
private static readonly ReaderWriterLockSlim Lock = new ReaderWriterLockSlim();
public static IEnumerable<RazorDataTypeModelStaticMappingItem> RazorDataTypeModelStaticMapping
internal static IEnumerable<RazorDataTypeModelStaticMappingItem> RazorDataTypeModelStaticMapping
{
get
{
@@ -549,7 +599,7 @@ namespace Umbraco.Core.Configuration
/// <value>
/// <c>true</c> if umbraco will clone XML cache on publish; otherwise, <c>false</c>.
/// </value>
public static bool CloneXmlCacheOnPublish
internal static bool CloneXmlCacheOnPublish
{
get
{
@@ -571,7 +621,7 @@ namespace Umbraco.Core.Configuration
/// Gets a value indicating whether rich text editor content should be parsed by tidy.
/// </summary>
/// <value><c>true</c> if content is parsed; otherwise, <c>false</c>.</value>
public static bool TidyEditorContent
internal static bool TidyEditorContent
{
get { return bool.Parse(GetKey("/settings/content/TidyEditorContent")); }
}
@@ -580,7 +630,7 @@ namespace Umbraco.Core.Configuration
/// Gets the encoding type for the tidyied content.
/// </summary>
/// <value>The encoding type as string.</value>
public static string TidyCharEncoding
internal static string TidyCharEncoding
{
get
{
@@ -597,18 +647,18 @@ namespace Umbraco.Core.Configuration
/// Gets the property context help option, this can either be 'text', 'icon' or 'none'
/// </summary>
/// <value>The property context help option.</value>
public static string PropertyContextHelpOption
internal static string PropertyContextHelpOption
{
get { return GetKey("/settings/content/PropertyContextHelpOption").ToLower(); }
}
public static string DefaultBackofficeProvider
internal static string DefaultBackofficeProvider
{
get
{
string defaultProvider = GetKey("/settings/providers/users/DefaultBackofficeProvider");
if (String.IsNullOrEmpty(defaultProvider))
defaultProvider = "UsersMembershipProvider";
defaultProvider = Constants.Conventions.User.UmbracoUsersProviderName;
return defaultProvider;
}
@@ -619,41 +669,55 @@ namespace Umbraco.Core.Configuration
/// <summary>
/// Whether to force safe aliases (no spaces, no special characters) at businesslogic level on contenttypes and propertytypes
/// </summary>
public static bool ForceSafeAliases
internal static bool ForceSafeAliases
{
get
{
if (_forceSafeAliases.HasValue)
return _forceSafeAliases.Value;
string forceSafeAlias = GetKey("/settings/content/ForceSafeAliases");
if (String.IsNullOrEmpty(forceSafeAlias))
return true;
else
{
try
{
return bool.Parse(forceSafeAlias);
}
catch
{
return true;
}
}
// default: true
return _forceSafeAliases ?? GetKeyValue("/settings/content/ForceSafeAliases", true);
}
internal set
/*internal*/ set
{
//used for unit testing
// used for unit testing
_forceSafeAliases = value;
}
}
/// <summary>
/// Gets a value indicating whether to try to skip IIS custom errors.
/// </summary>
[UmbracoWillObsolete("Use UmbracoSettings.For<WebRouting>.TrySkipIisCustomErrors instead.")]
internal static bool TrySkipIisCustomErrors
{
get { return GetKeyValue("/settings/web.routing/@trySkipIisCustomErrors", false); }
}
/// <summary>
/// Gets a value indicating whether internal redirect preserves the template.
/// </summary>
[UmbracoWillObsolete("Use UmbracoSettings.For<WebRouting>.InternalRedirectPerservesTemplate instead.")]
internal static bool InternalRedirectPreservesTemplate
{
get { return GetKeyValue("/settings/web.routing/@internalRedirectPreservesTemplate", false); }
}
/// <summary>
/// File types that will not be allowed to be uploaded via the content/media upload control
/// </summary>
public static IEnumerable<string> DisallowedUploadFiles
{
get
{
var val = GetKey("/settings/content/disallowedUploadFiles");
return val.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries);
}
}
/// <summary>
/// Gets the allowed image file types.
/// </summary>
/// <value>The allowed image file types.</value>
public static string ImageFileTypes
internal static string ImageFileTypes
{
get { return GetKey("/settings/content/imaging/imageFileTypes").ToLowerInvariant(); }
}
@@ -662,7 +726,7 @@ namespace Umbraco.Core.Configuration
/// Gets the allowed script file types.
/// </summary>
/// <value>The allowed script file types.</value>
public static string ScriptFileTypes
internal static string ScriptFileTypes
{
get { return GetKey("/settings/content/scripteditor/scriptFileTypes"); }
}
@@ -673,37 +737,25 @@ namespace Umbraco.Core.Configuration
/// Gets the duration in seconds to cache queries to umbraco library member and media methods
/// Default is 1800 seconds (30 minutes)
/// </summary>
public static int UmbracoLibraryCacheDuration
internal static int UmbracoLibraryCacheDuration
{
get
{
if (_umbracoLibraryCacheDuration.HasValue)
return _umbracoLibraryCacheDuration.Value;
string libraryCacheDuration = GetKey("/settings/content/UmbracoLibraryCacheDuration");
if (String.IsNullOrEmpty(libraryCacheDuration))
return 1800;
else
{
try
{
return int.Parse(libraryCacheDuration);
}
catch
{
return 1800;
}
}
// default: 1800
return _umbracoLibraryCacheDuration ?? GetKeyValue("/settings/content/UmbracoLibraryCacheDuration", 1800);
}
internal set { _umbracoLibraryCacheDuration = value; }
/*internal*/ set
{
// for unit tests only
_umbracoLibraryCacheDuration = value;
}
}
/// <summary>
/// Gets the path to the scripts folder used by the script editor.
/// </summary>
/// <value>The script folder path.</value>
public static string ScriptFolderPath
internal static string ScriptFolderPath
{
get { return GetKey("/settings/content/scripteditor/scriptFolderPath"); }
}
@@ -711,7 +763,7 @@ namespace Umbraco.Core.Configuration
/// <summary>
/// Enabled or disable the script/code editor
/// </summary>
public static bool ScriptDisableEditor
internal static bool ScriptDisableEditor
{
get
{
@@ -729,7 +781,7 @@ namespace Umbraco.Core.Configuration
/// ex: existingnodename.aspx would become existingnodename(1).aspx if a node with the same name is found
/// </summary>
/// <value><c>true</c> if umbraco ensures unique node naming; otherwise, <c>false</c>.</value>
public static bool EnsureUniqueNaming
internal static bool EnsureUniqueNaming
{
get
{
@@ -748,7 +800,7 @@ namespace Umbraco.Core.Configuration
/// Gets the notification email sender.
/// </summary>
/// <value>The notification email sender.</value>
public static string NotificationEmailSender
internal static string NotificationEmailSender
{
get { return GetKey("/settings/content/notifications/email"); }
}
@@ -759,7 +811,7 @@ namespace Umbraco.Core.Configuration
/// <value>
/// <c>true</c> if html notification-emails are disabled; otherwise, <c>false</c>.
/// </value>
public static bool NotificationDisableHtmlEmail
internal static bool NotificationDisableHtmlEmail
{
get
{
@@ -772,12 +824,12 @@ namespace Umbraco.Core.Configuration
/// Gets the allowed attributes on images.
/// </summary>
/// <value>The allowed attributes on images.</value>
public static string ImageAllowedAttributes
internal static string ImageAllowedAttributes
{
get { return GetKey("/settings/content/imaging/allowedAttributes"); }
}
public static XmlNode ImageAutoFillImageProperties
internal static XmlNode ImageAutoFillImageProperties
{
get { return GetKeyAsNode("/settings/content/imaging/autoFillImageProperties"); }
}
@@ -786,7 +838,7 @@ namespace Umbraco.Core.Configuration
/// Gets the scheduled tasks as XML
/// </summary>
/// <value>The scheduled tasks.</value>
public static XmlNode ScheduledTasks
internal static XmlNode ScheduledTasks
{
get { return GetKeyAsNode("/settings/scheduledTasks"); }
}
@@ -795,7 +847,7 @@ namespace Umbraco.Core.Configuration
/// Gets a list of characters that will be replaced when generating urls
/// </summary>
/// <value>The URL replacement characters.</value>
public static XmlNode UrlReplaceCharacters
internal static XmlNode UrlReplaceCharacters
{
get { return GetKeyAsNode("/settings/requestHandler/urlReplacing"); }
}
@@ -803,7 +855,9 @@ namespace Umbraco.Core.Configuration
/// <summary>
/// Whether to replace double dashes from url (ie my--story----from--dash.aspx caused by multiple url replacement chars
/// </summary>
public static bool RemoveDoubleDashesFromUrlReplacing
// was used by the legacy short string helper, is not used anymore by the new default short string helper
// should update documentation
internal static bool RemoveDoubleDashesFromUrlReplacing
{
get
{
@@ -824,7 +878,7 @@ namespace Umbraco.Core.Configuration
/// Used for load-balancing high-traffic sites.
/// </summary>
/// <value><c>true</c> if umbraco uses distributed calls; otherwise, <c>false</c>.</value>
public static bool UseDistributedCalls
internal static bool UseDistributedCalls
{
get
{
@@ -844,7 +898,7 @@ namespace Umbraco.Core.Configuration
/// Gets the ID of the user with access rights to perform the distributed calls.
/// </summary>
/// <value>The distributed call user.</value>
public static int DistributedCallUser
internal static int DistributedCallUser
{
get
{
@@ -862,7 +916,7 @@ namespace Umbraco.Core.Configuration
/// <summary>
/// Gets the html injected into a (x)html page if Umbraco is running in preview mode
/// </summary>
public static string PreviewBadge
internal static string PreviewBadge
{
get
{
@@ -883,7 +937,7 @@ namespace Umbraco.Core.Configuration
/// and update their content cache accordingly, ensuring a consistent cache on all servers
/// </summary>
/// <value>The distribution servers.</value>
public static XmlNode DistributionServers
internal static XmlNode DistributionServers
{
get
{
@@ -903,7 +957,7 @@ namespace Umbraco.Core.Configuration
/// A help page configuration specify language, user type, application, application url and
/// the target help page url.
/// </summary>
public static XmlNode HelpPages
internal static XmlNode HelpPages
{
get
{
@@ -925,7 +979,7 @@ namespace Umbraco.Core.Configuration
/// All packages installed from a repository gets the repository alias included in the install information
/// </summary>
/// <value>The repository servers.</value>
public static XmlNode Repositories
internal static XmlNode Repositories
{
get
{
@@ -948,7 +1002,7 @@ namespace Umbraco.Core.Configuration
/// <value>
/// <c>true</c> if umbraco will use the viewstate mover module; otherwise, <c>false</c>.
/// </value>
public static bool UseViewstateMoverModule
internal static bool UseViewstateMoverModule
{
get
{
@@ -970,7 +1024,7 @@ namespace Umbraco.Core.Configuration
/// Tells us whether the Xml Content cache is disabled or not
/// Default is enabled
/// </summary>
public static bool IsXmlContentCacheDisabled
internal static bool IsXmlContentCacheDisabled
{
get
{
@@ -995,7 +1049,7 @@ namespace Umbraco.Core.Configuration
/// Makes it possible to updates environments by syncing the umbraco.config file across instances
/// Relates to http://umbraco.codeplex.com/workitem/30722
/// </summary>
public static bool XmlContentCheckForDiskChanges
internal static bool XmlContentCheckForDiskChanges
{
get
{
@@ -1020,7 +1074,7 @@ namespace Umbraco.Core.Configuration
/// If disabled, only documents will generate data.
/// This feature is useful if anyone would like to see how data looked at a given time
/// </summary>
public static bool EnableGlobalPreviewStorage
internal static bool EnableGlobalPreviewStorage
{
get
{
@@ -1048,37 +1102,22 @@ namespace Umbraco.Core.Configuration
/// <value>
/// <c>true</c> if yes, use the old node/data model; otherwise, <c>false</c>.
/// </value>
public static bool UseLegacyXmlSchema
internal static bool UseLegacyXmlSchema
{
get
{
try
{
if (_useLegacySchema.HasValue)
return _useLegacySchema.Value;
string value = GetKey("/settings/content/UseLegacyXmlSchema");
bool result;
if (!string.IsNullOrEmpty(value) && bool.TryParse(value, out result))
return result;
return true;
}
catch (Exception)
{
//default. TODO: When we change this to a real config section we won't have to worry about parse errors
// and should handle defaults with unit tests properly.
return false;
}
// default: true
return _useLegacySchema ?? GetKeyValue("/settings/content/UseLegacyXmlSchema", false);
}
internal set
/*internal*/ set
{
//used for unit testing
// used for unit testing
_useLegacySchema = value;
}
}
[Obsolete("This setting is not used anymore, the only file extensions that are supported are .cs and .vb files")]
public static IEnumerable<string> AppCodeFileExtensionsList
internal static IEnumerable<string> AppCodeFileExtensionsList
{
get
{
@@ -1089,7 +1128,7 @@ namespace Umbraco.Core.Configuration
}
[Obsolete("This setting is not used anymore, the only file extensions that are supported are .cs and .vb files")]
public static XmlNode AppCodeFileExtensions
internal static XmlNode AppCodeFileExtensions
{
get
{
@@ -1111,7 +1150,7 @@ namespace Umbraco.Core.Configuration
/// Tells us whether the Xml to always update disk cache, when changes are made to content
/// Default is enabled
/// </summary>
public static bool ContinouslyUpdateXmlDiskCache
internal static bool ContinouslyUpdateXmlDiskCache
{
get
{
@@ -1137,7 +1176,7 @@ namespace Umbraco.Core.Configuration
/// have a splash page
/// Default is disabled
/// </summary>
public static bool EnableSplashWhileLoading
internal static bool EnableSplashWhileLoading
{
get
{
@@ -1158,7 +1197,7 @@ namespace Umbraco.Core.Configuration
}
private static bool? _resolveUrlsFromTextString;
public static bool ResolveUrlsFromTextString
internal static bool ResolveUrlsFromTextString
{
get
{
@@ -1195,7 +1234,7 @@ namespace Umbraco.Core.Configuration
/// is used instead of the masterpages editor
/// </summary>
/// <value><c>true</c> if umbraco defaults to using MVC views for templating, otherwise <c>false</c>.</value>
public static RenderingEngine DefaultRenderingEngine
internal static RenderingEngine DefaultRenderingEngine
{
get
{
@@ -1219,8 +1258,102 @@ namespace Umbraco.Core.Configuration
}
return _defaultRenderingEngine.Value;
}
//internal set
//{
// _defaultRenderingEngine = value;
// var node = UmbracoSettingsXmlDoc.DocumentElement.SelectSingleNode("/settings/templates/defaultRenderingEngine");
// node.InnerText = value.ToString();
//}
}
private static MacroErrorBehaviour? _macroErrorBehaviour;
/// <summary>
/// This configuration setting defines how to handle macro errors:
/// - Inline - Show error within macro as text (default and current Umbraco 'normal' behavior)
/// - Silent - Suppress error and hide macro
/// - Throw - Throw an exception and invoke the global error handler (if one is defined, if not you'll get a YSOD)
/// </summary>
/// <value>MacroErrorBehaviour enum defining how to handle macro errors.</value>
internal static MacroErrorBehaviour MacroErrorBehaviour
{
get
{
if (_macroErrorBehaviour == null)
{
try
{
var behaviour = MacroErrorBehaviour.Inline;
var value = GetKey("/settings/content/MacroErrors");
if (value != null)
{
Enum<MacroErrorBehaviour>.TryParse(value, true, out behaviour);
}
_macroErrorBehaviour = behaviour;
}
catch (Exception ex)
{
LogHelper.Error<UmbracoSettings>("Could not load /settings/content/MacroErrors from umbracosettings.config", ex);
_macroErrorBehaviour = MacroErrorBehaviour.Inline;
}
}
return _macroErrorBehaviour.Value;
}
}
private static IconPickerBehaviour? _iconPickerBehaviour;
/// <summary>
/// This configuration setting defines how to show icons in the document type editor.
/// - ShowDuplicates - Show duplicates in files and sprites. (default and current Umbraco 'normal' behaviour)
/// - HideSpriteDuplicates - Show files on disk and hide duplicates from the sprite
/// - HideFileDuplicates - Show files in the sprite and hide duplicates on disk
/// </summary>
/// <value>MacroErrorBehaviour enum defining how to show icons in the document type editor.</value>
internal static IconPickerBehaviour IconPickerBehaviour
{
get
{
if (_iconPickerBehaviour == null)
{
try
{
var behaviour = IconPickerBehaviour.ShowDuplicates;
var value = GetKey("/settings/content/DocumentTypeIconList");
if (value != null)
{
Enum<IconPickerBehaviour>.TryParse(value, true, out behaviour);
}
_iconPickerBehaviour = behaviour;
}
catch (Exception ex)
{
LogHelper.Error<UmbracoSettings>("Could not load /settings/content/DocumentTypeIconList from umbracosettings.config", ex);
_iconPickerBehaviour = IconPickerBehaviour.ShowDuplicates;
}
}
return _iconPickerBehaviour.Value;
}
}
/// <summary>
/// Gets the default document type property used when adding new properties through the back-office
/// </summary>
/// <value>Configured text for the default document type property</value>
/// <remarks>If undefined, 'Textstring' is the default</remarks>
public static string DefaultDocumentTypeProperty
{
get
{
var defaultDocumentTypeProperty = GetKey("/settings/content/defaultDocumentTypeProperty");
if (string.IsNullOrEmpty(defaultDocumentTypeProperty))
{
defaultDocumentTypeProperty = "Textstring";
}
return defaultDocumentTypeProperty;
}
}
/// <summary>
/// Configuration regarding webservices
@@ -1405,6 +1538,80 @@ namespace Umbraco.Core.Configuration
}
#endregion
}
}
}
#region Extensible settings
/// <summary>
/// Resets settings that were set programmatically, to their initial values.
/// </summary>
/// <remarks>To be used in unit tests.</remarks>
internal static void Reset()
{
ResetInternal();
using (new WriteLock(SectionsLock))
{
foreach (var section in Sections.Values)
section.ResetSection();
}
}
private static readonly ReaderWriterLockSlim SectionsLock = new ReaderWriterLockSlim();
private static readonly Dictionary<Type, UmbracoConfigurationSection> Sections = new Dictionary<Type, UmbracoConfigurationSection>();
/// <summary>
/// Gets the specified UmbracoConfigurationSection.
/// </summary>
/// <typeparam name="T">The type of the UmbracoConfigurationSectiont.</typeparam>
/// <returns>The UmbracoConfigurationSection of the specified type.</returns>
public static T For<T>()
where T : UmbracoConfigurationSection, new()
{
var sectionType = typeof (T);
using (new WriteLock(SectionsLock))
{
if (Sections.ContainsKey(sectionType)) return Sections[sectionType] as T;
var attr = sectionType.GetCustomAttribute<ConfigurationKeyAttribute>(false);
if (attr == null)
throw new InvalidOperationException(string.Format("Type \"{0}\" is missing attribute ConfigurationKeyAttribute.", sectionType.FullName));
var sectionKey = attr.ConfigurationKey;
if (string.IsNullOrWhiteSpace(sectionKey))
throw new InvalidOperationException(string.Format("Type \"{0}\" ConfigurationKeyAttribute value is null or empty.", sectionType.FullName));
var section = GetSection(sectionType, sectionKey);
Sections[sectionType] = section;
return section as T;
}
}
private static UmbracoConfigurationSection GetSection(Type sectionType, string key)
{
if (!sectionType.Inherits<UmbracoConfigurationSection>())
throw new ArgumentException(string.Format(
"Type \"{0}\" does not inherit from UmbracoConfigurationSection.", sectionType.FullName), "sectionType");
var section = ConfigurationManager.GetSection(key);
if (section != null && section.GetType() != sectionType)
throw new InvalidCastException(string.Format("Section at key \"{0}\" is of type \"{1}\" and not \"{2}\".",
key, section.GetType().FullName, sectionType.FullName));
if (section != null) return section as UmbracoConfigurationSection;
section = Activator.CreateInstance(sectionType) as UmbracoConfigurationSection;
if (section == null)
throw new NullReferenceException(string.Format(
"Activator failed to create an instance of type \"{0}\" for key\"{1}\" and returned null.",
sectionType.FullName, key));
return section as UmbracoConfigurationSection;
}
#endregion
}
}
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Configuration
{
public class UmbracoVersion
{
private static readonly Version Version = new Version("6.0.0");
private static readonly Version Version = new Version("6.2.0");
/// <summary>
/// Gets the current version of Umbraco.
@@ -23,7 +23,7 @@ namespace Umbraco.Core.Configuration
/// Gets the version comment (like beta or RC).
/// </summary>
/// <value>The version comment.</value>
public static string CurrentComment { get { return "RC"; } }
public static string CurrentComment { get { return "beta"; } }
// Get the version of the umbraco.dll by looking at a class in that dll
// Had to do it like this due to medium trust issues, see: http://haacked.com/archive/2010/11/04/assembly-location-and-medium-trust.aspx
@@ -0,0 +1,46 @@
namespace Umbraco.Core
{
public static partial class Constants
{
/// <summary>
/// Defines the alias identifiers for Umbraco's core application sections.
/// </summary>
public static class Applications
{
/// <summary>
/// Application alias for the content section.
/// </summary>
public const string Content = "content";
/// <summary>
/// Application alias for the developer section.
/// </summary>
public const string Developer = "developer";
/// <summary>
/// Application alias for the media section.
/// </summary>
public const string Media = "media";
/// <summary>
/// Application alias for the members section.
/// </summary>
public const string Members = "member";
/// <summary>
/// Application alias for the settings section.
/// </summary>
public const string Settings = "settings";
/// <summary>
/// Application alias for the translation section.
/// </summary>
public const string Translation = "translation";
/// <summary>
/// Application alias for the users section.
/// </summary>
public const string Users = "users";
}
}
}
+289
View File
@@ -0,0 +1,289 @@
using System;
using System.Collections.Generic;
using Umbraco.Core.Models;
namespace Umbraco.Core
{
public static partial class Constants
{
/// <summary>
/// Defines the identifiers for property-type alias conventions that are used within the Umbraco core.
/// </summary>
public static class Conventions
{
/// <summary>
/// Constants for Umbraco Content property aliases.
/// </summary>
public static class Content
{
/// <summary>
/// Property alias for the Content's Url (internal) redirect.
/// </summary>
public const string InternalRedirectId = "umbracoInternalRedirectId";
/// <summary>
/// Property alias for the Content's navigational hide, (not actually used in core code).
/// </summary>
public const string NaviHide = "umbracoNaviHide";
/// <summary>
/// Property alias for the Content's Url redirect.
/// </summary>
public const string Redirect = "umbracoRedirect";
/// <summary>
/// Property alias for the Content's Url alias.
/// </summary>
public const string UrlAlias = "umbracoUrlAlias";
/// <summary>
/// Property alias for the Content's Url name.
/// </summary>
public const string UrlName = "umbracoUrlName";
}
/// <summary>
/// Constants for Umbraco Media property aliases.
/// </summary>
public static class Media
{
/// <summary>
/// Property alias for the Media's file name.
/// </summary>
public const string File = "umbracoFile";
/// <summary>
/// Property alias for the Media's width.
/// </summary>
public const string Width = "umbracoWidth";
/// <summary>
/// Property alias for the Media's height.
/// </summary>
public const string Height = "umbracoHeight";
/// <summary>
/// Property alias for the Media's file size (in bytes).
/// </summary>
public const string Bytes = "umbracoBytes";
/// <summary>
/// Property alias for the Media's file extension.
/// </summary>
public const string Extension = "umbracoExtension";
}
/// <summary>
/// Defines the alias identifiers for Umbraco media types.
/// </summary>
public static class MediaTypes
{
/// <summary>
/// MediaType alias for a file.
/// </summary>
public const string File = "File";
/// <summary>
/// MediaType alias for a folder.
/// </summary>
public const string Folder = "Folder";
/// <summary>
/// MediaType alias for an image.
/// </summary>
public const string Image = "Image";
}
/// <summary>
/// Constants for Umbraco user
/// </summary>
public static class User
{
public static readonly string UmbracoUsersProviderName = "UsersMembershipProvider";
}
/// <summary>
/// Constants for Umbraco Member property aliases.
/// </summary>
public static class Member
{
public static readonly string UmbracoMemberProviderName = "UmbracoMembershipProvider";
public static readonly string UmbracoRoleProviderName = "UmbracoRoleProvider";
/// <summary>
/// Property alias for a Members Password Question
/// </summary>
public const string PasswordQuestion = "umbracoPasswordRetrievalQuestionPropertyTypeAlias";
public const string PasswordQuestionLabel = "Password Question";
/// <summary>
/// Property alias for Members Password Answer
/// </summary>
public const string PasswordAnswer = "umbracoPasswordRetrievalAnswerPropertyTypeAlias";
public const string PasswordAnswerLabel = "Password Answer";
/// <summary>
/// Property alias for the Comments on a Member
/// </summary>
public const string Comments = "umbracoCommentPropertyTypeAlias";
public const string CommentsLabel = "Comments";
/// <summary>
/// Property alias for the Approved boolean of a Member
/// </summary>
public const string IsApproved = "umbracoApprovePropertyTypeAlias";
public const string IsApprovedLabel = "Is Approved";
/// <summary>
/// Property alias for the Locked out boolean of a Member
/// </summary>
public const string IsLockedOut = "umbracoLockPropertyTypeAlias";
public const string IsLockedOutLabel = "Is Locked Out";
/// <summary>
/// Property alias for the last date the Member logged in
/// </summary>
public const string LastLoginDate = "umbracoLastLoginPropertyTypeAlias";
public const string LastLoginDateLabel = "Last Login Date";
/// <summary>
/// Property alias for the last date a Member changed its password
/// </summary>
public const string LastPasswordChangeDate = "umbracoMemberLastPasswordChange";
public const string LastPasswordChangeDateLabel = "Last Password Change Date";
/// <summary>
/// Property alias for the last date a Member was locked out
/// </summary>
public const string LastLockoutDate = "umbracoMemberLastLockout";
public const string LastLockoutDateLabel = "Last Lockout Date";
/// <summary>
/// Property alias for the number of failed login attemps
/// </summary>
public const string FailedPasswordAttempts = "umbracoFailedPasswordAttemptsPropertyTypeAlias";
public const string FailedPasswordAttemptsLabel = "Failed Password Attempts";
/// <summary>
/// Group name to put the membership properties on
/// </summary>
internal const string StandardPropertiesGroupName = "Membership";
internal static Dictionary<string, PropertyType> GetStandardPropertyTypeStubs()
{
return new Dictionary<string, PropertyType>
{
{
Comments,
new PropertyType(new Guid(PropertyEditors.TextboxMultiple), DataTypeDatabaseType.Ntext, true)
{
Alias = Comments,
Name = CommentsLabel
}
},
{
FailedPasswordAttempts,
new PropertyType(new Guid(PropertyEditors.NoEdit), DataTypeDatabaseType.Integer, true)
{
Alias = FailedPasswordAttempts,
Name = FailedPasswordAttemptsLabel
}
},
{
IsApproved,
new PropertyType(new Guid(PropertyEditors.TrueFalse), DataTypeDatabaseType.Integer, true)
{
Alias = IsApproved,
Name = IsApprovedLabel
}
},
{
IsLockedOut,
new PropertyType(new Guid(PropertyEditors.TrueFalse), DataTypeDatabaseType.Integer, true)
{
Alias = IsLockedOut,
Name = IsLockedOutLabel
}
},
{
LastLockoutDate,
new PropertyType(new Guid(PropertyEditors.NoEdit), DataTypeDatabaseType.Date, true)
{
Alias = LastLockoutDate,
Name = LastLockoutDateLabel
}
},
{
LastLoginDate,
new PropertyType(new Guid(PropertyEditors.NoEdit), DataTypeDatabaseType.Date, true)
{
Alias = LastLoginDate,
Name = LastLoginDateLabel
}
},
{
LastPasswordChangeDate,
new PropertyType(new Guid(PropertyEditors.NoEdit), DataTypeDatabaseType.Date, true)
{
Alias = LastPasswordChangeDate,
Name = LastPasswordChangeDateLabel
}
},
{
PasswordAnswer,
new PropertyType(new Guid(PropertyEditors.NoEdit), DataTypeDatabaseType.Nvarchar, true)
{
Alias = PasswordAnswer,
Name = PasswordAnswerLabel
}
},
{
PasswordQuestion,
new PropertyType(new Guid(PropertyEditors.NoEdit), DataTypeDatabaseType.Nvarchar, true)
{
Alias = PasswordQuestion,
Name = PasswordQuestionLabel
}
}
};
}
}
/// <summary>
/// Defines the alias identifiers for Umbraco member types.
/// </summary>
public static class MemberTypes
{
/// <summary>
/// MemberType alias for default member type.
/// </summary>
public const string Member = "Member";
public const string SystemDefaultProtectType = "_umbracoSystemDefaultProtectType";
}
/// <summary>
/// Constants for Umbraco URLs/Querystrings.
/// </summary>
public static class Url
{
/// <summary>
/// Querystring parameter name used for Umbraco's alternative template functionality.
/// </summary>
public const string AltTemplate = "altTemplate";
}
}
}
}
+86
View File
@@ -0,0 +1,86 @@
namespace Umbraco.Core
{
public static partial class Constants
{
/// <summary>
/// Defines the identifiers for Umbraco object types as constants for easy centralized access/management.
/// </summary>
public static class ObjectTypes
{
/// <summary>
/// Guid for a Content Item object.
/// </summary>
public const string ContentItem = "10E2B09F-C28B-476D-B77A-AA686435E44A";
/// <summary>
/// Guid for a Content Item Type object.
/// </summary>
public const string ContentItemType = "7A333C54-6F43-40A4-86A2-18688DC7E532";
/// <summary>
/// Guid for the Content Recycle Bin.
/// </summary>
public const string ContentRecycleBin = "01BB7FF2-24DC-4C0C-95A2-C24EF72BBAC8";
/// <summary>
/// Guid for a DataType object.
/// </summary>
public const string DataType = "30A2A501-1978-4DDB-A57B-F7EFED43BA3C";
/// <summary>
/// Guid for a Document object.
/// </summary>
public const string Document = "C66BA18E-EAF3-4CFF-8A22-41B16D66A972";
/// <summary>
/// Guid for a Document Type object.
/// </summary>
public const string DocumentType = "A2CB7800-F571-4787-9638-BC48539A0EFB";
/// <summary>
/// Guid for a Media object.
/// </summary>
public const string Media = "B796F64C-1F99-4FFB-B886-4BF4BC011A9C";
/// <summary>
/// Guid for the Media Recycle Bin.
/// </summary>
public const string MediaRecycleBin = "CF3D8E34-1C1C-41e9-AE56-878B57B32113";
/// <summary>
/// Guid for a Media Type object.
/// </summary>
public const string MediaType = "4EA4382B-2F5A-4C2B-9587-AE9B3CF3602E";
/// <summary>
/// Guid for a Member object.
/// </summary>
public const string Member = "39EB0F98-B348-42A1-8662-E7EB18487560";
/// <summary>
/// Guid for a Member Group object.
/// </summary>
public const string MemberGroup = "366E63B9-880F-4E13-A61C-98069B029728";
/// <summary>
/// Guid for a Member Type object.
/// </summary>
public const string MemberType = "9B5416FB-E72F-45A9-A07B-5A9A2709CE43";
/// <summary>
/// Guid for a Stylesheet object.
/// </summary>
public const string Stylesheet = "9F68DA4F-A3A8-44C2-8226-DCBD125E4840";
/// <summary>
/// Guid for the System Root.
/// </summary>
public const string SystemRoot = "EA7D8624-4CFE-4578-A871-24AA946BF34D";
/// <summary>
/// Guid for a Template object.
/// </summary>
public const string Template = "6FBDE604-4178-42CE-A10B-8A2600A2F07D";
}
}
}
@@ -0,0 +1,186 @@
namespace Umbraco.Core
{
public static partial class Constants
{
/// <summary>
/// Defines the identifiers for Umbraco Property Editors as constants for easy centralized access/management.
/// </summary>
public static class PropertyEditors
{
/// <summary>
/// Guid for the Checkbox list datatype.
/// </summary>
public const string CheckBoxList = "B4471851-82B6-4C75-AFA4-39FA9C6A75E9";
/// <summary>
/// Guid for the Color Picker datatype.
/// </summary>
public const string ColorPicker = "F8D60F68-EC59-4974-B43B-C46EB5677985";
/// <summary>
/// Guid for the Content Picker datatype.
/// </summary>
public const string ContentPicker = "158AA029-24ED-4948-939E-C3DA209E5FBA";
/// <summary>
/// Guid for the Date datatype.
/// </summary>
public const string Date = "23E93522-3200-44E2-9F29-E61A6FCBB79A";
/// <summary>
/// Guid for the Date/Time datatype.
/// </summary>
public const string DateTime = "B6FB1622-AFA5-4BBF-A3CC-D9672A442222";
/// <summary>
/// Guid for the Dictionary Picker datatype.
/// </summary>
public const string DictionaryPicker = "17B70066-F764-407D-AB05-3717F1E1C513";
/// <summary>
/// Guid for the Dropdown list datatype.
/// </summary>
public const string DropDownList = "A74EA9C9-8E18-4D2A-8CF6-73C6206C5DA6";
/// <summary>
/// Guid for the Dropdown list multiple datatype.
/// </summary>
public const string DropDownListMultiple = "928639ED-9C73-4028-920C-1E55DBB68783";
/// <summary>
/// Guid for the Dropdown list multiple, publish keys datatype.
/// </summary>
public const string DropdownlistMultiplePublishKeys = "928639AA-9C73-4028-920C-1E55DBB68783";
/// <summary>
/// Guid for the Dropdown list, publishing keys datatype.
/// </summary>
public const string DropdownlistPublishingKeys = "A74EA9E1-8E18-4D2A-8CF6-73C6206C5DA6";
/// <summary>
/// Guid for the Folder browser datatype.
/// </summary>
public const string FolderBrowser = "CCCD4AE9-F399-4ED2-8038-2E88D19E810C";
/// <summary>
/// Guid for the Image Cropper datatype.
/// </summary>
public const string ImageCropper = "7A2D436C-34C2-410F-898F-4A23B3D79F54";
/// <summary>
/// Guid for the Integer datatype.
/// </summary>
public const string Integer = "1413AFCB-D19A-4173-8E9A-68288D2A73B8";
/// <summary>
/// Guid for the Macro Container datatype.
/// </summary>
public const string MacroContainer = "474FCFF8-9D2D-11DE-ABC6-AD7A56D89593";
/// <summary>
/// Guid for the Media Picker datatype.
/// </summary>
public const string MediaPicker = "EAD69342-F06D-4253-83AC-28000225583B";
/// <summary>
/// Guid for the Member Picker datatype.
/// </summary>
public const string MemberPicker = "39F533E4-0551-4505-A64B-E0425C5CE775";
/// <summary>
/// Guid for the Multi-Node Tree Picker datatype
/// </summary>
public const string MultiNodeTreePicker = "7E062C13-7C41-4AD9-B389-41D88AEEF87C";
/// <summary>
/// Guid for the Multiple Textstring datatype.
/// </summary>
public const string MultipleTextstring = "5359AD0B-06CC-4182-92BD-0A9117448D3F";
/// <summary>
/// Guid for the No edit datatype.
/// </summary>
public const string NoEdit = "6C738306-4C17-4D88-B9BD-6546F3771597";
/// <summary>
/// Guid for the Picker Relations datatype.
/// </summary>
public const string PickerRelations = "83396FF2-2E39-4A90-9066-17F5F3989374";
/// <summary>
/// Guid for the Radiobutton list datatype.
/// </summary>
public const string RadioButtonList = "A52C7C1C-C330-476E-8605-D63D3B84B6A6";
/// <summary>
/// Guid for the Related Links datatype.
/// </summary>
public const string RelatedLinks = "71B8AD1A-8DC2-425C-B6B8-FAA158075E63";
/// <summary>
/// Guid for the Slider datatype.
/// </summary>
public const string Slider = "29E790E6-26B3-438A-B21F-908663A0B19E";
/// <summary>
/// Guid for the Tags datatype.
/// </summary>
public const string Tags = "4023E540-92F5-11DD-AD8B-0800200C9A66";
/// <summary>
/// Guid for the Textbox datatype.
/// </summary>
public const string Textbox = "EC15C1E5-9D90-422A-AA52-4F7622C63BEA";
/// <summary>
/// Guid for the Textbox multiple datatype.
/// </summary>
public const string TextboxMultiple = "67DB8357-EF57-493E-91AC-936D305E0F2A";
/// <summary>
/// Guid for the TinyMCE v3 wysiwyg datatype.
/// </summary>
public const string TinyMCEv3 = "5E9B75AE-FACE-41C8-B47E-5F4B0FD82F83";
/// <summary>
/// Guid for the TinyMCE wysiwyg (deprecated, upgrade to tinymce v3!) datatype.
/// </summary>
public const string TinyMCE = "83722133-F80C-4273-BDB6-1BEFAA04A612";
/// <summary>
/// Guid for the True/False (Ja/Nej) datatype.
/// </summary>
public const string TrueFalse = "38B352C1-E9F8-4FD8-9324-9A2EAB06D97A";
/// <summary>
/// Guid for the Ultimate Picker datatype.
/// </summary>
public const string UltimatePicker = "CDBF0B5D-5CB2-445F-BC12-FCAAEC07CF2C";
/// <summary>
/// Guid for the UltraSimpleEditor datatype.
/// </summary>
public const string UltraSimpleEditor = "60B7DABF-99CD-41EB-B8E9-4D2E669BBDE9";
/// <summary>
/// Guid for the Umbraco Usercontrol Wrapper datatype.
/// </summary>
public const string UmbracoUserControlWrapper = "D15E1281-E456-4B24-AA86-1DDA3E4299D5";
/// <summary>
/// Guid for the Upload field datatype.
/// </summary>
public const string UploadField = "5032A6E6-69E3-491D-BB28-CD31CD11086C";
/// <summary>
/// Guid for the XPath CheckBoxList datatype.
/// </summary>
public const string XPathCheckBoxList = "34451D92-D270-49BA-8C7F-EE55BFEEE1CB";
/// <summary>
/// Guid for the XPath DropDownList datatype.
/// </summary>
public const string XPathDropDownList = "173A96AE-00ED-4A7C-9F76-4B53D4A0A1B9";
}
}
}
+26
View File
@@ -0,0 +1,26 @@
namespace Umbraco.Core
{
public static partial class Constants
{
/// <summary>
/// Defines the identifiers for Umbraco system nodes.
/// </summary>
public static class System
{
/// <summary>
/// The integer identifier for global system root node.
/// </summary>
public const int Root = -1;
/// <summary>
/// The integer identifier for content's recycle bin.
/// </summary>
public const int RecycleBinContent = -20;
/// <summary>
/// The integer identifier for media's recycle bin.
/// </summary>
public const int RecycleBinMedia = -21;
}
}
}
+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";
}
}
}
+10
View File
@@ -0,0 +1,10 @@
namespace Umbraco.Core
{
/// <summary>
/// Constants all the identifiers within the Umbraco core.
/// </summary>
public static partial class Constants
{
// generic constants can go here
}
}
+46
View File
@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.UI;
namespace Umbraco.Core
{
internal static class ControlExtensions
{
/// <summary>
/// Recursively finds a control with the specified identifier.
/// </summary>
/// <typeparam name="T">
/// The type of control to be found.
/// </typeparam>
/// <param name="parent">
/// The parent control from which the search will start.
/// </param>
/// <param name="id">
/// The identifier of the control to be found.
/// </param>
/// <returns>
/// The control with the specified identifier, otherwise <see langword="null"/> if the control
/// is not found.
/// </returns>
public static T FindControlRecursive<T>(this Control parent, string id) where T : Control
{
if ((parent is T) && (parent.ID == id))
{
return (T)parent;
}
foreach (Control control in parent.Controls)
{
var foundControl = FindControlRecursive<T>(control, id);
if (foundControl != null)
{
return foundControl;
}
}
return default(T);
}
}
}
+196 -62
View File
@@ -1,18 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Umbraco.Core.Cache;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Models.PublishedContent;
using Umbraco.Core.ObjectResolution;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.Mappers;
using Umbraco.Core.Persistence.Migrations;
using Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSix;
using Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionSixZeroOne;
using Umbraco.Core.Persistence.SqlSyntax;
using Umbraco.Core.Persistence.UnitOfWork;
using Umbraco.Core.Profiling;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.PropertyEditors.ValueConverters;
using Umbraco.Core.Publishing;
using Umbraco.Core.Macros;
using Umbraco.Core.Services;
using Umbraco.Core.Sync;
using Umbraco.Core.Strings;
using MigrationsVersionFourNineZero = Umbraco.Core.Persistence.Migrations.Upgrades.TargetVersionFourNineZero;
namespace Umbraco.Core
@@ -30,41 +37,134 @@ namespace Umbraco.Core
private bool _isInitialized = false;
private bool _isStarted = false;
private bool _isComplete = false;
private readonly UmbracoApplicationBase _umbracoApplication;
protected ApplicationContext ApplicationContext { get; private set; }
protected CacheHelper ApplicationCache { get; set; }
public virtual IBootManager Initialize()
protected UmbracoApplicationBase UmbracoApplication
{
get { return _umbracoApplication; }
}
public CoreBootManager(UmbracoApplicationBase umbracoApplication)
{
if (umbracoApplication == null) throw new ArgumentNullException("umbracoApplication");
_umbracoApplication = umbracoApplication;
}
public virtual IBootManager Initialize()
{
if (_isInitialized)
throw new InvalidOperationException("The boot manager has already been initialized");
LogHelper.Info<CoreBootManager>("Umbraco application starting");
_timer = DisposableTimer.Start(x => LogHelper.Info<CoreBootManager>("Umbraco application startup complete" + " (took " + x + "ms)"));
InitializeProfilerResolver();
CreateApplicationCache();
_timer = DisposableTimer.DebugDuration<CoreBootManager>("Umbraco application starting", "Umbraco application startup complete");
//create database and service contexts for the app context
var dbFactory = new DefaultDatabaseFactory(GlobalSettings.UmbracoConnectionName);
Database.Mapper = new PetaPocoMapper();
var dbContext = new DatabaseContext(dbFactory);
var serviceContext = new ServiceContext(
new PetaPocoUnitOfWorkProvider(dbFactory),
new FileUnitOfWorkProvider(),
new PublishingStrategy());
//create the ApplicationContext
ApplicationContext = ApplicationContext.Current = new ApplicationContext(dbContext, serviceContext);
var serviceContext = new ServiceContext(
new PetaPocoUnitOfWorkProvider(dbFactory),
new FileUnitOfWorkProvider(),
new PublishingStrategy(),
ApplicationCache);
//initialize the DatabaseContext
dbContext.Initialize();
CreateApplicationContext(dbContext, serviceContext);
InitializeApplicationEventsResolver();
InitializeResolvers();
//initialize the DatabaseContext
dbContext.Initialize();
//now we need to call the initialize methods
ApplicationEventsResolver.Current.ApplicationEventHandlers
.ForEach(x => x.OnApplicationInitialized(UmbracoApplication, ApplicationContext));
_isInitialized = true;
return this;
}
/// <summary>
/// Creates and assigns the application context singleton
/// </summary>
/// <param name="dbContext"></param>
/// <param name="serviceContext"></param>
protected virtual void CreateApplicationContext(DatabaseContext dbContext, ServiceContext serviceContext)
{
//create the ApplicationContext
ApplicationContext = ApplicationContext.Current = new ApplicationContext(dbContext, serviceContext, ApplicationCache);
}
/// <summary>
/// Creates and assigns the ApplicationCache based on a new instance of System.Web.Caching.Cache
/// </summary>
protected virtual void CreateApplicationCache()
{
var cacheHelper = new CacheHelper(
new ObjectCacheRuntimeCacheProvider(),
new StaticCacheProvider(),
//we have no request based cache when not running in web-based context
new NullCacheProvider());
ApplicationCache = cacheHelper;
}
/// <summary>
/// Special method to initialize the ProfilerResolver
/// </summary>
protected virtual void InitializeProfilerResolver()
{
//By default we'll initialize the Log profiler (in the web project, we'll override with the web profiler)
ProfilerResolver.Current = new ProfilerResolver(new LogProfiler())
{
//This is another special resolver that needs to be resolvable before resolution is frozen
//since it is used for profiling the application startup
CanResolveBeforeFrozen = true
};
}
/// <summary>
/// Special method to initialize the ApplicationEventsResolver and any modifications required for it such
/// as adding custom types to the resolver.
/// </summary>
protected virtual void InitializeApplicationEventsResolver()
{
//find and initialize the application startup handlers, we need to initialize this resolver here because
//it is a special resolver where they need to be instantiated first before any other resolvers in order to bind to
//events and to call their events during bootup.
//ApplicationStartupHandler.RegisterHandlers();
//... and set the special flag to let us resolve before frozen resolution
ApplicationEventsResolver.Current = new ApplicationEventsResolver(
PluginManager.Current.ResolveApplicationStartupHandlers())
{
CanResolveBeforeFrozen = true
};
// add custom types here that are internal, if needed
//ApplicationEventsResolver.Current.AddType<>();
}
/// <summary>
/// Special method to extend the use of Umbraco by enabling the consumer to overwrite
/// the absolute path to the root of an Umbraco site/solution, which is used for stuff
/// like Umbraco.Core.IO.IOHelper.MapPath etc.
/// </summary>
/// <param name="rootPath">Absolute</param>
protected virtual void InitializeApplicationRootPath(string rootPath)
{
Umbraco.Core.IO.IOHelper.SetRootDirectory(rootPath);
}
/// <summary>
/// Fires after initialization and calls the callback to allow for customizations to occur
/// Fires after initialization and calls the callback to allow for customizations to occur &
/// Ensure that the OnApplicationStarting methods of the IApplicationEvents are called
/// </summary>
/// <param name="afterStartup"></param>
/// <returns></returns>
@@ -73,10 +173,14 @@ namespace Umbraco.Core
if (_isStarted)
throw new InvalidOperationException("The boot manager has already been initialized");
if (afterStartup != null)
{
afterStartup(ApplicationContext.Current);
}
//call OnApplicationStarting of each application events handler
ApplicationEventsResolver.Current.ApplicationEventHandlers
.ForEach(x => x.OnApplicationStarting(UmbracoApplication, ApplicationContext));
if (afterStartup != null)
{
afterStartup(ApplicationContext.Current);
}
_isStarted = true;
@@ -93,75 +197,105 @@ namespace Umbraco.Core
if (_isComplete)
throw new InvalidOperationException("The boot manager has already been completed");
//freeze resolution to not allow Resolvers to be modified
Resolution.Freeze();
FreezeResolution();
//stop the timer and log the output
_timer.Dispose();
if (afterComplete != null)
{
afterComplete(ApplicationContext.Current);
}
//call OnApplicationStarting of each application events handler
ApplicationEventsResolver.Current.ApplicationEventHandlers
.ForEach(x => x.OnApplicationStarted(UmbracoApplication, ApplicationContext));
//Now, startup all of our legacy startup handler
ApplicationEventsResolver.Current.InstantiateLegacyStartupHandlers();
if (afterComplete != null)
{
afterComplete(ApplicationContext.Current);
}
_isComplete = true;
// we're ready to serve content!
ApplicationContext.IsReady = true;
return this;
}
/// <summary>
/// Freeze resolution to not allow Resolvers to be modified
/// </summary>
protected virtual void FreezeResolution()
{
Resolution.Freeze();
}
/// <summary>
/// Create the resolvers
/// </summary>
protected virtual void InitializeResolvers()
{
{
//by default we'll use the standard configuration based sync
ServerRegistrarResolver.Current = new ServerRegistrarResolver(
new ConfigServerRegistrar());
//by default (outside of the web) we'll use the default server messenger without
//supplying a username/password, this will automatically disable distributed calls
// .. we'll override this in the WebBootManager
ServerMessengerResolver.Current = new ServerMessengerResolver(
new DefaultServerMessenger());
MappingResolver.Current = new MappingResolver(
() => PluginManager.Current.ResolveAssignedMapperTypes());
RepositoryResolver.Current = new RepositoryResolver(
new RepositoryFactory());
new RepositoryFactory(ApplicationCache));
SqlSyntaxProvidersResolver.Current = new SqlSyntaxProvidersResolver(
new[] { typeof(MySqlSyntaxProvider), typeof(SqlCeSyntaxProvider), typeof(SqlServerSyntaxProvider) })
{
CanResolveBeforeFrozen = true
};
CacheRefreshersResolver.Current = new CacheRefreshersResolver(
PluginManager.Current.ResolveCacheRefreshers());
() => PluginManager.Current.ResolveCacheRefreshers());
DataTypesResolver.Current = new DataTypesResolver(
PluginManager.Current.ResolveDataTypes());
() => PluginManager.Current.ResolveDataTypes());
MacroFieldEditorsResolver.Current = new MacroFieldEditorsResolver(
PluginManager.Current.ResolveMacroRenderings());
() => PluginManager.Current.ResolveMacroRenderings());
PackageActionsResolver.Current = new PackageActionsResolver(
PluginManager.Current.ResolvePackageActions());
() => PluginManager.Current.ResolvePackageActions());
ActionsResolver.Current = new ActionsResolver(
PluginManager.Current.ResolveActions());
() => PluginManager.Current.ResolveActions());
MacroPropertyTypeResolver.Current = new MacroPropertyTypeResolver(
PluginManager.Current.ResolveMacroPropertyTypes());
//the database migration objects
MigrationResolver.Current = new MigrationResolver(
() => PluginManager.Current.ResolveMigrationTypes());
//TODO: Y U NO WORK?
//MigrationResolver.Current = new MigrationResolver(
// PluginManager.Current.ResolveMigrationTypes());
//the database migration objects
MigrationResolver.Current = new MigrationResolver(new List<Type>
{
typeof (MigrationsVersionFourNineZero.RemoveUmbracoAppConstraints),
typeof (DeleteAppTables),
typeof (EnsureAppsTreesUpdated),
typeof (MoveMasterContentTypeData),
typeof (NewCmsContentType2ContentTypeTable),
typeof (RemoveMasterContentTypeColumn),
typeof (RenameCmsTabTable),
typeof (RenameTabIdColumn),
typeof (UpdateCmsContentTypeAllowedContentTypeTable),
typeof (UpdateCmsContentTypeTable),
typeof (UpdateCmsContentVersionTable),
typeof (UpdateCmsPropertyTypeGroupTable)
});
PropertyEditorValueConvertersResolver.Current = new PropertyEditorValueConvertersResolver(
// todo: remove once we drop IPropertyEditorValueConverter support.
PropertyEditorValueConvertersResolver.Current = new PropertyEditorValueConvertersResolver(
PluginManager.Current.ResolvePropertyEditorValueConverters());
//add the internal ones, these are not public currently so need to add them manually
PropertyEditorValueConvertersResolver.Current.AddType<DatePickerPropertyEditorValueConverter>();
PropertyEditorValueConvertersResolver.Current.AddType<TinyMcePropertyEditorValueConverter>();
PropertyEditorValueConvertersResolver.Current.AddType<YesNoPropertyEditorValueConverter>();
}
// initialize the new property value converters by discovering IPropertyValueConverter
PropertyValueConvertersResolver.Current = new PropertyValueConvertersResolver(
PluginManager.Current.ResolveTypes<IPropertyValueConverter>());
// use the new DefaultShortStringHelper
ShortStringHelperResolver.Current = new ShortStringHelperResolver(
//new LegacyShortStringHelper());
new DefaultShortStringHelper().WithDefaultConfig());
UrlSegmentProviderResolver.Current = new UrlSegmentProviderResolver(
typeof (DefaultUrlSegmentProvider));
// keep it internal for now
PublishedContentModelFactoryResolver.Current = new PublishedContentModelFactoryResolver();
// new PublishedContentModelFactoryImpl());
}
}
}
@@ -22,8 +22,8 @@ namespace Umbraco.Core
if (value is string)
{
var str = (string)value;
if (str == null || str.Length == 0 || str == "0") return false;
if (str == "1") return true;
if (str == "0" || str == "") return false;
}
return base.ConvertFrom(context, culture, value);
+2 -2
View File
@@ -14,7 +14,7 @@ namespace Umbraco.Core
/// Constructor
/// </summary>
/// <param name="dataTypes"></param>
internal DataTypesResolver(IEnumerable<Type> dataTypes)
internal DataTypesResolver(Func<IEnumerable<Type>> dataTypes)
: base(dataTypes)
{
@@ -27,7 +27,7 @@ namespace Umbraco.Core
{
get
{
EnsureIdsAreTracked();
EnsureIsInitialized();
return Values;
}
}
+339 -51
View File
@@ -9,6 +9,7 @@ using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.Migrations;
using Umbraco.Core.Persistence.Migrations.Initial;
using Umbraco.Core.Persistence.SqlSyntax;
namespace Umbraco.Core
@@ -21,14 +22,15 @@ namespace Umbraco.Core
/// </remarks>
public class DatabaseContext
{
private readonly IDatabaseFactory _factory;
private bool _configured;
private readonly IDatabaseFactory _factory;
private bool _configured;
private string _connectionString;
private string _providerName;
private DatabaseSchemaResult _result;
internal DatabaseContext(IDatabaseFactory factory)
public DatabaseContext(IDatabaseFactory factory)
{
_factory = factory;
_factory = factory;
}
/// <summary>
@@ -107,10 +109,10 @@ namespace Umbraco.Core
/// <summary>
/// Configure a ConnectionString for the embedded database.
/// </summary>
public void ConfigureDatabaseConnection()
public void ConfigureEmbeddedDatabaseConnection()
{
const string providerName = "System.Data.SqlServerCe.4.0";
const string connectionString = "Datasource=|DataDirectory|Umbraco.sdf";
const string connectionString = @"Data Source=|DataDirectory|\Umbraco.sdf;Flush Interval=1;";
SaveConnectionString(connectionString, providerName);
@@ -149,14 +151,14 @@ namespace Umbraco.Core
{
string connectionString;
string providerName = "System.Data.SqlClient";
if(databaseProvider.ToLower().Contains("mysql"))
if (databaseProvider.ToLower().Contains("mysql"))
{
providerName = "MySql.Data.MySqlClient";
connectionString = string.Format("Server={0}; Database={1};Uid={2};Pwd={3}", server, databaseName, user, password);
}
else if(databaseProvider.ToLower().Contains("azure"))
else if (databaseProvider.ToLower().Contains("azure"))
{
connectionString = string.Format("Server=tcp:{0}.database.windows.net;Database={1};User ID={2}@{0};Password={3}", server, databaseName, user, password);
connectionString = BuildAzureConnectionString(server, databaseName, user, password);
}
else
{
@@ -167,6 +169,66 @@ namespace Umbraco.Core
Initialize(providerName);
}
/// <summary>
/// Configures a ConnectionString for the Umbraco database that uses Microsoft SQL Server integrated security.
/// </summary>
/// <param name="server">Name or address of the database server</param>
/// <param name="databaseName">Name of the database</param>
public void ConfigureIntegratedSecurityDatabaseConnection(string server, string databaseName)
{
const string providerName = "System.Data.SqlClient";
string connectionString = String.Format("Server={0};Database={1};Integrated Security=true", server, databaseName);
SaveConnectionString(connectionString, providerName);
Initialize(providerName);
}
internal string BuildAzureConnectionString(string server, string databaseName, string user, string password)
{
if (server.Contains(".") && ServerStartsWithTcp(server) == false)
server = string.Format("tcp:{0}", server);
if (server.Contains(".") == false && ServerStartsWithTcp(server))
{
string serverName = server.Contains(",")
? server.Substring(0, server.IndexOf(",", StringComparison.Ordinal))
: server;
var portAddition = string.Empty;
if (server.Contains(","))
portAddition = server.Substring(server.IndexOf(",", StringComparison.Ordinal));
server = string.Format("{0}.database.windows.net{1}", serverName, portAddition);
}
if (ServerStartsWithTcp(server) == false)
server = string.Format("tcp:{0}.database.windows.net", server);
if (server.Contains(",") == false)
server = string.Format("{0},1433", server);
if (user.Contains("@") == false)
{
var userDomain = server;
if (ServerStartsWithTcp(server))
userDomain = userDomain.Substring(userDomain.IndexOf(":", StringComparison.Ordinal) + 1);
if (userDomain.Contains("."))
userDomain = userDomain.Substring(0, userDomain.IndexOf(".", StringComparison.Ordinal));
user = string.Format("{0}@{1}", user, userDomain);
}
return string.Format("Server={0};Database={1};User ID={2};Password={3}", server, databaseName, user, password);
}
private static bool ServerStartsWithTcp(string server)
{
return server.ToLower().StartsWith("tcp:".ToLower());
}
/// <summary>
/// Saves the connection string as a proper .net ConnectionString and the legacy AppSettings key/value.
/// </summary>
@@ -204,7 +266,7 @@ namespace Umbraco.Core
// Update connectionString if it exists, or else create a new appSetting for the given key and value
var setting = connectionstrings.Descendants("add").FirstOrDefault(s => s.Attribute("name").Value == GlobalSettings.UmbracoConnectionName);
if (setting == null)
connectionstrings.Add(new XElement("add",
connectionstrings.Add(new XElement("add",
new XAttribute("name", GlobalSettings.UmbracoConnectionName),
new XAttribute("connectionString", connectionStringSettings),
new XAttribute("providerName", providerName)));
@@ -216,7 +278,7 @@ namespace Umbraco.Core
xml.Save(fileName, SaveOptions.DisableFormatting);
LogHelper.Info<DatabaseContext>("Configured new ConnectionString: " + connectionString);
LogHelper.Info<DatabaseContext>("Configured a new ConnectionString using the '" + providerName + "' provider.");
}
/// <summary>
@@ -230,32 +292,57 @@ namespace Umbraco.Core
/// </remarks>
internal void Initialize()
{
if (ConfigurationManager.ConnectionStrings[GlobalSettings.UmbracoConnectionName] != null)
var databaseSettings = ConfigurationManager.ConnectionStrings[GlobalSettings.UmbracoConnectionName];
if (databaseSettings != null && string.IsNullOrWhiteSpace(databaseSettings.ConnectionString) == false && string.IsNullOrWhiteSpace(databaseSettings.ProviderName) == false)
{
var providerName = "System.Data.SqlClient";
string connString = null;
if (!string.IsNullOrEmpty(ConfigurationManager.ConnectionStrings[GlobalSettings.UmbracoConnectionName].ProviderName))
{
providerName = ConfigurationManager.ConnectionStrings[GlobalSettings.UmbracoConnectionName].ProviderName;
_connectionString =
ConfigurationManager.ConnectionStrings[GlobalSettings.UmbracoConnectionName].ConnectionString;
connString = ConfigurationManager.ConnectionStrings[GlobalSettings.UmbracoConnectionName].ConnectionString;
}
Initialize(providerName, connString);
if (providerName.StartsWith("MySql"))
DetermineSqlServerVersion();
}
else if (ConfigurationManager.AppSettings.ContainsKey(GlobalSettings.UmbracoConnectionName) && string.IsNullOrEmpty(ConfigurationManager.AppSettings[GlobalSettings.UmbracoConnectionName]) == false)
{
//A valid connectionstring does not exist, but the legacy appSettings key was found, so we'll reconfigure the conn.string.
var legacyConnString = ConfigurationManager.AppSettings[GlobalSettings.UmbracoConnectionName];
if (legacyConnString.ToLowerInvariant().Contains("sqlce4umbraco"))
{
SyntaxConfig.SqlSyntaxProvider = MySqlSyntax.Provider;
ConfigureEmbeddedDatabaseConnection();
}
else if (providerName.Contains("SqlServerCe"))
else if (legacyConnString.ToLowerInvariant().Contains("tcp:"))
{
SyntaxConfig.SqlSyntaxProvider = SqlCeSyntax.Provider;
//Must be sql azure
SaveConnectionString(legacyConnString, "System.Data.SqlClient");
Initialize("System.Data.SqlClient");
}
else if (legacyConnString.ToLowerInvariant().Contains("datalayer=mysql"))
{
//Must be MySql
//Need to strip the datalayer part off
var connectionStringWithoutDatalayer = string.Empty;
foreach (var variable in legacyConnString.Split(';').Where(x => x.ToLowerInvariant().StartsWith("datalayer") == false))
connectionStringWithoutDatalayer = string.Format("{0}{1};", connectionStringWithoutDatalayer, variable);
SaveConnectionString(connectionStringWithoutDatalayer, "MySql.Data.MySqlClient");
Initialize("MySql.Data.MySqlClient");
}
else
{
SyntaxConfig.SqlSyntaxProvider = SqlServerSyntax.Provider;
//Must be sql
SaveConnectionString(legacyConnString, "System.Data.SqlClient");
Initialize("System.Data.SqlClient");
}
_configured = true;
//Remove the legacy connection string, so we don't end up in a loop if something goes wrong.
GlobalSettings.RemoveSetting(GlobalSettings.UmbracoConnectionName);
DetermineSqlServerVersion();
}
else
{
@@ -265,55 +352,256 @@ namespace Umbraco.Core
internal void Initialize(string providerName)
{
if (providerName.StartsWith("MySql"))
{
SyntaxConfig.SqlSyntaxProvider = MySqlSyntax.Provider;
}
else if (providerName.Contains("SqlServerCe"))
{
SyntaxConfig.SqlSyntaxProvider = SqlCeSyntax.Provider;
}
else
{
SyntaxConfig.SqlSyntaxProvider = SqlServerSyntax.Provider;
}
_providerName = providerName;
_configured = true;
try
{
SqlSyntaxContext.SqlSyntaxProvider =
SqlSyntaxProvidersResolver.Current.GetByProviderNameOrDefault(providerName);
_configured = true;
}
catch (Exception e)
{
_configured = false;
LogHelper.Info<DatabaseContext>("Initialization of the DatabaseContext failed with following error: " + e.Message);
LogHelper.Info<DatabaseContext>(e.StackTrace);
}
}
internal Result CreateDatabaseSchemaAndDataOrUpgrade()
internal void Initialize(string providerName, string connectionString)
{
_connectionString = connectionString;
Initialize(providerName);
}
/// <summary>
/// Set the lazy resolution of determining the SQL server version if that is the db type we're using
/// </summary>
private void DetermineSqlServerVersion()
{
var sqlServerSyntax = SqlSyntaxContext.SqlSyntaxProvider as SqlServerSyntaxProvider;
if (sqlServerSyntax != null)
{
//this will not execute now, it is lazy so will only execute when we need to actually know
// the sql server version.
sqlServerSyntax.VersionName = new Lazy<SqlServerVersionName>(() =>
{
try
{
var database = this._factory.CreateDatabase();
var version = database.ExecuteScalar<string>("SELECT SERVERPROPERTY('productversion')");
var firstPart = version.Split('.')[0];
switch (firstPart)
{
case "11":
return SqlServerVersionName.V2012;
case "10":
return SqlServerVersionName.V2008;
case "9":
return SqlServerVersionName.V2005;
case "8":
return SqlServerVersionName.V2000;
case "7":
return SqlServerVersionName.V7;
default:
return SqlServerVersionName.Other;
}
}
catch (Exception)
{
return SqlServerVersionName.Invalid;
}
});
}
}
internal DatabaseSchemaResult ValidateDatabaseSchema()
{
if (_configured == false || (string.IsNullOrEmpty(_connectionString) || string.IsNullOrEmpty(ProviderName)))
return new DatabaseSchemaResult();
if (_result == null)
{
return new Result{Message = "Database configuration is invalid", Success = false, Percentage = "10"};
var database = new UmbracoDatabase(_connectionString, ProviderName);
var dbSchema = new DatabaseSchemaCreation(database);
_result = dbSchema.ValidateSchema();
}
return _result;
}
internal Result CreateDatabaseSchemaAndData()
{
var readyForInstall = CheckReadyForInstall();
if (readyForInstall.Success == false)
{
return readyForInstall.Result;
}
try
{
LogHelper.Info<DatabaseContext>("Database configuration status: Started");
string message;
var database = new UmbracoDatabase(_connectionString, ProviderName);
var supportsCaseInsensitiveQueries = SqlSyntaxContext.SqlSyntaxProvider.SupportsCaseInsensitiveQueries(database);
if (supportsCaseInsensitiveQueries == false)
{
message = "<p>&nbsp;</p><p>The database you're trying to use does not support case insensitive queries. <br />We currently do not support these types of databases.</p>" +
"<p>You can fix this by changing 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>";
return new Result { Message = message, Success = false, Percentage = "15" };
}
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" };
}
//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);
//If Configuration Status is empty its a new install - otherwise upgrade the existing
if (string.IsNullOrEmpty(GlobalSettings.ConfigurationStatus))
{
database.CreateDatabaseSchema();
}
else
{
var configuredVersion = new Version(GlobalSettings.ConfigurationStatus);
var targetVersion = UmbracoVersion.Current;
var runner = new MigrationRunner(configuredVersion, targetVersion, GlobalSettings.UmbracoMigrationName);
var upgraded = runner.Execute(database, true);
}
var supportsCaseInsensitiveQueries = SqlSyntaxContext.SqlSyntaxProvider.SupportsCaseInsensitiveQueries(database);
var message = GetResultMessageForMySql(supportsCaseInsensitiveQueries);
var schemaResult = ValidateDatabaseSchema();
var installedVersion = schemaResult.DetermineInstalledVersion();
return new Result { Message = "Installation completed!", Success = true, Percentage = "100" };
//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>";
//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" };
}
catch (Exception ex)
{
return new Result { Message = ex.Message, 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; }
+47
View File
@@ -0,0 +1,47 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Umbraco.Core
{
public static class DateTimeExtensions
{
/// <summary>
/// Returns the DateTime as an ISO formatted string that is globally expectable
/// </summary>
/// <param name="dt"></param>
/// <returns></returns>
public static string ToIsoString(this DateTime dt)
{
return dt.ToString("yyyy-MM-dd HH:mm:ss");
}
public static DateTime TruncateTo(this DateTime dt, DateTruncate truncateTo)
{
if (truncateTo == DateTruncate.Year)
return new DateTime(dt.Year, 0, 0);
if (truncateTo == DateTruncate.Month)
return new DateTime(dt.Year, dt.Month, 0);
if (truncateTo == DateTruncate.Day)
return new DateTime(dt.Year, dt.Month, dt.Day);
if (truncateTo == DateTruncate.Hour)
return new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, 0, 0);
if (truncateTo == DateTruncate.Minute)
return new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, 0);
return new DateTime(dt.Year, dt.Month, dt.Day, dt.Hour, dt.Minute, dt.Second);
}
public enum DateTruncate
{
Year,
Month,
Day,
Hour,
Minute,
Second
}
}
}
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Dictionary
/// <summary>
/// Resolves the current CultureDictionaryFactory
/// </summary>
internal class CultureDictionaryFactoryResolver : SingleObjectResolverBase<CultureDictionaryFactoryResolver, ICultureDictionaryFactory>
internal sealed class CultureDictionaryFactoryResolver : SingleObjectResolverBase<CultureDictionaryFactoryResolver, ICultureDictionaryFactory>
{
internal CultureDictionaryFactoryResolver(ICultureDictionaryFactory factory)
: base(factory)
+112 -24
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
@@ -10,10 +11,60 @@ using System.Web;
namespace Umbraco.Core
{
///<summary>
/// Extension methods for dictionary
/// Extension methods for dictionary & concurrentdictionary
///</summary>
internal static class DictionaryExtensions
{
/// <summary>
/// Updates an item with the specified key with the specified value
/// </summary>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TValue"></typeparam>
/// <param name="dict"></param>
/// <param name="key"></param>
/// <param name="updateFactory"></param>
/// <returns></returns>
/// <remarks>
/// Taken from: http://stackoverflow.com/questions/12240219/is-there-a-way-to-use-concurrentdictionary-tryupdate-with-a-lambda-expression
///
/// If there is an item in the dictionary with the key, it will keep trying to update it until it can
/// </remarks>
public static bool TryUpdate<TKey, TValue>(this ConcurrentDictionary<TKey, TValue> dict, TKey key, Func<TValue, TValue> updateFactory)
{
TValue curValue;
while (dict.TryGetValue(key, out curValue))
{
if (dict.TryUpdate(key, updateFactory(curValue), curValue))
return true;
//if we're looping either the key was removed by another thread, or another thread
//changed the value, so we start again.
}
return false;
}
/// <summary>
/// Updates an item with the specified key with the specified value
/// </summary>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TValue"></typeparam>
/// <param name="dict"></param>
/// <param name="key"></param>
/// <param name="updateFactory"></param>
/// <returns></returns>
/// <remarks>
/// Taken from: http://stackoverflow.com/questions/12240219/is-there-a-way-to-use-concurrentdictionary-tryupdate-with-a-lambda-expression
///
/// WARNING: If the value changes after we've retreived it, then the item will not be updated
/// </remarks>
public static bool TryUpdateOptimisitic<TKey, TValue>(this ConcurrentDictionary<TKey, TValue> dict, TKey key, Func<TValue, TValue> updateFactory)
{
TValue curValue;
if (!dict.TryGetValue(key, out curValue))
return false;
dict.TryUpdate(key, updateFactory(curValue), curValue);
return true;//note we return true whether we succeed or not, see explanation below.
}
/// <summary>
/// Converts a dictionary to another type by only using direct casting
/// </summary>
@@ -80,30 +131,48 @@ namespace Umbraco.Core
return n;
}
/// <summary>
/// Returns a new dictionary of this ... others merged leftward.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <typeparam name="TK"></typeparam>
/// <typeparam name="TV"></typeparam>
/// <param name="me"></param>
/// <param name="others"></param>
/// <returns></returns>
/// <remarks>
/// Reference: http://stackoverflow.com/questions/294138/merging-dictionaries-in-c
/// </remarks>
public static T MergeLeft<T, TK, TV>(this T me, params IDictionary<TK, TV>[] others)
where T : IDictionary<TK, TV>, new()
{
var newMap = new T();
foreach (var p in (new List<IDictionary<TK, TV>> { me }).Concat(others).SelectMany(src => src))
{
newMap[p.Key] = p.Value;
}
return newMap;
}
/// <summary>
/// Merges all key/values from the sources dictionaries into the destination dictionary
/// </summary>
/// <typeparam name="T"></typeparam>
/// <typeparam name="TK"></typeparam>
/// <typeparam name="TV"></typeparam>
/// <param name="destination">The source dictionary to merge other dictionaries into</param>
/// <param name="overwrite">
/// By default all values will be retained in the destination if the same keys exist in the sources but
/// this can changed if overwrite = true, then any key/value found in any of the sources will overwritten in the destination. Note that
/// it will just use the last found key/value if this is true.
/// </param>
/// <param name="sources">The other dictionaries to merge values from</param>
public static void MergeLeft<T, TK, TV>(this T destination, IEnumerable<IDictionary<TK, TV>> sources, bool overwrite = false)
where T : IDictionary<TK, TV>
{
foreach (var p in sources.SelectMany(src => src).Where(p => overwrite || destination.ContainsKey(p.Key) == false))
{
destination[p.Key] = p.Value;
}
}
/// <summary>
/// <summary>
/// Merges all key/values from the sources dictionaries into the destination dictionary
/// </summary>
/// <typeparam name="T"></typeparam>
/// <typeparam name="TK"></typeparam>
/// <typeparam name="TV"></typeparam>
/// <param name="destination">The source dictionary to merge other dictionaries into</param>
/// <param name="overwrite">
/// By default all values will be retained in the destination if the same keys exist in the sources but
/// this can changed if overwrite = true, then any key/value found in any of the sources will overwritten in the destination. Note that
/// it will just use the last found key/value if this is true.
/// </param>
/// <param name="source">The other dictionary to merge values from</param>
public static void MergeLeft<T, TK, TV>(this T destination, IDictionary<TK, TV> source, bool overwrite = false)
where T : IDictionary<TK, TV>
{
destination.MergeLeft(new[] {source}, overwrite);
}
/// <summary>
/// Returns the value of the key value based on the key, if the key is not found, a null value is returned
/// </summary>
/// <typeparam name="TKey">The type of the key.</typeparam>
@@ -136,6 +205,25 @@ namespace Umbraco.Core
return String.Empty;
}
/// <summary>
/// Returns the value of the key value based on the key as it's string value, if the key is not found or is an empty string, then the provided default value is returned
/// </summary>
/// <param name="d"></param>
/// <param name="key"></param>
/// <param name="defaultValue"></param>
/// <returns></returns>
public static string GetValueAsString<TKey, TVal>(this IDictionary<TKey, TVal> d, TKey key, string defaultValue)
{
if (d.ContainsKey(key))
{
var value = d[key].ToString();
if (value != string.Empty)
return value;
}
return defaultValue;
}
/// <summary>contains key ignore case.</summary>
/// <param name="dictionary">The dictionary.</param>
/// <param name="key">The key.</param>
+158 -83
View File
@@ -1,6 +1,8 @@
using System;
using System.Diagnostics;
using System.Web;
using Umbraco.Core.Logging;
using Umbraco.Core.Profiling;
namespace Umbraco.Core
{
@@ -9,11 +11,17 @@ namespace Umbraco.Core
/// </summary>
/// <example>
/// <code>
///
/// using (DisposableTimer.TraceDuration{MyType}("starting", "finished"))
/// {
/// Thread.Sleep(567);
/// }
///
/// Console.WriteLine("Testing Stopwatchdisposable, should be 567:");
// using (var timer = new DisposableTimer(result => Console.WriteLine("Took {0}ms", result)))
// {
// Thread.Sleep(567);
// }
/// using (var timer = new DisposableTimer(result => Console.WriteLine("Took {0}ms", result)))
/// {
/// Thread.Sleep(567);
/// }
/// </code>
/// </example>
public class DisposableTimer : DisposableObject
@@ -24,7 +32,7 @@ namespace Umbraco.Core
protected DisposableTimer(Action<long> callback)
{
_callback = callback;
}
}
public Stopwatch Stopwatch
{
@@ -36,96 +44,149 @@ namespace Umbraco.Core
/// </summary>
/// <param name="callback">The callback.</param>
/// <returns></returns>
[Obsolete("Use either TraceDuration or DebugDuration instead of using Start")]
public static DisposableTimer Start(Action<long> callback)
{
return new DisposableTimer(callback);
}
public static DisposableTimer TraceDuration<T>(Func<string> startMessage, Func<string> completeMessage)
{
return TraceDuration(typeof(T), startMessage, completeMessage);
}
#region TraceDuration
public static DisposableTimer TraceDuration<T>(Func<string> startMessage, Func<string> completeMessage)
{
return TraceDuration(typeof(T), startMessage, completeMessage);
}
public static DisposableTimer TraceDuration(Type loggerType, Func<string> startMessage, Func<string> completeMessage)
{
LogHelper.Debug(loggerType, startMessage);
return new DisposableTimer(x => LogHelper.Info(loggerType, () => completeMessage() + " (took " + x + "ms)"));
}
public static DisposableTimer TraceDuration(Type loggerType, Func<string> startMessage, Func<string> completeMessage)
{
var startMsg = startMessage();
LogHelper.Info(loggerType, startMsg);
if (HttpContext.Current != null)
HttpContext.Current.Trace.Write("Start: " + startMsg);
var profiler = ActivateProfiler(loggerType, startMsg);
return new DisposableTimer(x =>
{
profiler.DisposeIfDisposable();
LogHelper.Info(loggerType, () => completeMessage() + " (took " + x + "ms)");
if (HttpContext.Current != null)
HttpContext.Current.Trace.Write("End: " + startMsg);
});
}
/// <summary>
/// Adds a start and end log entry as Info and tracks how long it takes until disposed.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="startMessage"></param>
/// <param name="completeMessage"></param>
/// <returns></returns>
public static DisposableTimer TraceDuration<T>(string startMessage, string completeMessage)
{
return TraceDuration(typeof(T), startMessage, completeMessage);
}
/// <summary>
/// Adds a start and end log entry as Info and tracks how long it takes until disposed.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="startMessage"></param>
/// <param name="completeMessage"></param>
/// <returns></returns>
public static DisposableTimer TraceDuration<T>(string startMessage, string completeMessage)
{
return TraceDuration(typeof(T), startMessage, completeMessage);
}
/// <summary>
/// Adds a start and end log entry as Info and tracks how long it takes until disposed.
/// </summary>
/// <param name="loggerType"></param>
/// <param name="startMessage"></param>
/// <param name="completeMessage"></param>
/// <returns></returns>
public static DisposableTimer TraceDuration(Type loggerType, string startMessage, string completeMessage)
{
LogHelper.Info(loggerType, () => startMessage);
return new DisposableTimer(x => LogHelper.Info(loggerType, () => completeMessage + " (took " + x + "ms)"));
}
public static DisposableTimer TraceDuration<T>(string startMessage)
{
return TraceDuration(typeof(T), startMessage, "Complete");
}
/// <summary>
/// Adds a start and end log entry as Debug and tracks how long it takes until disposed.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="startMessage"></param>
/// <param name="completeMessage"></param>
/// <returns></returns>
public static DisposableTimer DebugDuration<T>(string startMessage, string completeMessage)
{
return DebugDuration(typeof(T), startMessage, completeMessage);
}
/// <summary>
/// Adds a start and end log entry as Info and tracks how long it takes until disposed.
/// </summary>
/// <param name="loggerType"></param>
/// <param name="startMessage"></param>
/// <param name="completeMessage"></param>
/// <returns></returns>
public static DisposableTimer TraceDuration(Type loggerType, string startMessage, string completeMessage)
{
LogHelper.Info(loggerType, startMessage);
if (HttpContext.Current != null)
HttpContext.Current.Trace.Write("Start: " + startMessage);
var profiler = ActivateProfiler(loggerType, startMessage);
return new DisposableTimer(x =>
{
profiler.DisposeIfDisposable();
LogHelper.Info(loggerType, () => completeMessage + " (took " + x + "ms)");
if (HttpContext.Current != null)
HttpContext.Current.Trace.Write("End: " + startMessage);
});
}
#endregion
/// <summary>
/// Adds a start and end log entry as Debug and tracks how long it takes until disposed.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="startMessage"></param>
/// <param name="completeMessage"></param>
/// <returns></returns>
public static DisposableTimer DebugDuration<T>(Func<string> startMessage, Func<string> completeMessage)
{
return DebugDuration(typeof(T), startMessage, completeMessage);
}
#region DebugDuration
/// <summary>
/// Adds a start and end log entry as Debug and tracks how long it takes until disposed.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="startMessage"></param>
/// <param name="completeMessage"></param>
/// <returns></returns>
public static DisposableTimer DebugDuration<T>(string startMessage, string completeMessage)
{
return DebugDuration(typeof(T), startMessage, completeMessage);
}
/// <summary>
/// Adds a start and end log entry as Debug and tracks how long it takes until disposed.
/// </summary>
/// <param name="loggerType"></param>
/// <param name="startMessage"></param>
/// <param name="completeMessage"></param>
/// <returns></returns>
public static DisposableTimer DebugDuration(Type loggerType, string startMessage, string completeMessage)
{
LogHelper.Debug(loggerType, () => startMessage);
return new DisposableTimer(x => LogHelper.Debug(loggerType, () => completeMessage + " (took " + x + "ms)"));
}
public static DisposableTimer DebugDuration<T>(string startMessage)
{
return DebugDuration(typeof(T), startMessage, "Complete");
}
/// <summary>
/// Adds a start and end log entry as Debug and tracks how long it takes until disposed.
/// </summary>
/// <param name="loggerType"></param>
/// <param name="startMessage"></param>
/// <param name="completeMessage"></param>
/// <returns></returns>
public static DisposableTimer DebugDuration(Type loggerType, Func<string> startMessage, Func<string> completeMessage)
{
LogHelper.Debug(loggerType, startMessage);
return new DisposableTimer(x => LogHelper.Debug(loggerType, () => completeMessage() + " (took " + x + "ms)"));
}
/// <summary>
/// Adds a start and end log entry as Debug and tracks how long it takes until disposed.
/// </summary>
/// <typeparam name="T"></typeparam>
/// <param name="startMessage"></param>
/// <param name="completeMessage"></param>
/// <returns></returns>
public static DisposableTimer DebugDuration<T>(Func<string> startMessage, Func<string> completeMessage)
{
return DebugDuration(typeof(T), startMessage, completeMessage);
}
/// <summary>
/// Adds a start and end log entry as Debug and tracks how long it takes until disposed.
/// </summary>
/// <param name="loggerType"></param>
/// <param name="startMessage"></param>
/// <param name="completeMessage"></param>
/// <returns></returns>
public static DisposableTimer DebugDuration(Type loggerType, string startMessage, string completeMessage)
{
LogHelper.Debug(loggerType, startMessage);
if (HttpContext.Current != null)
HttpContext.Current.Trace.Write("Start: " + startMessage);
var profiler = ActivateProfiler(loggerType, startMessage);
return new DisposableTimer(x =>
{
profiler.DisposeIfDisposable();
LogHelper.Debug(loggerType, () => completeMessage + " (took " + x + "ms)");
if (HttpContext.Current != null)
HttpContext.Current.Trace.Write("End: " + startMessage);
});
}
/// <summary>
/// Adds a start and end log entry as Debug and tracks how long it takes until disposed.
/// </summary>
/// <param name="loggerType"></param>
/// <param name="startMessage"></param>
/// <param name="completeMessage"></param>
/// <returns></returns>
public static DisposableTimer DebugDuration(Type loggerType, Func<string> startMessage, Func<string> completeMessage)
{
var msg = startMessage();
LogHelper.Debug(loggerType, msg);
if (HttpContext.Current != null)
HttpContext.Current.Trace.Write("Start: " + startMessage);
var profiler = ActivateProfiler(loggerType, msg);
return new DisposableTimer(x =>
{
profiler.DisposeIfDisposable();
LogHelper.Debug(loggerType, () => completeMessage() + " (took " + x + "ms)");
if (HttpContext.Current != null)
HttpContext.Current.Trace.Write("End: " + startMessage);
});
}
#endregion
/// <summary>
/// Handles the disposal of resources. Derived from abstract class <see cref="DisposableObject"/> which handles common required locking logic.
@@ -134,5 +195,19 @@ namespace Umbraco.Core
{
_callback.Invoke(Stopwatch.ElapsedMilliseconds);
}
private static IDisposable ActivateProfiler(Type loggerType, string profileName)
{
try
{
return ProfilerResolver.Current.Profiler.Step(loggerType, profileName);
}
catch (InvalidOperationException)
{
//swallow this exception, it will occur if the ProfilerResolver is not initialized... generally only in
// unit tests.
}
return null;
}
}
}
@@ -82,7 +82,7 @@ namespace Umbraco.Core.Dynamics
null,
thisObject,
args);
return new Attempt<TryInvokeMemberResult>(true, new TryInvokeMemberResult(result, TryInvokeMemberSuccessReason.FoundProperty));
return Attempt.Succeed(new TryInvokeMemberResult(result, TryInvokeMemberSuccessReason.FoundProperty));
}
catch (MissingMethodException)
{
@@ -97,7 +97,7 @@ namespace Umbraco.Core.Dynamics
null,
thisObject,
args);
return new Attempt<TryInvokeMemberResult>(true, new TryInvokeMemberResult(result, TryInvokeMemberSuccessReason.FoundMethod));
return Attempt.Succeed(new TryInvokeMemberResult(result, TryInvokeMemberSuccessReason.FoundMethod));
}
catch (MissingMethodException)
{
@@ -106,13 +106,14 @@ namespace Umbraco.Core.Dynamics
try
{
result = FindAndExecuteExtensionMethod(thisObject, args, binder.Name, findExtensionMethodsOnTypes);
return new Attempt<TryInvokeMemberResult>(true, new TryInvokeMemberResult(result, TryInvokeMemberSuccessReason.FoundExtensionMethod));
return Attempt.Succeed(new TryInvokeMemberResult(result, TryInvokeMemberSuccessReason.FoundExtensionMethod));
}
catch (TargetInvocationException ext)
{
//don't log here, we return this exception because the caller may need to do something specific when
//this exception occurs.
return new Attempt<TryInvokeMemberResult>(ext);
var mresult = new TryInvokeMemberResult(null, TryInvokeMemberSuccessReason.FoundExtensionMethod);
return Attempt<TryInvokeMemberResult>.Fail(mresult, ext);
}
catch (Exception ex)
{
@@ -124,16 +125,17 @@ namespace Umbraco.Core.Dynamics
sb.Append(t + ",");
}
LogHelper.Error<DynamicInstanceHelper>(sb.ToString(), ex);
return new Attempt<TryInvokeMemberResult>(ex);
var mresult = new TryInvokeMemberResult(null, TryInvokeMemberSuccessReason.FoundExtensionMethod);
return Attempt<TryInvokeMemberResult>.Fail(mresult, ex);
}
}
return Attempt<TryInvokeMemberResult>.False;
return Attempt<TryInvokeMemberResult>.Fail();
}
}
catch (Exception ex)
{
LogHelper.Error<DynamicInstanceHelper>("An unhandled exception occurred in method TryInvokeMember", ex);
return new Attempt<TryInvokeMemberResult>(ex);
return Attempt<TryInvokeMemberResult>.Fail(ex);
}
}
+31 -9
View File
@@ -11,78 +11,101 @@ namespace Umbraco.Core.Dynamics
//Because it's IEnumerable, if the user is actually trying @Model.TextPages or similar
//it will still return an enumerable object (assuming the call actually failed because there were no children of that type)
//but in .Where, if they use a property that doesn't exist, the lambda will bypass this and return false
// returned when TryGetMember fails on a DynamicPublishedContent
//
// so if user does @CurrentPage.TextPages it will get something that is enumerable (but empty)
// note - not sure I understand the stuff about .Where, though
public class DynamicNull : DynamicObject, IEnumerable, IHtmlString
{
public static readonly DynamicNull Null = new DynamicNull();
private DynamicNull() {}
public IEnumerator GetEnumerator()
{
return (new List<DynamicNull>()).GetEnumerator();
}
public DynamicNull Where(string predicate, params object[] values)
{
return this;
}
public DynamicNull OrderBy(string orderBy)
{
return this;
}
public DynamicNull ToContentSet()
{
return this;
}
public int Count()
{
return 0;
}
public override string ToString()
{
return string.Empty;
}
public override bool TryGetMember(GetMemberBinder binder, out object result)
{
result = this;
return true;
}
public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result)
{
result = this;
return true;
}
public override bool TryInvoke(InvokeBinder binder, object[] args, out object result)
{
result = this;
return true;
}
public bool IsNull()
{
return true;
}
public bool HasValue()
{
return false;
}
public string Name
{
get
{
return string.Empty;
}
get { return string.Empty; }
}
public int Id
{
get
{
return 0;
}
get { return 0; }
}
public static implicit operator bool(DynamicNull n)
{
return false;
}
public static implicit operator DateTime(DynamicNull n)
{
return DateTime.MinValue;
}
public static implicit operator int(DynamicNull n)
{
return 0;
}
public static implicit operator string(DynamicNull n)
{
return string.Empty;
@@ -92,6 +115,5 @@ namespace Umbraco.Core.Dynamics
{
return string.Empty;
}
}
}
+220 -122
View File
@@ -9,35 +9,106 @@ using System.Xml.XPath;
using System.Collections;
using System.IO;
using System.Web;
using Umbraco.Core;
namespace Umbraco.Core.Dynamics
{
[TypeConverter(typeof(DynamicXmlConverter))]
public class DynamicXml : DynamicObject, IEnumerable<DynamicXml>, IEnumerable<XElement>
{
/// <summary>
/// Returns the XElement used to create the DynamicXml structure
/// </summary>
public XElement BaseElement { get; set; }
/// <summary>
/// Returns the raw XElement used to create the DynamicXml structure if one was specified otherwise returns the
/// same value as BaseElement.
/// </summary>
/// <remarks>
/// This is purely used for when an instance of DynamicXml is created with the overload that supports
/// passing in both a raw xml version and a dash-stripped xml version. Otherwise this value is exactly the
/// same as BaseElement.
/// </remarks>
public XElement RawXmlElement { get; internal set; }
/// <summary>
/// Constructor
/// </summary>
/// <param name="baseElement"></param>
public DynamicXml(XElement baseElement)
{
this.BaseElement = baseElement;
if (baseElement == null) return;
//same
RawXmlElement = baseElement;
BaseElement = baseElement;
}
public DynamicXml(string xml)
/// <summary>
/// When this constructor is used the BaseElement becomes equivalent to the strippedXml structure
/// </summary>
/// <param name="strippedXml"></param>
/// <param name="rawXml"></param>
internal DynamicXml(XElement strippedXml, XElement rawXml)
{
var baseElement = XElement.Parse(xml);
this.BaseElement = baseElement;
if (rawXml == null) return;
if (strippedXml == null) return;
RawXmlElement = rawXml;
BaseElement = strippedXml;
}
/// <summary>
/// When this constructor is used the BaseElement becomes equivalent to the strippedXml structure
/// </summary>
/// <param name="strippedXml"></param>
/// <param name="rawXml"></param>
internal DynamicXml(string strippedXml, string rawXml)
{
if (rawXml == null) return;
if (strippedXml == null) return;
RawXmlElement = XElement.Parse(rawXml);
BaseElement = XElement.Parse(strippedXml);
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="xml"></param>
public DynamicXml(string xml)
{
if (xml.IsNullOrWhiteSpace()) return;
var baseElement = XElement.Parse(xml);
//same
RawXmlElement = baseElement;
BaseElement = baseElement;
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="xpni"></param>
public DynamicXml(XPathNodeIterator xpni)
{
if (xpni != null)
{
if (xpni.Current != null)
{
var xml = xpni.Current.OuterXml;
var baseElement = XElement.Parse(xml);
this.BaseElement = baseElement;
}
}
if (xpni == null) return;
if (xpni.Current == null) return;
//TODO: OuterXml is really bad for performance! Should actually use the XPathNodeIterator api
var xml = xpni.Current.OuterXml;
var baseElement = XElement.Parse(xml);
//same
RawXmlElement = baseElement;
BaseElement = baseElement;
}
/// <summary>
/// Returns the InnertText based on the BaseElement object
/// </summary>
public string InnerText
{
get
@@ -45,17 +116,34 @@ namespace Umbraco.Core.Dynamics
return BaseElement.Value;
}
}
/// <summary>
/// Returns the string representation of the BaseElement object
/// </summary>
/// <returns></returns>
public string ToXml()
{
return BaseElement.ToString(SaveOptions.DisableFormatting);
}
/// <summary>
/// Returns the string representation of the RawXmlElement object
/// </summary>
/// <returns></returns>
public string ToRawXml()
{
return RawXmlElement.ToString(SaveOptions.DisableFormatting);
}
public override bool TryGetIndex(GetIndexBinder binder, object[] indexes, out object result)
{
int index = 0;
if (indexes.Length > 0)
{
index = (int)indexes[0];
result = new DynamicXml(this.BaseElement.Elements().ToList()[index]);
result = new DynamicXml(
RawXmlElement.Elements().ElementAt(index),
BaseElement.Elements().ElementAt(index));
return true;
}
return base.TryGetIndex(binder, indexes, out result);
@@ -64,12 +152,12 @@ namespace Umbraco.Core.Dynamics
{
if (args.Length == 0 && binder.Name == "ToXml")
{
result = this.BaseElement.ToString();
result = BaseElement.ToString();
return true;
}
if (args.Length == 1 && binder.Name == "XPath")
{
var elements = this.BaseElement.XPathSelectElements(args[0].ToString());
var elements = BaseElement.XPathSelectElements(args[0].ToString());
HandleIEnumerableXElement(elements, out result);
return true; //anyway
}
@@ -102,7 +190,9 @@ namespace Umbraco.Core.Dynamics
}
else if (attempt.Result.ObjectResult is IEnumerable<DynamicXml>)
{
result = ((IEnumerable<DynamicXml>)attempt.Result.ObjectResult).Select(x => new DynamicXml(x.BaseElement));
result = ((IEnumerable<DynamicXml>) attempt.Result.ObjectResult).Select(x => new DynamicXml(
x.RawXmlElement,
x.BaseElement));
}
}
}
@@ -111,9 +201,9 @@ namespace Umbraco.Core.Dynamics
//this is the result of an extension method execution gone wrong so we return dynamic null
if (attempt.Result.Reason == DynamicInstanceHelper.TryInvokeMemberSuccessReason.FoundExtensionMethod
&& attempt.Error != null && attempt.Error is TargetInvocationException)
&& attempt.Exception != null && attempt.Exception is TargetInvocationException)
{
result = new DynamicNull();
result = DynamicNull.Null;
return true;
}
@@ -123,55 +213,102 @@ namespace Umbraco.Core.Dynamics
}
public override bool TryGetMember(GetMemberBinder binder, out object result)
{
if (BaseElement == null || binder == null)
if (RawXmlElement == null || binder == null)
{
result = null;
return false;
}
//Go ahead and try to fetch all of the elements matching the member name, and wrap them
var elements = BaseElement.Elements(binder.Name);
if (!elements.Any() && BaseElement.Name == "root" && BaseElement.Elements().Count() == 1)
{
//no elements matched, lets try first child
elements = BaseElement.Elements().ElementAt(0).Elements(binder.Name);
}
if (HandleIEnumerableXElement(elements, out result))
{
return true;
}
else
{
//Ok, so no elements matched, so lets try attributes
IEnumerable<string> attributes = BaseElement.Attributes(binder.Name).Select(attr => attr.Value);
int count = attributes.Count();
if (count > 0)
//Check if the name matches a node based on the BaseElement (which if the correct ctor is used, will be dash stripped)
var elementByNameAttempt = CheckNodeNameMatch(binder.Name, BaseElement);
if (elementByNameAttempt.Success)
{
if (HandleIEnumerableXElement(elementByNameAttempt.Result, out result))
{
if (count > 1)
result = attributes; //more than one attribute matched, lets return the collection
else
result = attributes.FirstOrDefault(); //only one attribute matched, lets just return it
return true;
}
}
return true; // return true because we matched
//Check if the name matches a node based on the BaseElement (which if the correct ctor is used, will be dash stripped)
var attributeByNameAttempt = CheckAttributeNameMatch(binder.Name, BaseElement);
if (attributeByNameAttempt.Success)
{
if (attributeByNameAttempt.Result.Count() > 1)
{
//more than one attribute matched, lets return the collection
result = attributeByNameAttempt.Result;
}
else
{
//no attributes matched, lets try first child
if (BaseElement.Name == "root" && BaseElement.Elements().Count() == 1)
{
attributes = BaseElement.Elements().ElementAt(0).Attributes(binder.Name).Select(attr => attr.Value);
count = attributes.Count();
if (count > 1)
result = attributes; //more than one attribute matched, lets return the collection
else
result = attributes.FirstOrDefault(); //only one attribute matched, lets just return it
//only one attribute matched, lets just return it
result = attributeByNameAttempt.Result.FirstOrDefault();
}
return true;
}
return true; // return true because we matched
}
return base.TryGetMember(binder, out result);
}
/// <summary>
/// Checks if the 'name' matches any attributes of xmlElement
/// </summary>
/// <param name="name">The name to match</param>
/// <param name="xmlElement">The xml element to check against</param>
/// <returns></returns>
private static Attempt<IEnumerable<string>> CheckAttributeNameMatch(string name, XElement xmlElement)
{
var attributes = xmlElement.Attributes(name).Select(attr => attr.Value).ToArray();
if (attributes.Any())
{
return Attempt<IEnumerable<string>>.Succeed(attributes);
}
if (!attributes.Any() && xmlElement.Name == "root" && xmlElement.Elements().Count() == 1)
{
//no elements matched and this node is called 'root' and only has one child... lets see if it matches.
var childElements = xmlElement.Elements().ElementAt(0).Attributes(name).Select(attr => attr.Value).ToArray();
if (childElements.Any())
{
//we've found a match by the first child of an element called 'root' (strange, but sure)
return Attempt<IEnumerable<string>>.Succeed(childElements);
}
}
//no deal
return Attempt<IEnumerable<string>>.Fail();
}
/// <summary>
/// Checks if the 'name' matches any elements of xmlElement
/// </summary>
/// <param name="name">The name to match</param>
/// <param name="xmlElement">The xml element to check against</param>
/// <returns></returns>
private Attempt<IEnumerable<XElement>> CheckNodeNameMatch(string name, XElement xmlElement)
{
//Go ahead and try to fetch all of the elements matching the member name, and wrap them
var elements = xmlElement.Elements(name).ToArray();
//Check if we've got any matches, if so then return true
if (elements.Any())
{
return Attempt<IEnumerable<XElement>>.Succeed(elements);
}
if (!elements.Any() && xmlElement.Name == "root" && xmlElement.Elements().Count() == 1)
{
//no elements matched and this node is called 'root' and only has one child... lets see if it matches.
var childElements = xmlElement.Elements().ElementAt(0).Elements(name).ToArray();
if (childElements.Any())
{
//we've found a match by the first child of an element called 'root' (strange, but sure)
return Attempt<IEnumerable<XElement>>.Succeed(childElements);
}
}
return base.TryGetMember(binder, out result);
//no deal
return Attempt<IEnumerable<XElement>>.Fail();
}
private bool HandleIEnumerableXElement(IEnumerable<XElement> elements, out object result)
@@ -193,7 +330,7 @@ namespace Umbraco.Core.Dynamics
//We have more than one matching element, so let's return the collection
//elements is IEnumerable<DynamicXml>
//but we want to be able to re-enter this code
XElement root = new XElement(XName.Get("root"));
var root = new XElement(XName.Get("root"));
root.Add(elements);
result = new DynamicXml(root);
@@ -205,10 +342,16 @@ namespace Umbraco.Core.Dynamics
result = null;
return false;
}
/// <summary>
/// Executes an XPath expression over the BaseElement object
/// </summary>
/// <param name="expression"></param>
/// <returns></returns>
public DynamicXml XPath(string expression)
{
var matched = this.BaseElement.XPathSelectElements(expression);
DynamicXml root = new DynamicXml("<results/>");
var matched = BaseElement.XPathSelectElements(expression);
var root = new DynamicXml("<results/>");
foreach (var element in matched)
{
root.BaseElement.Add(element);
@@ -217,7 +360,7 @@ namespace Umbraco.Core.Dynamics
}
/// <summary>
/// Return the string version of Xml
/// Return the string version of the BaseElement object
/// </summary>
/// <returns></returns>
public override string ToString()
@@ -231,23 +374,23 @@ namespace Umbraco.Core.Dynamics
}
public DynamicXml Find(string expression)
{
return new DynamicXml(this.BaseElement.XPathSelectElements(expression).FirstOrDefault());
return new DynamicXml(BaseElement.XPathSelectElements(expression).FirstOrDefault());
}
public DynamicXml Find(string attributeName, object value)
{
string expression = string.Format("//*[{0}='{1}']", attributeName, value);
return new DynamicXml(this.BaseElement.XPathSelectElements(expression).FirstOrDefault());
return new DynamicXml(BaseElement.XPathSelectElements(expression).FirstOrDefault());
}
IEnumerator<XElement> IEnumerable<XElement>.GetEnumerator()
{
return this.BaseElement.Elements().GetEnumerator();
return BaseElement.Elements().GetEnumerator();
}
public IEnumerator<DynamicXml> GetEnumerator()
{
return this.BaseElement.Elements().Select(e => new DynamicXml(e)).GetEnumerator();
return BaseElement.Elements().Select(e => new DynamicXml(e)).GetEnumerator();
}
IEnumerator IEnumerable.GetEnumerator()
@@ -310,7 +453,7 @@ namespace Umbraco.Core.Dynamics
}
public bool IsPosition(int index)
{
if (this.BaseElement == null || this.BaseElement.Parent == null)
if (BaseElement == null || BaseElement.Parent == null)
{
return false;
}
@@ -318,7 +461,7 @@ namespace Umbraco.Core.Dynamics
}
public HtmlString IsPosition(int index, string valueIfTrue)
{
if (this.BaseElement == null || this.BaseElement.Parent == null)
if (BaseElement == null || BaseElement.Parent == null)
{
return new HtmlString(string.Empty);
}
@@ -326,7 +469,7 @@ namespace Umbraco.Core.Dynamics
}
public HtmlString IsPosition(int index, string valueIfTrue, string valueIfFalse)
{
if (this.BaseElement == null || this.BaseElement.Parent == null)
if (BaseElement == null || BaseElement.Parent == null)
{
return new HtmlString(valueIfFalse);
}
@@ -334,7 +477,7 @@ namespace Umbraco.Core.Dynamics
}
public bool IsModZero(int modulus)
{
if (this.BaseElement == null || this.BaseElement.Parent == null)
if (BaseElement == null || BaseElement.Parent == null)
{
return false;
}
@@ -342,7 +485,7 @@ namespace Umbraco.Core.Dynamics
}
public HtmlString IsModZero(int modulus, string valueIfTrue)
{
if (this.BaseElement == null || this.BaseElement.Parent == null)
if (BaseElement == null || BaseElement.Parent == null)
{
return new HtmlString(string.Empty);
}
@@ -350,7 +493,7 @@ namespace Umbraco.Core.Dynamics
}
public HtmlString IsModZero(int modulus, string valueIfTrue, string valueIfFalse)
{
if (this.BaseElement == null || this.BaseElement.Parent == null)
if (BaseElement == null || BaseElement.Parent == null)
{
return new HtmlString(valueIfFalse);
}
@@ -359,7 +502,7 @@ namespace Umbraco.Core.Dynamics
public bool IsNotModZero(int modulus)
{
if (this.BaseElement == null || this.BaseElement.Parent == null)
if (BaseElement == null || BaseElement.Parent == null)
{
return false;
}
@@ -367,7 +510,7 @@ namespace Umbraco.Core.Dynamics
}
public HtmlString IsNotModZero(int modulus, string valueIfTrue)
{
if (this.BaseElement == null || this.BaseElement.Parent == null)
if (BaseElement == null || this.BaseElement.Parent == null)
{
return new HtmlString(string.Empty);
}
@@ -573,7 +716,8 @@ namespace Umbraco.Core.Dynamics
}
public IEnumerable<DynamicXml> Descendants(Func<XElement, bool> func)
{
var flattenedNodes = this.BaseElement.Elements().Map(func, (XElement n) => { return n.Elements(); });
//var flattenedNodes = this.BaseElement.Elements().Map(func, n => n.Elements());
var flattenedNodes = this.BaseElement.Elements().SelectMany(n => n.Elements()).Where(func);
return flattenedNodes.ToList().ConvertAll(n => new DynamicXml(n));
}
public IEnumerable<DynamicXml> DescendantsOrSelf()
@@ -582,7 +726,8 @@ namespace Umbraco.Core.Dynamics
}
public IEnumerable<DynamicXml> DescendantsOrSelf(Func<XElement, bool> func)
{
var flattenedNodes = this.BaseElement.Elements().Map(func, (XElement n) => { return n.Elements(); });
//var flattenedNodes = this.BaseElement.Elements().Map(func, n => n.Elements());
var flattenedNodes = this.BaseElement.Elements().SelectMany(n => n.Elements()).Where(func);
var list = new List<DynamicXml>();
list.Add(this);
list.AddRange(flattenedNodes.ToList().ConvertAll(n => new DynamicXml(n)));
@@ -689,57 +834,10 @@ namespace Umbraco.Core.Dynamics
return test(this) ? new HtmlString(valueIfTrue) : new HtmlString(valueIfFalse);
}
[Obsolete("Use XmlHelper.StripDashesInElementOrAttributeNames instead")]
public static string StripDashesInElementOrAttributeNames(string xml)
{
using (MemoryStream outputms = new MemoryStream())
{
using (TextWriter outputtw = new StreamWriter(outputms))
{
using (MemoryStream ms = new MemoryStream())
{
using (TextWriter tw = new StreamWriter(ms))
{
tw.Write(xml);
tw.Flush();
ms.Position = 0;
using (TextReader tr = new StreamReader(ms))
{
bool IsInsideElement = false, IsInsideQuotes = false;
int ic = 0;
while ((ic = tr.Read()) != -1)
{
if (ic == (int)'<' && !IsInsideQuotes)
{
if (tr.Peek() != (int)'!')
{
IsInsideElement = true;
}
}
if (ic == (int)'>' && !IsInsideQuotes)
{
IsInsideElement = false;
}
if (ic == (int)'"')
{
IsInsideQuotes = !IsInsideQuotes;
}
if (!IsInsideElement || ic != (int)'-' || IsInsideQuotes)
{
outputtw.Write((char)ic);
}
}
}
}
}
outputtw.Flush();
outputms.Position = 0;
using (TextReader outputtr = new StreamReader(outputms))
{
return outputtr.ReadToEnd();
}
}
}
return XmlHelper.StripDashesInElementOrAttributeNames(xml);
}
@@ -7,6 +7,58 @@ using System.Xml.Linq;
namespace Umbraco.Core.Dynamics
{
/// <summary>
/// Used to return the raw xml string value from DynamicXml when using type converters
/// </summary>
public class RawXmlString
{
public string Value { get; private set; }
public RawXmlString(string value)
{
Value = value;
}
}
/// <summary>
/// Used to return the raw xml XElement value from DynamicXml when using type converters
/// </summary>
public class RawXElement
{
public XElement Value { get; private set; }
public RawXElement(XElement value)
{
Value = value;
}
}
/// <summary>
/// Used to return the raw xml XElement value from DynamicXml when using type converters
/// </summary>
public class RawXmlElement
{
public XmlElement Value { get; private set; }
public RawXmlElement(XmlElement value)
{
Value = value;
}
}
/// <summary>
/// Used to return the raw xml XmlDocument value from DynamicXml when using type converters
/// </summary>
public class RawXmlDocument
{
public XmlDocument Value { get; private set; }
public RawXmlDocument(XmlDocument value)
{
Value = value;
}
}
/// <summary>
/// A custom type converter for DynamicXml
/// </summary>
@@ -14,7 +66,17 @@ namespace Umbraco.Core.Dynamics
{
public override bool CanConvertTo(ITypeDescriptorContext context, Type sourceType)
{
var convertableTypes = new[] {typeof(string), typeof(XElement), typeof(XmlElement), typeof(XmlDocument)};
var convertableTypes = new[]
{
typeof(string),
typeof(XElement),
typeof(XmlElement),
typeof(XmlDocument),
typeof(RawXmlString),
typeof(RawXElement),
typeof(RawXmlElement),
typeof(RawXmlDocument)
};
return convertableTypes.Any(x => TypeHelper.IsTypeAssignableFrom(x, sourceType))
|| base.CanConvertFrom(context, sourceType);
@@ -34,6 +96,7 @@ namespace Umbraco.Core.Dynamics
{
return value.ToString();
}
//XElement
if (TypeHelper.IsTypeAssignableFrom<XElement>(destinationType))
{
@@ -53,6 +116,34 @@ namespace Umbraco.Core.Dynamics
xDoc.LoadXml(dxml.ToString());
return xDoc;
}
//RAW values:
//string
if (TypeHelper.IsTypeAssignableFrom<RawXmlString>(destinationType))
{
return new RawXmlString(dxml.ToRawXml());
}
//XElement
if (TypeHelper.IsTypeAssignableFrom<RawXElement>(destinationType))
{
return new RawXElement(dxml.RawXmlElement);
}
//XmlElement
if (TypeHelper.IsTypeAssignableFrom<RawXmlElement>(destinationType))
{
var xDoc = new XmlDocument();
xDoc.LoadXml(dxml.ToRawXml());
return new RawXmlElement(xDoc.DocumentElement);
}
//XmlDocument
if (TypeHelper.IsTypeAssignableFrom<RawXmlDocument>(destinationType))
{
var xDoc = new XmlDocument();
xDoc.LoadXml(dxml.ToRawXml());
return new RawXmlDocument(xDoc);
}
return base.ConvertTo(context, culture, value, destinationType);
}
}
@@ -13,7 +13,96 @@ namespace Umbraco.Core.Dynamics
/// Utility class for finding extension methods on a type to execute
/// </summary>
internal static class ExtensionMethodFinder
{
{
private static readonly MethodInfo[] AllExtensionMethods;
static ExtensionMethodFinder()
{
AllExtensionMethods = TypeFinder.GetAssembliesWithKnownExclusions()
// assemblies that contain extension methods
.Where(a => a.IsDefined(typeof(ExtensionAttribute), false))
// types that contain extension methods
.SelectMany(a => a.GetTypes()
.Where(t => t.IsDefined(typeof(ExtensionAttribute), false) && t.IsSealed && t.IsGenericType == false && t.IsNested == false))
// actual extension methods
.SelectMany(t => t.GetMethods(BindingFlags.Static | BindingFlags.Public)
.Where(m => m.IsDefined(typeof(ExtensionAttribute), false)))
// and also IEnumerable<T> extension methods - because the assembly is excluded
.Concat(typeof(Enumerable).GetMethods(BindingFlags.Static | BindingFlags.Public))
.ToArray();
}
// ORIGINAL CODE IS NOT COMPLETE, DOES NOT HANDLE GENERICS, ETC...
// so this is an attempt at fixing things, but it's not done yet
// and do we really want to do this? extension methods are not supported on dynamics, period
// we should use strongly typed content instead of dynamics.
/*
// get all extension methods for type thisType, with name name,
// accepting argsCount arguments (not counting the instance of thisType).
private static IEnumerable<MethodInfo> GetExtensionMethods(Type thisType, string name, int argsCount)
{
var key = string.Format("{0}.{1}::{2}", thisType.FullName, name, argsCount);
var types = thisType.GetBaseTypes(true); // either do this OR have MatchFirstParameter handle the stuff... F*XME
var methods = AllExtensionMethods
.Where(m => m.Name == name)
.Where(m => m.GetParameters().Length == argsCount)
.Where(m => MatchFirstParameter(thisType, m.GetParameters()[0].ParameterType));
// f*xme - is this what we should cache?
return methods;
}
// find out whether the first parameter is a match for thisType
private static bool MatchFirstParameter(Type thisType, Type firstParameterType)
{
return MethodArgZeroHasCorrectTargetType(null, firstParameterType, thisType);
}
// get the single extension method for type thisType, with name name,
// that accepts the arguments in args (which does not contain the instance of thisType).
public static MethodInfo GetExtensionMethod(Type thisType, string name, object[] args)
{
MethodInfo result = null;
foreach (var method in GetExtensionMethods(thisType, name, args.Length).Where(m => MatchParameters(m, args)))
{
if (result == null)
result = method;
else
throw new AmbiguousMatchException("More than one matching extension method was found.");
}
return result;
}
// find out whether the method can accept the arguments
private static bool MatchParameters(MethodInfo method, IList<object> args)
{
var parameters = method.GetParameters();
var i = 0;
for (; i < parameters.Length; ++i)
{
if (MatchParameter(parameters[i].ParameterType, args[i].GetType()) == false)
break;
}
return (i == parameters.Length);
}
internal static bool MatchParameter(Type parameterType, Type argumentType)
{
// public static int DoSomething<T>(Foo foo, T t1, T t2)
// DoSomething(foo, t1, t2) => how can we match?!
return parameterType == argumentType; // f*xme of course!
}
*
*/
// BELOW IS THE ORIGINAL CODE...
/// <summary>
/// Returns all extension methods found matching the definition
/// </summary>
@@ -27,6 +116,10 @@ namespace Umbraco.Core.Dynamics
/// </remarks>
private static IEnumerable<MethodInfo> GetAllExtensionMethods(Type thisType, string name, int argumentCount, bool argsContainsThis)
{
// at *least* we can cache the extension methods discovery
var candidates = AllExtensionMethods;
/*
//only scan assemblies we know to contain extension methods (user assemblies)
var assembliesToScan = TypeFinder.GetAssembliesWithKnownExclusions();
@@ -45,6 +138,7 @@ namespace Umbraco.Core.Dynamics
//add the extension methods defined in IEnumerable
candidates = candidates.Concat(typeof(Enumerable).GetMethods(BindingFlags.Static | BindingFlags.Public));
*/
//filter by name
var methodsByName = candidates.Where(m => m.Name == name);
+31 -28
View File
@@ -5,36 +5,35 @@ using Umbraco.Core.Models;
namespace Umbraco.Core.Dynamics
{
[Obsolete("This class should not be used, it is just referenced by already obsoleted code and will be removed in the future")]
internal static class ExtensionMethods
{
public static IEnumerable<TSource> Map<TSource>(
this IEnumerable<TSource> source,
Func<TSource, bool> selectorFunction,
Func<TSource, IEnumerable<TSource>> getChildrenFunction)
{
if (!source.Any())
{
return source;
}
// Add what we have to the stack
var flattenedList = source.Where(selectorFunction);
// Go through the input enumerable looking for children,
// and add those if we have them
foreach (TSource element in source)
{
var secondInner = getChildrenFunction(element);
if (secondInner.Any())
{
secondInner = secondInner.Map(selectorFunction, getChildrenFunction);
}
flattenedList = flattenedList.Concat(secondInner);
}
return flattenedList;
}
//public static IEnumerable<TSource> Map<TSource>(
// this IEnumerable<TSource> source,
// Func<TSource, bool> selectorFunction,
// Func<TSource, IEnumerable<TSource>> getChildrenFunction)
//{
// if (!source.Any())
// {
// return source;
// }
// // Add what we have to the stack
// var flattenedList = source.Where(selectorFunction);
// // Go through the input enumerable looking for children,
// // and add those if we have them
// foreach (TSource element in source)
// {
// var secondInner = getChildrenFunction(element);
// if (secondInner.Any())
// {
// secondInner = secondInner.Map(selectorFunction, getChildrenFunction);
// }
// flattenedList = flattenedList.Concat(secondInner);
// }
// return flattenedList;
//}
[Obsolete("This method should not be used and will be removed in the future")]
public static bool ContainsAny(this string haystack, IEnumerable<string> needles)
{
if (haystack == null) throw new ArgumentNullException("haystack");
@@ -44,6 +43,7 @@ namespace Umbraco.Core.Dynamics
}
return false;
}
[Obsolete("This method should not be used and will be removed in the future")]
public static bool ContainsAny(this string haystack, params string[] needles)
{
if (haystack == null) throw new ArgumentNullException("haystack");
@@ -53,6 +53,7 @@ namespace Umbraco.Core.Dynamics
}
return false;
}
[Obsolete("This method should not be used and will be removed in the future")]
public static bool ContainsAny(this string haystack, StringComparison comparison, IEnumerable<string> needles)
{
if (haystack == null) throw new ArgumentNullException("haystack");
@@ -62,6 +63,7 @@ namespace Umbraco.Core.Dynamics
}
return false;
}
[Obsolete("This method should not be used and will be removed in the future")]
public static bool ContainsAny(this string haystack, StringComparison comparison, params string[] needles)
{
if (haystack == null) throw new ArgumentNullException("haystack");
@@ -71,12 +73,13 @@ namespace Umbraco.Core.Dynamics
}
return false;
}
[Obsolete("This method should not be used and will be removed in the future")]
public static bool ContainsInsensitive(this string haystack, string needle)
{
if (haystack == null) throw new ArgumentNullException("haystack");
return haystack.IndexOf(needle, StringComparison.CurrentCultureIgnoreCase) >= 0;
}
[Obsolete("This method should not be used and will be removed in the future")]
public static bool HasValue(this string s)
{
return !string.IsNullOrWhiteSpace(s);
+25 -43
View File
@@ -1,65 +1,47 @@
using System;
using Umbraco.Core.Models;
using umbraco.interfaces;
using System.Web;
namespace Umbraco.Core.Dynamics
{
internal class PropertyResult : IPublishedContentProperty, IHtmlString
{
internal PropertyResult(IPublishedContentProperty source, PropertyResultType type)
internal class PropertyResult : IPublishedProperty, IHtmlString
{
private readonly IPublishedProperty _source;
private readonly string _alias;
private readonly object _value;
private readonly PropertyResultType _type;
internal PropertyResult(IPublishedProperty source, PropertyResultType type)
{
if (source == null) throw new ArgumentNullException("source");
Alias = source.Alias;
Value = source.Value;
Version = source.Version;
PropertyType = type;
_type = type;
_source = source;
}
internal PropertyResult(string alias, object value, Guid version, PropertyResultType type)
internal PropertyResult(string alias, object value, Guid version, PropertyResultType type)
{
if (alias == null) throw new ArgumentNullException("alias");
if (value == null) throw new ArgumentNullException("value");
Alias = alias;
Value = value;
Version = version;
PropertyType = type;
_type = type;
_alias = alias;
_value = value;
}
internal PropertyResultType PropertyType { get; private set; }
public string Alias { get; private set; }
internal PropertyResultType PropertyType { get { return _type; } }
public object Value { get; private set; }
/// <summary>
/// Returns the value as a string output, this is used in the final rendering process of a property
/// </summary>
internal string ValueAsString
{
get
{
return Value == null ? "" : Convert.ToString(Value);
}
}
public Guid Version { get; private set; }
/// <summary>
/// The Id of the document for which this property belongs to
/// </summary>
public int DocumentId { get; set; }
/// <summary>
/// The alias of the document type alias for which this property belongs to
/// </summary>
public string DocumentTypeAlias { get; set; }
public string PropertyTypeAlias { get { return _source == null ? _alias : _source.PropertyTypeAlias; } }
public object DataValue { get { return _source == null ? _value : _source.DataValue; } }
public bool HasValue { get { return _source == null || _source.HasValue; } }
public object Value { get { return _source == null ? _value : _source.Value; } }
public object XPathValue { get { return Value == null ? null : Value.ToString(); } }
// implements IHtmlString.ToHtmlString
public string ToHtmlString()
{
return ValueAsString;
var value = Value;
return value == null ? string.Empty : value.ToString();
}
}
}
+65 -14
View File
@@ -13,16 +13,45 @@ namespace Umbraco.Core
{
public static IEnumerable<IEnumerable<T>> InGroupsOf<T>(this IEnumerable<T> source, int groupSize)
{
var i = 0;
var length = source.Count();
if (source == null)
throw new NullReferenceException("source");
while ((i * groupSize) < length)
{
yield return source.Skip(i * groupSize).Take(groupSize);
i++;
}
// enumerate the source only once!
return new InGroupsEnumerator<T>(source, groupSize).Groups();
}
// this class makes sure that the source is enumerated only ONCE
// which means that when it is enumerated, the actual groups content
// has to be evaluated at the same time, and stored in an array.
private class InGroupsEnumerator<T>
{
private readonly IEnumerator<T> _source;
private readonly int _count;
private bool _mightHaveNext;
public InGroupsEnumerator(IEnumerable<T> source, int count)
{
_source = source.GetEnumerator();
_count = count;
_mightHaveNext = true;
}
public IEnumerable<IEnumerable<T>> Groups()
{
while (_mightHaveNext && _source.MoveNext())
yield return Group().ToArray(); // see note above
}
private IEnumerable<T> Group()
{
var c = 0;
do
{
yield return _source.Current;
} while (++c < _count && _source.MoveNext());
_mightHaveNext = c == _count;
}
}
/// <summary>The distinct by.</summary>
/// <param name="source">The source.</param>
@@ -243,23 +272,45 @@ namespace Umbraco.Core
});
}
///<summary>Finds the index of the first item matching an expression in an enumerable.</summary>
///<param name="items">The enumerable to search.</param>
///<param name="predicate">The expression to test the items against.</param>
///<returns>The index of the first matching item, or -1 if no items match.</returns>
/// <summary>
/// Finds the index of the first item matching an expression in an enumerable.
/// </summary>
/// <typeparam name="T">The type of the enumerated objects.</typeparam>
/// <param name="items">The enumerable to search.</param>
/// <param name="predicate">The expression to test the items against.</param>
/// <returns>The index of the first matching item, or -1.</returns>
public static int FindIndex<T>(this IEnumerable<T> items, Func<T, bool> predicate)
{
return FindIndex(items, 0, predicate);
}
/// <summary>
/// Finds the index of the first item matching an expression in an enumerable.
/// </summary>
/// <typeparam name="T">The type of the enumerated objects.</typeparam>
/// <param name="items">The enumerable to search.</param>
/// <param name="startIndex">The index to start at.</param>
/// <param name="predicate">The expression to test the items against.</param>
/// <returns>The index of the first matching item, or -1.</returns>
public static int FindIndex<T>(this IEnumerable<T> items, int startIndex, Func<T, bool> predicate)
{
if (items == null) throw new ArgumentNullException("items");
if (predicate == null) throw new ArgumentNullException("predicate");
if (startIndex < 0) throw new ArgumentOutOfRangeException("startIndex");
var index = startIndex;
if (index > 0)
items = items.Skip(index);
var retVal = 0;
foreach (var item in items)
{
if (predicate(item)) return retVal;
retVal++;
if (predicate(item)) return index;
index++;
}
return -1;
}
///<summary>Finds the index of the first occurence of an item in an enumerable.</summary>
///<param name="items">The enumerable to search.</param>
///<param name="item">The item to find.</param>
@@ -0,0 +1,4 @@
namespace Umbraco.Core.Events
{
internal class DatabaseCreationEventArgs : System.ComponentModel.CancelEventArgs{}
}
@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Umbraco.Core.Events
{
// Provides information on the macro that caused an error
public class MacroErrorEventArgs : System.EventArgs
{
/// <summary>
/// Name of the faulting macro.
/// </summary>
public string Name { get; set; }
/// <summary>
/// Alias of the faulting macro.
/// </summary>
public string Alias { get; set; }
/// <summary>
/// Filename, file path, fully qualified class name, or other key used by the macro engine to do it's processing of the faulting macro.
/// </summary>
public string ItemKey { get; set; }
/// <summary>
/// Exception raised.
/// </summary>
public Exception Exception { get; set; }
/// <summary>
/// Gets or sets the desired behaviour when a matching macro causes an error. See
/// <see cref="MacroErrorBehaviour"/> for definitions. By setting this in your event
/// you can override the default behaviour defined in UmbracoSettings.config.
/// </summary>
/// <value>Macro error behaviour enum.</value>
public MacroErrorBehaviour Behaviour { get; set; }
}
}
+21
View File
@@ -1,3 +1,5 @@
using Umbraco.Core.Models;
namespace Umbraco.Core.Events
{
public class NewEventArgs<TEntity> : CancellableObjectEventArgs<TEntity>
@@ -8,12 +10,26 @@ namespace Umbraco.Core.Events
ParentId = parentId;
}
public NewEventArgs(TEntity eventObject, bool canCancel, string @alias, TEntity parent)
: base(eventObject, canCancel)
{
Alias = alias;
Parent = parent;
}
public NewEventArgs(TEntity eventObject, string @alias, int parentId) : base(eventObject)
{
Alias = alias;
ParentId = parentId;
}
public NewEventArgs(TEntity eventObject, string @alias, TEntity parent)
: base(eventObject)
{
Alias = alias;
Parent = parent;
}
/// <summary>
/// The entity being created
/// </summary>
@@ -31,5 +47,10 @@ namespace Umbraco.Core.Events
/// Gets or Sets the Id of the parent.
/// </summary>
public int ParentId { get; private set; }
/// <summary>
/// Gets or Sets the parent IContent object.
/// </summary>
public TEntity Parent { get; private set; }
}
}
@@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
namespace Umbraco.Core.Events
{
public class RecycleBinEventArgs : CancellableEventArgs
{
public RecycleBinEventArgs(Guid nodeObjectType, IEnumerable<int> ids, List<string> files, bool emptiedSuccessfully)
: base(false)
{
NodeObjectType = nodeObjectType;
Ids = ids;
Files = files;
RecycleBinEmptiedSuccessfully = emptiedSuccessfully;
}
public RecycleBinEventArgs(Guid nodeObjectType, IEnumerable<int> ids, List<string> files)
: base(true)
{
NodeObjectType = nodeObjectType;
Ids = ids;
Files = files;
}
/// <summary>
/// Gets the Id of the node object type of the items
/// being deleted from the Recycle Bin.
/// </summary>
public Guid NodeObjectType { get; private set; }
/// <summary>
/// Gets the list of Ids for each of the items being deleted from the Recycle Bin.
/// </summary>
public IEnumerable<int> Ids { get; private set; }
/// <summary>
/// Gets the list of Files that should be deleted as part
/// of emptying the Recycle Bin.
/// </summary>
public List<string> Files { get; private set; }
/// <summary>
/// Boolean indicating whether the Recycle Bin was emptied successfully
/// </summary>
public bool RecycleBinEmptiedSuccessfully { get; private set; }
/// <summary>
/// Boolean indicating whether this event was fired for the Content's Recycle Bin.
/// </summary>
public bool IsContentRecycleBin
{
get { return NodeObjectType == new Guid(Constants.ObjectTypes.Document); }
}
/// <summary>
/// Boolean indicating whether this event was fired for the Media's Recycle Bin.
/// </summary>
public bool IsMediaRecycleBin
{
get { return NodeObjectType == new Guid(Constants.ObjectTypes.Media); }
}
}
}
@@ -1,9 +1,8 @@
using Umbraco.Core;
using umbraco.interfaces;
namespace Umbraco.Web
namespace Umbraco.Core
{
/// <summary>
/// <summary>
/// Custom IApplicationStartupHandler that auto subscribes to the applications events
/// </summary>
public interface IApplicationEventHandler : IApplicationStartupHandler
@@ -11,23 +10,23 @@ namespace Umbraco.Web
/// <summary>
/// ApplicationContext is created and other static objects that require initialization have been setup
/// </summary>
/// <param name="httpApplication"></param>
/// <param name="umbracoApplication"></param>
/// <param name="applicationContext"></param>
void OnApplicationInitialized(UmbracoApplication httpApplication, ApplicationContext applicationContext);
void OnApplicationInitialized(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext);
/// <summary>
/// All resolvers have been initialized but resolution is not frozen so they can be modified in this method
/// </summary>
/// <param name="httpApplication"></param>
/// <param name="umbracoApplication"></param>
/// <param name="applicationContext"></param>
void OnApplicationStarting(UmbracoApplication httpApplication, ApplicationContext applicationContext);
void OnApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext);
/// <summary>
/// Bootup is completed, this allows you to perform any other bootup logic required for the application.
/// Resolution is frozen so now they can be used to resolve instances.
/// </summary>
/// <param name="httpApplication"></param>
/// <param name="umbracoApplication"></param>
/// <param name="applicationContext"></param>
void OnApplicationStarted(UmbracoApplication httpApplication, ApplicationContext applicationContext);
void OnApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext);
}
}
+14
View File
@@ -0,0 +1,14 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Umbraco.Core
{
/// <summary>
/// Any class implementing this interface that is added to the httpcontext.items keys or values will be disposed of at the end of the request.
/// </summary>
public interface IDisposeOnRequestEnd : IDisposable
{
}
}
+25 -15
View File
@@ -1,37 +1,47 @@
using System.IO;
using System;
using System.IO;
using Umbraco.Core.CodeAnnotations;
namespace Umbraco.Core.IO
{
[UmbracoExperimentalFeature("http://issues.umbraco.org/issue/U4-1156", "Will be declared public after 4.10")]
{
public static class FileSystemExtensions
{
[UmbracoExperimentalFeature("http://issues.umbraco.org/issue/U4-1156", "Will be declared public after 4.10")]
internal static long GetSize(this IFileSystem fs, string path)
public static long GetSize(this IFileSystem fs, string path)
{
var s = fs.OpenFile(path);
var size = s.Length;
s.Close();
using (var s = fs.OpenFile(path))
{
var size = s.Length;
s.Close();
return size;
return size;
}
}
[UmbracoExperimentalFeature("http://issues.umbraco.org/issue/U4-1156", "Will be declared public after 4.10")]
internal static void CopyFile(this IFileSystem fs, string path, string newPath)
public static void CopyFile(this IFileSystem fs, string path, string newPath)
{
fs.AddFile(newPath, fs.OpenFile(path));
}
[UmbracoExperimentalFeature("http://issues.umbraco.org/issue/U4-1156", "Will be declared public after 4.10")]
internal static string GetExtension(this IFileSystem fs, string path)
public static string GetExtension(this IFileSystem fs, string path)
{
return Path.GetExtension(fs.GetFullPath(path));
}
[UmbracoExperimentalFeature("http://issues.umbraco.org/issue/U4-1156", "Will be declared public after 4.10")]
internal static string GetFileName(this IFileSystem fs, string path)
public static string GetFileName(this IFileSystem fs, string path)
{
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);
}
}
}
@@ -5,12 +5,11 @@ using System.Text;
using Umbraco.Core.CodeAnnotations;
namespace Umbraco.Core.IO
{
[UmbracoExperimentalFeature("http://issues.umbraco.org/issue/U4-1156", "Will be declared public after 4.10")]
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
internal class FileSystemProviderAttribute : Attribute
public class FileSystemProviderAttribute : Attribute
{
public string Alias { get; set; }
public string Alias { get; private set; }
public FileSystemProviderAttribute(string alias)
{
@@ -6,8 +6,7 @@ using Umbraco.Core.CodeAnnotations;
namespace Umbraco.Core.IO
{
[UmbracoExperimentalFeature("http://issues.umbraco.org/issue/U4-1156", "Will be declared public after 4.10")]
internal class FileSystemProvider
internal class FileSystemProviderConstants
{
public const string Media = "media";
}
@@ -9,9 +9,8 @@ using Umbraco.Core.CodeAnnotations;
using Umbraco.Core.Configuration;
namespace Umbraco.Core.IO
{
[UmbracoExperimentalFeature("http://issues.umbraco.org/issue/U4-1156", "Will be declared public after 4.10")]
internal class FileSystemProviderManager
{
public class FileSystemProviderManager
{
private readonly FileSystemProvidersSection _config;
@@ -28,7 +27,7 @@ namespace Umbraco.Core.IO
#region Constructors
public FileSystemProviderManager()
internal FileSystemProviderManager()
{
_config = (FileSystemProvidersSection)ConfigurationManager.GetSection("FileSystemProviders");
}
@@ -48,7 +47,15 @@ namespace Umbraco.Core.IO
private readonly ConcurrentDictionary<string, ProviderConstructionInfo> _providerLookup = new ConcurrentDictionary<string, ProviderConstructionInfo>();
private readonly ConcurrentDictionary<Type, string> _wrappedProviderLookup = new ConcurrentDictionary<Type, string>();
public IFileSystem GetFileSystemProvider(string alias)
/// <summary>
/// Returns the underlying (non-typed) file system provider for the alias specified
/// </summary>
/// <param name="alias"></param>
/// <returns></returns>
/// <remarks>
/// It is recommended to use the typed GetFileSystemProvider method instead to get a strongly typed provider instance.
/// </remarks>
public IFileSystem GetUnderlyingFileSystemProvider(string alias)
{
//either get the constructor info from cache or create it and add to cache
var ctorInfo = _providerLookup.GetOrAdd(alias, s =>
@@ -88,6 +95,11 @@ namespace Umbraco.Core.IO
return fs;
}
/// <summary>
/// Returns the strongly typed file system provider
/// </summary>
/// <typeparam name="TProviderTypeFilter"></typeparam>
/// <returns></returns>
public TProviderTypeFilter GetFileSystemProvider<TProviderTypeFilter>()
where TProviderTypeFilter : FileSystemWrapper
{
@@ -111,7 +123,7 @@ namespace Umbraco.Core.IO
return attr.Alias;
});
var innerFs = GetFileSystemProvider(alias);
var innerFs = GetUnderlyingFileSystemProvider(alias);
var outputFs = Activator.CreateInstance(typeof (TProviderTypeFilter), innerFs);
return (TProviderTypeFilter)outputFs;
}
+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);
+119 -72
View File
@@ -1,9 +1,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Globalization;
using System.Reflection;
using System.Text;
using System.IO;
using System.Configuration;
using System.Web;
@@ -36,7 +34,7 @@ namespace Umbraco.Core.IO
if (virtualPath.StartsWith("~"))
retval = virtualPath.Replace("~", SystemDirectories.Root);
if (virtualPath.StartsWith("/") && !virtualPath.StartsWith(SystemDirectories.Root))
if (virtualPath.StartsWith("/") && virtualPath.StartsWith(SystemDirectories.Root) == false)
retval = SystemDirectories.Root + "/" + virtualPath.TrimStart('/');
return retval;
@@ -45,8 +43,10 @@ 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;
else
return VirtualPathUtility.ToAbsolute(virtualPath, SystemDirectories.Root);
}
@@ -67,11 +67,7 @@ namespace Umbraco.Core.IO
if (tag.Groups[1].Success)
url = tag.Groups[1].Value;
// The richtext editor inserts a slash in front of the url. That's why we need this little fix
// if (url.StartsWith("/"))
// text = text.Replace(url, ResolveUrl(url.Substring(1)));
// else
if (!String.IsNullOrEmpty(url))
if (string.IsNullOrEmpty(url) == false)
{
string resolvedUrl = (url.Substring(0, 1) == "/") ? ResolveUrl(url.Substring(1)) : ResolveUrl(url);
text = text.Replace(url, resolvedUrl);
@@ -96,19 +92,15 @@ namespace Umbraco.Core.IO
if (useHttpContext && HttpContext.Current != null)
{
//string retval;
if (!string.IsNullOrEmpty(path) && (path.StartsWith("~") || path.StartsWith(SystemDirectories.Root)))
if (string.IsNullOrEmpty(path) == false && (path.StartsWith("~") || path.StartsWith(SystemDirectories.Root)))
return System.Web.Hosting.HostingEnvironment.MapPath(path);
else
return System.Web.Hosting.HostingEnvironment.MapPath("~/" + path.TrimStart('/'));
}
//var root = (!string.IsNullOrEmpty(System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath))
// ? System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath.TrimEnd(IOHelper.DirSepChar)
// : getRootDirectorySafe();
var root = GetRootDirectorySafe();
var newPath = path.TrimStart('~', '/').Replace('/', IOHelper.DirSepChar);
var retval = root + IOHelper.DirSepChar.ToString() + newPath;
var retval = root + IOHelper.DirSepChar.ToString(CultureInfo.InvariantCulture) + newPath;
return retval;
}
@@ -136,51 +128,98 @@ namespace Umbraco.Core.IO
}
/// <summary>
/// Validates if the current filepath matches a directory where the user is allowed to edit a file
/// Verifies that the current filepath matches a directory where the user is allowed to edit a file.
/// </summary>
/// <param name="filePath">filepath </param>
/// <param name="validDir"></param>
/// <returns>true if valid, throws a FileSecurityException if not</returns>
internal static bool ValidateEditPath(string filePath, string validDir)
/// <param name="filePath">The filepath to validate.</param>
/// <param name="validDir">The valid directory.</param>
/// <returns>A value indicating whether the filepath is valid.</returns>
internal static bool VerifyEditPath(string filePath, string validDir)
{
if (!filePath.StartsWith(MapPath(SystemDirectories.Root)))
if (filePath.StartsWith(MapPath(SystemDirectories.Root)) == false)
filePath = MapPath(filePath);
if (!validDir.StartsWith(MapPath(SystemDirectories.Root)))
if (validDir.StartsWith(MapPath(SystemDirectories.Root)) == false)
validDir = MapPath(validDir);
if (!filePath.StartsWith(validDir))
throw new FileSecurityException(String.Format("The filepath '{0}' is not within an allowed directory for this type of files", filePath.Replace(MapPath(SystemDirectories.Root), "")));
return filePath.StartsWith(validDir);
}
/// <summary>
/// Validates that the current filepath matches a directory where the user is allowed to edit a file.
/// </summary>
/// <param name="filePath">The filepath to validate.</param>
/// <param name="validDir">The valid directory.</param>
/// <returns>True, if the filepath is valid, else an exception is thrown.</returns>
/// <exception cref="FileSecurityException">The filepath is invalid.</exception>
internal static bool ValidateEditPath(string filePath, string validDir)
{
if (VerifyEditPath(filePath, validDir) == false)
throw new FileSecurityException(String.Format("The filepath '{0}' is not within an allowed directory for this type of files", filePath.Replace(MapPath(SystemDirectories.Root), "")));
return true;
}
internal static bool ValidateEditPath(string filePath, IEnumerable<string> validDirs)
/// <summary>
/// Verifies that the current filepath matches one of several directories where the user is allowed to edit a file.
/// </summary>
/// <param name="filePath">The filepath to validate.</param>
/// <param name="validDirs">The valid directories.</param>
/// <returns>A value indicating whether the filepath is valid.</returns>
internal static bool VerifyEditPath(string filePath, IEnumerable<string> validDirs)
{
foreach (var dir in validDirs)
{
var validDir = dir;
if (!filePath.StartsWith(MapPath(SystemDirectories.Root)))
if (filePath.StartsWith(MapPath(SystemDirectories.Root)) == false)
filePath = MapPath(filePath);
if (!validDir.StartsWith(MapPath(SystemDirectories.Root)))
if (validDir.StartsWith(MapPath(SystemDirectories.Root)) == false)
validDir = MapPath(validDir);
if (filePath.StartsWith(validDir))
return true;
}
throw new FileSecurityException(String.Format("The filepath '{0}' is not within an allowed directory for this type of files", filePath.Replace(MapPath(SystemDirectories.Root), "")));
return false;
}
internal static bool ValidateFileExtension(string filePath, List<string> validFileExtensions)
/// <summary>
/// Validates that the current filepath matches one of several directories where the user is allowed to edit a file.
/// </summary>
/// <param name="filePath">The filepath to validate.</param>
/// <param name="validDirs">The valid directories.</param>
/// <returns>True, if the filepath is valid, else an exception is thrown.</returns>
/// <exception cref="FileSecurityException">The filepath is invalid.</exception>
internal static bool ValidateEditPath(string filePath, IEnumerable<string> validDirs)
{
if (!filePath.StartsWith(MapPath(SystemDirectories.Root)))
if (VerifyEditPath(filePath, validDirs) == false)
throw new FileSecurityException(String.Format("The filepath '{0}' is not within an allowed directory for this type of files", filePath.Replace(MapPath(SystemDirectories.Root), "")));
return true;
}
/// <summary>
/// Verifies that the current filepath has one of several authorized extensions.
/// </summary>
/// <param name="filePath">The filepath to validate.</param>
/// <param name="validFileExtensions">The valid extensions.</param>
/// <returns>A value indicating whether the filepath is valid.</returns>
internal static bool VerifyFileExtension(string filePath, List<string> validFileExtensions)
{
if (filePath.StartsWith(MapPath(SystemDirectories.Root)) == false)
filePath = MapPath(filePath);
var f = new FileInfo(filePath);
return validFileExtensions.Contains(f.Extension.Substring(1));
}
if (!validFileExtensions.Contains(f.Extension.Substring(1)))
/// <summary>
/// Validates that the current filepath has one of several authorized extensions.
/// </summary>
/// <param name="filePath">The filepath to validate.</param>
/// <param name="validFileExtensions">The valid extensions.</param>
/// <returns>True, if the filepath is valid, else an exception is thrown.</returns>
/// <exception cref="FileSecurityException">The filepath is invalid.</exception>
internal static bool ValidateFileExtension(string filePath, List<string> validFileExtensions)
{
if (VerifyFileExtension(filePath, validFileExtensions) == false)
throw new FileSecurityException(String.Format("The extension for the current file '{0}' is not of an allowed type for this editor. This is typically controlled from either the installed MacroEngines or based on configuration in /config/umbracoSettings.config", filePath.Replace(MapPath(SystemDirectories.Root), "")));
return true;
}
@@ -193,7 +232,7 @@ namespace Umbraco.Core.IO
/// <returns></returns>
internal static string GetRootDirectorySafe()
{
if (!String.IsNullOrEmpty(_rootDir))
if (string.IsNullOrEmpty(_rootDir) == false)
{
return _rootDir;
}
@@ -202,12 +241,53 @@ namespace Umbraco.Core.IO
var uri = new Uri(codeBase);
var path = uri.LocalPath;
var baseDirectory = Path.GetDirectoryName(path);
_rootDir = baseDirectory.Substring(0, baseDirectory.LastIndexOf("bin") - 1);
if (string.IsNullOrEmpty(baseDirectory))
throw new Exception("No root directory could be resolved. Please ensure that your Umbraco solution is correctly configured.");
_rootDir = baseDirectory.Contains("bin")
? baseDirectory.Substring(0, baseDirectory.LastIndexOf("bin", StringComparison.OrdinalIgnoreCase) - 1)
: baseDirectory;
return _rootDir;
}
internal static string GetRootDirectoryBinFolder()
{
string binFolder = string.Empty;
if (string.IsNullOrEmpty(_rootDir))
{
binFolder = Assembly.GetExecutingAssembly().GetAssemblyFile().Directory.FullName;
return binFolder;
}
binFolder = Path.Combine(GetRootDirectorySafe(), "bin");
#if DEBUG
var debugFolder = Path.Combine(binFolder, "debug");
if (Directory.Exists(debugFolder))
return debugFolder;
#endif
var releaseFolder = Path.Combine(binFolder, "release");
if (Directory.Exists(releaseFolder))
return releaseFolder;
if (Directory.Exists(binFolder))
return binFolder;
return _rootDir;
}
/// <summary>
/// Allows you to overwrite RootDirectory, which would otherwise be resolved
/// automatically upon application start.
/// </summary>
/// <remarks>The supplied path should be the absolute path to the root of the umbraco site.</remarks>
/// <param name="rootPath"></param>
internal static void SetRootDirectory(string rootPath)
{
_rootDir = rootPath;
}
/// <summary>
/// Check to see if filename passed has any special chars in it and strips them to create a safe filename. Used to overcome an issue when Umbraco is used in IE in an intranet environment.
/// </summary>
@@ -215,41 +295,8 @@ namespace Umbraco.Core.IO
/// <returns>A safe filename without any path specific chars.</returns>
internal static string SafeFileName(string filePath)
{
if (String.IsNullOrEmpty(filePath))
return String.Empty;
if (!String.IsNullOrWhiteSpace(filePath))
{
foreach (var character in Path.GetInvalidFileNameChars())
{
filePath = filePath.Replace(character, '-');
}
}
else
{
filePath = String.Empty;
}
// Adapted from: http://stackoverflow.com/a/4827510/5018
// Combined both Reserved Characters and Character Data
// from http://en.wikipedia.org/wiki/Percent-encoding
var stringBuilder = new StringBuilder();
const string reservedCharacters = "!*'();:@&=+$,/?%#[]-~{}\"<>\\^`| ";
foreach (var character in filePath)
{
if (reservedCharacters.IndexOf(character) == -1)
stringBuilder.Append(character);
else
stringBuilder.Append("-");
}
// Remove repeating dashes
// From: http://stackoverflow.com/questions/5111967/regex-to-remove-a-specific-repeated-character
var reducedString = Regex.Replace(stringBuilder.ToString(), "-+", "-");
return reducedString;
// use string extensions
return filePath.ToSafeFileName();
}
}
}

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