Compare commits

..

185 Commits

Author SHA1 Message Date
Sebastiaan Janssen e553f2c671 Correct little mistake in nuspec file 2013-06-28 14:21:25 +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
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
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
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
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
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
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 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
Shannon Deminick af51465a6a Merge 2013-04-29 19:57:44 -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
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
Sebastiaan Janssen d2d1843e03 Fix default branch 2013-04-08 07:03:57 -02:00
Sebastiaan Janssen a89a122b09 Merge with 6.0.3 2013-03-27 11:56:44 -01:00
Shannon Deminick e5e22f75fc Merge 2013-03-11 18:47:36 +06:00
Sebastiaan Janssen cab21e9d48 Merge with 6.0.1 2013-03-01 06:51:38 -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
Sebastiaan Janssen 777d397ae7 Merge with 6.0.0 2013-01-31 14:07:05 -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
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
152 changed files with 2401 additions and 1257 deletions
+81
View File
@@ -0,0 +1,81 @@
*.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/
-70
View File
@@ -1,70 +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*/
_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\*
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\*
src\Umbraco.Web.UI\Web.*.config.transformed
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
-35
View File
@@ -1,35 +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
56015ac26f5ab60e3c61b1d09075297b660afa07 Release-6.0.0-RC
1719fbd857f28b376639ac2aa0abada0ef2e7560 Release-6.0.0
e02f5aebb87e3f07d27376647756caa9762931d8 Release-4.11.4
14338b0ab1738fbd8987677ecdb9a73d79fc229d release-4.11.6
ce47176bc6b9298741783e20f1fe2672c811f744 release-4.11.7
b247b35d821144849f551e02da8ba719f91d5fb0 Release-6.0.2
aed55cba29009ad3db48880a7cfb66407ce9805f release-6.0.3
87cf618a39e38ec58df916d10e6a924de62ae37d release-6.1.0-beta
0dee9964687ea51ea797984cf7cce3655d6a6558 release-6.0.4
7670bb47a671a9ecc15118589d8048907ea76241 release-6.1.0-beta2
+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 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 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/contribute/releases](http://our.umbraco.org/contribute/releases).
## 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)
+3 -1
View File
@@ -1,10 +1,12 @@
@ECHO OFF
SET release=6.1.0
SET release=6.1.2
SET comment=
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
+20 -1
View File
@@ -82,6 +82,7 @@
<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>
@@ -197,7 +198,7 @@
</Target>
<!-- Copy the transformed web.config file to the root -->
<Target Name="CopyTransformedWebConfig" DependsOnTargets="CopyXmlDocumentation">
<Target Name="CopyTransformedWebConfig" DependsOnTargets="CopyTransformedConfig">
<ItemGroup>
<WebConfigFile Include="..\src\Umbraco.Web.UI\web.$(BuildConfiguration).Config.transformed" />
</ItemGroup>
@@ -206,6 +207,24 @@
DestinationFiles="$(WebAppFolder)Web.config"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
</Target>
<!-- 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="@(ConfigFiles)"
DestinationFiles="@(ConfigFiles->'$(ConfigsFolder)\%(RecursiveDir)%(Filename)%(Extension)')"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
<Copy SourceFiles="@(WebConfigTransformFile)"
DestinationFiles="$(ConfigsFolder)Web.config.transform"
OverwriteReadOnlyFiles="true"
SkipUnchangedFiles="false" />
</Target>
<!-- Copy the xml documentation to the bin folder -->
+7 -8
View File
@@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>UmbracoCms.Core</id>
<version>6.0.0-alpha</version>
<version>6.1.2</version>
<title>Umbraco Cms Core Binaries</title>
<authors>Morten Christensen</authors>
<owners>Umbraco HQ</owners>
@@ -15,10 +15,14 @@
<language>en-US</language>
<tags>umbraco</tags>
<dependencies>
<dependency id="Microsoft.AspNet.Mvc" version="[4.0.20710.0]" />
<dependency id="Microsoft.AspNet.WebApi" version="4.0.20710.0" />
<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" />
<dependency id="HtmlAgilityPack" version="1.4.5" />
<dependency id="Lucene.Net" version="[2.9.4.1]" />
<dependency id="SharpZipLib" version="0.86.0" />
<dependency id="MySql.Data" version="[6.6,6.7)" />
</dependencies>
</metadata>
<files>
@@ -32,16 +36,11 @@
<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" />
+4 -4
View File
@@ -2,7 +2,7 @@
<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>
@@ -21,14 +21,14 @@
<files>
<file src="..\_BuildOutput\WebApp\bin\amd64\**" target="Content\bin\amd64" />
<file src="..\_BuildOutput\WebApp\bin\x86\**" target="Content\bin\x86" />
<file src="..\_BuildOutput\WebApp\config\*.config" target="Content\config" />
<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" />
@@ -36,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" />
+8 -5
View File
@@ -1,15 +1,18 @@
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.
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
Binary file not shown.
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">
@@ -5,7 +5,7 @@ namespace Umbraco.Core.Configuration
{
public class UmbracoVersion
{
private static readonly Version Version = new Version("6.1.0");
private static readonly Version Version = new Version("6.1.2");
/// <summary>
/// Gets the current version of Umbraco.
+26
View File
@@ -249,6 +249,32 @@ namespace Umbraco.Core.IO
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.
+48 -92
View File
@@ -16,6 +16,7 @@ using Umbraco.Core.Models.Membership;
using Umbraco.Core.Strings;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.UnitOfWork;
using Umbraco.Core.Services;
namespace Umbraco.Core.Models
{
@@ -105,6 +106,50 @@ namespace Umbraco.Core.Models
}
#endregion
/// <summary>
/// Checks if the IContentBase has children
/// </summary>
/// <param name="content"></param>
/// <param name="services"></param>
/// <returns></returns>
/// <remarks>
/// This is a bit of a hack because we need to type check!
/// </remarks>
internal static bool HasChildren(IContentBase content, ServiceContext services)
{
if (content is IContent)
{
return services.ContentService.HasChildren(content.Id);
}
if (content is IMedia)
{
return services.MediaService.HasChildren(content.Id);
}
return false;
}
/// <summary>
/// Returns the children for the content base item
/// </summary>
/// <param name="content"></param>
/// <param name="services"></param>
/// <returns></returns>
/// <remarks>
/// This is a bit of a hack because we need to type check!
/// </remarks>
internal static IEnumerable<IContentBase> Children(IContentBase content, ServiceContext services)
{
if (content is IContent)
{
return services.ContentService.GetChildren(content.Id);
}
if (content is IMedia)
{
return services.MediaService.GetChildren(content.Id);
}
return null;
}
/// <summary>
/// Set property values by alias with an annonymous object
/// </summary>
@@ -467,38 +512,7 @@ namespace Umbraco.Core.Models
/// <returns>Xml representation of the passed in <see cref="IContent"/></returns>
internal static XElement ToDeepXml(this IContent content)
{
var xml = content.ToXml();
var descendants = content.Descendants().ToArray();
var currentChildren = descendants.Where(x => x.ParentId == content.Id);
AddChildXml(descendants, currentChildren, xml);
return xml;
}
/// <summary>
/// Used by ToDeepXml to recursively add children
/// </summary>
/// <param name="originalDescendants"></param>
/// <param name="currentChildren"></param>
/// <param name="currentXml"></param>
private static void AddChildXml(
IContent[] originalDescendants,
IEnumerable<IContent> currentChildren,
XElement currentXml)
{
foreach (var child in currentChildren)
{
//add the child's xml
var childXml = child.ToXml();
currentXml.Add(childXml);
//copy local (out of closure)
var c = child;
//get this item's children
var children = originalDescendants.Where(x => x.ParentId == c.Id);
//recurse and add it's children to the child xml element
AddChildXml(originalDescendants, children, childXml);
}
return ApplicationContext.Current.Services.PackagingService.Export(content, true);
}
/// <summary>
@@ -508,21 +522,7 @@ namespace Umbraco.Core.Models
/// <returns>Xml representation of the passed in <see cref="IContent"/></returns>
public static XElement ToXml(this IContent content)
{
//nodeName should match Casing.SafeAliasWithForcingCheck(content.ContentType.Alias);
var nodeName = UmbracoSettings.UseLegacyXmlSchema ? "node" : content.ContentType.Alias.ToSafeAliasWithForcingCheck();
var x = content.ToXml(nodeName);
x.Add(new XAttribute("nodeType", content.ContentType.Id));
x.Add(new XAttribute("creatorName", content.GetCreatorProfile().Name));
x.Add(new XAttribute("writerName", content.GetWriterProfile().Name));
x.Add(new XAttribute("writerID", content.WriterId));
x.Add(new XAttribute("template", content.Template == null ? "0" : content.Template.Id.ToString()));
if (UmbracoSettings.UseLegacyXmlSchema)
{
x.Add(new XAttribute("nodeTypeAlias", content.ContentType.Alias));
}
return x;
return ApplicationContext.Current.Services.PackagingService.Export(content);
}
/// <summary>
@@ -532,53 +532,9 @@ namespace Umbraco.Core.Models
/// <returns>Xml representation of the passed in <see cref="IContent"/></returns>
public static XElement ToXml(this IMedia media)
{
//nodeName should match Casing.SafeAliasWithForcingCheck(content.ContentType.Alias);
var nodeName = UmbracoSettings.UseLegacyXmlSchema ? "node" : media.ContentType.Alias.ToSafeAliasWithForcingCheck();
var x = media.ToXml(nodeName);
x.Add(new XAttribute("nodeType", media.ContentType.Id));
x.Add(new XAttribute("writerName", media.GetCreatorProfile().Name));
x.Add(new XAttribute("writerID", media.CreatorId));
x.Add(new XAttribute("version", media.Version));
x.Add(new XAttribute("template", 0));
if (UmbracoSettings.UseLegacyXmlSchema)
{
x.Add(new XAttribute("nodeTypeAlias", media.ContentType.Alias));
}
return x;
return ApplicationContext.Current.Services.PackagingService.Export(media);
}
/// <summary>
/// Creates the xml representation for the <see cref="IContentBase"/> object
/// </summary>
/// <param name="contentBase"><see cref="IContent"/> to generate xml for</param>
/// <param name="nodeName"></param>
/// <returns>Xml representation of the passed in <see cref="IContent"/></returns>
private static XElement ToXml(this IContentBase contentBase, string nodeName)
{
// note: that one will take care of umbracoUrlName
var url = contentBase.GetUrlSegment();
var xml = new XElement(nodeName,
new XAttribute("id", contentBase.Id),
new XAttribute("parentID", contentBase.Level > 1 ? contentBase.ParentId : -1),
new XAttribute("level", contentBase.Level),
new XAttribute("creatorID", contentBase.CreatorId),
new XAttribute("sortOrder", contentBase.SortOrder),
new XAttribute("createDate", contentBase.CreateDate.ToString("s")),
new XAttribute("updateDate", contentBase.UpdateDate.ToString("s")),
new XAttribute("nodeName", contentBase.Name),
new XAttribute("urlName", url),
new XAttribute("path", contentBase.Path),
new XAttribute("isDoc", ""));
foreach (var property in contentBase.Properties.Where(p => p != null))
xml.Add(property.ToXml());
return xml;
}
/// <summary>
/// Creates the xml representation for the <see cref="IContent"/> object
/// </summary>
@@ -477,6 +477,15 @@ namespace Umbraco.Core.Models
}
}
/// <summary>
/// Removes a PropertyGroup from the current ContentType
/// </summary>
/// <param name="propertyGroupName">Name of the <see cref="PropertyGroup"/> to remove</param>
public void RemovePropertyGroup(string propertyGroupName)
{
PropertyGroups.RemoveItem(propertyGroupName);
}
/// <summary>
/// Sets the ParentId from the lazy integer id
/// </summary>
@@ -75,7 +75,7 @@ namespace Umbraco.Core.Models
if (contentType.ContentTypeComposition.Any(x => x.CompositionAliases().Any(ContentTypeCompositionExists)))
return false;
if (!ContentTypeCompositionExists(contentType.Alias))
if (ContentTypeCompositionExists(contentType.Alias) == false)
{
_contentTypeComposition.Add(contentType);
OnPropertyChanged(ContentTypeCompositionSelector);
@@ -64,6 +64,12 @@ namespace Umbraco.Core.Models
/// <param name="propertyTypeAlias">Alias of the <see cref="PropertyType"/> to remove</param>
void RemovePropertyType(string propertyTypeAlias);
/// <summary>
/// Removes a PropertyGroup from the current ContentType
/// </summary>
/// <param name="propertyGroupName">Name of the <see cref="PropertyGroup"/> to remove</param>
void RemovePropertyGroup(string propertyGroupName);
/// <summary>
/// Sets the ParentId from the lazy integer id
/// </summary>
@@ -1,6 +1,5 @@
using System;
using Umbraco.Core.Models.EntityBase;
using Umbraco.Core.Persistence.Mappers;
namespace Umbraco.Core.Models
{
@@ -97,6 +97,14 @@ namespace Umbraco.Core.Models
return this.Any(x => x.Name == groupName);
}
public void RemoveItem(string propertyGroupName)
{
var key = IndexOfKey(propertyGroupName);
//Only removes an item if the key was found
if (key != -1)
RemoveItem(key);
}
public int IndexOfKey(string key)
{
for (var i = 0; i < this.Count; i++)
+9 -15
View File
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Reflection;
using Umbraco.Core.Models.EntityBase;
@@ -21,7 +22,6 @@ namespace Umbraco.Core.Models
private bool _isDraft;
private bool _hasPendingChanges;
private string _contentTypeAlias;
private string _umbracoFile;
private Guid _nodeObjectTypeId;
private static readonly PropertyInfo CreatorIdSelector = ExpressionHelper.GetPropertyInfo<UmbracoEntity, int>(x => x.CreatorId);
@@ -38,7 +38,6 @@ namespace Umbraco.Core.Models
private static readonly PropertyInfo ContentTypeAliasSelector = ExpressionHelper.GetPropertyInfo<UmbracoEntity, string>(x => x.ContentTypeAlias);
private static readonly PropertyInfo ContentTypeIconSelector = ExpressionHelper.GetPropertyInfo<UmbracoEntity, string>(x => x.ContentTypeIcon);
private static readonly PropertyInfo ContentTypeThumbnailSelector = ExpressionHelper.GetPropertyInfo<UmbracoEntity, string>(x => x.ContentTypeThumbnail);
private static readonly PropertyInfo UmbracoFileSelector = ExpressionHelper.GetPropertyInfo<UmbracoEntity, string>(x => x.UmbracoFile);
private static readonly PropertyInfo NodeObjectTypeIdSelector = ExpressionHelper.GetPropertyInfo<UmbracoEntity, Guid>(x => x.NodeObjectTypeId);
private string _contentTypeIcon;
private string _contentTypeThumbnail;
@@ -234,19 +233,6 @@ namespace Umbraco.Core.Models
}
}
public string UmbracoFile
{
get { return _umbracoFile; }
set
{
SetPropertyValueAndDetectChanges(o =>
{
_umbracoFile = value;
return _umbracoFile;
}, _umbracoFile, UmbracoFileSelector);
}
}
public Guid NodeObjectTypeId
{
get { return _nodeObjectTypeId; }
@@ -259,5 +245,13 @@ namespace Umbraco.Core.Models
}, _nodeObjectTypeId, NodeObjectTypeIdSelector);
}
}
public IList<UmbracoProperty> UmbracoProperties { get; set; }
internal class UmbracoProperty
{
public Guid DataTypeControlId { get; set; }
public string Value { get; set; }
}
}
}
@@ -67,17 +67,18 @@ namespace Umbraco.Core.Persistence.Factories
if (property.HasIdentity)
dto.Id = property.Id;
if (property.DataTypeDatabaseType == DataTypeDatabaseType.Integer && property.Value != null && string.IsNullOrWhiteSpace(property.Value.ToString()) == false)
if (property.DataTypeDatabaseType == DataTypeDatabaseType.Integer)
{
if (property.Value is bool)
if (property.Value is bool || property.PropertyType.DataTypeId == new Guid("38b352c1-e9f8-4fd8-9324-9a2eab06d97a"))
{
int val = Convert.ToInt32(property.Value);
dto.Integer = val;
dto.Integer = property.Value != null && string.IsNullOrEmpty(property.Value.ToString())
? 0
: Convert.ToInt32(property.Value);
}
else
{
int val;
if (int.TryParse(property.Value.ToString(), out val))
if ((property.Value != null && string.IsNullOrWhiteSpace(property.Value.ToString()) == false) && int.TryParse(property.Value.ToString(), out val))
{
dto.Integer = val;
}
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using Umbraco.Core.Models;
using Umbraco.Core.Persistence.Repositories;
@@ -25,13 +26,26 @@ namespace Umbraco.Core.Persistence.Factories
ContentTypeAlias = dto.Alias ?? string.Empty,
ContentTypeIcon = dto.Icon ?? string.Empty,
ContentTypeThumbnail = dto.Thumbnail ?? string.Empty,
UmbracoFile = dto.UmbracoFile ?? string.Empty
UmbracoProperties = new List<UmbracoEntity.UmbracoProperty>()
};
entity.IsPublished = dto.PublishedVersion != default(Guid) || (dto.NewestVersion != default(Guid) && dto.PublishedVersion == dto.NewestVersion);
entity.IsDraft = dto.NewestVersion != default(Guid) && (dto.PublishedVersion == default(Guid) || dto.PublishedVersion != dto.NewestVersion);
entity.HasPendingChanges = (dto.PublishedVersion != default(Guid) && dto.NewestVersion != default(Guid)) && dto.PublishedVersion != dto.NewestVersion;
if (dto.UmbracoPropertyDtos != null)
{
foreach (var propertyDto in dto.UmbracoPropertyDtos)
{
entity.UmbracoProperties.Add(new UmbracoEntity.UmbracoProperty
{
DataTypeControlId =
propertyDto.DataTypeControlId,
Value = propertyDto.UmbracoFile
});
}
}
return entity;
}
@@ -27,6 +27,8 @@ namespace Umbraco.Core.Persistence.Repositories
{
_contentTypeRepository = contentTypeRepository;
_templateRepository = templateRepository;
EnsureUniqueNaming = true;
}
public ContentRepository(IDatabaseUnitOfWork work, IRepositoryCacheProvider cache, IContentTypeRepository contentTypeRepository, ITemplateRepository templateRepository)
@@ -34,8 +36,12 @@ namespace Umbraco.Core.Persistence.Repositories
{
_contentTypeRepository = contentTypeRepository;
_templateRepository = templateRepository;
EnsureUniqueNaming = true;
}
public bool EnsureUniqueNaming { get; set; }
#region Overrides of RepositoryBase<IContent>
protected override IContent PerformGet(int id)
@@ -180,6 +186,9 @@ namespace Umbraco.Core.Persistence.Repositories
{
((Content)entity).AddingEntity();
//Ensure unique name on the same level
entity.Name = EnsureUniqueNodeName(entity.ParentId, entity.Name);
var factory = new ContentFactory(NodeObjectTypeId, entity.Id);
var dto = factory.BuildDto(entity);
@@ -260,6 +269,9 @@ namespace Umbraco.Core.Persistence.Repositories
entity.UpdateDate = DateTime.Now;
}
//Ensure unique name on the same level
entity.Name = EnsureUniqueNodeName(entity.ParentId, entity.Name, entity.Id);
//Look up parent to get and set the correct Path and update SortOrder if ParentId has changed
if (((ICanBeDirty)entity).IsPropertyDirty("ParentId"))
{
@@ -489,5 +501,77 @@ namespace Umbraco.Core.Persistence.Repositories
return new PropertyCollection(properties);
}
private string EnsureUniqueNodeName(int parentId, string nodeName, int id = 0)
{
if (EnsureUniqueNaming == false)
return nodeName;
var sql = new Sql();
sql.Select("*")
.From<NodeDto>()
.Where<NodeDto>(x => x.ParentId == parentId && x.Text.StartsWith(nodeName));
int uniqueNumber = 1;
var currentName = nodeName;
var dtos = Database.Fetch<NodeDto>(sql);
if (dtos.Any())
{
var results = dtos.OrderBy(x => x.Text, new SimilarNodeNameComparer());
foreach (var dto in results)
{
if(id != 0 && id == dto.NodeId) continue;
if (dto.Text.ToLowerInvariant().Equals(currentName.ToLowerInvariant()))
{
currentName = nodeName + string.Format(" ({0})", uniqueNumber);
uniqueNumber++;
}
}
}
return currentName;
}
/// <summary>
/// Comparer that takes into account the duplicate index of a node name
/// This is needed as a normal alphabetic sort would go Page (1), Page (10), Page (2) etc.
/// </summary>
private class SimilarNodeNameComparer : IComparer<string>
{
public int Compare(string x, string y)
{
if (x.LastIndexOf(')') == x.Length - 1 && y.LastIndexOf(')') == y.Length - 1)
{
if (x.ToLower().Substring(0, x.LastIndexOf('(')) == y.ToLower().Substring(0, y.LastIndexOf('(')))
{
int xDuplicateIndex = ExtractDuplicateIndex(x);
int yDuplicateIndex = ExtractDuplicateIndex(y);
if (xDuplicateIndex != 0 && yDuplicateIndex != 0)
{
return xDuplicateIndex.CompareTo(yDuplicateIndex);
}
}
}
return String.Compare(x.ToLower(), y.ToLower(), StringComparison.Ordinal);
}
private int ExtractDuplicateIndex(string text)
{
int index = 0;
if (text.LastIndexOf('(') != -1 && text.LastIndexOf('(') < text.Length - 2)
{
int startPos = text.LastIndexOf('(') + 1;
int length = text.Length - 1 - startPos;
int.TryParse(text.Substring(startPos, length), out index);
}
return index;
}
}
}
}
@@ -203,7 +203,7 @@ namespace Umbraco.Core.Persistence.Repositories
.Where<NodeDto>(x => x.NodeObjectType == new Guid(Constants.ObjectTypes.Document))
.Where<ContentDto>(x => x.ContentTypeId == entity.Id);
var contentDtos = Database.Fetch<DocumentDto, ContentVersionDto, ContentDto, NodeDto>(sql);
var contentDtos = Database.Fetch<ContentDto, NodeDto>(sql);
//Loop through all tracked keys, which corresponds to the ContentTypes that has been removed from the composition
foreach (var key in compositionBase.RemovedContentTypeKeyTracker)
{
@@ -321,7 +321,7 @@ namespace Umbraco.Core.Persistence.Repositories
sql.Select("*")
.From<ContentTypeAllowedContentTypeDto>()
.LeftJoin<ContentTypeDto>()
.On<ContentTypeAllowedContentTypeDto, ContentTypeDto>(left => left.Id, right => right.NodeId)
.On<ContentTypeAllowedContentTypeDto, ContentTypeDto>(left => left.AllowedId, right => right.NodeId)
.Where<ContentTypeAllowedContentTypeDto>(x => x.Id == id);
var allowedContentTypeDtos = Database.Fetch<ContentTypeAllowedContentTypeDto, ContentTypeDto>(sql);
@@ -45,7 +45,7 @@ namespace Umbraco.Core.Persistence.Repositories
public virtual IUmbracoEntity Get(int id)
{
var sql = GetBaseWhere(GetBase, false, id);
var sql = GetBaseWhere(GetBase, false, false, id);
var nodeDto = _work.Database.FirstOrDefault<UmbracoEntityDto>(sql);
if (nodeDto == null)
return null;
@@ -58,8 +58,9 @@ namespace Umbraco.Core.Persistence.Repositories
public virtual IUmbracoEntity Get(int id, Guid objectTypeId)
{
bool isContentOrMedia = objectTypeId == new Guid(Constants.ObjectTypes.Document) || objectTypeId == new Guid(Constants.ObjectTypes.Media);
var sql = GetBaseWhere(GetBase, isContentOrMedia, objectTypeId, id).Append(GetGroupBy(isContentOrMedia));
bool isContent = objectTypeId == new Guid(Constants.ObjectTypes.Document);
bool isMedia = objectTypeId == new Guid(Constants.ObjectTypes.Media);
var sql = GetBaseWhere(GetBase, isContent, isMedia, objectTypeId, id).Append(GetGroupBy(isContent, isMedia));
var nodeDto = _work.Database.FirstOrDefault<UmbracoEntityDto>(sql);
if (nodeDto == null)
return null;
@@ -81,10 +82,13 @@ namespace Umbraco.Core.Persistence.Repositories
}
else
{
bool isContentOrMedia = objectTypeId == new Guid(Constants.ObjectTypes.Document) || objectTypeId == new Guid(Constants.ObjectTypes.Media);
var sql = GetBaseWhere(GetBase, isContentOrMedia, objectTypeId).Append(GetGroupBy(isContentOrMedia));
var dtos = _work.Database.Fetch<UmbracoEntityDto>(sql);
bool isContent = objectTypeId == new Guid(Constants.ObjectTypes.Document);
bool isMedia = objectTypeId == new Guid(Constants.ObjectTypes.Media);
var sql = GetBaseWhere(GetBase, isContent, isMedia, objectTypeId).Append(GetGroupBy(isContent, isMedia));
var dtos = isMedia
? _work.Database.Fetch<UmbracoEntityDto, UmbracoPropertyDto, UmbracoEntityDto>(
new UmbracoEntityRelator().Map, sql)
: _work.Database.Fetch<UmbracoEntityDto>(sql);
var factory = new UmbracoEntityFactory();
foreach (var dto in dtos)
@@ -97,9 +101,9 @@ namespace Umbraco.Core.Persistence.Repositories
public virtual IEnumerable<IUmbracoEntity> GetByQuery(IQuery<IUmbracoEntity> query)
{
var sqlClause = GetBase(false);
var sqlClause = GetBase(false, false);
var translator = new SqlTranslator<IUmbracoEntity>(sqlClause, query);
var sql = translator.Translate().Append(GetGroupBy(false));
var sql = translator.Translate().Append(GetGroupBy(false, false));
var dtos = _work.Database.Fetch<UmbracoEntityDto>(sql);
@@ -111,12 +115,16 @@ namespace Umbraco.Core.Persistence.Repositories
public virtual IEnumerable<IUmbracoEntity> GetByQuery(IQuery<IUmbracoEntity> query, Guid objectTypeId)
{
bool isContentOrMedia = objectTypeId == new Guid(Constants.ObjectTypes.Document) || objectTypeId == new Guid(Constants.ObjectTypes.Media);
var sqlClause = GetBaseWhere(GetBase, isContentOrMedia, objectTypeId);
bool isContent = objectTypeId == new Guid(Constants.ObjectTypes.Document);
bool isMedia = objectTypeId == new Guid(Constants.ObjectTypes.Media);
var sqlClause = GetBaseWhere(GetBase, isContent, isMedia, objectTypeId);
var translator = new SqlTranslator<IUmbracoEntity>(sqlClause, query);
var sql = translator.Translate().Append(GetGroupBy(isContentOrMedia));
var sql = translator.Translate().Append(GetGroupBy(isContent, isMedia));
var dtos = _work.Database.Fetch<UmbracoEntityDto>(sql);
var dtos = isMedia
? _work.Database.Fetch<UmbracoEntityDto, UmbracoPropertyDto, UmbracoEntityDto>(
new UmbracoEntityRelator().Map, sql)
: _work.Database.Fetch<UmbracoEntityDto>(sql);
var factory = new UmbracoEntityFactory();
var list = dtos.Select(factory.BuildEntity).Cast<IUmbracoEntity>().ToList();
@@ -128,7 +136,7 @@ namespace Umbraco.Core.Persistence.Repositories
#region Sql Statements
protected virtual Sql GetBase(bool isContentOrMedia)
protected virtual Sql GetBase(bool isContent, bool isMedia)
{
var columns = new List<object>
{
@@ -146,14 +154,19 @@ namespace Umbraco.Core.Persistence.Repositories
"COUNT(parent.parentID) as children"
};
if (isContentOrMedia)
if (isContent || isMedia)
{
columns.Add("published.versionId as publishedVerison");
columns.Add("latest.versionId as newestVersion");
columns.Add("contenttype.alias");
columns.Add("contenttype.icon");
columns.Add("contenttype.thumbnail");
}
if (isMedia)
{
columns.Add("property.dataNvarchar as umbracoFile");
columns.Add("property.controlId");
}
var sql = new Sql()
@@ -162,7 +175,7 @@ namespace Umbraco.Core.Persistence.Repositories
.LeftJoin("umbracoNode parent").On("parent.parentID = umbracoNode.id");
if (isContentOrMedia)
if (isContent || isMedia)
{
sql.InnerJoin("cmsContent content").On("content.nodeId = umbracoNode.id")
.LeftJoin("cmsContentType contenttype").On("contenttype.nodeId = content.contentType")
@@ -171,40 +184,51 @@ namespace Umbraco.Core.Persistence.Repositories
.On("umbracoNode.id = published.nodeId")
.LeftJoin(
"(SELECT nodeId, versionId FROM cmsDocument WHERE newest = 1 GROUP BY nodeId, versionId) as latest")
.On("umbracoNode.id = latest.nodeId")
.LeftJoin(
"(SELECT contentNodeId, dataNvarchar FROM cmsPropertyData INNER JOIN cmsPropertyType ON cmsPropertyType.id = cmsPropertyData.propertytypeid"+
" INNER JOIN cmsDataType ON cmsPropertyType.dataTypeId = cmsDataType.nodeId WHERE cmsDataType.controlId = '"+ Constants.PropertyEditors.UploadField +"') as property")
.On("umbracoNode.id = latest.nodeId");
}
/*if (isContent)
{
sql.LeftJoin(
"(SELECT contentNodeId, versionId, dataNvarchar, controlId FROM cmsPropertyData INNER JOIN cmsPropertyType ON cmsPropertyType.id = cmsPropertyData.propertytypeid" +
" INNER JOIN cmsDataType ON cmsPropertyType.dataTypeId = cmsDataType.nodeId) as property")
.On("umbracoNode.id = property.contentNodeId AND latest.versionId = property.versionId");
}*/
if (isMedia)
{
sql.LeftJoin(
"(SELECT contentNodeId, versionId, dataNvarchar, controlId FROM cmsPropertyData INNER JOIN cmsPropertyType ON cmsPropertyType.id = cmsPropertyData.propertytypeid" +
" INNER JOIN cmsDataType ON cmsPropertyType.dataTypeId = cmsDataType.nodeId) as property")
.On("umbracoNode.id = property.contentNodeId");
}
return sql;
}
protected virtual Sql GetBaseWhere(Func<bool, Sql> baseQuery, bool isContentOrMedia, Guid id)
protected virtual Sql GetBaseWhere(Func<bool, bool, Sql> baseQuery, bool isContent, bool isMedia, Guid id)
{
var sql = baseQuery(isContentOrMedia)
var sql = baseQuery(isContent, isMedia)
.Where("umbracoNode.nodeObjectType = @NodeObjectType", new { NodeObjectType = id });
return sql;
}
protected virtual Sql GetBaseWhere(Func<bool, Sql> baseQuery, bool isContentOrMedia, int id)
protected virtual Sql GetBaseWhere(Func<bool, bool, Sql> baseQuery, bool isContent, bool isMedia, int id)
{
var sql = baseQuery(isContentOrMedia)
var sql = baseQuery(isContent, isMedia)
.Where("umbracoNode.id = @Id", new { Id = id })
.Append(GetGroupBy(isContentOrMedia));
.Append(GetGroupBy(isContent, isMedia));
return sql;
}
protected virtual Sql GetBaseWhere(Func<bool, Sql> baseQuery, bool isContentOrMedia, Guid objectId, int id)
protected virtual Sql GetBaseWhere(Func<bool, bool, Sql> baseQuery, bool isContent, bool isMedia, Guid objectId, int id)
{
var sql = baseQuery(isContentOrMedia)
var sql = baseQuery(isContent, isMedia)
.Where("umbracoNode.id = @Id AND umbracoNode.nodeObjectType = @NodeObjectType",
new {Id = id, NodeObjectType = objectId});
return sql;
}
protected virtual Sql GetGroupBy(bool isContentOrMedia)
protected virtual Sql GetGroupBy(bool isContent, bool isMedia)
{
var columns = new List<object>
{
@@ -221,14 +245,19 @@ namespace Umbraco.Core.Persistence.Repositories
"umbracoNode.createDate"
};
if (isContentOrMedia)
if (isContent || isMedia)
{
columns.Add("published.versionId");
columns.Add("latest.versionId");
columns.Add("contenttype.alias");
columns.Add("contenttype.icon");
columns.Add("contenttype.thumbnail");
}
if (isMedia)
{
columns.Add("property.dataNvarchar");
columns.Add("property.controlId");
}
var sql = new Sql()
@@ -274,9 +303,57 @@ namespace Umbraco.Core.Persistence.Repositories
[Column("thumbnail")]
public string Thumbnail { get; set; }
[ResultColumn]
public List<UmbracoPropertyDto> UmbracoPropertyDtos { get; set; }
}
[ExplicitColumns]
internal class UmbracoPropertyDto
{
[Column("controlId")]
public Guid DataTypeControlId { get; set; }
[Column("umbracoFile")]
public string UmbracoFile { get; set; }
}
internal class UmbracoEntityRelator
{
internal UmbracoEntityDto Current;
internal UmbracoEntityDto Map(UmbracoEntityDto a, UmbracoPropertyDto p)
{
// Terminating call. Since we can return null from this function
// we need to be ready for PetaPoco to callback later with null
// parameters
if (a == null)
return Current;
// Is this the same UmbracoEntityDto as the current one we're processing
if (Current != null && Current.UniqueId == a.UniqueId)
{
// Yes, just add this UmbracoPropertyDto to the current UmbracoEntityDto's collection
Current.UmbracoPropertyDtos.Add(p);
// Return null to indicate we're not done with this UmbracoEntityDto yet
return null;
}
// This is a different UmbracoEntityDto to the current one, or this is the
// first time through and we don't have a Tab yet
// Save the current UmbracoEntityDto
var prev = Current;
// Setup the new current UmbracoEntityDto
Current = a;
Current.UmbracoPropertyDtos = new List<UmbracoPropertyDto>();
Current.UmbracoPropertyDtos.Add(p);
// Return the now populated previous UmbracoEntityDto (or null if first time through)
return prev;
}
}
#endregion
}
}
@@ -43,7 +43,7 @@ namespace Umbraco.Core.Persistence
uow,
RuntimeCacheProvider.Current,
CreateContentTypeRepository(uow),
CreateTemplateRepository(uow));
CreateTemplateRepository(uow)) { EnsureUniqueNaming = Umbraco.Core.Configuration.UmbracoSettings.EnsureUniqueNaming };
}
public virtual IContentTypeRepository CreateContentTypeRepository(IDatabaseUnitOfWork uow)
+10 -7
View File
@@ -333,7 +333,7 @@ namespace Umbraco.Core.Services
using (var repository = _repositoryFactory.CreateContentRepository(_uowProvider.GetUnitOfWork()))
{
var query = Query<IContent>.Builder.Where(x => x.ParentId == id);
var contents = repository.GetByQuery(query);
var contents = repository.GetByQuery(query).OrderBy(x => x.SortOrder);
return contents;
}
@@ -1036,7 +1036,10 @@ namespace Umbraco.Core.Services
var uow = _uowProvider.GetUnitOfWork();
using (var repository = _repositoryFactory.CreateContentRepository(uow))
{
content.WriterId = userId;
// Update the create author and last edit author
copy.CreatorId = userId;
copy.WriterId = userId;
repository.AddOrUpdate(copy);
uow.Commit();
@@ -1111,7 +1114,7 @@ namespace Umbraco.Core.Services
}
//Look for children and copy those as well
var children = GetChildren(content.Id).OrderBy(x => x.SortOrder);
var children = GetChildren(content.Id);
foreach (var child in children)
{
Copy(child, copy.Id, relateToOriginal, userId);
@@ -1172,6 +1175,7 @@ namespace Umbraco.Core.Services
{
content.WriterId = userId;
content.CreatorId = userId;
content.ChangePublishedState(PublishedState.Unpublished);
repository.AddOrUpdate(content);
uow.Commit();
@@ -1451,11 +1455,10 @@ namespace Umbraco.Core.Services
var uow = _uowProvider.GetUnitOfWork();
using (var repository = _repositoryFactory.CreateContentRepository(uow))
{
//Only loop through content that was successfully published, was not already published and where the Published property has been updated
//NOTE The Publish with subpages-dialog was used more as a republish-type-thing, so we'll have to include PublishStatusType.SuccessAlreadyPublished
//in the updated-list, so the Published event is triggered with the expected set of pages and the xml is updated.
foreach (var item in publishedOutcome.Where(
x => x.Success
&& x.Result.StatusType != PublishStatusType.SuccessAlreadyPublished
&& ((ICanBeDirty)x.Result.ContentItem).IsPropertyDirty("Published")))
x => x.Success || x.Result.StatusType == PublishStatusType.SuccessAlreadyPublished))
{
item.Result.ContentItem.WriterId = userId;
repository.AddOrUpdate(item.Result.ContentItem);
+19 -1
View File
@@ -101,7 +101,7 @@ namespace Umbraco.Core.Services
}
/// <summary>
/// Gets all values for an <see cref="IDataTypeDefinition"/>
/// Gets all prevalues for an <see cref="IDataTypeDefinition"/>
/// </summary>
/// <param name="id">Id of the <see cref="IDataTypeDefinition"/> to retrieve prevalues from</param>
/// <returns>An enumerable list of string values</returns>
@@ -115,6 +115,24 @@ namespace Umbraco.Core.Services
}
}
/// <summary>
/// Gets all prevalues for an <see cref="IDataTypeDefinition"/>
/// </summary>
/// <remarks>
/// This method should be kept internal until a proper PreValue object model is introduced.
/// </remarks>
/// <param name="id">Id of the <see cref="IDataTypeDefinition"/> to retrieve prevalues from</param>
/// <returns>An enumerable list of Tuples containing Id, Alias, SortOrder, Value</returns>
internal IEnumerable<Tuple<int, string, int, string>> GetDetailedPreValuesByDataTypeId(int id)
{
using (var uow = _uowProvider.GetUnitOfWork())
{
var dtos = uow.Database.Fetch<DataTypePreValueDto>("WHERE datatypeNodeId = @Id", new { Id = id });
var list = dtos.Select(x => new Tuple<int, string, int, string>(x.Id, x.Alias, x.SortOrder, x.Value)).ToList();
return list;
}
}
/// <summary>
/// Gets a specific PreValue by its Id
/// </summary>
+271 -8
View File
@@ -1,15 +1,18 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text.RegularExpressions;
using System.Threading;
using System.Xml.Linq;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.Querying;
using Umbraco.Core.Persistence.UnitOfWork;
using Umbraco.Core.Strings;
namespace Umbraco.Core.Services
{
@@ -45,8 +48,131 @@ namespace Umbraco.Core.Services
_importedContentTypes = new Dictionary<string, IContentType>();
}
#region Generic export methods
internal void ExportToFile(string absoluteFilePath, string nodeType, int id)
{
XElement xml = null;
if (nodeType.Equals("content", StringComparison.InvariantCultureIgnoreCase))
{
var content = _contentService.GetById(id);
xml = Export(content);
}
if (nodeType.Equals("media", StringComparison.InvariantCultureIgnoreCase))
{
var media = _mediaService.GetById(id);
xml = Export(media);
}
if (nodeType.Equals("contenttype", StringComparison.InvariantCultureIgnoreCase))
{
var contentType = _contentTypeService.GetContentType(id);
xml = Export(contentType);
}
if (nodeType.Equals("mediatype", StringComparison.InvariantCultureIgnoreCase))
{
var mediaType = _contentTypeService.GetMediaType(id);
xml = Export(mediaType);
}
if (nodeType.Equals("datatype", StringComparison.InvariantCultureIgnoreCase))
{
var dataType = _dataTypeService.GetDataTypeDefinitionById(id);
xml = Export(dataType);
}
if(xml != null)
xml.Save(absoluteFilePath);
}
#endregion
#region Content
/// <summary>
/// Exports an <see cref="IContent"/> item to xml as an <see cref="XElement"/>
/// </summary>
/// <param name="content">Content to export</param>
/// <param name="deep">Optional parameter indicating whether to include descendents</param>
/// <returns><see cref="XElement"/> containing the xml representation of the Content object</returns>
internal XElement Export(IContent content, bool deep = false)
{
//nodeName should match Casing.SafeAliasWithForcingCheck(content.ContentType.Alias);
var nodeName = UmbracoSettings.UseLegacyXmlSchema ? "node" : content.ContentType.Alias.ToSafeAliasWithForcingCheck();
var xml = Export(content, nodeName);
xml.Add(new XAttribute("nodeType", content.ContentType.Id));
xml.Add(new XAttribute("creatorName", content.GetCreatorProfile().Name));
xml.Add(new XAttribute("writerName", content.GetWriterProfile().Name));
xml.Add(new XAttribute("writerID", content.WriterId));
xml.Add(new XAttribute("template", content.Template == null ? "0" : content.Template.Id.ToString(CultureInfo.InvariantCulture)));
xml.Add(new XAttribute("nodeTypeAlias", content.ContentType.Alias));
if (deep)
{
var descendants = content.Descendants().ToArray();
var currentChildren = descendants.Where(x => x.ParentId == content.Id);
AddChildXml(descendants, currentChildren, xml);
}
return xml;
}
/// <summary>
/// Part of the export of IContent and IMedia which is shared
/// </summary>
/// <param name="contentBase">Base Content or Media to export</param>
/// <param name="nodeName">Name of the node</param>
/// <returns><see cref="XElement"/></returns>
private XElement Export(IContentBase contentBase, string nodeName)
{
//NOTE: that one will take care of umbracoUrlName
var url = contentBase.GetUrlSegment();
var xml = new XElement(nodeName,
new XAttribute("id", contentBase.Id),
new XAttribute("parentID", contentBase.Level > 1 ? contentBase.ParentId : -1),
new XAttribute("level", contentBase.Level),
new XAttribute("creatorID", contentBase.CreatorId),
new XAttribute("sortOrder", contentBase.SortOrder),
new XAttribute("createDate", contentBase.CreateDate.ToString("s")),
new XAttribute("updateDate", contentBase.UpdateDate.ToString("s")),
new XAttribute("nodeName", contentBase.Name),
new XAttribute("urlName", url),
new XAttribute("path", contentBase.Path),
new XAttribute("isDoc", ""));
foreach (var property in contentBase.Properties.Where(p => p != null))
xml.Add(property.ToXml());
return xml;
}
/// <summary>
/// Used by Content Export to recursively add children
/// </summary>
/// <param name="originalDescendants"></param>
/// <param name="currentChildren"></param>
/// <param name="currentXml"></param>
private void AddChildXml(IContent[] originalDescendants, IEnumerable<IContent> currentChildren, XElement currentXml)
{
foreach (var child in currentChildren)
{
//add the child's xml
var childXml = Export(child);
currentXml.Add(childXml);
//copy local (out of closure)
var c = child;
//get this item's children
var children = originalDescendants.Where(x => x.ParentId == c.Id);
//recurse and add it's children to the child xml element
AddChildXml(originalDescendants, children, childXml);
}
}
/// <summary>
/// Imports and saves package xml as <see cref="IContent"/>
/// </summary>
@@ -183,15 +309,15 @@ namespace Umbraco.Core.Services
return content;
}
internal XElement Export(IContent content, bool deep = false)
{
throw new NotImplementedException();
}
#endregion
#region ContentTypes
/// <summary>
/// Exports an <see cref="IContentType"/> to xml as an <see cref="XElement"/>
/// </summary>
/// <param name="contentType">ContentType to export</param>
/// <returns><see cref="XElement"/> containing the xml representation of the ContentType item.</returns>
public XElement Export(IContentType contentType)
{
var info = new XElement("Info",
@@ -244,7 +370,7 @@ namespace Umbraco.Core.Services
foreach (var propertyGroup in contentType.PropertyGroups)
{
var tab = new XElement("Tab",
new XElement("Id", propertyGroup.Id.ToString()),
new XElement("Id", propertyGroup.Id.ToString(CultureInfo.InvariantCulture)),
new XElement("Caption", propertyGroup.Name));
tabs.Add(tab);
}
@@ -386,7 +512,7 @@ namespace Umbraco.Core.Services
foreach (var templateElement in allowedTemplatesElement.Elements("Template"))
{
var alias = templateElement.Value;
var template = _fileService.GetTemplate(alias);
var template = _fileService.GetTemplate(alias.ToSafeAlias());
if (template != null)
{
if(allowedTemplates.Any(x => x.Id == template.Id)) continue;
@@ -406,7 +532,7 @@ namespace Umbraco.Core.Services
if (string.IsNullOrEmpty(defaultTemplateElement.Value) == false)
{
var defaultTemplate = _fileService.GetTemplate(defaultTemplateElement.Value);
var defaultTemplate = _fileService.GetTemplate(defaultTemplateElement.Value.ToSafeAlias());
if (defaultTemplate != null)
{
contentType.SetDefaultTemplate(defaultTemplate);
@@ -548,6 +674,30 @@ namespace Umbraco.Core.Services
#region DataTypes
internal XElement Export(IDataTypeDefinition dataTypeDefinition)
{
var prevalues = new XElement("PreValues");
var prevalueList = ((DataTypeService)_dataTypeService).GetDetailedPreValuesByDataTypeId(dataTypeDefinition.Id);
foreach (var tuple in prevalueList)
{
var prevalue = new XElement("PreValue");
prevalue.Add(new XAttribute("Id", tuple.Item1));
prevalue.Add(new XAttribute("Value", tuple.Item4));
prevalue.Add(new XAttribute("Alias", tuple.Item2));
prevalue.Add(new XAttribute("SortOrder", tuple.Item3));
prevalues.Add(prevalue);
}
var xml = new XElement("DataType", prevalues);
xml.Add(new XAttribute("Name", dataTypeDefinition.Name));
xml.Add(new XAttribute("Id", dataTypeDefinition.Id));
xml.Add(new XAttribute("Definition", dataTypeDefinition.Key));
xml.Add(new XAttribute("DatabaseType", dataTypeDefinition.DatabaseType.ToString()));
return xml;
}
/// <summary>
/// Imports and saves package xml as <see cref="IDataTypeDefinition"/>
/// </summary>
@@ -615,6 +765,7 @@ namespace Umbraco.Core.Services
_dataTypeService.SavePreValues(dataTypeDefinition.Id, values);
}
}
#endregion
#region Dictionary Items
@@ -630,9 +781,121 @@ namespace Umbraco.Core.Services
#endregion
#region Media
/// <summary>
/// Exports an <see cref="IMedia"/> item to xml as an <see cref="XElement"/>
/// </summary>
/// <param name="media">Media to export</param>
/// <param name="deep">Optional parameter indicating whether to include descendents</param>
/// <returns><see cref="XElement"/> containing the xml representation of the Media object</returns>
internal XElement Export(IMedia media, bool deep = false)
{
//nodeName should match Casing.SafeAliasWithForcingCheck(content.ContentType.Alias);
var nodeName = UmbracoSettings.UseLegacyXmlSchema ? "node" : media.ContentType.Alias.ToSafeAliasWithForcingCheck();
var xml = Export(media, nodeName);
xml.Add(new XAttribute("nodeType", media.ContentType.Id));
xml.Add(new XAttribute("writerName", media.GetCreatorProfile().Name));
xml.Add(new XAttribute("writerID", media.CreatorId));
xml.Add(new XAttribute("version", media.Version));
xml.Add(new XAttribute("template", 0));
xml.Add(new XAttribute("nodeTypeAlias", media.ContentType.Alias));
if (deep)
{
var descendants = media.Descendants().ToArray();
var currentChildren = descendants.Where(x => x.ParentId == media.Id);
AddChildXml(descendants, currentChildren, xml);
}
return xml;
}
/// <summary>
/// Used by Media Export to recursively add children
/// </summary>
/// <param name="originalDescendants"></param>
/// <param name="currentChildren"></param>
/// <param name="currentXml"></param>
private void AddChildXml(IMedia[] originalDescendants, IEnumerable<IMedia> currentChildren, XElement currentXml)
{
foreach (var child in currentChildren)
{
//add the child's xml
var childXml = Export(child);
currentXml.Add(childXml);
//copy local (out of closure)
var c = child;
//get this item's children
var children = originalDescendants.Where(x => x.ParentId == c.Id);
//recurse and add it's children to the child xml element
AddChildXml(originalDescendants, children, childXml);
}
}
#endregion
#region MediaTypes
/// <summary>
/// Exports an <see cref="IMediaType"/> to xml as an <see cref="XElement"/>
/// </summary>
/// <param name="mediaType">MediaType to export</param>
/// <returns><see cref="XElement"/> containing the xml representation of the MediaType item.</returns>
internal XElement Export(IMediaType mediaType)
{
var info = new XElement("Info",
new XElement("Name", mediaType.Name),
new XElement("Alias", mediaType.Alias),
new XElement("Icon", mediaType.Icon),
new XElement("Thumbnail", mediaType.Thumbnail),
new XElement("Description", mediaType.Description),
new XElement("AllowAtRoot", mediaType.AllowedAsRoot.ToString()));
var masterContentType = mediaType.CompositionAliases().FirstOrDefault();
if (masterContentType != null)
info.Add(new XElement("Master", masterContentType));
var structure = new XElement("Structure");
foreach (var allowedType in mediaType.AllowedContentTypes)
{
structure.Add(new XElement("MediaType", allowedType.Alias));
}
var genericProperties = new XElement("GenericProperties");
foreach (var propertyType in mediaType.PropertyTypes)
{
var definition = _dataTypeService.GetDataTypeDefinitionById(propertyType.DataTypeDefinitionId);
var propertyGroup = mediaType.PropertyGroups.FirstOrDefault(x => x.Id == propertyType.PropertyGroupId.Value);
var genericProperty = new XElement("GenericProperty",
new XElement("Name", propertyType.Name),
new XElement("Alias", propertyType.Alias),
new XElement("Type", propertyType.DataTypeId.ToString()),
new XElement("Definition", definition.Key),
new XElement("Tab", propertyGroup == null ? "" : propertyGroup.Name),
new XElement("Mandatory", propertyType.Mandatory.ToString()),
new XElement("Validation", propertyType.ValidationRegExp),
new XElement("Description", new XCData(propertyType.Description)));
genericProperties.Add(genericProperty);
}
var tabs = new XElement("Tabs");
foreach (var propertyGroup in mediaType.PropertyGroups)
{
var tab = new XElement("Tab",
new XElement("Id", propertyGroup.Id.ToString(CultureInfo.InvariantCulture)),
new XElement("Caption", propertyGroup.Name));
tabs.Add(tab);
}
var xml = new XElement("MediaType",
info,
structure,
genericProperties,
tabs);
return xml;
}
#endregion
#region Package Manifest
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.Mappers;
using Umbraco.Core.Persistence.UnitOfWork;
@@ -14,12 +15,27 @@ namespace Umbraco.Core.Standalone
private ServiceContext _serviceContext;
private readonly StandaloneCoreApplication _application;
public ServiceContextManager(string connectionString, string providerName)
public ServiceContextManager(string connectionString, string providerName, string baseDirectory)
{
_connectionString = connectionString;
_providerName = providerName;
_application = StandaloneCoreApplication.GetApplication();
Trace.WriteLine("ServiceContextManager-Current AppDomain: " + AppDomain.CurrentDomain.FriendlyName);
Trace.WriteLine("ServiceContextManager-Current AppDomain: " + AppDomain.CurrentDomain.BaseDirectory);
//var webAssembly = AppDomain.CurrentDomain.GetAssemblies().FirstOrDefault(x => x.FullName.StartsWith("umbraco"));
//if (webAssembly != null && examineEventHandlerToRemove == null)
//{
// var examineEventType = webAssembly.GetType("Umbraco.Web.Search.ExamineEvents");
// examineEventHandlerToRemove = examineEventType;
//}
_application = StandaloneCoreApplication.GetApplication(baseDirectory);
var examineEventHandlerToRemove = Type.GetType("Umbraco.Web.Search.ExamineEvents, umbraco");
if (examineEventHandlerToRemove != null)
_application.WithoutApplicationEventHandler(examineEventHandlerToRemove);
_application.Start();
}
@@ -8,7 +8,10 @@ namespace Umbraco.Core.Standalone
/// <summary>
/// Initializes a new instance of the <see cref="StandaloneCoreApplication"/> class.
/// </summary>
protected StandaloneCoreApplication() { }
protected StandaloneCoreApplication(string baseDirectory)
{
_baseDirectory = baseDirectory;
}
/// <summary>
/// Provides the application boot manager.
@@ -16,11 +19,12 @@ namespace Umbraco.Core.Standalone
/// <returns>An application boot manager.</returns>
protected override IBootManager GetBootManager()
{
return new StandaloneCoreBootManager(this, _handlersToAdd, _handlersToRemove);
return new StandaloneCoreBootManager(this, _handlersToAdd, _handlersToRemove, _baseDirectory);
}
#region Application
private readonly string _baseDirectory;
private static StandaloneCoreApplication _application;
private static bool _started;
private static readonly object AppLock = new object();
@@ -28,11 +32,11 @@ namespace Umbraco.Core.Standalone
/// <summary>
/// Gets the instance of the standalone Umbraco application.
/// </summary>
public static StandaloneCoreApplication GetApplication()
public static StandaloneCoreApplication GetApplication(string baseDirectory)
{
lock (AppLock)
{
return _application ?? (_application = new StandaloneCoreApplication());
return _application ?? (_application = new StandaloneCoreApplication(baseDirectory));
}
}
@@ -10,12 +10,16 @@ namespace Umbraco.Core.Standalone
{
private readonly IEnumerable<Type> _handlersToAdd;
private readonly IEnumerable<Type> _handlersToRemove;
private readonly string _baseDirectory;
public StandaloneCoreBootManager(UmbracoApplicationBase umbracoApplication, IEnumerable<Type> handlersToAdd, IEnumerable<Type> handlersToRemove)
public StandaloneCoreBootManager(UmbracoApplicationBase umbracoApplication, IEnumerable<Type> handlersToAdd, IEnumerable<Type> handlersToRemove, string baseDirectory)
: base(umbracoApplication)
{
_handlersToAdd = handlersToAdd;
_handlersToRemove = handlersToRemove;
_baseDirectory = baseDirectory;
base.InitializeApplicationRootPath(_baseDirectory);
// this is only here to ensure references to the assemblies needed for
// the DataTypesResolver otherwise they won't be loaded into the AppDomain.
@@ -25,8 +29,10 @@ namespace Umbraco.Core.Standalone
protected override void InitializeApplicationEventsResolver()
{
base.InitializeApplicationEventsResolver();
foreach (var type in _handlersToAdd)
ApplicationEventsResolver.Current.AddType(type);
foreach (var type in _handlersToRemove)
ApplicationEventsResolver.Current.RemoveType(type);
}
@@ -36,7 +42,7 @@ namespace Umbraco.Core.Standalone
base.InitializeResolvers();
//Mappers are not resolved, which could be because of a known TypeMapper issue
MappingResolver.Reset();
/*MappingResolver.Reset();
MappingResolver.Current = new MappingResolver(
() =>
new List<Type>
@@ -47,7 +53,7 @@ namespace Umbraco.Core.Standalone
typeof (MediaTypeMapper),
typeof (DataTypeDefinitionMapper),
typeof (UmbracoEntityMapper)
});
});*/
}
}
}
+29
View File
@@ -1035,5 +1035,34 @@ namespace Umbraco.Core
{
return ShortStringHelper.CleanStringForSafeFileName(text, culture);
}
/// <summary>
/// An extension method that returns a new string in which all occurrences of a
/// specified string in the current instance are replaced with another specified string.
/// StringComparison specifies the type of search to use for the specified string.
/// </summary>
/// <param name="source">Current instance of the string</param>
/// <param name="oldString">Specified string to replace</param>
/// <param name="newString">Specified string to inject</param>
/// <param name="stringComparison">String Comparison object to specify search type</param>
/// <returns>Updated string</returns>
public static string Replace(this string source, string oldString, string newString, StringComparison stringComparison)
{
var index = source.IndexOf(oldString, stringComparison);
// Determine if we found a match
var matchFound = index >= 0;
if (matchFound)
{
// Remove the old text
source = source.Remove(index, oldString.Length);
// Add the replacemenet text
source = source.Insert(index, newString);
}
return source;
}
}
}
+5 -3
View File
@@ -73,8 +73,10 @@ namespace Umbraco.Core
{
//NOTE: we cannot use AppDomain.CurrentDomain.GetAssemblies() because this only returns assemblies that have
// already been loaded in to the app domain, instead we will look directly into the bin folder and load each one.
var binFolder = Assembly.GetExecutingAssembly().GetAssemblyFile().Directory;
var binAssemblyFiles = Directory.GetFiles(binFolder.FullName, "*.dll", SearchOption.TopDirectoryOnly).ToList();
var binFolder = IOHelper.GetRootDirectoryBinFolder();
var binAssemblyFiles = Directory.GetFiles(binFolder, "*.dll", SearchOption.TopDirectoryOnly).ToList();
//var binFolder = Assembly.GetExecutingAssembly().GetAssemblyFile().Directory;
//var binAssemblyFiles = Directory.GetFiles(binFolder.FullName, "*.dll", SearchOption.TopDirectoryOnly).ToList();
assemblies = new List<Assembly>();
foreach (var a in binAssemblyFiles)
{
@@ -540,7 +542,7 @@ namespace Umbraco.Core
foreach (var typeToSearch in subTypesToSearch)
{
//recursively find the types inheriting from this sub type in the other non-scanned assemblies.
var foundTypes = GetClasses(typeToSearch, otherAssemblies, onlyConcreteClasses);
var foundTypes = GetClasses(typeToSearch, otherAssemblies, onlyConcreteClasses, additionalFilter);
foundAssignableTypes.AddRange(foundTypes);
}
-1
View File
@@ -772,7 +772,6 @@
<Compile Include="Xml\DynamicContext.cs" />
<Compile Include="Xml\XmlNamespaces.cs" />
<Compile Include="Xml\XmlNodeListFactory.cs" />
<Compile Include="Xml\XmlNodeExtensions.cs" />
<Compile Include="Xml\XPathNavigatorExtensions.cs" />
<Compile Include="Xml\XPathVariable.cs" />
</ItemGroup>
-169
View File
@@ -1,169 +0,0 @@
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using System.Xml.XPath;
// source: mvpxml.codeplex.com
namespace Umbraco.Core.Xml
{
/// <summary>
/// Provides extensions to XmlNode.
/// </summary>
internal static class XmlNodeExtensions
{
/// <summary>
/// Selects a list of XmlNode matching an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The list of XmlNode matching the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNodeList SelectNodes(this XmlNode source, string expression, IEnumerable<XPathVariable> variables)
{
var av = variables == null ? null : variables.ToArray();
return SelectNodes(source, expression, av);
}
/// <summary>
/// Selects a list of XmlNode matching an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The list of XmlNode matching the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNodeList SelectNodes(this XmlNode source, XPathExpression expression, IEnumerable<XPathVariable> variables)
{
var av = variables == null ? null : variables.ToArray();
return SelectNodes(source, expression, av);
}
/// <summary>
/// Selects a list of XmlNode matching an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The list of XmlNode matching the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNodeList SelectNodes(this XmlNode source, string expression, params XPathVariable[] variables)
{
if (variables == null || variables.Length == 0 || variables[0] == null)
return source.SelectNodes(expression);
var iterator = source.CreateNavigator().Select(expression, variables);
return XmlNodeListFactory.CreateNodeList(iterator);
}
/// <summary>
/// Selects a list of XmlNode matching an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The list of XmlNode matching the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNodeList SelectNodes(this XmlNode source, XPathExpression expression, params XPathVariable[] variables)
{
if (variables == null || variables.Length == 0 || variables[0] == null)
return source.SelectNodes(expression);
var iterator = source.CreateNavigator().Select(expression, variables);
return XmlNodeListFactory.CreateNodeList(iterator);
}
/// <summary>
/// Selects the first XmlNode that matches an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The first XmlNode that matches the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNode SelectSingleNode(this XmlNode source, string expression, IEnumerable<XPathVariable> variables)
{
var av = variables == null ? null : variables.ToArray();
return SelectSingleNode(source, expression, av);
}
/// <summary>
/// Selects the first XmlNode that matches an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The first XmlNode that matches the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNode SelectSingleNode(this XmlNode source, XPathExpression expression, IEnumerable<XPathVariable> variables)
{
var av = variables == null ? null : variables.ToArray();
return SelectSingleNode(source, expression, av);
}
/// <summary>
/// Selects the first XmlNode that matches an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The first XmlNode that matches the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNode SelectSingleNode(this XmlNode source, string expression, params XPathVariable[] variables)
{
if (variables == null || variables.Length == 0 || variables[0] == null)
return source.SelectSingleNode(expression);
return SelectNodes(source, expression, variables).Cast<XmlNode>().FirstOrDefault();
}
/// <summary>
/// Selects the first XmlNode that matches an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The first XmlNode that matches the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNode SelectSingleNode(this XmlNode source, XPathExpression expression, params XPathVariable[] variables)
{
if (variables == null || variables.Length == 0 || variables[0] == null)
return source.SelectSingleNode(expression);
return SelectNodes(source, expression, variables).Cast<XmlNode>().FirstOrDefault();
}
}
}
+158
View File
@@ -1,6 +1,10 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
using System.Xml.XPath;
using Umbraco.Core.Xml;
namespace Umbraco.Core
{
@@ -9,6 +13,160 @@ namespace Umbraco.Core
/// </summary>
internal static class XmlExtensions
{
/// <summary>
/// Selects a list of XmlNode matching an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The list of XmlNode matching the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNodeList SelectNodes(this XmlNode source, string expression, IEnumerable<XPathVariable> variables)
{
var av = variables == null ? null : variables.ToArray();
return SelectNodes(source, expression, av);
}
/// <summary>
/// Selects a list of XmlNode matching an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The list of XmlNode matching the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNodeList SelectNodes(this XmlNode source, XPathExpression expression, IEnumerable<XPathVariable> variables)
{
var av = variables == null ? null : variables.ToArray();
return SelectNodes(source, expression, av);
}
/// <summary>
/// Selects a list of XmlNode matching an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The list of XmlNode matching the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNodeList SelectNodes(this XmlNode source, string expression, params XPathVariable[] variables)
{
if (variables == null || variables.Length == 0 || variables[0] == null)
return source.SelectNodes(expression);
var iterator = source.CreateNavigator().Select(expression, variables);
return XmlNodeListFactory.CreateNodeList(iterator);
}
/// <summary>
/// Selects a list of XmlNode matching an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The list of XmlNode matching the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNodeList SelectNodes(this XmlNode source, XPathExpression expression, params XPathVariable[] variables)
{
if (variables == null || variables.Length == 0 || variables[0] == null)
return source.SelectNodes(expression);
var iterator = source.CreateNavigator().Select(expression, variables);
return XmlNodeListFactory.CreateNodeList(iterator);
}
/// <summary>
/// Selects the first XmlNode that matches an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The first XmlNode that matches the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNode SelectSingleNode(this XmlNode source, string expression, IEnumerable<XPathVariable> variables)
{
var av = variables == null ? null : variables.ToArray();
return SelectSingleNode(source, expression, av);
}
/// <summary>
/// Selects the first XmlNode that matches an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The first XmlNode that matches the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNode SelectSingleNode(this XmlNode source, XPathExpression expression, IEnumerable<XPathVariable> variables)
{
var av = variables == null ? null : variables.ToArray();
return SelectSingleNode(source, expression, av);
}
/// <summary>
/// Selects the first XmlNode that matches an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The first XmlNode that matches the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNode SelectSingleNode(this XmlNode source, string expression, params XPathVariable[] variables)
{
if (variables == null || variables.Length == 0 || variables[0] == null)
return source.SelectSingleNode(expression);
return SelectNodes(source, expression, variables).Cast<XmlNode>().FirstOrDefault();
}
/// <summary>
/// Selects the first XmlNode that matches an XPath expression.
/// </summary>
/// <param name="source">A source XmlNode.</param>
/// <param name="expression">An XPath expression.</param>
/// <param name="variables">A set of XPathVariables.</param>
/// <returns>The first XmlNode that matches the XPath expression.</returns>
/// <remarks>
/// <para>If <param name="variables" /> is <c>null</c>, or is empty, or contains only one single
/// value which itself is <c>null</c>, then variables are ignored.</para>
/// <para>The XPath expression should reference variables as <c>$var</c>.</para>
/// </remarks>
public static XmlNode SelectSingleNode(this XmlNode source, XPathExpression expression, params XPathVariable[] variables)
{
if (variables == null || variables.Length == 0 || variables[0] == null)
return source.SelectSingleNode(expression);
return SelectNodes(source, expression, variables).Cast<XmlNode>().FirstOrDefault();
}
/// <summary>
/// Converts from an XDocument to an XmlDocument
/// </summary>
@@ -1,4 +1,5 @@
using System.Linq;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using NUnit.Framework;
using Umbraco.Core.Models;
@@ -57,11 +58,35 @@ namespace Umbraco.Tests.CodeFirst
#region Test setup
public override void Initialize()
{
var currDir = new DirectoryInfo(TestHelper.CurrentAssemblyDirectory);
var configPath = Path.Combine(currDir.Parent.Parent.FullName, "config");
if (Directory.Exists(configPath) == false)
Directory.CreateDirectory(configPath);
var umbracoSettingsFile = Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config");
if (System.IO.File.Exists(umbracoSettingsFile) == false)
System.IO.File.Copy(
currDir.Parent.Parent.Parent.GetDirectories("Umbraco.Web.UI")
.First()
.GetDirectories("config").First()
.GetFiles("umbracoSettings.Release.config").First().FullName,
Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config"),
true);
Core.Configuration.UmbracoSettings.SettingsFilePath = Core.IO.IOHelper.MapPath(Core.IO.SystemDirectories.Config + Path.DirectorySeparatorChar, false);
base.Initialize();
}
public override void TearDown()
{
var currDir = new DirectoryInfo(TestHelper.CurrentAssemblyDirectory);
var umbracoSettingsFile = Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config");
if (System.IO.File.Exists(umbracoSettingsFile))
System.IO.File.Delete(umbracoSettingsFile);
base.TearDown();
}
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using NUnit.Framework;
@@ -17,8 +18,32 @@ namespace Umbraco.Tests.CoreStrings
public void Setup()
{
_helper = new LegacyShortStringHelper();
var currDir = new DirectoryInfo(TestHelpers.TestHelper.CurrentAssemblyDirectory);
Directory.CreateDirectory(Path.Combine(currDir.Parent.Parent.FullName, "config"));
File.Copy(
currDir.Parent.Parent.Parent.GetDirectories("Umbraco.Web.UI")
.First()
.GetDirectories("config").First()
.GetFiles("umbracoSettings.Release.config").First().FullName,
Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config"),
true);
Core.Configuration.UmbracoSettings.SettingsFilePath = Core.IO.IOHelper.MapPath(Core.IO.SystemDirectories.Config + Path.DirectorySeparatorChar, false);
}
[TearDown]
public void TearDown()
{
//TODO: Deleting the umbracoSettings.config file makes a lot of tests fail
//var currDir = new DirectoryInfo(TestHelpers.TestHelper.CurrentAssemblyDirectory);
//var umbracoSettingsFile = Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config");
//if (File.Exists(umbracoSettingsFile))
// File.Delete(umbracoSettingsFile);
}
#region Cases
[TestCase("foo", "foo")]
[TestCase(" foo ", "Foo")]
+22 -7
View File
@@ -27,19 +27,34 @@ namespace Umbraco.Tests
UmbracoContext.Current = routingContext.UmbracoContext;
var currDir = new DirectoryInfo(TestHelper.CurrentAssemblyDirectory);
File.Copy(
currDir.Parent.Parent.Parent.GetDirectories("Umbraco.Web.UI")
.First()
.GetDirectories("config").First()
.GetFiles("umbracoSettings.Release.config").First().FullName,
Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config"),
true);
var configPath = Path.Combine(currDir.Parent.Parent.FullName, "config");
if (Directory.Exists(configPath) == false)
Directory.CreateDirectory(configPath);
var umbracoSettingsFile = Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config");
if (File.Exists(umbracoSettingsFile) == false)
File.Copy(
currDir.Parent.Parent.Parent.GetDirectories("Umbraco.Web.UI")
.First()
.GetDirectories("config").First()
.GetFiles("umbracoSettings.Release.config").First().FullName,
Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config"),
true);
Core.Configuration.UmbracoSettings.SettingsFilePath = Core.IO.IOHelper.MapPath(Core.IO.SystemDirectories.Config + Path.DirectorySeparatorChar, false);
}
public override void TearDown()
{
//TODO: Deleting the umbracoSettings.config file makes a lot of tests fail
//var currDir = new DirectoryInfo(TestHelper.CurrentAssemblyDirectory);
//var umbracoSettingsFile = Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config");
//if (File.Exists(umbracoSettingsFile))
// File.Delete(umbracoSettingsFile);
base.TearDown();
UmbracoContext.Current = null;
}
@@ -2,13 +2,10 @@
using System.Xml.Linq;
using NUnit.Framework;
using Umbraco.Core;
using Umbraco.Core.ObjectResolution;
using Umbraco.Core.Models;
using Umbraco.Core.Strings;
using Umbraco.Tests.TestHelpers;
using Umbraco.Tests.TestHelpers.Entities;
using umbraco.editorControls.tinyMCE3;
using umbraco.interfaces;
namespace Umbraco.Tests.Models
{
@@ -4,6 +4,7 @@ using System.Xml;
using NUnit.Framework;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Tests.PublishedContent;
using Umbraco.Tests.TestHelpers;
using Umbraco.Web;
using Umbraco.Web.PublishedCache;
@@ -77,6 +78,7 @@ namespace Umbraco.Tests.PublishedCache
//ensure the StateHelper is using our custom context
StateHelper.HttpContext = _httpContextFactory.HttpContext;
UmbracoSettings.UseLegacyXmlSchema = false;
var cache = new PublishedContentCache
{
GetXmlDelegate = (context, preview) =>
@@ -30,13 +30,20 @@ namespace Umbraco.Tests.PublishedContent
base.Initialize();
//copy the umbraco settings file over
var currDir = new DirectoryInfo(TestHelper.CurrentAssemblyDirectory);
File.Copy(
currDir.Parent.Parent.Parent.GetDirectories("Umbraco.Web.UI")
.First()
.GetDirectories("config").First()
.GetFiles("umbracoSettings.Release.config").First().FullName,
Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config"),
true);
var configPath = Path.Combine(currDir.Parent.Parent.FullName, "config");
if (Directory.Exists(configPath) == false)
Directory.CreateDirectory(configPath);
var umbracoSettingsFile = Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config");
if (File.Exists(umbracoSettingsFile) == false)
File.Copy(
currDir.Parent.Parent.Parent.GetDirectories("Umbraco.Web.UI")
.First()
.GetDirectories("config").First()
.GetFiles("umbracoSettings.Release.config").First().FullName,
Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config"),
true);
UmbracoSettings.SettingsFilePath = IOHelper.MapPath(SystemDirectories.Config + Path.DirectorySeparatorChar, false);
@@ -76,6 +83,14 @@ namespace Umbraco.Tests.PublishedContent
public override void TearDown()
{
//TODO: Deleting the umbracoSettings.config file makes a lot of tests fail
//var currDir = new DirectoryInfo(TestHelper.CurrentAssemblyDirectory);
//var umbracoSettingsFile = Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config");
//if (File.Exists(umbracoSettingsFile))
// File.Delete(umbracoSettingsFile);
base.TearDown();
}
@@ -1,3 +1,4 @@
using System.IO;
using System.Linq;
using NUnit.Framework;
using Umbraco.Core;
@@ -6,6 +7,7 @@ using Umbraco.Web;
using Umbraco.Web.Models;
using Umbraco.Web.PublishedCache;
using Umbraco.Web.PublishedCache.XmlPublishedCache;
using File = Umbraco.Core.Models.File;
namespace Umbraco.Tests.PublishedContent
{
@@ -13,9 +15,26 @@ namespace Umbraco.Tests.PublishedContent
public class DynamicPublishedContentTests : DynamicDocumentTestsBase<DynamicPublishedContent, DynamicPublishedContentList>
{
public override void Initialize()
{
base.Initialize();
{
var currDir = new DirectoryInfo(TestHelpers.TestHelper.CurrentAssemblyDirectory);
var configPath = Path.Combine(currDir.Parent.Parent.FullName, "config");
if (Directory.Exists(configPath) == false)
Directory.CreateDirectory(configPath);
var umbracoSettingsFile = Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config");
if (System.IO.File.Exists(umbracoSettingsFile) == false)
System.IO.File.Copy(
currDir.Parent.Parent.Parent.GetDirectories("Umbraco.Web.UI")
.First()
.GetDirectories("config").First()
.GetFiles("umbracoSettings.Release.config").First().FullName,
Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config"),
true);
Core.Configuration.UmbracoSettings.SettingsFilePath = Core.IO.IOHelper.MapPath(Core.IO.SystemDirectories.Config + Path.DirectorySeparatorChar, false);
base.Initialize();
}
public override void TearDown()
@@ -18,17 +18,36 @@ namespace Umbraco.Tests.Routing
base.Initialize();
var currDir = new DirectoryInfo(TestHelper.CurrentAssemblyDirectory);
File.Copy(
currDir.Parent.Parent.Parent.GetDirectories("Umbraco.Web.UI")
.First()
.GetDirectories("config").First()
.GetFiles("umbracoSettings.Release.config").First().FullName,
Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config"),
true);
var configPath = Path.Combine(currDir.Parent.Parent.FullName, "config");
if (Directory.Exists(configPath) == false)
Directory.CreateDirectory(configPath);
var umbracoSettingsFile = Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config");
if (File.Exists(umbracoSettingsFile) == false)
File.Copy(
currDir.Parent.Parent.Parent.GetDirectories("Umbraco.Web.UI")
.First()
.GetDirectories("config").First()
.GetFiles("umbracoSettings.Release.config").First().FullName,
Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config"),
true);
SettingsForTests.SettingsFilePath = Core.IO.IOHelper.MapPath(Core.IO.SystemDirectories.Config + Path.DirectorySeparatorChar, false);
}
public void TearDown()
{
//TODO: Deleting the umbracoSettings.config file makes a lot of tests fail
//var currDir = new DirectoryInfo(TestHelper.CurrentAssemblyDirectory);
//var umbracoSettingsFile = Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config");
//if (File.Exists(umbracoSettingsFile))
// File.Delete(umbracoSettingsFile);
}
protected override void FreezeResolution()
{
SiteDomainHelperResolver.Current = new SiteDomainHelperResolver(new SiteDomainHelper());
@@ -158,33 +158,46 @@ namespace Umbraco.Tests.Services
}
}
[Test]
public void Can_Save_ContentType_Structure_And_Create_Content_Based_On_It()
{
// Arrange
var cs = ServiceContext.ContentService;
var cts = ServiceContext.ContentTypeService;
var dtdYesNo = ServiceContext.DataTypeService.GetDataTypeDefinitionById(-49);
var ctBase = new ContentType(-1) { Name = "Base", Alias = "Base", Icon = "folder.gif", Thumbnail = "folder.png" };
ctBase.AddPropertyType(new PropertyType(dtdYesNo) { Name = "Hide From Navigation", Alias = Constants.Conventions.Content.NaviHide } /*,"Navigation"*/ );
cts.Save(ctBase);
[Test]
public void Can_Save_ContentType_Structure_And_Create_Content_Based_On_It()
{
// Arrange
var cs = ServiceContext.ContentService;
var cts = ServiceContext.ContentTypeService;
var dtdYesNo = ServiceContext.DataTypeService.GetDataTypeDefinitionById(-49);
var ctBase = new ContentType(-1) {Name = "Base", Alias = "Base", Icon = "folder.gif", Thumbnail = "folder.png"};
ctBase.AddPropertyType(new PropertyType(dtdYesNo)
{
Name = "Hide From Navigation",
Alias = Constants.Conventions.Content.NaviHide
}
/*,"Navigation"*/);
cts.Save(ctBase);
var ctHomePage = new ContentType(ctBase) { Name = "Home Page", Alias = "HomePage", Icon = "settingDomain.gif", Thumbnail = "folder.png", AllowedAsRoot = true };
ctHomePage.AddPropertyType(new PropertyType(dtdYesNo) { Name = "Some property", Alias = "someProperty" } /*,"Navigation"*/ );
cts.Save(ctHomePage);
var ctHomePage = new ContentType(ctBase)
{
Name = "Home Page",
Alias = "HomePage",
Icon = "settingDomain.gif",
Thumbnail = "folder.png",
AllowedAsRoot = true
};
ctHomePage.AddPropertyType(new PropertyType(dtdYesNo) {Name = "Some property", Alias = "someProperty"}
/*,"Navigation"*/);
cts.Save(ctHomePage);
// Act
var homeDoc = cs.CreateContent("Home Page", -1, "HomePage");
cs.SaveAndPublish(homeDoc);
// Act
var homeDoc = cs.CreateContent("Home Page", -1, "HomePage");
cs.SaveAndPublish(homeDoc);
// Assert
Assert.That(ctBase.HasIdentity, Is.True);
Assert.That(ctHomePage.HasIdentity, Is.True);
Assert.That(homeDoc.HasIdentity, Is.True);
Assert.That(homeDoc.ContentTypeId, Is.EqualTo(ctHomePage.Id));
}
// Assert
Assert.That(ctBase.HasIdentity, Is.True);
Assert.That(ctHomePage.HasIdentity, Is.True);
Assert.That(homeDoc.HasIdentity, Is.True);
Assert.That(homeDoc.ContentTypeId, Is.EqualTo(ctHomePage.Id));
}
[Test]
[Test]
public void Can_Create_And_Save_ContentType_Composition()
{
/*
@@ -210,6 +223,140 @@ namespace Umbraco.Tests.Services
Assert.That(success, Is.False);
}
[Test]
public void Can_Remove_ContentType_Composition_From_ContentType()
{
//Test for U4-2234
var cts = ServiceContext.ContentTypeService;
//Arrange
var component = CreateComponent();
cts.Save(component);
var banner = CreateBannerComponent(component);
cts.Save(banner);
var site = CreateSite();
cts.Save(site);
var homepage = CreateHomepage(site);
cts.Save(homepage);
//Add banner to homepage
var added = homepage.AddContentType(banner);
cts.Save(homepage);
//Assert composition
var bannerExists = homepage.ContentTypeCompositionExists(banner.Alias);
var bannerPropertyExists = homepage.CompositionPropertyTypes.Any(x => x.Alias.Equals("bannerName"));
Assert.That(added, Is.True);
Assert.That(bannerExists, Is.True);
Assert.That(bannerPropertyExists, Is.True);
Assert.That(homepage.CompositionPropertyTypes.Count(), Is.EqualTo(6));
//Remove banner from homepage
var removed = homepage.RemoveContentType(banner.Alias);
cts.Save(homepage);
//Assert composition
var bannerStillExists = homepage.ContentTypeCompositionExists(banner.Alias);
var bannerPropertyStillExists = homepage.CompositionPropertyTypes.Any(x => x.Alias.Equals("bannerName"));
Assert.That(removed, Is.True);
Assert.That(bannerStillExists, Is.False);
Assert.That(bannerPropertyStillExists, Is.False);
Assert.That(homepage.CompositionPropertyTypes.Count(), Is.EqualTo(4));
}
private ContentType CreateComponent()
{
var component = new ContentType(-1)
{
Alias = "component",
Name = "Component",
Description = "ContentType used for Component grouping",
Icon = ".sprTreeDoc3",
Thumbnail = "doc.png",
SortOrder = 1,
CreatorId = 0,
Trashed = false
};
var contentCollection = new PropertyTypeCollection();
contentCollection.Add(new PropertyType(new Guid(), DataTypeDatabaseType.Ntext) { Alias = "componentGroup", Name = "Component Group", Description = "", HelpText = "", Mandatory = false, SortOrder = 1, DataTypeDefinitionId = -88 });
component.PropertyGroups.Add(new PropertyGroup(contentCollection) { Name = "Component", SortOrder = 1 });
return component;
}
private ContentType CreateBannerComponent(ContentType parent)
{
var banner = new ContentType(parent)
{
Alias = "banner",
Name = "Banner Component",
Description = "ContentType used for Banner Component",
Icon = ".sprTreeDoc3",
Thumbnail = "doc.png",
SortOrder = 1,
CreatorId = 0,
Trashed = false
};
var propertyType = new PropertyType(new Guid(), DataTypeDatabaseType.Ntext)
{
Alias = "bannerName",
Name = "Banner Name",
Description = "",
HelpText = "",
Mandatory = false,
SortOrder = 2,
DataTypeDefinitionId = -88
};
banner.AddPropertyType(propertyType, "Component");
return banner;
}
private ContentType CreateSite()
{
var site = new ContentType(-1)
{
Alias = "site",
Name = "Site",
Description = "ContentType used for Site inheritence",
Icon = ".sprTreeDoc3",
Thumbnail = "doc.png",
SortOrder = 2,
CreatorId = 0,
Trashed = false
};
var contentCollection = new PropertyTypeCollection();
contentCollection.Add(new PropertyType(new Guid(), DataTypeDatabaseType.Ntext) { Alias = "hostname", Name = "Hostname", Description = "", HelpText = "", Mandatory = false, SortOrder = 1, DataTypeDefinitionId = -88 });
site.PropertyGroups.Add(new PropertyGroup(contentCollection) { Name = "Site Settings", SortOrder = 1 });
return site;
}
private ContentType CreateHomepage(ContentType parent)
{
var contentType = new ContentType(parent)
{
Alias = "homepage",
Name = "Homepage",
Description = "ContentType used for the Homepage",
Icon = ".sprTreeDoc3",
Thumbnail = "doc.png",
SortOrder = 1,
CreatorId = 0,
Trashed = false
};
var contentCollection = new PropertyTypeCollection();
contentCollection.Add(new PropertyType(new Guid(), DataTypeDatabaseType.Ntext) { Alias = "title", Name = "Title", Description = "", HelpText = "", Mandatory = false, SortOrder = 1, DataTypeDefinitionId = -88 });
contentCollection.Add(new PropertyType(new Guid(), DataTypeDatabaseType.Ntext) { Alias = "bodyText", Name = "Body Text", Description = "", HelpText = "", Mandatory = false, SortOrder = 2, DataTypeDefinitionId = -87 });
contentCollection.Add(new PropertyType(new Guid(), DataTypeDatabaseType.Ntext) { Alias = "author", Name = "Author", Description = "Name of the author", HelpText = "", Mandatory = false, SortOrder = 3, DataTypeDefinitionId = -88 });
contentType.PropertyGroups.Add(new PropertyGroup(contentCollection) { Name = "Content", SortOrder = 1 });
return contentType;
}
private IEnumerable<IContentType> CreateContentTypeHierarchy()
{
//create the master type
@@ -128,7 +128,12 @@ namespace Umbraco.Tests.Services
Assert.That(entities.Any(), Is.True);
Assert.That(entities.Count(), Is.EqualTo(3));
Assert.That(entities.Any(x => ((UmbracoEntity)x).UmbracoFile != string.Empty), Is.True);
//Assert.That(entities.Any(x => ((UmbracoEntity)x).UmbracoFile != string.Empty), Is.True);
Assert.That(
entities.Any(
x =>
((UmbracoEntity) x).UmbracoProperties.Any(
y => y.DataTypeControlId == new Guid(Constants.PropertyEditors.UploadField))), Is.True);
}
public override void CreateTestData()
+3 -1
View File
@@ -447,7 +447,9 @@ namespace Umbraco.Tests
"HtmlAgilityPack.",
"TidyNet.",
"ICSharpCode.",
"CookComputing."
"CookComputing.",
/* Mono */
"MonoDevelop.NUnit"
};
public static IEnumerable<Type> FindClassesOfTypeWithAttribute<T, TAttribute>()
@@ -30,6 +30,8 @@ namespace Umbraco.Tests.UmbracoExamine
var path = svc.MapPath("/App_Data/Converting_file_to_PDF.pdf");
var f = new FileInfo(path);
var dir = f.Directory;
//ensure the folder is there
System.IO.Directory.CreateDirectory(dir.FullName);
var pdfs = new[] { TestFiles.Converting_file_to_PDF, TestFiles.PDFStandards, TestFiles.SurviorFlipCup, TestFiles.windows_vista };
var names = new[] { "Converting_file_to_PDF.pdf", "PDFStandards.pdf", "SurviorFlipCup.pdf", "windows_vista.pdf" };
for (int index = 0; index < pdfs.Length; index++)
+12 -4
View File
@@ -100,9 +100,9 @@
<Project>{07fbc26b-2927-4a22-8d96-d644c667fecc}</Project>
<Name>UmbracoExamine</Name>
</ProjectReference>
<Reference Include="ClientDependency.Core, Version=1.7.0.1, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="ClientDependency.Core, Version=1.7.0.2, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\ClientDependency.1.7.0.1\lib\ClientDependency.Core.dll</HintPath>
<HintPath>..\packages\ClientDependency.1.7.0.2\lib\ClientDependency.Core.dll</HintPath>
</Reference>
<Reference Include="ClientDependency.Core.Mvc, Version=1.7.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
@@ -451,6 +451,13 @@
<DependentUpon>EditMacro.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Umbraco\Dialogs\MoveOrCopy.aspx.cs">
<DependentUpon>moveOrCopy.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Umbraco\Dialogs\MoveOrCopy.aspx.designer.cs">
<DependentUpon>moveOrCopy.aspx</DependentUpon>
</Compile>
<Compile Include="Umbraco\dialogs\Sort.aspx.cs">
<DependentUpon>sort.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -837,6 +844,7 @@
<Content Include="Umbraco_Client\ContextMenu\Js\jquery.contextMenu.js" />
<Content Include="Umbraco_Client\Dashboards\ExamineManagement.css" />
<Content Include="Umbraco_Client\Dashboards\ExamineManagement.js" />
<Content Include="Umbraco_Client\Dashboards\ExamineManagementIco.png" />
<Content Include="Umbraco_Client\Dialogs\SortDialog.css" />
<Content Include="Umbraco_client\Dialogs\SortDialog.js" />
<Content Include="Umbraco_Client\Dialogs\AssignDomain2.js" />
@@ -2551,9 +2559,9 @@ xcopy "$(ProjectDir)"..\packages\SqlServerCE.4.0.0.0\x86\*.* "$(TargetDir)x86\"
<WebProjectProperties>
<UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>61637</DevelopmentServerPort>
<DevelopmentServerPort>6120</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:61638</IISUrl>
<IISUrl>http://localhost:6120</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer>
<CustomServerUrl>
@@ -2,7 +2,7 @@
<!--
For full details of the client dependency framework, visit
the CodePlex site @ http://clientdependency.codeplex.com
https://github.com/Shandem/ClientDependency
It manages CSS and JS file dependencies per control without having to worry about duplicates.
It also manages the combination, compression and minification of all JS & CSS files.
@@ -10,26 +10,40 @@ NOTES:
* Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config
* A new version will invalidate both client and server cache and create new persisted files
-->
<clientDependency version="1" fileDependencyExtensions=".js,.css">
<clientDependency version="1" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
<!--
This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true.
The LoaderControlProvider is set to default, the javascriptPlaceHolderId, cssPlaceHolderId attributes are optional and default to what is listed below. If using
this provider, then you must specify both PlaceHolder controls on your page in order to render the JS/CSS.
-->
<fileRegistration defaultProvider="LoaderControlProvider">
<providers>
<add name="PageHeaderProvider" type="ClientDependency.Core.FileRegistration.Providers.PageHeaderProvider, ClientDependency.Core"/>
<add name="LazyLoadProvider" type="ClientDependency.Core.FileRegistration.Providers.LazyLoadProvider, ClientDependency.Core"/>
<add name="LoaderControlProvider" type="ClientDependency.Core.FileRegistration.Providers.LoaderControlProvider, ClientDependency.Core"/>
<add name="PageHeaderProvider" type="ClientDependency.Core.FileRegistration.Providers.PageHeaderProvider, ClientDependency.Core" />
<add name="LazyLoadProvider" type="ClientDependency.Core.FileRegistration.Providers.LazyLoadProvider, ClientDependency.Core" />
<add name="LoaderControlProvider" type="ClientDependency.Core.FileRegistration.Providers.LoaderControlProvider, ClientDependency.Core" />
<add name="PlaceHolderProvider" type="ClientDependency.Core.FileRegistration.Providers.PlaceHolderProvider, ClientDependency.Core" enableCompositeFiles="true" javascriptPlaceHolderId="JavaScriptPlaceHolder" cssPlaceHolderId="CssPlaceHolder" />
<!-- Used for loading dependencies in Canvas mode -->
<add name="CanvasProvider" type="umbraco.presentation.LiveEditing.CanvasClientDependencyProvider, umbraco" />
</providers>
</fileRegistration>
<!--
The composite file section configures the compression/combination/minification of files.
You can enable/disable minification of either JS/CSS files and you can enable/disable the
persistence of composite files. By default, minification and persistence is enabled. Persisting files
means that the system is going to save the output of the compressed/combined/minified files
to disk so that on any subsequent request (when output cache expires) that these files don't have
to be recreated again and will be based on the persisted file on disk. This saves on processing time.
-->
<!-- This section is used for MVC only -->
<mvc defaultRenderer="StandardRenderer">
<renderers>
<add name="StandardRenderer" type="ClientDependency.Core.FileRegistration.Providers.StandardRenderer, ClientDependency.Core" />
<add name="LazyLoadRenderer" type="ClientDependency.Core.FileRegistration.Providers.LazyLoadRenderer, ClientDependency.Core" />
</renderers>
</mvc>
<!--
The composite file section configures the compression/combination/minification of files.
You can enable/disable minification of either JS/CSS files and you can enable/disable the
persistence of composite files. By default, minification and persistence is enabled. Persisting files
means that the system is going to save the output of the compressed/combined/minified files
to disk so that on any subsequent request (when output cache expires) that these files don't have
to be recreated again and will be based on the persisted file on disk. This saves on processing time.
-->
<compositeFiles defaultProvider="defaultFileProcessingProvider" compositeFileHandlerPath="~/DependencyHandler.axd">
<fileProcessingProviders>
<add name="CompositeFileProcessor"
@@ -38,30 +52,42 @@ NOTES:
enableJsMinify="true"
persistFiles="true"
compositeFilePath="~/App_Data/TEMP/ClientDependency"
urlType="Base64QueryStrings" />
bundleDomains="localhost:123456"
urlType="Base64QueryStrings"
pathUrlFormat="{dependencyId}/{version}/{type}"/>
</fileProcessingProviders>
<!-- A file map provider stores references to dependency files by an id to be used in the handler URL when using the MappedId Url type -->
<fileMapProviders>
<add name="XmlFileMap"
type="ClientDependency.Core.CompositeFiles.Providers.XmlFileMapper, ClientDependency.Core"
mapPath="~/App_Data/TEMP/ClientDependency" />
</fileMapProviders>
<!--
Defines the mime types to compress when requested by the client.
Path is a regex selector, or a * can be used as in place of 'any'.
Generally mime types are only set by client browsers in the request for things
such as JSON or XML ajax requests.
-->
Defines the mime types to compress when requested by the client.
Path is a regex selector, or a * can be used as in place of 'any'.
Generally mime types are only set by client browsers in the request for things
such as JSON or XML ajax requests.
-->
<mimeTypeCompression>
<!-- Compress all json requests for the tree -->
<add type="application/json" path="^.*?/webservices/Tree.*" />
</mimeTypeCompression>
<!--
Defines the paths to match on to enable rogue file compression.
Path is a regex selector, or a * can be used as in place of 'any'.
jsExt and cssExt are comma seperated list of extensions to match to have the dependencies
replaced with the composite file handler. You can even include ASP.Net web service JS proxies.
-->
<rogueFileCompression>
<!--<add path="*" compressJs="true" compressCss="true" jsExt=".js,asmx/js" cssExt=".css">
<exclusions>
<add path="^.*test.aspx.*"/>
</exclusions>
</add>-->
</rogueFileCompression>
</compositeFiles>
<!-- ClientDependency also supports the ASP.Net MVC framework, see codeplex URL for full details -->
<!--
<mvc defaultRenderer="StandardRenderer">
<renderers>
<add name="StandardRenderer" type="ClientDependency.Core.Mvc.Providers.StandardRenderer, ClientDependency.Core"/>
<add name="LazyLoadRenderer" type="ClientDependency.Core.Mvc.Providers.LazyLoadRenderer, ClientDependency.Core"/>
</renderers>
</mvc>
-->
</clientDependency>
@@ -2,7 +2,7 @@
<!--
For full details of the client dependency framework, visit
the CodePlex site @ http://clientdependency.codeplex.com
https://github.com/Shandem/ClientDependency
It manages CSS and JS file dependencies per control without having to worry about duplicates.
It also manages the combination, compression and minification of all JS & CSS files.
@@ -10,8 +10,13 @@ NOTES:
* Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config
* A new version will invalidate both client and server cache and create new persisted files
-->
<clientDependency version="11" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
<clientDependency version="8" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
<!--
This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true.
The LoaderControlProvider is set to default, the javascriptPlaceHolderId, cssPlaceHolderId attributes are optional and default to what is listed below. If using
this provider, then you must specify both PlaceHolder controls on your page in order to render the JS/CSS.
-->
<fileRegistration defaultProvider="LoaderControlProvider">
<providers>
<add name="PageHeaderProvider" type="ClientDependency.Core.FileRegistration.Providers.PageHeaderProvider, ClientDependency.Core" />
@@ -32,16 +37,16 @@ NOTES:
</mvc>
<!--
The composite file section configures the compression/combination/minification of files.
You can enable/disable minification of either JS/CSS files and you can enable/disable the
persistence of composite files. By default, minification and persistence is enabled. Persisting files
means that the system is going to save the output of the compressed/combined/minified files
to disk so that on any subsequent request (when output cache expires) that these files don't have
to be recreated again and will be based on the persisted file on disk. This saves on processing time.
-->
<compositeFiles defaultProvider="defaultFileProcessingProvider" compositeFileHandlerPath="~/DependencyHandler.axd">
The composite file section configures the compression/combination/minification of files.
You can enable/disable minification of either JS/CSS files and you can enable/disable the
persistence of composite files. By default, minification and persistence is enabled. Persisting files
means that the system is going to save the output of the compressed/combined/minified files
to disk so that on any subsequent request (when output cache expires) that these files don't have
to be recreated again and will be based on the persisted file on disk. This saves on processing time.
-->
<compositeFiles defaultProvider="defaultFileProcessingProvider" compositeFileHandlerPath="~/DependencyHandler.axd">
<fileProcessingProviders>
<add name="CompositeFileProcessor" type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core" enableCssMinify="true" enableJsMinify="true" persistFiles="true" compositeFilePath="~/App_Data/TEMP/ClientDependency" urlType="Base64QueryStrings" />
<add name="CompositeFileProcessor" type="ClientDependency.Core.CompositeFiles.Providers.CompositeFileProcessingProvider, ClientDependency.Core" enableCssMinify="true" enableJsMinify="true" persistFiles="true" compositeFilePath="~/App_Data/TEMP/ClientDependency" bundleDomains="localhost:123456" urlType="Base64QueryStrings" pathUrlFormat="{dependencyId}/{version}/{type}" />
</fileProcessingProviders>
<!-- A file map provider stores references to dependency files by an id to be used in the handler URL when using the MappedId Url type -->
@@ -49,17 +54,31 @@ NOTES:
<add name="XmlFileMap" type="ClientDependency.Core.CompositeFiles.Providers.XmlFileMapper, ClientDependency.Core" mapPath="~/App_Data/TEMP/ClientDependency" />
</fileMapProviders>
<!--
Defines the mime types to compress when requested by the client.
Path is a regex selector, or a * can be used as in place of 'any'.
Generally mime types are only set by client browsers in the request for things
such as JSON or XML ajax requests.
-->
<!--
Defines the mime types to compress when requested by the client.
Path is a regex selector, or a * can be used as in place of 'any'.
Generally mime types are only set by client browsers in the request for things
such as JSON or XML ajax requests.
-->
<mimeTypeCompression>
<!-- Compress all json requests for the tree -->
<add type="application/json" path="^.*?/webservices/Tree.*" />
</mimeTypeCompression>
</compositeFiles>
<!--
Defines the paths to match on to enable rogue file compression.
Path is a regex selector, or a * can be used as in place of 'any'.
jsExt and cssExt are comma seperated list of extensions to match to have the dependencies
replaced with the composite file handler. You can even include ASP.Net web service JS proxies.
-->
<rogueFileCompression>
<!--<add path="*" compressJs="true" compressCss="true" jsExt=".js,asmx/js" cssExt=".css">
<exclusions>
<add path="^.*test.aspx.*"/>
</exclusions>
</add>-->
</rogueFileCompression>
</compositeFiles>
</clientDependency>
@@ -101,5 +101,12 @@
<control>/umbraco/plugins/uGoLive/Dashboard.ascx</control>
</tab>
</section>
<section alias="ExamineManagement">
<areas>
<area>developer</area>
</areas>
<tab caption="Examine Management">
<control>/umbraco/dashboard/ExamineManagement.ascx</control>
</tab>
</section>
</dashBoard>
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<urlrewritingnet xmlns="http://www.urlrewriting.net/schemas/config/2006/07">
<rewrites>
<!--
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<urlrewritingnet xmlns="http://www.urlrewriting.net/schemas/config/2006/07">
<rewrites>
<!--
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<microsoft.scripting>
<languages>
<language names="IronPython;Python;py" extensions=".py" displayName="IronPython 2.6" type="IronPython.Runtime.PythonContext, IronPython, Version=2.6.10920.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<microsoft.scripting>
<languages>
<language names="IronPython;Python;py" extensions=".py" displayName="IronPython 2.6" type="IronPython.Runtime.PythonContext, IronPython, Version=2.6.10920.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
@@ -33,7 +33,7 @@
<div class="row">
<asp:label AssociatedControlID="tb_email" runat="server">Email:</asp:label>
<span><asp:TextBox ID="tb_email" CssClass="text" type="text" Text="admin@domain.com" runat="server" /></span>
<span><asp:TextBox ID="tb_email" CssClass="text" type="text" Text="admin@example.com" runat="server" /></span>
<asp:RequiredFieldValidator Display="Dynamic" CssClass="invalidaing" ControlToValidate="tb_email" runat="server" ErrorMessage="Email is a mandatory field" />
</div>
+1 -1
View File
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="ClientDependency" version="1.7.0.1" targetFramework="net40" />
<package id="ClientDependency" version="1.7.0.2" targetFramework="net40" />
<package id="ClientDependency-Mvc" version="1.7.0.0" targetFramework="net40" />
<package id="Examine" version="0.1.51.2941" targetFramework="net40" />
<package id="log4net-mediumtrust" version="2.0.0" targetFramework="net40" />
@@ -432,13 +432,13 @@ Dette er en automatisk mail for at fortælle at handlingen '%1%'
er blevet udført på siden '%2%'
af brugeren '%3%'
Gå til http://%4%/umbraco/default.aspx?section=content&id=%5% for at redigere.
Gå til http://%4%/default.aspx?section=content&id=%5% for at redigere.
Ha' en dejlig dag!
Mange hilsner fra umbraco robotten
]]></key>
<key alias="mailBodyHtml"><![CDATA[<p>Hej %0%</p> <p>Dette er en automatisk mail for at informere dig om at opgaven <strong>'%1%'</strong> er blevet udførtpå siden <a href="%7%"><strong>'%2%'</strong></a> af brugeren <strong>'%3%'</strong> </p> <div style="margin: 8px 0; padding: 8px; display: block;"> <br /> <a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/umbraco/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLISÉr&nbsp;&nbsp;</a> &nbsp; <a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp; <a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/umbraco/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;SLET&nbsp;&nbsp;&nbsp;&nbsp;</a> <br /> </div> <p> <h3>Opdateringssammendrag:</h3> <table style="width: 100%;"> %6% </table> </p> <div style="margin: 8px 0; padding: 8px; display: block;"> <br /> <a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/umbraco/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLISÉR&nbsp;&nbsp;</a> &nbsp; <a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp; <a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/umbraco/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;SLET&nbsp;&nbsp;&nbsp;&nbsp;</a> <br /> </div> <p>Hav en fortsat god dag!<br /><br /> De bedste hilsner fra umbraco robotten </p>]]></key>
<key alias="mailBodyHtml"><![CDATA[<p>Hej %0%</p> <p>Dette er en automatisk mail for at informere dig om at opgaven <strong>'%1%'</strong> er blevet udførtpå siden <a href="%7%"><strong>'%2%'</strong></a> af brugeren <strong>'%3%'</strong> </p> <div style="margin: 8px 0; padding: 8px; display: block;"> <br /> <a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLISÉr&nbsp;&nbsp;</a> &nbsp; <a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp; <a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;SLET&nbsp;&nbsp;&nbsp;&nbsp;</a> <br /> </div> <p> <h3>Opdateringssammendrag:</h3> <table style="width: 100%;"> %6% </table> </p> <div style="margin: 8px 0; padding: 8px; display: block;"> <br /> <a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLISÉR&nbsp;&nbsp;</a> &nbsp; <a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp; <a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;SLET&nbsp;&nbsp;&nbsp;&nbsp;</a> <br /> </div> <p>Hav en fortsat god dag!<br /><br /> De bedste hilsner fra umbraco robotten </p>]]></key>
<key alias="mailSubject">[%0%] Notificering om %1% udført på %2%</key>
<key alias="notifications">Notificeringer</key>
</area>
@@ -463,7 +463,7 @@ Hallo %0%,
die Aufgabe '%1%' (von Benutzer '%3%') an der Seite '%2%' wurde ausgeführt.
Zum Bearbeiten verwenden Sie bitte diesen Link: http://%4%/umbraco/actions/editContent.aspx?id=%5%
Zum Bearbeiten verwenden Sie bitte diesen Link: http://%4%/actions/editContent.aspx?id=%5%
Einen schönen Tag wünscht
Ihr freundlicher Umbraco-Robot
@@ -474,9 +474,9 @@ Ihr freundlicher Umbraco-Robot
<p>die Aufgabe <strong>'%1%'</strong> (von Benutzer '%3%') an der Seite <a href="%7%"><strong>'%2%'</strong></a> wurde ausgeführt.</p>
<div style="margin: 8px 0; padding: 8px; display: block;">
<br />
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/umbraco/actions/publish.aspx?id=%5%">&nbsp;&nbsp;VERÖFFENTLICHEN&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BEARBEITEN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/umbraco/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;LÖSCHEN&nbsp;&nbsp;&nbsp;&nbsp;</a>
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/actions/publish.aspx?id=%5%">&nbsp;&nbsp;VERÖFFENTLICHEN&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BEARBEITEN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;LÖSCHEN&nbsp;&nbsp;&nbsp;&nbsp;</a>
<br />
</div>
<p>
@@ -487,9 +487,9 @@ Ihr freundlicher Umbraco-Robot
</p>
<div style="margin: 8px 0; padding: 8px; display: block;">
<br />
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/umbraco/actions/publish.aspx?id=%5%">&nbsp;&nbsp;VERÖFFENTLICHEN&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BEARBEITEN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/umbraco/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;LÖSCHEN&nbsp;&nbsp;&nbsp;&nbsp;</a>
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/actions/publish.aspx?id=%5%">&nbsp;&nbsp;VERÖFFENTLICHEN&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;BEARBEITEN&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;LÖSCHEN&nbsp;&nbsp;&nbsp;&nbsp;</a>
<br />
</div>
<p>Einen schönen Tag wünscht<br />Ihr freundlicher Umbraco-Robot</p>
@@ -50,7 +50,7 @@
<key alias="domainHelp">
<![CDATA[Valid domain names are: "example.com", "www.example.com", "example.com:8080" or
"https://www.example.com/".<br /><br />One-level paths in domains are supported, eg. "example.com/en". However, they
they should be avoided. Better use the culture setting above.]]>
should be avoided. Better use the culture setting above.]]>
</key>
<key alias="domainUpdated">Domain '%0%' has been updated</key>
<key alias="orEdit">Edit Current Domains</key>
@@ -639,6 +639,7 @@ To manage your website, simply open the umbraco back office and start adding con
<key alias="packageUpgradeInstructions">Upgrade instructions</key>
<key alias="packageUpgradeText"> There's an upgrade available for this package. You can download it directly from the umbraco package repository.</key>
<key alias="packageVersion">Package version</key>
<key alias="packageVersionHistory">Package version history</key>
<key alias="viewPackageWebsite">View package website</key>
</area>
<area alias="paste">
@@ -534,7 +534,7 @@ Pour gerer votre site, accéder simplement au back office et commencez à contri
Ceci est un email automatique pour vous informer que la tâche '%1%' a été activée sur la page '%2%' par l'utilisateur '%3%'
Allez à http://%4%/umbraco/actions/editContent.aspx?id=%5% pour éditer.
Allez à http://%4%/actions/editContent.aspx?id=%5% pour éditer.
Bonne journée!
@@ -550,9 +550,9 @@ Pour gerer votre site, accéder simplement au back office et commencez à contri
</p>
<div class="buttons">
<br />
<a class="buttonPublish" href="http://%4%/umbraco/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLIER&nbsp;&nbsp;</a> &nbsp;
<a class="buttonEdit" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EDITER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a class="buttonDelete" href="http://%4%/umbraco/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;SUPPRIMER&nbsp;&nbsp;&nbsp;&nbsp;</a>
<a class="buttonPublish" href="http://%4%/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLIER&nbsp;&nbsp;</a> &nbsp;
<a class="buttonEdit" href="http://%4%/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EDITER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a class="buttonDelete" href="http://%4%/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;SUPPRIMER&nbsp;&nbsp;&nbsp;&nbsp;</a>
<br />
</div>
<p>
@@ -564,9 +564,9 @@ Pour gerer votre site, accéder simplement au back office et commencez à contri
<div class="buttons">
<br />
<a class="buttonPublish" href="http://%4%/umbraco/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLIER&nbsp;&nbsp;</a> &nbsp;
<a class="buttonEdit" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EDITER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a class="buttonDelete" href="http://%4%/umbraco/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;SUPPRIMER&nbsp;&nbsp;&nbsp;&nbsp;</a>
<a class="buttonPublish" href="http://%4%/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLIER&nbsp;&nbsp;</a> &nbsp;
<a class="buttonEdit" href="http://%4%/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EDITER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a class="buttonDelete" href="http://%4%/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;SUPPRIMER&nbsp;&nbsp;&nbsp;&nbsp;</a>
<br />
</div>
@@ -452,9 +452,9 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je
</p>
<div class="buttons">
<br />
<a class="buttonPublish" href="http://%4%/umbraco/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLISH&nbsp;&nbsp;</a> &nbsp;
<a class="buttonEdit" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EDIT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a class="buttonDelete" href="http://%4%/umbraco/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;DELETE&nbsp;&nbsp;&nbsp;&nbsp;</a>
<a class="buttonPublish" href="http://%4%/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLISH&nbsp;&nbsp;</a> &nbsp;
<a class="buttonEdit" href="http://%4%/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EDIT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a class="buttonDelete" href="http://%4%/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;DELETE&nbsp;&nbsp;&nbsp;&nbsp;</a>
<br />
</div>
<p>
@@ -466,9 +466,9 @@ Echter, Runway biedt een gemakkelijke basis om je snel op weg te helpen. Als je
<div class="buttons">
<br />
<a class="buttonPublish" href="http://%4%/umbraco/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLISH&nbsp;&nbsp;</a> &nbsp;
<a class="buttonEdit" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EDIT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a class="buttonDelete" href="http://%4%/umbraco/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;DELETE&nbsp;&nbsp;&nbsp;&nbsp;</a>
<a class="buttonPublish" href="http://%4%/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLISH&nbsp;&nbsp;</a> &nbsp;
<a class="buttonEdit" href="http://%4%/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EDIT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a class="buttonDelete" href="http://%4%/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;DELETE&nbsp;&nbsp;&nbsp;&nbsp;</a>
<br />
</div>
@@ -433,7 +433,7 @@ Dette er en automatisk mail for å informere om at handlingen '%1%'
er utført på siden '%2%'
av brukeren '%3%'
Gå til http://%4%/umbraco/default.aspx?section=content&id=%5% for å redigere.
Gå til http://%4%/default.aspx?section=content&id=%5% for å redigere.
Ha en fin dag!
@@ -447,9 +447,9 @@ Vennlig hilsen umbraco roboten
</p>
<div style="margin: 8px 0; padding: 8px; display: block;">
<br />
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/umbraco/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLISER&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REDIGER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/umbraco/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;SLETT&nbsp;&nbsp;&nbsp;&nbsp;</a>
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLISER&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REDIGER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;SLETT&nbsp;&nbsp;&nbsp;&nbsp;</a>
<br />
</div>
<p>
@@ -461,9 +461,9 @@ Vennlig hilsen umbraco roboten
<div style="margin: 8px 0; padding: 8px; display: block;">
<br />
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/umbraco/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLISER&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/umbraco/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REDIGER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/umbraco/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;SLETT&nbsp;&nbsp;&nbsp;&nbsp;</a>
<a style="color: white; font-weight: bold; background-color: #66cc66; text-decoration : none; margin-right: 20px; border: 8px solid #66cc66; width: 150px;" href="http://%4%/actions/publish.aspx?id=%5%">&nbsp;&nbsp;PUBLISER&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #5372c3; text-decoration : none; margin-right: 20px; border: 8px solid #5372c3; width: 150px;" href="http://%4%/actions/editContent.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;REDIGER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a> &nbsp;
<a style="color: white; font-weight: bold; background-color: #ca4a4a; text-decoration : none; margin-right: 20px; border: 8px solid #ca4a4a; width: 150px;" href="http://%4%/actions/delete.aspx?id=%5%">&nbsp;&nbsp;&nbsp;&nbsp;SLETT&nbsp;&nbsp;&nbsp;&nbsp;</a>
<br />
</div>
@@ -18,7 +18,7 @@
<div style="margin-right: 15px;">
<asp:Button id="sbmt" Runat="server" style="Width: 90px; margin-right: 6px;" onclick="sbmt_Click"></asp:Button>
<em> or </em>
<em> <%= umbraco.ui.Text("or") %> </em>
<a href="#" style="color: Blue; margin-left: 6px;" onclick="UmbClientMgr.closeModalWindow()"><%=umbraco.ui.Text("cancel")%></a>
<!--
@@ -56,7 +56,17 @@
</cc2:Pane>
<cc2:Pane ID="pane_versions" runat="server" Text="Package version history" Visible="false">
<cc2:PropertyPanel ID="pp_versions" runat="server">
<asp:Repeater ID="rptr_versions" runat="server">
<HeaderTemplate><ul></HeaderTemplate>
<ItemTemplate><li><a href="installedPackage.aspx?id=<%# ((umbraco.cms.businesslogic.packager.InstalledPackage)Container.DataItem).Data.Id %>"><%# ((umbraco.cms.businesslogic.packager.InstalledPackage)Container.DataItem).Data.Version %></a></li></ItemTemplate>
<FooterTemplate></ul></FooterTemplate>
</asp:Repeater>
</cc2:PropertyPanel>
</cc2:Pane>
<cc2:Pane ID="pane_options" runat="server" Text="Package options">
<table border="0" style="width: 100%;">
<tr><td class="propertyHeader" valign="top">
@@ -1,4 +1,4 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditRelationType.aspx.cs" Inherits="umbraco.cms.presentation.developer.RelationTypes.EditRelationType" MasterPageFile="/umbraco/masterpages/umbracoPage.Master" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditRelationType.aspx.cs" Inherits="umbraco.cms.presentation.developer.RelationTypes.EditRelationType" MasterPageFile="../../masterpages/umbracoPage.Master" %>
<%@ Register TagPrefix="umb" Namespace="umbraco.uicontrols" Assembly="controls" %>
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="server">
@@ -1,4 +1,4 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewRelationType.aspx.cs" Inherits="umbraco.cms.presentation.developer.RelationTypes.NewRelationType" MasterPageFile="/umbraco/masterpages/umbracoPage.Master"%>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewRelationType.aspx.cs" Inherits="umbraco.cms.presentation.developer.RelationTypes.NewRelationType" MasterPageFile="../../masterpages/umbracoPage.Master"%>
<%@ Register TagPrefix="umb" Namespace="umbraco.uicontrols" Assembly="controls" %>
@@ -0,0 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Umbraco.Web.UI.Umbraco.Dialogs
{
public partial class MoveOrCopy : global::umbraco.dialogs.moveOrCopy
{
}
}
@@ -0,0 +1,15 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Umbraco.Web.UI.Umbraco.Dialogs {
public partial class MoveOrCopy {
}
}
@@ -1,4 +1,4 @@
<%@ Page Language="c#" CodeBehind="moveOrCopy.aspx.cs" MasterPageFile="../masterpages/umbracoDialog.Master" AutoEventWireup="True" Inherits="umbraco.dialogs.moveOrCopy" %>
<%@ Page Language="c#" CodeBehind="moveOrCopy.aspx.cs" MasterPageFile="../masterpages/umbracoDialog.Master" AutoEventWireup="True" Inherits="Umbraco.Web.UI.Umbraco.Dialogs.MoveOrCopy" %>
<%@ Register TagPrefix="umb" Namespace="ClientDependency.Core.Controls" Assembly="ClientDependency.Core" %>
<%@ Register TagPrefix="cc1" Namespace="umbraco.uicontrols" Assembly="controls" %>
<%@ Register Src="../controls/Tree/TreeControl.ascx" TagName="TreeControl" TagPrefix="umbraco" %>
@@ -10,7 +10,7 @@
@* Get the property alias we want to filter on from the macro parameter *@
var propertyAlias = Parameter.propertyAlias;
var selection = Model.Children.Where("Visible").OrderBy(propertyAlias)
var selection = Model.Children.Where("Visible").OrderBy(propertyAlias);
}
@@ -10,9 +10,15 @@
@{
@*Build a query and return the visible items *@
var selection= Model.Textpages.Where(query).Where("Visible");
var selection= Model.Textpages.Where("Visible");
@*
Example of more querying, if you have a true/false property with the alias of shouldBeFeatured:
var selection= Model.Textpages.Where("shouldBeFeatured == true").Where("Visible");
*@
}
@*Determine if there are any nodes in the selection, then render list *@
@if(selection.Any()){
@@ -1,25 +1,21 @@
@inherits PartialViewMacroPage
@using Umbraco.Cms.Web
@using Umbraco.Cms.Web.Macros
@using Umbraco.Framework
@inherits umbraco.MacroEngines.DynamicNodeContext
@* Ensure that the Current Page has children, where the property umbracoNaviHide is not True *@
@if (CurrentPage.Children.Where("umbracoNaviHide != @0", "True").Any())
@if (Model.Children.Where("Visible").Any())
{
@* Get the first page in the children, where the property umbracoNaviHide is not True *@
var naviLevel = CurrentPage.Children.Where("umbracoNaviHide != @0", "True").First().Level;
var naviLevel = Model.Children.Where("Visible").First().Level;
@* Add in level for a CSS hook *@
<ul class="level-@naviLevel">
@* For each child page under the root node, where the property umbracoNaviHide is not True *@
@foreach (var childPage in CurrentPage.Children.Where("umbracoNaviHide != @0", "True"))
@foreach (var childPage in Model.Children.Where("Visible"))
{
<li>
<a href="@childPage.Url">@childPage.Name</a>
@* if the current page has any children, where the property umbracoNaviHide is not True *@
@if (childPage.Children.Where("umbracoNaviHide != @0", "True").Any())
@if (childPage.Children.Where("Visible").Any())
{
@* Call our helper to display the children *@
@childPages(childPage.Children)
@@ -40,13 +36,13 @@
@* Add in level for a CSS hook *@
<ul class="level-@(naviLevel)">
@foreach (var page in pages.Where("umbracoNaviHide != @0", "True"))
@foreach (var page in pages.Where("Visible"))
{
<li>
<a href="@page.Url">@page.Name</a>
@* if the current page has any children, where the property umbracoNaviHide is not True *@
@if (page.Children.Where("umbracoNaviHide != @0", "True").Any())
@if (page.Children.Where("Visible").Any())
{
@* Call our helper to display the children *@
@childPages(page.Children)
@@ -24,6 +24,7 @@
useMasterPages: <%=umbraco.UmbracoSettings.UseAspNetMasterPages.ToString().ToLower()%>,
templateId: <%= Request.QueryString["templateID"] %>,
masterTemplateId: jQuery('#<%= MasterTemplate.ClientID %>').val(),
masterPageDropDown: $("#<%= MasterTemplate.ClientID %>"),
treeSyncPath: '<%=TemplateTreeSyncPath%>',
text: {
templateErrorHeader: "<%= umbraco.ui.Text("speechBubbles", "templateErrorHeader") %>",
@@ -25,10 +25,11 @@
}
});
editor.init();
});
//bind save shortcut
UmbClientMgr.appActions().bindSaveShortCut();
});
})(jQuery);
</script>
@@ -10,25 +10,25 @@
<table cellspacing="0" cellpadding="4" border="0">
<tr>
<th width="30%">
<%=umbraco.ui.Text("name", UmbracoUser)%>:
<%=umbraco.ui.Text("name", base.getUser())%>:
</th>
<td class="propertyContent">
<asp:TextBox ID="NameTxt" Width="350px" runat="server" /><br />
<small><%=umbraco.ui.Text("stylesheet", "nameHelp", UmbracoUser)%></small>
<small><%=umbraco.ui.Text("stylesheet", "nameHelp", base.getUser())%></small>
</td>
</tr>
<tr>
<th width="30%">
<%=umbraco.ui.Text("alias", UmbracoUser)%>:
<%=umbraco.ui.Text("alias", base.getUser())%>:
</th>
<td class="propertyContent">
<asp:TextBox ID="AliasTxt" Width="350px" runat="server" /><br />
<small><%=umbraco.ui.Text("stylesheet", "aliasHelp", UmbracoUser)%></small>
<small><%=umbraco.ui.Text("stylesheet", "aliasHelp", base.getUser())%></small>
</td>
</tr>
<tr>
<th width="30%">
<%=umbraco.ui.Text("styles", UmbracoUser)%>:
<%=umbraco.ui.Text("styles", base.getUser())%>:
</th>
<td class="propertyContent">
<asp:TextBox ID="Content" Style="width: 350px" TextMode="MultiLine" runat="server" />
@@ -38,7 +38,7 @@
</tr>
<tr>
<th width="30%">
<%=umbraco.ui.Text("preview", UmbracoUser)%>:
<%=umbraco.ui.Text("preview", base.getUser())%>:
</th>
<td class="propertyContent">
<div id="preview" style="padding: 10px; border: 1px solid #ccc; width: 330px;">
@@ -111,16 +111,16 @@ Umbraco.Application.Actions = function () {
this._currApp = whichApp.toLowerCase();
if (this._currApp != 'media' && this._currApp != 'content' && this._currApp != 'member') {
jQuery("#buttonCreate").attr("disabled", "true");
jQuery("#buttonCreate").attr("disabled", "true").fadeOut(400);
jQuery("#FindDocuments .umbracoSearchHolder").fadeOut(400);
}
else {
// create button should still remain disabled for the memebers section
if (this._currApp == 'member') {
jQuery("#buttonCreate").attr("disabled", "true");
jQuery("#buttonCreate").attr("disabled", "true").css("display", "inline-block").css("visibility", "hidden");
}
else {
jQuery("#buttonCreate").removeAttr("disabled");
jQuery("#buttonCreate").removeAttr("disabled").fadeIn(500).css("visibility", "visible");
}
jQuery("#FindDocuments .umbracoSearchHolder").fadeIn(500);
//need to set the recycle bin node id based on app
@@ -102,7 +102,7 @@
var self = this;
umbraco.presentation.webservices.codeEditorSave.SaveTemplate(
templateName, templateAlias, codeVal, self._opts.templateId, self._opts.masterTemplateId,
templateName, templateAlias, codeVal, self._opts.templateId, this._opts.masterPageDropDown.val(),
function(t) { self.submitSucces(t); },
function(t) { self.submitFailure(t); });
@@ -178,7 +178,7 @@ Umbraco.Sys.registerNamespace("Umbraco.Controls");
var overlay = $("<div class='upload-overlay'>" +
"<div class='upload-panel'>" +
instructions +
"<form action=\"/umbraco/webservices/MediaUploader.ashx?format=json&action=upload&parentNodeId=" + this._parentId + "\" method=\"post\" enctype=\"multipart/form-data\">" +
"<form action=\"" + self._opts.umbracoPath + "/webservices/MediaUploader.ashx?format=json&action=upload&parentNodeId=" + this._parentId + "\" method=\"post\" enctype=\"multipart/form-data\">" +
"<input id='fileupload' type='file' name='file' multiple>" +
"<input type='hidden' name='name' />" +
"<input type='hidden' name='replaceExisting' />" +
+2 -9
View File
@@ -167,13 +167,6 @@
<add name="UmbracoRoleProvider" type="umbraco.providers.members.UmbracoRoleProvider" />
</providers>
</roleManager>
<!-- Sitemap provider-->
<siteMap defaultProvider="UmbracoSiteMapProvider" enabled="true">
<providers>
<clear />
<add name="UmbracoSiteMapProvider" type="umbraco.presentation.nodeFactory.UmbracoSiteMapProvider" defaultDescriptionAlias="description" securityTrimmingEnabled="true" />
</providers>
</siteMap>
</system.web>
<!-- ASPNETAJAX -->
@@ -190,7 +183,7 @@
<add name="UrlRewriteModule" type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />
<remove name="UmbracoModule" />
<add name=" UmbracoModule" type="Umbraco.Web.UmbracoModule,umbraco" />
<add name="UmbracoModule" type="Umbraco.Web.UmbracoModule,umbraco" />
<remove name="ScriptModule" />
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
@@ -290,4 +283,4 @@
</pages>
</system.web.webPages.razor>
</configuration>
</configuration>
@@ -402,7 +402,7 @@ namespace Umbraco.Web.Cache
{
DistributedCache.Instance.RefreshUserCache(sender.UserId);
}
if (sender.Nodes.Any())
if (sender.NodeIds.Any())
{
DistributedCache.Instance.RefreshAllUserCache();
}
+18 -5
View File
@@ -13,10 +13,17 @@ namespace Umbraco.Web.Media
{
public class ImageUrl
{
[Obsolete("Use TryGetImageUrl() instead")]
public static string GetImageUrl(string specifiedSrc, string field, string provider, string parameters, int? nodeId = null)
{
string url;
var found = TryGetImageUrl(specifiedSrc, field, provider, parameters, nodeId, out url);
return found ? url : string.Empty;
}
public static bool TryGetImageUrl(string specifiedSrc, string field, string provider, string parameters, int? nodeId, out string url)
{
var imageUrlProvider = GetProvider(provider);
var parsedParameters = string.IsNullOrEmpty(parameters) ? new NameValueCollection() : HttpUtility.ParseQueryString(parameters);
@@ -26,6 +33,7 @@ namespace Umbraco.Web.Media
if (string.IsNullOrEmpty(field))
{
url = imageUrlProvider.GetImageUrlFromFileName(specifiedSrc, queryValues);
return true;
}
else
{
@@ -58,13 +66,18 @@ namespace Umbraco.Web.Media
}
}
int mediaId;
url = int.TryParse(fieldValue, out mediaId)
? imageUrlProvider.GetImageUrlFromMedia(mediaId, queryValues)
: imageUrlProvider.GetImageUrlFromFileName(fieldValue, queryValues);
if (!string.IsNullOrWhiteSpace(fieldValue))
{
int mediaId;
url = int.TryParse(fieldValue, out mediaId)
? imageUrlProvider.GetImageUrlFromMedia(mediaId, queryValues)
: imageUrlProvider.GetImageUrlFromFileName(fieldValue, queryValues);
return true;
}
}
return url;
url = string.Empty;
return false;
}
private static IImageUrlProvider GetProvider(string provider)
@@ -43,7 +43,7 @@ namespace Umbraco.Web.Media.ImageUrlProviders
if (parameters.ContainsKey("thumb"))
thumb = parameters["thumb"];
if (!string.IsNullOrEmpty(thumb))
if (!string.IsNullOrEmpty(thumb) && filename.Contains("."))
{
var lastIndexOf = filename.LastIndexOf('.');
var name = filename.Substring(0, lastIndexOf);
@@ -59,7 +59,7 @@ namespace Umbraco.Web.Media.ImageUrlProviders
if (parameters.ContainsKey("crop"))
crop = parameters["crop"];
if (!string.IsNullOrEmpty(crop))
if (!string.IsNullOrEmpty(crop) && filename.Contains("."))
{
var lastIndexOf = filename.LastIndexOf('.');
var name = filename.Substring(0, lastIndexOf);
@@ -36,7 +36,7 @@ namespace Umbraco.Web.Mvc
bool isMvc = true)
{
Mandate.ParameterNotNullOrEmpty(controllerName, "controllerName");
Mandate.ParameterNotNullOrEmpty(controllerSuffixName, "controllerSuffixName");
Mandate.ParameterNotNull(controllerSuffixName, "controllerSuffixName");
Mandate.ParameterNotNull(controllerType, "controllerType");
Mandate.ParameterNotNull(routes, "routes");
@@ -86,13 +86,18 @@ namespace Umbraco.Web.Mvc
controllerPluginRoute.DataTokens.Add("Namespaces", new[] {controllerType.Namespace});
}
//Don't look anywhere else except this namespace!
controllerPluginRoute.DataTokens.Add("UseNamespaceFallback", false);
//constraints: only match controllers ending with 'controllerSuffixName' and only match this controller's ID for this route
if (controllerSuffixName.IsNullOrWhiteSpace() == false)
{
controllerPluginRoute.Constraints = new RouteValueDictionary(
new Dictionary<string, object>
{
{"controller", @"(\w+)" + controllerSuffixName}
});
}
//match this area
controllerPluginRoute.DataTokens.Add("area", area.AreaName);
+44
View File
@@ -0,0 +1,44 @@
using System.Web.Mvc;
using Umbraco.Core.Configuration;
using Umbraco.Web.Install;
namespace Umbraco.Web.Mvc
{
/// <summary>
/// An area registration for back office components
/// </summary>
internal class BackOfficeArea : AreaRegistration
{
/// <summary>
/// Create the routes for the area
/// </summary>
/// <param name="context"></param>
/// <remarks>
/// By using the context to register the routes it means that the area is already applied to them all
/// and that the namespaces searched for the controllers are ONLY the ones specified.
/// </remarks>
public override void RegisterArea(AreaRegistrationContext context)
{
//Create the install routes
context.MapRoute(
"Umbraco_install_packages",
"Install/PackageInstaller/{action}/{id}",
new {controller = "InstallPackage", action = "Index", id = UrlParameter.Optional},
new[] {typeof (InstallPackageController).Namespace});
//Create the REST/web/script service routes
context.MapRoute(
"Umbraco_web_services",
GlobalSettings.UmbracoMvcArea + "/RestServices/{controller}/{action}/{id}",
new {controller = "SaveFileController", action = "Index", id = UrlParameter.Optional},
//look in this namespace for controllers
new[] {"Umbraco.Web.WebServices"});
}
public override string AreaName
{
get { return GlobalSettings.UmbracoMvcArea; }
}
}
}
@@ -36,14 +36,14 @@ namespace Umbraco.Web.Mvc
/// <summary>
/// Returns an instance of the default controller instance.
/// </summary>
public RenderMvcController GetControllerInstance()
public IRenderMvcController GetControllerInstance()
{
//try the dependency resolver, then the activator
var instance = DependencyResolver.Current.GetService(Value) ?? Activator.CreateInstance(Value);
var result = instance as RenderMvcController;
var result = instance as IRenderMvcController;
if (result == null)
{
throw new InvalidOperationException("Could not create an instance of " + Value + " for the default RenderMvcController");
throw new InvalidOperationException("Could not create an instance of " + Value + " for the default " + typeof(IRenderMvcController).Name);
}
return result;
}
@@ -64,9 +64,9 @@ namespace Umbraco.Web.Mvc
/// <param name="type"></param>
private void ValidateType(Type type)
{
if (TypeHelper.IsTypeAssignableFrom<RenderMvcController>(type) == false)
if (TypeHelper.IsTypeAssignableFrom<IRenderMvcController>(type) == false)
{
throw new InvalidOperationException("The Type specified (" + type + ") is not of type " + typeof(RenderMvcController));
throw new InvalidOperationException("The Type specified (" + type + ") is not of type " + typeof(IRenderMvcController));
}
}
@@ -7,7 +7,7 @@ namespace Umbraco.Web.Mvc
/// <summary>
/// A resolver for storing IFilteredControllerFactories
/// </summary>
internal sealed class FilteredControllerFactoriesResolver : ManyObjectsResolverBase<FilteredControllerFactoriesResolver, IFilteredControllerFactory>
public sealed class FilteredControllerFactoriesResolver : ManyObjectsResolverBase<FilteredControllerFactoriesResolver, IFilteredControllerFactory>
{
/// <summary>
/// Constructor
@@ -0,0 +1,18 @@
using System.Web.Mvc;
using Umbraco.Web.Models;
namespace Umbraco.Web.Mvc
{
/// <summary>
/// The interface that must be implemented for a controller to be designated to execute for route hijacking
/// </summary>
public interface IRenderMvcController : IController
{
/// <summary>
/// The default action to render the front-end view
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
ActionResult Index(RenderModel model);
}
}
+1 -1
View File
@@ -85,7 +85,7 @@ namespace Umbraco.Web.Mvc
{
foreach (var s in apiControllers)
{
this.RouteControllerPlugin(s.ControllerName, s.ControllerType, routes, "Api", "", UrlParameter.Optional, "api", isMvc: false);
this.RouteControllerPlugin(s.ControllerName, s.ControllerType, routes, "", "", UrlParameter.Optional, "api", isMvc: false);
}
}
}
+2 -2
View File
@@ -22,8 +22,8 @@ namespace Umbraco.Web.Mvc
//now we need to check if it exists, if not we need to return the Index by default
if (ad == null)
{
//check if the controller is an instance of RenderMvcController
if (controllerContext.Controller is RenderMvcController)
//check if the controller is an instance of IRenderMvcController
if (controllerContext.Controller is IRenderMvcController)
{
return new ReflectedActionDescriptor(controllerContext.Controller.GetType().GetMethod("Index"), "Index", controllerDescriptor);
}
@@ -1,3 +1,4 @@
using System.Web.Mvc;
using System.Web.Routing;
namespace Umbraco.Web.Mvc
@@ -22,5 +23,27 @@ namespace Umbraco.Web.Mvc
return dataToken == null || string.IsNullOrWhiteSpace(dataToken.ToString());
}
/// <summary>
/// Creates the controller
/// </summary>
/// <param name="requestContext"></param>
/// <param name="controllerName"></param>
/// <returns></returns>
/// <remarks>
/// We always set the correct ActionInvoker on our custom created controller, this is very important for route hijacking!
/// </remarks>
public override IController CreateController(RequestContext requestContext, string controllerName)
{
var instance = base.CreateController(requestContext, controllerName);
var controllerInstance = instance as Controller;
if (controllerInstance != null)
{
//set the action invoker!
controllerInstance.ActionInvoker = new RenderActionInvoker();
}
return instance;
}
}
}
+8 -8
View File
@@ -15,7 +15,7 @@ namespace Umbraco.Web.Mvc
/// <summary>
/// A controller to render front-end requests
/// </summary>
public class RenderMvcController : UmbracoController
public class RenderMvcController : UmbracoController, IRenderMvcController
{
public RenderMvcController()
@@ -73,13 +73,13 @@ namespace Umbraco.Web.Mvc
/// <returns></returns>
protected bool EnsurePhsyicalViewExists(string template)
{
if (!System.IO.File.Exists(
Path.Combine(Server.MapPath(Constants.ViewLocation), template + ".cshtml")))
{
LogHelper.Warn<RenderMvcController>("No physical template file was found for template " + template);
return false;
}
return true;
var result = ViewEngines.Engines.FindView(ControllerContext, template, null);
if(result.View == null)
{
LogHelper.Warn<RenderMvcController>("No physical template file was found for template " + template);
return false;
}
return true;
}
/// <summary>
+7 -5
View File
@@ -163,7 +163,7 @@ namespace Umbraco.Web.Mvc
ReservedAdditionalKeys.Area }.Contains(x.Key)))
{
// Populate route with additional values which aren't reserved values so they eventually to action parameters
requestContext.RouteData.Values.Add(item.Key, item.Value);
requestContext.RouteData.Values[item.Key] = item.Value;
}
//return the proxy info without the surface id... could be a local controller.
@@ -271,8 +271,9 @@ namespace Umbraco.Web.Mvc
//check if that controller exists
if (controllerType != null)
{
//ensure the controller is of type 'RenderMvcController'
if (TypeHelper.IsTypeAssignableFrom<RenderMvcController>(controllerType))
//ensure the controller is of type 'IRenderMvcController' and ControllerBase
if (TypeHelper.IsTypeAssignableFrom<IRenderMvcController>(controllerType)
&& TypeHelper.IsTypeAssignableFrom<ControllerBase>(controllerType))
{
//set the controller and name to the custom one
def.ControllerType = controllerType;
@@ -285,10 +286,11 @@ namespace Umbraco.Web.Mvc
else
{
LogHelper.Warn<RenderRouteHandler>(
"The current Document Type {0} matches a locally declared controller of type {1}. Custom Controllers for Umbraco routing must inherit from '{2}'.",
"The current Document Type {0} matches a locally declared controller of type {1}. Custom Controllers for Umbraco routing must implement '{2}' and inherit from '{3}'.",
() => publishedContentRequest.PublishedContent.DocumentTypeAlias,
() => controllerType.FullName,
() => typeof (RenderMvcController).FullName);
() => typeof(IRenderMvcController).FullName,
() => typeof(ControllerBase).FullName);
//exit as we cannnot route to the custom controller, just route to the standard one.
return def;
}
@@ -7,6 +7,7 @@ namespace Umbraco.Web.Mvc
/// <summary>
/// Creates SurfaceControllers
/// </summary>
[Obsolete("This is not used in the codebase and will be removed from the core in future versions")]
public class SurfaceControllerFactory : RenderControllerFactory
{
/// <summary>
@@ -6,6 +6,7 @@ using System.Text;
using System.Xml;
using System.Xml.XPath;
using Umbraco.Core.Logging;
using Umbraco.Core;
using Umbraco.Core.Models;
using Umbraco.Core.Xml;
using Umbraco.Web.Routing;
@@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
using Umbraco.Core;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.Mappers;
@@ -15,12 +16,15 @@ namespace Umbraco.Web.Standalone
private ServiceContext _serviceContext;
private readonly StandaloneApplication _application;
public ServiceContextManager(string connectionString, string providerName)
public ServiceContextManager(string connectionString, string providerName, string baseDirectory)
{
_connectionString = connectionString;
_providerName = providerName;
_application = StandaloneApplication.GetApplication();
Trace.WriteLine("Current AppDomain: " + AppDomain.CurrentDomain.FriendlyName);
Trace.WriteLine("Current AppDomain: " + AppDomain.CurrentDomain.BaseDirectory);
_application = StandaloneApplication.GetApplication(baseDirectory);
_application.Start();
}
@@ -14,7 +14,10 @@ namespace Umbraco.Web.Standalone
/// <summary>
/// Initializes a new instance of the <see cref="StandaloneApplication"/> class.
/// </summary>
protected StandaloneApplication(){ }
protected StandaloneApplication(string baseDirectory)
{
_baseDirectory = baseDirectory;
}
/// <summary>
/// Provides the application boot manager.
@@ -22,23 +25,24 @@ namespace Umbraco.Web.Standalone
/// <returns>An application boot manager.</returns>
protected override IBootManager GetBootManager()
{
return new StandaloneBootManager(this, _handlersToAdd, _handlersToRemove);
return new StandaloneBootManager(this, _handlersToAdd, _handlersToRemove, _baseDirectory);
}
#region Application
private static StandaloneApplication _application;
private readonly string _baseDirectory;
private static bool _started;
private static readonly object AppLock = new object();
/// <summary>
/// Gets the instance of the standalone Umbraco application.
/// </summary>
public static StandaloneApplication GetApplication()
public static StandaloneApplication GetApplication(string baseDirectory)
{
lock (AppLock)
{
return _application ?? (_application = new StandaloneApplication());
return _application ?? (_application = new StandaloneApplication(baseDirectory));
}
}

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