Compare commits

..

186 Commits

Author SHA1 Message Date
Sebastien Ros
48685b3ed7 Fixing build.cmd 2017-04-27 12:03:00 -07:00
Sebastien Ros
cd9bccef96 Supportin VS2017 in build.cmd
Fixes #7657
2017-04-24 11:13:42 -07:00
Sebastien Ros
358c57464e Merge branch 'refs/heads/1.10.x' into 1.10.2 2017-04-13 12:42:46 -07:00
Sebastien Ros
5d892feceb Merge branch 'refs/heads/1.10.x' into 1.10.2 2017-04-13 12:39:38 -07:00
ViRuSTriNiTy
a200e35923 [Fixes #5745] Calling RoleService.Renamed() after it's been renamed (#7653)
[Fixes #5745]
2017-04-13 12:29:47 -07:00
Sebastien Ros
d384110253 Logging errors during Media Upload 2017-04-13 12:12:14 -07:00
Sebastien Ros
d17930395c Merge branch '1.10.x' into 1.10.2 2017-04-11 16:48:35 -07:00
Sebastien Ros
5eef9c654c Fixing NRE on upgrade 2017-04-11 16:48:06 -07:00
Sebastien Ros
54575ab513 Merge branch 'refs/heads/1.10.x' into 1.10.2 2017-04-11 10:11:10 -07:00
ViRuSTriNiTy
55c43ad236 [Fixes #6979] Added operator IsNull and IsNotNull to date time filter
Fixes #6979
2017-04-06 12:25:08 -07:00
Sébastien Ros
1870e3eb04 Fixing Author tokenization for RssPart
Fixes #7629
2017-04-06 12:06:57 -07:00
GiuseppeMusso-Laser
d8079dec26 Fix on Content Picker Field rendering (#7631)
Fixes #7630
2017-04-05 11:38:41 -07:00
Sébastien Ros
ac4f7c05c9 Update README.md 2017-04-04 11:43:44 -07:00
Sebastien Ros
98e0b43c26 Updating version number 2017-04-03 12:21:56 -07:00
Sebastien Ros
17c7c77e3c Merge remote-tracking branch 'origin/1.10.x' into 1.10.2 2017-04-03 11:16:23 -07:00
Benedek Farkas
185ad6b1eb Adding LangVersion 5 setting to each csproj's Debug and Release target (#7641)
Fixes #7639
2017-04-03 10:38:41 -07:00
Lombiq
dbb5668d49 Framework: Removing C# 6 code from LocalizationStreamParser 2017-04-01 20:20:01 +02:00
andy
d686d688a4 add comments to audit module (#7635)
* add comments to audit module

* Improve it as @DanielStolt  suggest

* Apply trailing periods consistently
2017-03-31 22:36:39 +02:00
GiuseppeMusso-Laser
5361b29a9c Taxonomies: added index on TermContentItem table. (#7594)
Fixes #7593
2017-03-31 12:51:56 -07:00
Matteo Piovanelli
86ec07007f Allows draft ContentItems in ContentPickerField (#7624)
Fixes #7623
2017-03-31 12:31:15 -07:00
GiuseppeMusso-Laser
2eeef52077 Localization: default culture set to site culture for new content items. (#7626)
Fixes #7625
2017-03-31 12:29:54 -07:00
ViRuSTriNiTy
c228421051 [Fixes #7633] Orchard.Mvc.Routes - Added support for multiple IRouteProvider implementations per module in StandardExtensionRouteProvider (#7634)
[Fixes #7633]
2017-03-31 12:11:12 -07:00
Sebastien Ros
a23e9ea764 Merge branch '1.10.x' into 1.10.2 2017-03-27 15:39:59 -07:00
Sebastien Ros
e41e9079d3 Fixing content file marker for tests 2017-03-27 13:21:35 -07:00
Lombiq
d85954fa6d Implementing user-configurable Lucene indexing analyzer selection, resolves #3887 2017-03-23 00:45:57 +01:00
Lombiq
a709e37ddc Fixing that Taxonomy Fields attached to the User content type didn't work in the User editor (#4479) 2017-03-16 22:02:56 +01:00
siyamandayubi
87bdf9c413 Fix MySQL support (#7607)
Fixes #7602
2017-03-16 12:04:52 -07:00
LorenzoFrediani-Laser
d2889e46e3 Changed UpgradeFrom1 to UpdateFrom1 on Migration (#7612)
Fixes #7611
2017-03-16 12:03:41 -07:00
GiuseppeMusso-Laser
134bac44c3 Tags: added index on ContentTagRecord table. (#7591) 2017-03-09 12:14:28 -08:00
andy
9ec312a1c3 Use Compose to make code stronger and consistent (#7582) 2017-03-02 16:03:27 -05:00
Sipke Schoorstra
097119466a Revert "Updated GroupInfo name for AuditTrail settings."
This reverts commit 9f98d3151b.
2017-02-28 21:17:48 +01:00
Sipke Schoorstra
9f98d3151b Updated GroupInfo name for AuditTrail settings.
#Fixes 7583
2017-02-28 14:37:39 +01:00
Daniel Stolt
234d5214dd Added missing SnippetDescriptor property to Snippet element shape. 2017-02-14 06:44:36 +02:00
GiuseppeMusso-Laser
33bdfd0551 Feature to remove a Publish Later task (#7438) 2017-02-09 12:43:19 -08:00
Hannan Azam Khan
ac978b665b Fixes #7493 TextFieldDriver doesn't export its tag if content is empty (#7510)
* TextFieldDriver doesn't export its tag if content is empty
* Null check implemented , string.Empty returned
* TextFieldDriver doesn't export its tag if content is empty #7493
* TextFieldDriver doesn't export its tag if content is empty #7493
2017-02-09 14:00:18 +01:00
Lombiq
8dde994bde MediaLibrary: Fixing that removing TitlePart from a type with MediaPart causes the type to be unusable due to an implicit dependency, fixes #6047 2017-02-04 15:49:19 +01:00
Lombiq
f28da9894a Fixing redirect on tenants with a URL prefix, fixes #4605 2017-02-03 17:16:18 +01:00
Hannan Azam Khan
8c1ffe2564 [Fixes #7486] Possibility of exporting individual Form Submissions (#7495) 2017-02-02 12:24:13 -08:00
Carl Woodhouse
5a0fe4e105 [Fixes #5596] blueprint harvesting caching (#7549)
Fixes #5596
2017-02-02 12:23:07 -08:00
Carl Woodhouse
2c26c65f63 [Fixes #7479] Unwrapping of TargetInvocationException causes partial stacktrace loss (#7550)
Fixes #7479
2017-02-02 12:22:00 -08:00
Lombiq
654a9e1884 Framework: Fixing that a non-zero MaxPageSize site setting was not applied when the page size is 0, #7541 2017-01-27 03:29:31 +01:00
Sebastien Ros
149346ce68 Merge remote-tracking branch 'refs/remotes/origin/1.10.x' into 1.10.2 2017-01-24 16:37:22 -08:00
Sebastien Ros
9b6c2315de Fixing unit tests 2017-01-24 11:40:20 -08:00
Sebastien Ros
68c10bce60 Improving IsLocalUrl 2017-01-24 08:50:12 -08:00
Carl Woodhouse
8615422e27 Redis: Improving Redis extensions use of keys (#7532) (#5958 re-applied) 2017-01-24 15:25:08 +01:00
Lombiq
06a2e0d6b1 Users: Removing unnecessary file copied to the Users module (see UserResolverSelector.cs)
Same change as 5e17db3afd
2017-01-23 22:49:34 +01:00
Lombiq
6e476243c6 Core: Removing empty folders 2017-01-23 22:38:03 +01:00
Lombiq
eff27ec05e Framework: Removing unused file (ContentManagement\Handlers\IdentifyDependenciesContext.cs) 2017-01-23 22:22:03 +01:00
Lombiq
0869f957bd Fixing that SpecFlow tests were not ran using the tools from the NUnit NuGet package 2017-01-20 18:38:34 +01:00
Matteo Piovanelli
c795cdb871 [Fixes #7348] Changed the SummaryAdmin view to have the same "New Translation" link as the Editor view (#7513)
Fixes #7348
2017-01-19 12:44:48 -08:00
Sebastien Ros
8bd74c947e Fixing log typo
Fixes #7520
2017-01-19 12:37:03 -08:00
Sebastien Ros
b7dd2f6055 Merge branch 'refs/heads/1.10.x' into 1.10.2 2017-01-19 12:05:05 -08:00
bedegaming-aleksej
3b7ec4cb89 [Fixes #7515] Add RemoveContentDefinition recipe step (#7516) 2017-01-13 11:07:29 -08:00
Sebastien Ros
acb93df3ec Merge branch '1.10.x' into 1.10.2 2017-01-12 14:40:22 -08:00
Sebastien Ros
3ac09df891 Fixing Gallery search
Fixes #7497
2017-01-12 12:38:33 -08:00
Benedek Farkas
863d2e4e6b Fixing that the content fields' values in a new content item were reset when building their editor (#7505) (#7507)
Fixes #7505
2017-01-12 12:13:42 -08:00
Matt Varblow
ddfcfd7379 Add UserParameters token object (#7482)
Fixes #7481
2017-01-12 12:08:40 -08:00
Lombiq
8456716d8b Make each JobsQueue tasks execute in its own transaction, see #5365 2017-01-06 20:43:31 +01:00
Hannan Azam Khan
fe4a116cb4 [Fixes #6316] Update Alias when importing AutoroutePart (#7485)
Fixes #6316
2017-01-05 12:37:18 -08:00
Sebastien Ros
4f57ecb487 Fixing unit test 2017-01-03 13:45:09 -08:00
Sebastien Ros
7a9f86dac6 Adding vsvars32.bat is vsvarall cannot be found 2017-01-03 13:42:27 -08:00
Sebastien Ros
6df57dd098 Fixing settings group info matching
Fixes #7371
2017-01-03 13:24:08 -08:00
Sebastien Ros
cccb358ce1 Fixing QueryHints.Empty mutable usage
Fixes #7358
2017-01-03 13:08:32 -08:00
Arman Forghani
db7832db37 [Fixes #1531] IThemeSelector.GetTheme() gets called several times. (#7491)
Fixes #1531
2016-12-31 12:21:43 -08:00
Lombiq
48e2a6a1b4 Fixing that JobsQueue will fail if there are a large number of tasks, fixes #5365
JobsQueue now works in batches to prevent transaction timeouts and the manual job execution feature uses batches as well. This is a fix for the immediate issue, further fixes are needed around the background task infrastructure, see the linked issue.
2016-12-28 20:16:47 +01:00
Hannan Azam Khan
8425fb4829 [Fixes #7452] Media Library: Replacing a media item in recent section (#7484)
Fixes #7452
2016-12-22 12:15:00 -08:00
Matt Varblow
923646c27f [Fixes 7474] Add Canvas in Page commands (#7475)
Fixes #7474.
Create layout with a Canvas root element so it can be edited in the Orchard admin.
2016-12-15 12:27:04 -08:00
GiuseppeMusso-Laser
27a9bae394 [Fixes 6890] Admin Menu: fix for "Content" item visibility. (#7464)
Fixes #6890
2016-12-12 08:15:15 -08:00
Hermes Sbicego
3bda4acee1 [#7396] Implements UnassignRoleActivity (#7414)
Fixes #7396
2016-12-08 13:05:18 -08:00
Hermes Sbicego
bc66cdb36c [Fixes #7413] Refactor taxonomies and terms permissions (#7456)
Fixes #7413 

* Taxonomies:
 - AdminController: Added Actions to AdminController in order to manage Create/Edit: Only Users with Permission.CreateTaxonomy can Edit/Create a Taxonomy
 - Views/Admin/Index.cshtml: Conditional display of ActionLink Create/Edit in Admin/Index.cshtml based on Permission.CreateTaxonomy
 - Views/Admin/Index.cshtml: Conditional display of ActionLink Delete in Admin/Index.cshtml based on Permission.ManageTaxonomies
 - TaxonomyPartHandler: Adding context.Metadata.EditorRouteValues for Taxonomy
Terms:
 - Paring Action/Permission based on existing Permissions
 - Views/TermAdmin/Index.cshtml: Conditional display of ActionLink Create/Edit/Move/Delete based on right Permissions
 - TermPartHandler: Adding context.Metadata.EditorRouteValues for Taxonomy
AdminMenu:
 - The AdminMenu was shown only if a User had ManageTaxonomies Permission; In that way, Roles who have the Create/Edit/Delete Term Permission could not access Index/Edit forms: specializing permissions on Navigation grants access to users belonging to those Roles.

* Removed redundant check over SiteOwner permission
2016-12-08 12:48:25 -08:00
mhodorogea
9f60edc7f5 [Fixes #7451] Encoding of taxonomies in the dynamic forms (#7458)
Fixes #7451
2016-12-08 12:44:23 -08:00
JOSHUA NOGALES
e35b71e1dc [Fixes #7425] Session Locator | Isolation Levels not respected in Sites.config (#7466)
Fixes #7425
2016-12-08 12:32:21 -08:00
Chris Payne
6ab9ffc7da [Fixes #4941] Adds Url property to dynamic menu shape (#7468)
Fixes #4941
2016-12-08 12:30:42 -08:00
Xceno Malloy
5c6dd3e34f [Fixes: #7462] Orchard.OutputCache - Possible NRE in DefaultTagCache ctor when accessing the WorkContext (#7463)
Fixes #7462
2016-12-08 12:20:54 -08:00
Sebastien Ros
d0b65cb60b [Fixes #7427] Fixing Blog Post permission
The SummaryAdmin was not using the dedicated permissions.
The default content handler can convert to the owner variation before the blogpost handler.

Fixes #7427
2016-12-07 12:15:24 -08:00
MarcoViglione-Laser
6f3193e52b [Fixes ##7430] Added support for culture neutral patterns (#7449)
Fixes ##7430
2016-12-02 08:07:43 -08:00
LorenzoFrediani-Laser
a7f51c13d4 [Fixes #7404] Users own media folder name provider (#7454)
Fixes #7404
2016-12-01 13:14:52 -08:00
bedegaming-aleksej
4b2e1ca19d [Fixes #7441] Adapt export steps flag to work with refactored steps (#7442)
Fixes #7441
2016-12-01 13:08:06 -08:00
Hermes Sbicego
8a328902fd ProjectionManager Extension (#7417)
- Defined a new interface IProjectionManagerExtension that inherits from IProjectionManager
- ProjectionManager now implements IProjectionManagerExtension, so we can pass a part to GetCount and GetContentItems
- GetCount and GetContentItems transform the part into a Content token, so you can filter data with informations contained in the Projection itself
2016-12-01 13:00:13 -08:00
ViRuSTriNiTy
83f47ac148 [Fixes #7446] Orchard.Users - Allow umlauts in UserPart.EmailPattern (#7447)
Fixes #7446
2016-12-01 12:50:45 -08:00
GiuseppeMusso-Laser
750824b197 [Fixes #7443] Jobs Queue menu item visibility for site owners only. (#7444)
Fixes #7443
2016-12-01 12:43:52 -08:00
GiuseppeMusso-Laser
7045c40406 [Fixes #7436] Added a using of System.Linq in CSharp scripting. (#7437)
Fixes #7436
2016-12-01 12:35:01 -08:00
Lombiq
eed3ee6871 Adding the ability to enable HTTP Strict Transport Security from the SSL module, fixes #6612 2016-11-24 23:38:20 +01:00
GiuseppeMusso-Laser
e6d4d0c9d4 Fix DateTime parsed in ISO 8601 format. (#7433)
Fixes #7432
2016-11-22 18:41:40 -08:00
Matteo Piovanelli
0ea47a5554 Fixed the tenant name validation (#7429) 2016-11-22 18:39:40 -08:00
Szymon Seliga
d8f423888a [Fixes #7378] Fixed tenant name validation regex, not to allow numbers. (#7399)
[Fixes #7378]
2016-11-18 10:25:31 -08:00
Hermes Sbicego
4299239482 Implements what described in #6688 (#7356)
Fixes #6688
2016-11-17 13:02:54 -08:00
Hannan Azam Khan
7e859f2ccf Default Tag Cache from HttpContext (#7280)
Fixes #7240
2016-11-17 12:54:04 -08:00
Matteo Piovanelli
4584da9214 Content picker localization culture dropdown (#7388) 2016-11-17 12:49:35 -08:00
Matteo Piovanelli
f697fbb06a Implements ContentPicker localization options discussed in #7352 (#7391)
* Squashed commit of the following:

commit bd1e2bf3d386a1d6f12a5d062639929a17ba6c46
Author: matteo.piovanelli <matteo.piovanelli@laser-group.com>
Date:   Thu Nov 10 12:02:09 2016 +0100

    Added notifications about what the localization methods for ContentPickerField will do or have done.

commit 04eb7074dcfef2c8beb65f0322821dc654902cfb
Author: matteo.piovanelli <matteo.piovanelli@laser-group.com>
Date:   Wed Nov 9 17:48:59 2016 +0100

    Added the TryTranslate option and its suboptions

commit fad9fa87f3f3a8c555d088e8971dd04a337cf4dc
Author: matteo.piovanelli <matteo.piovanelli@laser-group.com>
Date:   Wed Nov 9 15:31:44 2016 +0100

    Added a new feature to the ContentPicker module.
    So far, it stops saving/publication when the items in the ContentPickerField are the "wrong" culture

commit b90629dc3e
Merge: 578b21b c486355
Author: matteo.piovanelli <matteo.piovanelli@laser-group.com>
Date:   Tue Nov 8 09:37:30 2016 +0100

    Merge remote-tracking branch 'remotes/OrchardCMS.Orchard/1.10.x' into Laser/1.10.x

commit 578b21b75e
Merge: 395976f 3c53ffb
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Nov 4 13:45:51 2016 +0100

    Merge branch 'feature/6688_RequestTokens_Chaintext' into Laser/1.10.x

commit 3c53ffb09a
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Nov 4 13:43:38 2016 +0100

    - replaced Regex.Replace with String.Trim(char[]) as suggested
    - ran Orchard.Tokens.Tests: 66/66 passed

commit 395976fa60
Merge: 708ed79 a15557e
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Oct 28 16:34:50 2016 +0200

    Merge branch 'Laser/1.10.x' of https://github.com/LaserSrl/Orchard into Laser/1.10.x

commit 708ed79ccb
Merge: 5fe0b69 68acf26
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Oct 28 16:32:52 2016 +0200

    Merge branch '1.10.x' of https://github.com/LaserSrl/Orchard into Laser/1.10.x

commit 5fe0b69c6b
Merge: 0daad70 e3a7059
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Oct 28 16:32:31 2016 +0200

    Merge branch 'feature/6196_SupportForAttachments' into Laser/1.10.x

commit e3a7059edf
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Oct 28 15:22:48 2016 +0200

    - Addition of an existing png (OrchardLogo.png) as attachment within "Test Smtp Settings" Section, in order to demonstrate functionality of support for attachments in email

commit f095dea5e5
Merge: 7b09747 68acf26
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Oct 28 12:37:55 2016 +0200

    Merge remote-tracking branch 'remotes/OrchardCMS.Orchard/1.10.x' into feature/6688_RequestTokens_Chaintext

commit a15557e5f3
Merge: 0daad70 ce8a61e
Author: matteo.piovanelli <matteo.piovanelli@laser-group.com>
Date:   Thu Oct 27 17:10:53 2016 +0200

    Merge branch 'issues/7346_WidgetsViewQueryString' into Laser/1.10.x

commit 0daad70219
Merge: 927d18b 7b09747
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Thu Oct 27 09:07:58 2016 +0200

    Merge remote-tracking branch 'remotes/Laser.Orchard/feature/6688_RequestTokens_Chaintext' into 1.10.x

commit 7b09747fc9
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Thu Oct 27 09:05:17 2016 +0200

    inserted a better explanation on how to use the chains

commit 927d18b1c2
Merge: f8cbc63 17ebdd2
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Wed Oct 26 19:00:44 2016 +0200

    Merge remote-tracking branch 'remotes/Laser.Orchard/feature/6688_RequestTokens_Chaintext' into 1.10.x

commit 17ebdd2bfc
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Wed Oct 26 18:57:48 2016 +0200

    - typo

commit f8cbc63fc0
Merge: 9f42664 1b511b2
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Wed Oct 26 18:53:11 2016 +0200

    Merge branch 'feature/6688_RequestTokens_Chaintext' into 1.10.x

commit 1b511b2692
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Wed Oct 26 18:50:35 2016 +0200

    - Implement what described in #6688

    Supported Syntaxes for Request and Form tokens are:
    1. QueryString:(param1) or Form:(param1)
    2. QueryString:param1 or Form:param1
    3. QueryString:(param1).SomeOtherTextToken or Form:(param1).SomeOtherTextToken

    If you want to Chain TextTokens you have to use the 3rd syntax
    the element (here param1) has been surrounded with brackets in order to preserve backward compatibility.

commit ce8a61ed86
Author: matteo.piovanelli <matteo.piovanelli@laser-group.com>
Date:   Wed Oct 26 11:46:24 2016 +0200

    Fixes #7346

commit 9f4266401a
Merge: 60aa1cc f6cfe32
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Tue Oct 25 09:20:57 2016 +0200

    Merge branch '1.10.x' of https://github.com/LaserSrl/Orchard into 1.10.x

commit 60aa1cc2f4
Merge: c1b1c4d 7a16cf5
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Tue Oct 25 09:20:28 2016 +0200

    Merge branch '1.10.x' of https://github.com/OrchardCMS/Orchard into 1.10.x

commit c1b1c4dc06
Merge: bf2201c e50bd60
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Tue Oct 25 09:19:54 2016 +0200

    Merge remote-tracking branch 'remotes/Laser.Orchard/feature/6196_SupportForAttachments' into 1.10.x

commit e50bd607b7
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Tue Oct 25 09:18:24 2016 +0200

    - Formatted Code (Rebracer)

commit f6cfe324b1
Merge: 7a16cf5 bf2201c
Author: matteo.piovanelli <matteo.piovanelli@laser-group.com>
Date:   Mon Oct 24 09:24:57 2016 +0200

    Merge remote-tracking branch 'remotes/Laser.Orchard/1.10.x' into 1.10.x
    Ho fatto pull della 1.10 remota di Orchard

commit bf2201c2a9
Merge: 67af300 580b79c
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Oct 21 18:40:21 2016 +0200

    Merge branch 'feature/6196_SupportForAttachments' into 1.10.x

    # Conflicts:
    #	src/Orchard.Web/Modules/Orchard.Email/Services/SmtpMessageChannel.cs

commit 580b79c24d
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Oct 21 11:46:08 2016 +0200

    - Added attachments logic

commit 67af300783
Merge: d4d4a32 a4c816b
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Oct 21 11:56:13 2016 +0200

    Merge branch 'feature/6196_SupportForAttachments' into 1.10.x

commit a4c816b291
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Oct 21 11:55:38 2016 +0200

    - missing Attachments Key fix

commit d4d4a322bc
Merge: 297e586 2bb81ee
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Oct 21 11:46:40 2016 +0200

    Merge branch 'feature/6196_SupportForAttachments' into 1.10.x

commit 2bb81eef31
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Oct 21 11:46:08 2016 +0200

    - Added attachments logic

commit 297e586a19
Merge: 54a1bdf 548b5d7
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Oct 21 09:39:11 2016 +0200

    Merge branch 'feature/5790_partecipate_in_cache_key_generation' into 1.10.x

commit 548b5d7d8f
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Fri Oct 21 09:37:07 2016 +0200

    - Method renamed
    - try catch removed

commit 54a1bdf03a
Merge: b7ee130 794b9b0
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Wed Oct 19 17:51:29 2016 +0200

    Merge remote-tracking branch 'remotes/Laser.Orchard/feature/5790_partecipate_in_cache_key_generation' into 1.10.x

commit 794b9b0252
Merge: 1dcee8a 350cbbd
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Wed Oct 19 17:44:35 2016 +0200

    Merge branch 'feature/5790_partecipate_in_cache_key_generation' of https://github.com/LaserSrl/Orchard into feature/5790_partecipate_in_cache_key_generation

commit 1dcee8aae8
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Wed Oct 19 16:30:12 2016 +0200

    - typo chaching > caching

    - added EventHandler in order to partecipate in cachekey generation

commit 350cbbd183
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Wed Oct 19 17:40:58 2016 +0200

    - typo chaching > caching

commit b7ee130847
Merge: c9e14f9 58e59e2
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Wed Oct 19 16:32:13 2016 +0200

    Merge remote-tracking branch 'remotes/Laser.Orchard/feature/5790_partecipate_in_cache_key_generation' into 1.10.x

commit 58e59e2fca
Author: HermesSbicego-Laser <hermes.sbicego@laser-group.com>
Date:   Wed Oct 19 16:30:12 2016 +0200

    - added EventHandler in order to partecipate in cachekey generation

commit c9e14f9b82
Author: matteo.piovanelli <matteo.piovanelli@laser-group.com>
Date:   Mon Oct 17 12:54:53 2016 +0200

    Modified the OutputCache Module based on the enhancement proposed in Issue 5811,
    by adding a VaryByRequestCookies property to the CacheSettingsPart to enable the generation of the Cache Key based on cookies

* Changed the view as reccomended by @sebastienros in his comments

* Added culture information to the contentpickerfield editor view

* Fixed a bug in the handler (!= instead of ==)

* showing displaytext in warnings and notifications rather than content item's id

* Cleanup. I
ContentPickerFieldLocalizationDriver Editor methods are executed correctly on validation errors, so they load the additional javascript correctly
2016-11-17 12:47:58 -08:00
Thierry Fleury
1254a11b8d Sort Taxonomies Terms failed
Fixes #6795
2016-11-17 12:47:15 -08:00
hacko-bede
203fd95079 Delete scheduled task when content is published
Fixes #6840
2016-11-17 12:37:55 -08:00
Marek Dzikiewicz
fab73d7157 LocalizationStreamParser should not fail on faulty PO files
Closes #7387
2016-11-14 10:56:47 -08:00
Lombiq
c48635540b Adding import/export for the RenderingMode property of ShapePart 2016-11-07 22:24:43 +01:00
Lombiq
8f2411dbf9 Adding the ability to select whether a Template (content item) will be rendered on the frontend, admin, or both. Fixes #5579. 2016-11-07 21:41:43 +01:00
Another Developer
68acf2694d Fix Event Bus for null exception (#7360)
EventsInterceptor fails when it tries to locate a generic method on an implementation with a return type. A null check has been added to avoid the exception.

Fixes #4718 
Dixes #4584
2016-10-27 14:56:27 -07:00
jtkech
b160dc731d Allow the initial value of some fields to be tokenized (#6613)
Fixes #6613 
Fixes #6237
2016-10-27 13:15:47 -07:00
jtkech
d59f5b511b Update Module.txt (#6945) 2016-10-27 13:09:34 -07:00
Matteo Piovanelli
85326ead8c [Fixes #7346] Allowing cultures and layers to be selected in Widgets
Fixes #7346
2016-10-27 12:40:14 -07:00
Matthew Harris
d91aa41be3 [Fixes #7339] Orchard.Widgets - Refactor #7251 (#7342)
Fixes #7339
2016-10-27 12:24:30 -07:00
Matthew Harris
7a16cf527c [Fixes #7258] Orchard.Core - Tabbed groupby breaks priority (#7336)
Fixes #7258
2016-10-21 14:58:28 +01:00
Matthew Harris
fef68ad7ae Orchard.Roles GetRoles should defer execution (#7320)
Fixes #7278
2016-10-20 12:33:55 -07:00
Matthew Harris
4a5ed9790a [Fixes #7251, Fixes #1659] Orchard.Setup - Blog recipe doesn't create widgets correctly (#7324)
Fixes #7251, Fixes #1659
2016-10-20 12:30:47 -07:00
Matthew Harris
9be38010b0 [Fixes #7071] Orchard.Users - Users last login time is not correct (#7325)
Fixes #7071
2016-10-20 12:26:23 -07:00
Matthew Harris
30312ad6b0 [Fixes #7326] Orchard.Widgets - Fix typo in logger (#7327) 2016-10-20 12:25:33 -07:00
MatteoPiovanelli-Laser
429889b36e [Fixes #5811] Adding a VaryByRequestCookies property to the CacheSettingsPart
Fixes #5811
2016-10-20 12:24:47 -07:00
Sebastien Ros
59a9f0bf03 Fixing SQL exception during automatic migrations in PostgreSql
Fixes #6783
Fixes #7323
2016-10-17 14:34:37 -07:00
Matthew Harris
bd222908d6 [Fixes #7318] Orchard.DesignerTools - Setting Id not needed anymore (#7319)
Fixes #7318
2016-10-13 21:59:41 +01:00
Matthew Harris
7c95b53807 [Fixes #7155] Orchard.Framework - GroupInfo generates routes with spaces (#7275)
Fixes #7155
2016-10-13 12:32:21 -07:00
Hannan Azam Khan
794f30af39 [Fixes 6759] Replace Media Item: Replacing an Image/OEmbed with new one (#7160)
Fixes #6759
2016-10-13 12:31:49 -07:00
Hannan Azam Khan
210aebcbe9 [Fixes #7255] Cached items are not evicted on Remove and Destroy (#7281)
Fixes #7255
2016-10-13 12:27:41 -07:00
Matthew Harris
5cc0acae44 [Fixes #7299] Update defaults for rebracer.xml (#7300)
Fixes #7299
2016-10-13 12:20:36 -07:00
Matthew Harris
8a80daa9b7 [Fixes #6494] SSL missing settings banner showing on frontend (#7302)
Fixes #6494
2016-10-13 12:16:33 -07:00
Matthew Harris
99b0fd6ca7 [Fixes #5960] LinkEntry needs Sizes Attribute (#7303)
Fixes #5960
2016-10-13 12:15:13 -07:00
Sergio Navarro
b8bd587a9f [Fixes #6704] Regular Expression for Validating TextField Element (#6705)
Fixes #6704
2016-10-13 12:10:57 -07:00
Sipke Schoorstra
03d5a375d3 Fixed an issue with layout element lookup. (#7305)
Fixes #7304
2016-10-13 12:09:19 -07:00
Matthew Harris
3e275f3f22 [Fixes #4723] Orchard.Core.Contents - Verify type exists on create content
Fixes #4723, #6769
2016-10-13 12:06:10 -07:00
Matthew Harris
951c36a59b Orchard.MultiTenancy - Mismatched ConnectionString UI between add/edit
Fixes #7301
2016-10-13 12:16:24 -04:00
Matthew Harris
cf81574552 Blog Recent Posts, Archives, Tag Cloud "no data" msgs
Fixes #7168, Fixes #7169, Fixes #7170
2016-10-09 07:19:46 -04:00
Matthew Harris
0ae205c987 feature - add front end toggling of shape tracing
Fixes #7162
2016-10-09 00:23:47 +01:00
ViRuSTriNiTy
2a8d091e07 [Fixes 7246] Added null checks for version ids
Fixes #7246
2016-10-06 12:41:45 -07:00
Matthew Harris
7171244044 Add Orchard.Tags.TagsCloud "no data" message
Fixes #7170
2016-10-05 12:26:36 +02:00
Matthew Harris
004f35900d line wrap css and bind title attr
Fixes #7208
2016-10-01 17:57:24 +02:00
Matthew Harris
bd195cbb04 [Fixes #7192] Orchard.Tags - Manage Tags Admin Page Not Alpha Sorted (#7198) 2016-10-01 17:14:36 +02:00
Matthew Harris
37e8696fe0 [Fixes #7131] Orchard.ContentTypes - Add / Edit Field Issues (#7150) 2016-09-29 12:58:04 -07:00
Matthew Harris
ed94ba11e7 Customize blog recipe (#7166)
Fixes #7115
2016-09-29 12:49:21 -07:00
Matthew Harris
a46b86b243 Fixes #7120 Hidden Field in Dynamic Forms causes crash (#7123)
Fixes #7120 - If a Hidden Field is added to a DynamicForm without a Value set then it will crash the front end because of a null value.
2016-09-29 12:48:22 -07:00
Sipke Schoorstra
ec0a0998da Wrapped owin middleware config (#7161)
This wraps owin middle ware configuration within a work context scope.

Fixes #6991
2016-09-29 12:34:50 -07:00
Matthew Harris
e5e84c0e1b Fields display as "&amp;" instead of "&" in validation error msgs (#7156)
Fixes #7111
2016-09-29 12:18:39 -07:00
Matthew Harris
8ddfb0ed73 [Fixes #7151] Orchard.Core - Use CDN setting ui not correct (#7152)
[Fixes #7151] Orchard.Core - Use CDN setting ui not correct
2016-09-29 12:03:49 -07:00
Sipke Schoorstra
8218535d27 Added CodeRush for Roslyn settings folder to .gitignore. 2016-09-28 16:10:46 +02:00
Matthew Harris
a7c4dfbf7c [Fixes #7153] Typo .buton:active in several css files (#7154)
* [Fixes #7153] Typo .buton:active in several css files

[Fixes #7153] Typo .buton:active in several css files

* [Fixes #7153] Typo .buton:active in several css files

[Fixes #7153] Typo .buton:active in several css files

* [Fixes #7153] Typo .buton:active in several css files

[Fixes #7153] Typo .buton:active in several css files

* [Fixes #7153] Typo .buton:active in several css files

[Fixes #7153] Typo .buton:active in several css files
2016-09-24 22:30:55 +02:00
Sipke Schoorstra
bc74aec232 Fixed ContentFieldHarvester when NULL Content
The content field harvester throws an error when the LayoutEditor is rendered without having a content item as the context (BluePrints, for example). The previous code would fall back to simply enumerating all fields of all parts to make available all content fields as elements. However, the content field elements can't render these fields without having a proper content item as context, so it would fail with an exception.

There are scenarios where one might still want to be able to add content field elements on the canvas even when there is no current content item (to create template layouts for example). But to support this, we need to figure out what we want to render if we can;t actually render the content field at design time. Perhaps a simplified representation would suffice in this scenario. To be discussed. Removing the broken feature for now.
2016-09-24 11:45:19 +02:00
Matthew Harris
84a95e3cb9 [Fixes #7125] tokenized css class left behind (#7127) 2016-09-22 13:03:46 -07:00
Matthew Harris
50224d5ebe [Fixes #7129] Boolean.cshtml doesn't have * required support in view (#7133) 2016-09-22 12:48:21 -07:00
Matthew Harris
357f1aa166 Fix incorrect title on edit page
Fixes #7142
2016-09-22 12:18:21 -07:00
Matthew Harris
27d5c6658a Labels hidden when datetime field added (#7146)
Fixes #7144
2016-09-22 12:13:26 -07:00
Daniel Stenson
8ec6e8a724 Preserve returnUrl value in Content-User.Edit.cshtml
Fixes #7141 #3447
2016-09-22 12:07:23 -07:00
Matthew Harris
e3c0c97b66 [Fixes #7121] Fix incorrect documentation url 2016-09-15 12:07:53 -07:00
Matthew Harris
be31746c4e [Fixes #7119] Path Comparison Case Sensitivity 2016-09-15 12:07:09 -07:00
Matthew Harris
0cac0ac601 [Fixes #7104] - Widget Element Title Encoding Fix 2016-09-02 09:21:21 -07:00
Mohammad Dameer
01fa02bd90 [Fixes #6812] Add shape attributes to "CreateElementTagBuilder" 2016-08-25 12:49:13 -07:00
jtkech
94ddb257e1 Pass the right display type to the widget element. (#7074) 2016-08-25 12:47:21 -07:00
judgestone
1c1e9e4c97 Allowing adding classes through ShapeTableBuilder.Describe
Small change to Content.Summary.cshtml to allow module developers to add classes to Content.Summary.cshtml via ShapeTableBuilder.Describe.

Fixes #7089
2016-08-19 09:39:00 -07:00
adrian booth
84288aeff6 fix typo of occured for logging messages and notification (#7083) 2016-08-15 14:25:41 +02:00
Pablo Sanchez
0deab6bd0d Sanitize username in activity 2016-08-04 12:58:41 -07:00
Lombiq
4c1254e128 Fixing that the debug log was created even in Release mode 2016-08-01 00:30:40 +02:00
Pablo Sanchez
dcc63228e5 [Fixes #7003] Fixing NRE 2016-07-21 12:31:40 -07:00
Carl Woodhouse
35c379191e [Fixes #7034] Don't cache pages when status code is changed in the view
* Fixed the output caching of non 200 responses when errors are thrown in views

* Added debug message to output cache when the response isn't cached due to a non 200 status code.
2016-07-21 12:17:33 -07:00
Lombiq
dbbeb175a6 Readme: Simplifying the "Project Status" section 2016-07-12 21:42:17 +02:00
Lombiq
a5b1aa5d2a Fixing that with multiple TinyMCE editors on a page multiple toolbars also appeared, see #7022 2016-07-12 18:08:02 +02:00
Daniel Stolt
e04b12d177 Removed incorrect comments in Gulpfile.js. 2016-07-03 12:52:48 +02:00
Lombiq
74011e659b README: updating 1.10.1 release description 2016-06-29 22:57:47 +02:00
Lombiq
7aa6371ec1 README: updating released versions, adding links to releases, fixing Azure deploy link 2016-06-29 22:44:07 +02:00
Lombiq
c004545eeb Updating README from the dev branch 2016-06-29 22:36:08 +02:00
Lombiq
31f07a44e4 The TinyMce toolbar is now always visible in the editor, even if scrolled down, fixes #5769 2016-06-28 23:48:50 +02:00
Lombiq
13f3473868 Some grammar fixes (I hope) in NavigationAliasProvider 2016-06-28 17:03:04 +02:00
Sipke Schoorstra
0a06a788b2 Renamed private method in NavigationHelper. 2016-06-16 21:55:07 +02:00
Alex Petryakov
a5ac956b6a Fixes a selected path issue
This fixes an issue where the selected path is being looked for by comparing string-based urls. It now selects the most nested url.

#6899
2016-06-16 21:52:51 +02:00
Lombiq
3e2b5d5b82 Upgrading FluentNHibernate so it's sync with other assemblies to prevent exceptions when running tests. Fixes #6933. 2016-06-16 19:01:07 +02:00
Sebastien Ros
a8d4440c2e Encoding error messages for custom forms widgets. 2016-06-14 11:06:33 -07:00
Lombiq
af35f1387c Orchard.Framework.csproj: Fixing file inclusion syntax by removing unnecessary properties 2016-06-13 16:11:22 +02:00
Lombiq
161a2e3204 Fixing a typo in the Module.txt of Orchard.Warmup 2016-06-11 16:26:34 +02:00
Lombiq
50c8a2631d Adding "/m" switch to MSBuild in ClickToBuild.cmd and Deploy.cmd. Fixes #6936.
It allows running independent project builds in parallel by using more than one cores.

Signed-off-by: Benedek Farkas <benedek.farkas@lombiq.com>
2016-06-05 21:07:40 +02:00
Daniel Stolt
fbe5945ea6 Ignore DST in time zone conversion for time-only DateTime fields. Fixes #6731. 2016-06-05 20:45:10 +02:00
Daniel Stolt
03bac9222b Fixed Enter keyboard shortcut for layout elements that are not of type "Content". Fixes #5749. 2016-06-05 18:58:17 +02:00
Matthew Harris
897687e4b3 Extend snippet manifest format 2016-05-27 09:08:03 -07:00
Matthew Harris
0f155827fd Layout editor br tags
Fixes #5825
2016-05-26 12:41:13 -07:00
Matthew Harris
bcd66f39d1 Setup recipe description mismatch
Fixes #6811
2016-05-26 12:39:46 -07:00
andy
86b4ff4e65 Deleted unnecessary reference on JobsQueue 2016-05-19 12:33:43 -07:00
Matthew Harris
3cb63d80af Fix missing translations
Fixes #6877
2016-05-19 12:26:34 -07:00
Jack Cheng
e90f114a8b Error importing media - uses indexOf instead of contains
Fixes #6894
2016-05-19 09:06:29 -07:00
Lombiq
8fadee4a49 Removing long orphaned backup module manifest file from Orchard.MultiTenancy 2016-05-17 21:08:30 +02:00
Daniel Stolt
9e57d016df Fixed incorrect reference in Orchard.Resources.csproj. 2016-05-17 16:48:18 +02:00
Daniel Stolt
e477328c39 Fixed admin 404 due to incorrectly named resource "jquery-colorbox.css". 2016-05-17 16:45:35 +02:00
Sebastien Ros
5ef753ef2d Merge branch 'master' into 1.10.x 2016-05-11 12:25:15 -07:00
Sebastien Ros
280de4e6fc Merge remote-tracking branch 'origin/1.10.1' into 1.10.x 2016-05-05 17:39:32 -07:00
Matthew Harris
c251665dfe Add 10 digit precision support to sass
Fixes #6865
2016-05-05 15:03:54 -07:00
jagraz
ed13ac2802 Update localizations service to harvest only dictionaries for enabled themes.
Fixes #6600
2016-05-05 13:02:13 -07:00
Arjan Noordende
0ed5198cb3 Added scheme to OutputCacheKey to prevent SSL bypass
Fixes #6850.
2016-05-05 13:01:06 -07:00
Sergio Navarro
018a3faa2e Create target folder if not exist when moving media
Fixes #6856
2016-05-05 12:59:01 -07:00
Arjan Noordende
91488f31da Added SASS support to Gulpfile.js
Fixes #6860
2016-05-05 12:58:18 -07:00
Sergio Navarro
dfa22687b5 Fixed problem with case checking request headers in output cache
Fixes #6863
2016-05-05 12:57:13 -07:00
Lombiq
34bd78a487 Text in the token helper's columns are now wrapped, so longer token names or descriptions can be properly displayed. Fixes #3100. 2016-04-30 00:47:01 +02:00
Arjan Noordende
b292269f2b Fixed Specific url's in SecureSocketsLayer not redirected to https
Fixes #5294
2016-04-29 09:08:43 -07:00
Matthew Harris
b0393a0780 Add generic default theme.png
Fixes #5672
2016-04-28 13:03:33 -07:00
600 changed files with 5679 additions and 2033 deletions

3
.gitignore vendored
View File

@@ -68,6 +68,9 @@ ipch/
_ReSharper*/
*.[Rr]e[Ss]harper
# CodeRush is a .NET coding add-in
.cr*/
# TeamCity is a build add-in
_TeamCity*

View File

@@ -1,22 +1,29 @@
@echo off
for /f "usebackq tokens=1* delims=: " %%i in (`lib\vswhere\vswhere -latest -version "[15.0,16.0)" -requires Microsoft.Component.MSBuild`) do (
if /i "%%i"=="installationPath" (
set InstallDir=%%j
if exist "%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe" (
echo "Using MSBuild from Visual Studio 2017"
set msbuild="%InstallDir%\MSBuild\15.0\Bin\MSBuild.exe"
goto build
)
)
)
FOR %%b in (
"%VS140COMNTOOLS%..\..\VC\vcvarsall.bat"
"%ProgramFiles(x86)%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
"%ProgramFiles%\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
"%VS120COMNTOOLS%..\..\VC\vcvarsall.bat"
"%ProgramFiles(x86)%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
"%ProgramFiles%\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
"%VS110COMNTOOLS%..\..\VC\vcvarsall.bat"
"%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"
"%ProgramFiles%\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"
"%VS140COMNTOOLS%\vsvars32.bat"
"%VS120COMNTOOLS%\vsvars32.bat"
"%VS110COMNTOOLS%\vsvars32.bat"
) do (
if exist %%b (
call %%b x86
goto build
echo "Using MSBuild from %%b"
call %%b
set msbuild="msbuild"
goto build
)
)
echo "Unable to detect suitable environment. Build may not succeed."
:build
@@ -31,6 +38,8 @@ IF "%solution%" == "" SET solution=src\Orchard.sln
lib\nuget\nuget.exe restore %solution%
msbuild /t:%target% %project% /p:Solution=%solution%
%msbuild% /t:%target% %project% /p:Solution=%solution% /m
:end
pause

View File

@@ -167,11 +167,12 @@
</Target>
<Target Name="Spec" DependsOnTargets="Package-Stage">
<CreateItem Include="$(CompileFolder)\*.Specs.dll">
<!-- Running SpecFlow tests -->
<CreateItem Include="$(CompileFolder)\*.Specs.*dll">
<Output TaskParameter="Include" ItemName="SpecAssemblies" />
</CreateItem>
<NUnit Assemblies="@(SpecAssemblies)" ToolPath="$(NUnitPackageToolsFolder)" />
<NUnit Assemblies="@(SpecAssemblies)" ToolPath="@(NUnitPackageToolsFolder)" WorkingDirectory="$(CompileFolder)" OutputXmlFile="$(BuildFolder)\Orchard.Specs.xml" />
</Target>
<!-- Packaging (Stage) -->

View File

@@ -6,7 +6,7 @@ Orchard is a free, open source, community-focused Content Management System buil
You can try it for free on [DotNest.com](https://dotnest.com) or on Microsoft Azure by clicking on this button.
[![Deploy to Azure](https://azuredeploy.net/deploybutton.png)](https://portal.azure.com/#create/OutercurveFoundation.OrchardCMS.1.0.4)
[![Deploy to Azure](https://azuredeploy.net/deploybutton.png)](https://portal.azure.com/#create/OutercurveFoundation.OrchardCMS)
## About The Orchard Project
@@ -22,8 +22,10 @@ Our mission is to empower our users and foster a dedicated and diverse community
## Project Status
Orchard is currently in version 1.9.2. We invite participation by the developer community in shaping the projects direction, so that we can publicly validate our designs and development approach.
Our 1.9.2 release is available from our Downloads page, and is easy to [Install Orchard using the Web Platform Installer](http://docs.orchardproject.net/Documentation/Installing-Orchard). We encourage interested developers to check out the source code on the Orchard Github site and get involved with the project.
Orchard is currently in version **[1.10.2](https://github.com/OrchardCMS/Orchard/releases/tag/1.10.2)**: It contains bugfixes and the more impactful changes and new features added in the latest major version (*1.10*).
We invite participation by the developer community in shaping the projects direction, so that we can publicly validate our designs and development approach.
All our releases are available on our [Releases](https://github.com/OrchardCMS/Orchard/releases) page, and it's easy to [Install Orchard using the Web Platform Installer](http://docs.orchardproject.net/Documentation/Installing-Orchard) as well. We encourage interested developers to check out the source code on the Orchard GitHub site and get involved with the project.
* [Download the latest release](https://github.com/OrchardCMS/Orchard/releases)
* [Feature roadmap](http://docs.orchardproject.net/Documentation/feature-roadmap)
@@ -51,4 +53,4 @@ There are many ways you can [contribute to Orchard](http://orchardproject.net/co
## The Future Of Orchard CMS: Orchard 2
As the underlying frameworks (.NET, ASP.NET and ASP.NET MVC) are constantly evolving, Orchard of course keeps track of the changes and improvements of these: Orchard 2 is the next generation of Orchard releases that is based on [ASP.NET vNext](http://www.asp.net/vnext). Just like the current Orchard project, it's fully [open-source and is publicly available on GitHub](https://github.com/OrchardCMS/Orchard2). Orchard 2 (as a framework) is being built from scratch: it's still in development and does not share any of its code base (at least directly) with the current versions of Orchard.
As the underlying frameworks (.NET, ASP.NET and ASP.NET MVC) are constantly evolving, Orchard of course keeps track of the changes and improvements of these: Orchard 2 is the next generation of Orchard releases that is based on [ASP.NET Core](http://www.asp.net/core). Just like the current Orchard project, it's fully [open-source and is publicly available on GitHub](https://github.com/OrchardCMS/Orchard2). Orchard 2 (as a framework) is being built from scratch: it's still in development and does not share any of its code base (at least directly) with the current versions of Orchard.

View File

@@ -72,7 +72,7 @@ call :ExecuteCmd nuget restore "%DEPLOYMENT_SOURCE%\src\Orchard.sln"
IF !ERRORLEVEL! NEQ 0 goto error
:: 2. Build to the temporary path
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Orchard.proj" /t:Precompiled /v:m
call :ExecuteCmd "%MSBUILD_PATH%" "%DEPLOYMENT_SOURCE%\Orchard.proj" /t:Precompiled /v:m /m
IF !ERRORLEVEL! NEQ 0 goto error
:: 3. KuduSync

BIN
lib/vswhere/vswhere.exe Normal file

Binary file not shown.

View File

@@ -8,6 +8,7 @@ var fs = require("fs"),
plumber = require("gulp-plumber"),
sourcemaps = require("gulp-sourcemaps"),
less = require("gulp-less"),
sass = require("gulp-sass"),
autoprefixer = require("gulp-autoprefixer"),
minify = require("gulp-minify-css"),
typescript = require("gulp-typescript"),
@@ -123,7 +124,7 @@ function createAssetGroupTask(assetGroup, doRebuild) {
function buildCssPipeline(assetGroup, doConcat, doRebuild) {
assetGroup.inputPaths.forEach(function (inputPath) {
var ext = path.extname(inputPath).toLowerCase();
if (ext !== ".less" && ext !== ".css")
if (ext !== ".less" && ext !== ".scss" && ext !== ".css")
throw "Input file '" + inputPath + "' is not of a valid type for output file '" + assetGroup.outputPath + "'.";
});
var generateSourceMaps = assetGroup.hasOwnProperty("generateSourceMaps") ? assetGroup.generateSourceMaps : true;
@@ -138,9 +139,11 @@ function buildCssPipeline(assetGroup, doConcat, doRebuild) {
.pipe(plumber())
.pipe(gulpif(generateSourceMaps, sourcemaps.init()))
.pipe(gulpif("*.less", less()))
.pipe(gulpif("*.scss", sass({
precision: 10
})))
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
.pipe(autoprefixer({ browsers: ["last 2 versions"] }))
// TODO: Start using below whenever gulp-header supports sourcemaps.
.pipe(header(
"/*\n" +
"** NOTE: This file is generated by Gulp and should not be edited directly!\n" +
@@ -179,8 +182,7 @@ function buildJsPipeline(assetGroup, doConcat, doRebuild) {
noEmitOnError: true,
sortOutput: true,
}).js))
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
// TODO: Start using below whenever gulp-header supports sourcemaps.
.pipe(gulpif(doConcat, concat(assetGroup.outputFileName)))
.pipe(header(
"/*\n" +
"** NOTE: This file is generated by Gulp and should not be edited directly!\n" +
@@ -189,9 +191,9 @@ function buildJsPipeline(assetGroup, doConcat, doRebuild) {
"*/\n\n"))
.pipe(gulpif(generateSourceMaps, sourcemaps.write()))
.pipe(gulp.dest(assetGroup.outputDir))
.pipe(uglify())
.pipe(rename({
suffix: ".min"
}))
.pipe(gulp.dest(assetGroup.outputDir));
.pipe(uglify())
.pipe(rename({
suffix: ".min"
}))
.pipe(gulp.dest(assetGroup.outputDir));
}

View File

@@ -42,6 +42,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -51,6 +52,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.WindowsAzure.ServiceRuntime, Version=1.8.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

View File

@@ -36,6 +36,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -47,6 +48,7 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">

View File

@@ -44,6 +44,7 @@
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -55,14 +56,15 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
<HintPath>..\packages\Autofac.3.5.2\lib\net40\Autofac.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">

View File

@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.10.1")]
[assembly: AssemblyFileVersion("1.10.1")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net452" />
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net452" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net452" />

View File

@@ -44,6 +44,7 @@
<PlatformTarget>AnyCPU</PlatformTarget>
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -54,6 +55,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="nunit.framework, Version=2.5.10.11092, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL">

View File

@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.10.1")]
[assembly: AssemblyFileVersion("1.10.1")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]

View File

@@ -44,6 +44,7 @@
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -55,6 +56,7 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
@@ -65,8 +67,8 @@
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentPath, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">

View File

@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.10.1")]
[assembly: AssemblyFileVersion("1.10.1")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]

View File

@@ -2,7 +2,7 @@
<packages>
<package id="Autofac" version="3.5.2" targetFramework="net452" />
<package id="Castle.Core" version="3.3.1" targetFramework="net452" />
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net452" />
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
<package id="log4net" version="2.0.3" targetFramework="net452" />

View File

@@ -14,7 +14,6 @@ using Orchard.ContentManagement.MetaData.Builders;
using Orchard.ContentManagement.Records;
using Orchard.Core.Common.Handlers;
using Orchard.Core.Common.Models;
using Orchard.Data;
using Orchard.Environment;
using Orchard.Environment.Configuration;
using Orchard.Environment.Extensions;
@@ -69,6 +68,7 @@ namespace Orchard.Tests.Modules.Indexing {
builder.RegisterType<IndexingTaskManager>().As<IIndexingTaskManager>();
builder.RegisterType<DefaultContentManager>().As<IContentManager>();
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
builder.RegisterType<StubWorkContextAccessor>().As<IWorkContextAccessor>();
builder.RegisterType<Signals>().As<ISignals>();
builder.RegisterType<DefaultContentManagerSession>().As<IContentManagerSession>();
builder.RegisterInstance(_contentDefinitionManager.Object);

View File

@@ -9,6 +9,7 @@ using Orchard.Environment.Configuration;
using Orchard.FileSystems.AppData;
using Orchard.Indexing;
using Orchard.Tests.FileSystems.AppData;
using Orchard.Tests.Stubs;
namespace Orchard.Tests.Modules.Indexing {
public class LuceneIndexProviderTests {
@@ -35,6 +36,7 @@ namespace Orchard.Tests.Modules.Indexing {
_appDataFolder = AppDataFolderTests.CreateAppDataFolder(_basePath);
var builder = new ContainerBuilder();
builder.RegisterType<StubWorkContextAccessor>().As<IWorkContextAccessor>();
builder.RegisterType<DefaultLuceneAnalyzerProvider>().As<ILuceneAnalyzerProvider>();
builder.RegisterType<DefaultLuceneAnalyzerSelector>().As<ILuceneAnalyzerSelector>();
builder.RegisterType<LuceneIndexProvider>().As<IIndexProvider>();

View File

@@ -8,6 +8,7 @@ using Orchard.Environment.Configuration;
using Orchard.FileSystems.AppData;
using Orchard.Indexing;
using Orchard.Tests.FileSystems.AppData;
using Orchard.Tests.Stubs;
namespace Orchard.Tests.Modules.Indexing {
public class LuceneSearchBuilderTests {
@@ -34,6 +35,7 @@ namespace Orchard.Tests.Modules.Indexing {
_appDataFolder = AppDataFolderTests.CreateAppDataFolder(_basePath);
var builder = new ContainerBuilder();
builder.RegisterType<StubWorkContextAccessor>().As<IWorkContextAccessor>();
builder.RegisterType<DefaultLuceneAnalyzerProvider>().As<ILuceneAnalyzerProvider>();
builder.RegisterType<DefaultLuceneAnalyzerSelector>().As<ILuceneAnalyzerSelector>();
builder.RegisterType<LuceneIndexProvider>().As<IIndexProvider>();

View File

@@ -44,6 +44,7 @@
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -55,6 +56,7 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
@@ -65,8 +67,8 @@
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentPath, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">

View File

@@ -30,5 +30,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.10.1")]
[assembly: AssemblyFileVersion("1.10.1")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]

View File

@@ -17,8 +17,9 @@ namespace Orchard.Tests.Modules.Recipes.RecipeHandlers {
builder.RegisterType<RecipeExecutionLogger>().AsSelf();
builder.RegisterType<StubRecipeExecutionStep>().As<IRecipeExecutionStep>().AsSelf().SingleInstance();
builder.RegisterType<RecipeExecutionStepHandler>().SingleInstance();
builder.RegisterType<RecipeExecutionStepResolver>().As<IRecipeExecutionStepResolver>().SingleInstance();
_container = builder.Build();
_container = builder.Build();
}
[Test]

View File

@@ -205,7 +205,8 @@ namespace Orchard.Tests.Modules.Users.Controllers {
@"Ima.Fool@example.com",
@"""Ima.Fool""@example.com",
@"""Ima Fool""@example.com",
"2xxx1414@i.ua"
"2xxx1414@i.ua",
"Dreißig-öffentliche-Ämter-in-Übersee@Beispiel.de"
)]
string email)
{

View File

@@ -3,7 +3,7 @@
<package id="Autofac" version="3.5.2" targetFramework="net452" />
<package id="Castle.Core" version="3.3.1" targetFramework="net452" />
<package id="DotNetZip" version="1.9.1.8" targetFramework="net452" />
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
<package id="IronRuby" version="1.1.3" targetFramework="net452" />
<package id="Lucene.Net" version="3.0.3" targetFramework="net452" />

View File

@@ -3,6 +3,7 @@ using Autofac;
using NUnit.Framework;
using Orchard.Localization.Models;
using Orchard.Localization.Services;
using Orchard.Tests.Stubs;
namespace Orchard.Tests.Localization {
@@ -303,10 +304,11 @@ namespace Orchard.Tests.Localization {
}
[Test]
[Description("DST date and time are not properly round-tripped when date is ignored.")]
[Description("DST is ignored when date is ignored (non-DST date).")]
public void ConvertToLocalizedTimeStringTest03() {
var timeZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
var container = TestHelpers.InitializeContainer("en-US", null, timeZone);
var clock = new StubClock(new DateTime(2012, 1, 1, 12, 0, 0, DateTimeKind.Utc));
var container = TestHelpers.InitializeContainer("en-US", null, timeZone, clock);
var target = container.Resolve<IDateLocalizationServices>();
var dateString = "3/10/2012";
@@ -318,7 +320,27 @@ namespace Orchard.Tests.Localization {
var timeString2 = target.ConvertToLocalizedTimeString(dateTimeUtc, new DateLocalizationOptions() { IgnoreDate = true });
Assert.AreEqual(dateString, dateString2);
Assert.AreNotEqual(timeString, timeString2);
Assert.AreEqual(timeString, timeString2);
}
[Test]
[Description("DST is ignored when date is ignored (DST date).")]
public void ConvertToLocalizedTimeStringTest04() {
var timeZone = TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time");
var clock = new StubClock(new DateTime(2012, 10, 3, 12, 0, 0, DateTimeKind.Utc));
var container = TestHelpers.InitializeContainer("en-US", null, timeZone, clock);
var target = container.Resolve<IDateLocalizationServices>();
var dateString = "3/10/2012";
var timeString = "12:00:00 PM";
var dateTimeUtc = target.ConvertFromLocalizedString(dateString, timeString);
var dateString2 = target.ConvertToLocalizedDateString(dateTimeUtc);
var timeString2 = target.ConvertToLocalizedTimeString(dateTimeUtc, new DateLocalizationOptions() { IgnoreDate = true });
Assert.AreEqual(dateString, dateString2);
Assert.AreEqual(timeString, timeString2);
}
/*

View File

@@ -39,5 +39,21 @@ namespace Orchard.Tests.Localization {
Assert.AreEqual("Foo \"{0}\"", translations["~/themes/mytheme/views/myview.cshtml|foo \"{0}\""]);
}
[Test]
public void ShouldHandleUnclosedQuote() {
var parser = new LocalizationStreamParser();
var text = new StringBuilder();
text.AppendLine("#: ~/Themes/MyTheme/Views/MyView.cshtml");
text.AppendLine("msgctxt \"");
text.AppendLine("msgid \"Foo \\\"{0}\\\"\"");
text.AppendLine("msgstr \"Foo \\\"{0}\\\"\"");
var translations = new Dictionary<string, string>();
parser.ParseLocalizationStream(text.ToString(), translations, false);
Assert.AreEqual("Foo \"{0}\"", translations["|foo \"{0}\""]);
}
}
}

View File

@@ -9,9 +9,12 @@ using Orchard.Tests.Stubs;
namespace Orchard.Tests.Localization {
internal class TestHelpers {
public static IContainer InitializeContainer(string cultureName, string calendarName, TimeZoneInfo timeZone) {
public static IContainer InitializeContainer(string cultureName, string calendarName, TimeZoneInfo timeZone, IClock clock = null) {
var builder = new ContainerBuilder();
builder.RegisterType<StubClock>().As<IClock>();
if (clock != null)
builder.RegisterInstance(clock);
else
builder.RegisterType<StubClock>().As<IClock>();
builder.RegisterInstance<WorkContext>(new StubWorkContext(cultureName, calendarName, timeZone));
builder.RegisterType<StubWorkContextAccessor>().As<IWorkContextAccessor>();
builder.RegisterType<CultureDateTimeFormatProvider>().As<IDateTimeFormatProvider>();

View File

@@ -44,6 +44,7 @@
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -55,6 +56,7 @@
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">
@@ -69,8 +71,8 @@
<HintPath>..\packages\Castle.Core.3.3.1\lib\net45\Castle.Core.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FluentNHibernate, Version=1.4.0.0, Culture=neutral, PublicKeyToken=8aa435e3cb308880, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.1.4.0.0\lib\net35\FluentNHibernate.dll</HintPath>
<Reference Include="FluentNHibernate, Version=2.0.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">

View File

@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.10.1")]
[assembly: AssemblyFileVersion("1.10.1")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]

View File

@@ -4,8 +4,13 @@ using Orchard.Services;
namespace Orchard.Tests.Stubs {
public class StubClock : IClock {
public StubClock() {
UtcNow = new DateTime(2009, 10, 14, 12, 34, 56, DateTimeKind.Utc);
public StubClock()
: this(new DateTime(2009, 10, 14, 12, 34, 56, DateTimeKind.Utc)) {
}
public StubClock(DateTime utcNow) {
UtcNow = utcNow;
}
public DateTime UtcNow { get; private set; }
@@ -18,7 +23,6 @@ namespace Orchard.Tests.Stubs {
return UtcNow.Add(span);
}
public IVolatileToken When(TimeSpan duration) {
return new Clock.AbsoluteExpirationToken(this, duration);
}

View File

@@ -6,7 +6,7 @@ using Orchard.Utility.Extensions;
namespace Orchard.Tests.Utility.Extensions {
[TestFixture]
public class HttpRequestExtensionsTests {
[Test]
public void IsLocalUrlShouldReturnFalseWhenUrlIsNullOrEmpty() {
var request = new StubHttpRequest();
@@ -21,6 +21,7 @@ namespace Orchard.Tests.Utility.Extensions {
var request = new StubHttpRequest();
Assert.That(request.IsLocalUrl("//"), Is.False);
Assert.That(request.IsLocalUrl(" //"), Is.False);
}
[Test]
@@ -28,6 +29,7 @@ namespace Orchard.Tests.Utility.Extensions {
var request = new StubHttpRequest();
Assert.That(request.IsLocalUrl("/\\"), Is.False);
Assert.That(request.IsLocalUrl(" /\\"), Is.False);
}
[Test]
@@ -35,6 +37,7 @@ namespace Orchard.Tests.Utility.Extensions {
var request = new StubHttpRequest();
Assert.That(request.IsLocalUrl("/"), Is.True);
Assert.That(request.IsLocalUrl("\t/"), Is.True);
Assert.That(request.IsLocalUrl("/контакты"), Is.True);
Assert.That(request.IsLocalUrl("/ "), Is.True);
Assert.That(request.IsLocalUrl("/abc-def"), Is.True);
@@ -46,6 +49,18 @@ namespace Orchard.Tests.Utility.Extensions {
request.Headers.Add("Host", "localhost");
Assert.That(request.IsLocalUrl("http://localhost"), Is.True);
Assert.That(request.IsLocalUrl("https://localhost"), Is.True);
}
[Test]
public void IsLocalUrlShouldReturnFalseForNonHttpSchemes() {
var request = new StubHttpRequest();
request.Headers.Add("Host", "localhost");
Assert.That(request.IsLocalUrl("httpx://localhost"), Is.False);
Assert.That(request.IsLocalUrl("foo://localhost"), Is.False);
Assert.That(request.IsLocalUrl("data://localhost"), Is.False);
Assert.That(request.IsLocalUrl("mailto://localhost"), Is.False);
}
[Test]

View File

@@ -3,7 +3,7 @@
<package id="Autofac" version="3.5.2" targetFramework="net452" />
<package id="Autofac.Web" version="3.2.0" targetFramework="net452" />
<package id="Castle.Core" version="3.3.1" targetFramework="net452" />
<package id="FluentNHibernate" version="1.4.0.0" targetFramework="net452" />
<package id="FluentNHibernate" version="2.0.3.0" targetFramework="net452" />
<package id="Iesi.Collections" version="4.0.1.4000" targetFramework="net452" />
<package id="IronRuby" version="1.1.3" targetFramework="net452" />
<package id="log4net" version="2.0.3" targetFramework="net452" />

View File

@@ -23,6 +23,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
<UseVSHostingProcess>false</UseVSHostingProcess>
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
@@ -34,6 +35,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />

View File

@@ -32,8 +32,8 @@ using System.Security;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.10.1")]
[assembly: AssemblyFileVersion("1.10.1")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]
// Enable web application to call this assembly in Full Trust
[assembly: AllowPartiallyTrustedCallers]

View File

@@ -44,6 +44,7 @@
<CodeAnalysisRuleSet>..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<PlatformTarget>AnyCPU</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -54,6 +55,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Autofac, Version=3.5.0.0, Culture=neutral, PublicKeyToken=17863af14b0044da, processorArchitecture=MSIL">

View File

@@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.10.1")]
[assembly: AssemblyFileVersion("1.10.1")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]

View File

@@ -26,8 +26,8 @@
-->
<!--
<component instance-scope="per-lifetime-scope"
type="Orchard.Data.SessionLocator, Orchard.Framework"
service="Orchard.Data.ISessionLocator">
type="Orchard.Data.TransactionManager, Orchard.Framework"
service="Orchard.Data.ITransactionManager">
<properties>
<property name="IsolationLevel" value="ReadUncommitted" />
</properties>

View File

@@ -1,9 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<log4net xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<root>
<priority value="ERROR" xdt:Transform="SetAttributes(value)" />
<appender-ref ref="debug-file" xdt:Locator="Match(ref)" xdt:Transform="Remove" />
</root>
<logger name="Orchard" xdt:Locator="Match(name)" xdt:Transform="Remove" />
<appender name="debugger" xdt:Locator="Match(name)" xdt:Transform="Remove" />
<appender name="debug-file" xdt:Locator="Match(name)" xdt:Transform="Remove" />
<appender>
<immediateFlush value="false" xdt:Transform="SetAttributes(value)" />
</appender>
</log4net>

View File

@@ -46,7 +46,7 @@ namespace Orchard.Core.Common.Drivers {
return ContentShape("Fields_Common_Text_Edit", GetDifferentiator(field, part),
() => {
var settings = field.PartFieldDefinition.Settings.GetModel<TextFieldSettings>();
var text = part.IsNew() ? settings.DefaultValue : field.Value;
var text = part.IsNew() && String.IsNullOrEmpty(field.Value) ? settings.DefaultValue : field.Value;
var viewModel = new TextFieldDriverViewModel {
Field = field,
@@ -84,8 +84,7 @@ namespace Orchard.Core.Common.Drivers {
}
protected override void Exporting(ContentPart part, TextField field, ExportContentContext context) {
if (!String.IsNullOrEmpty(field.Value))
context.Element(field.FieldDefinition.Name + "." + field.Name).SetAttributeValue("Text", field.Value);
context.Element(field.FieldDefinition.Name + "." + field.Name).SetAttributeValue("Text", field.Value);
}
protected override void Describe(DescribeMembersContext context) {

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The common module introduces content parts that are going to be used by most content types (common, body, identity).
FeatureDescription: Core content parts.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The containers module introduces container and containable behaviors for content items.
FeatureDescription: Container and containable parts to enable parent-child relationships between content items.

View File

@@ -3,16 +3,19 @@ using Orchard.ContentManagement;
using Orchard.ContentManagement.MetaData;
using Orchard.Core.Contents.Settings;
using Orchard.Localization;
using Orchard.Security;
using Orchard.UI.Navigation;
namespace Orchard.Core.Contents {
public class AdminMenu : INavigationProvider {
private readonly IContentDefinitionManager _contentDefinitionManager;
private readonly IContentManager _contentManager;
private readonly IAuthorizer _authorizer;
public AdminMenu(IContentDefinitionManager contentDefinitionManager, IContentManager contentManager) {
public AdminMenu(IContentDefinitionManager contentDefinitionManager, IContentManager contentManager, IAuthorizer authorizer) {
_contentDefinitionManager = contentDefinitionManager;
_contentManager = contentManager;
_authorizer = authorizer;
}
public Localizer T { get; set; }
@@ -20,10 +23,17 @@ namespace Orchard.Core.Contents {
public void GetNavigation(NavigationBuilder builder) {
var contentTypeDefinitions = _contentDefinitionManager.ListTypeDefinitions().OrderBy(d => d.Name);
builder.AddImageSet("content")
.Add(T("Content"), "1.4", menu => menu
.Permission(Permissions.EditOwnContent)
.Add(T("Content Items"), "1", item => item.Action("List", "Admin", new { area = "Contents", id = "" }).LocalNav()));
var listableContentTypes = contentTypeDefinitions.Where(ctd => ctd.Settings.GetModel<ContentTypeSettings>().Listable);
ContentItem listableCi = null;
foreach(var contentTypeDefinition in listableContentTypes) {
listableCi = _contentManager.New(contentTypeDefinition.Name);
if(_authorizer.Authorize(Permissions.EditContent, listableCi)) {
builder.AddImageSet("content")
.Add(T("Content"), "1.4", menu => menu
.Add(T("Content Items"), "1", item => item.Action("List", "Admin", new { area = "Contents", id = "" }).LocalNav()));
break;
}
}
var contentTypes = contentTypeDefinitions.Where(ctd => ctd.Settings.GetModel<ContentTypeSettings>().Creatable).OrderBy(ctd => ctd.DisplayName);
if (contentTypes.Any()) {
builder.Add(T("New"), "-1", menu => {

View File

@@ -241,6 +241,10 @@ namespace Orchard.Core.Contents.Controllers {
if (string.IsNullOrEmpty(id))
return CreatableTypeList(containerId);
if (_contentDefinitionManager.GetTypeDefinition(id) == null) {
return RedirectToAction("Create", new { id = "" });
}
var contentItem = _contentManager.New(id);
if (!Services.Authorizer.Authorize(Permissions.EditContent, contentItem, T("Cannot create content")))

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The contents module enables the creation of custom content types.
Features:

View File

@@ -1,8 +1,12 @@
@using Orchard.Utility.Extensions;
@{
var contentTypeClassName = ((string)Model.ContentItem.ContentType).HtmlClassify();
Model.Classes.Add(contentTypeClassName);
Model.Classes.Add("content-item");
var tag = Tag(Model, "article");
}
<article class="content-item @contentTypeClassName">
@tag.StartElement
<header>
@Display(Model.Header)
@if (Model.Meta != null) {
@@ -17,4 +21,4 @@
@Display(Model.Footer)
</footer>
}
</article>
@tag.EndElement

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The dashboard module is providing the dashboard screen of the admininstration UI of the application.
FeatureDescription: Standard admin dashboard.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The Feeds module is providing RSS feeds to content items.
FeatureDescription: RSS feeds for content items.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The navigation module creates and manages a simple navigation menu for the front-end of the application and allows you to add content items to the admin menu.
FeatureDescription: Menu management.

View File

@@ -37,6 +37,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
<UseVSHostingProcess>false</UseVSHostingProcess>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@@ -48,6 +49,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
@@ -397,7 +399,6 @@
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />
<Folder Include="Views\Gamma\" />
</ItemGroup>
<ItemGroup>
<Content Include="Contents\Views\Content.cshtml" />

View File

@@ -30,6 +30,6 @@ using System.Security;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.10.1")]
[assembly: AssemblyFileVersion("1.10.1")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The dashboard module is providing the reports screen of the application.
FeatureDescription: Reports management.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The scheduling module enables background task scheduling.
FeatureDescription: Scheduled background tasks.

View File

@@ -189,7 +189,7 @@ namespace Orchard.Core.Settings.Metadata {
private void Apply(ContentTypeDefinition model, ContentTypeDefinitionRecord record) {
record.DisplayName = model.DisplayName;
record.Settings = _settingsFormatter.Map(model.Settings).ToString();
record.Settings = Compose(_settingsFormatter.Map(model.Settings));
var toRemove = record.ContentTypePartDefinitionRecords
.Where(partDefinitionRecord => model.Parts.All(part => partDefinitionRecord.ContentPartDefinitionRecord.Name != part.PartDefinition.Name))
@@ -215,7 +215,7 @@ namespace Orchard.Core.Settings.Metadata {
}
private void Apply(ContentPartDefinition model, ContentPartDefinitionRecord record) {
record.Settings = _settingsFormatter.Map(model.Settings).ToString();
record.Settings = Compose(_settingsFormatter.Map(model.Settings));
var toRemove = record.ContentPartFieldDefinitionRecords
.Where(partFieldDefinitionRecord => model.Fields.All(partField => partFieldDefinitionRecord.Name != partField.Name))

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The settings module creates site settings that other modules can contribute to.
FeatureDescription: Site settings.

View File

@@ -63,8 +63,8 @@
<span class="hint">@T("Determines whether scripts and stylesheets load in their debuggable or minified form.")</span>
</div>
<div>
@Html.LabelFor(m => m.UseCdn, T("Use CDN"))
@Html.CheckBoxFor(m => m.UseCdn)
@Html.LabelFor(m => m.UseCdn, T("Use CDN").Text, new { @class = "forcheckbox" })
<span class="hint">@T("Determines whether the defined CDN value is used for scripts and stylesheets, or their local version")</span>
</div>
<div>
@@ -84,4 +84,4 @@
<span class="hint">@T("Determines the last element of the database that can be displayed. Leave 0 for unlimited.")</span>
</div>
}
</fieldset>
</fieldset>

View File

@@ -283,7 +283,7 @@ namespace Orchard.Core.Shapes {
[Shape]
public void ContentZone(dynamic Display, dynamic Shape, TextWriter Output) {
var unordered = ((IEnumerable<dynamic>)Shape).ToArray();
var tabbed = unordered.GroupBy(x => (string)x.Metadata.Tab);
var tabbed = unordered.GroupBy(x => (string)x.Metadata.Tab ?? "");
if (tabbed.Count() > 1) {
foreach (var tab in tabbed) {

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The shapes module contains core shape templates and display hooks.
FeatureDescription: Core shape templates and display hooks.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The title module enables content items to have titles.
FeatureDescription: Title content part.

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The XmlRpc module enables creation of contents from client applications such as LiveWriter.
FeatureDescription: XML-RPC opt-in implementation.

View File

@@ -0,0 +1,69 @@
using Lucene.Models;
using Lucene.Services;
using Lucene.ViewModels;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Drivers;
using Orchard.Indexing;
using Orchard.Localization;
using Orchard.UI.Notify;
using System.Collections.Generic;
using System.Linq;
using System.Web.Mvc;
namespace Lucene.Drivers {
public class LuceneSettingsPartDriver : ContentPartDriver<LuceneSettingsPart> {
private readonly IIndexManager _indexManager;
private readonly IEnumerable<ILuceneAnalyzerSelector> _analyzerSelectors;
private readonly INotifier _notifier;
public Localizer T { get; set; }
public LuceneSettingsPartDriver(IIndexManager indexManager, IEnumerable<ILuceneAnalyzerSelector> analyzerSelectors, INotifier notifier) {
_indexManager = indexManager;
_analyzerSelectors = analyzerSelectors;
_notifier = notifier;
T = NullLocalizer.Instance;
}
protected override DriverResult Editor(LuceneSettingsPart part, dynamic shapeHelper) {
return ContentShape("Parts_LuceneSettings_Edit", () => {
MaintainMappings(part);
return shapeHelper.EditorTemplate(
TemplateName: "Parts.LuceneSettings",
Model: new LuceneSettingsPartEditViewModel {
LuceneAnalyzerSelectorMappings = part.LuceneAnalyzerSelectorMappings.ToArray(),
LuceneAnalyzerSelectors = _analyzerSelectors.Select(analyzerSelector =>
new SelectListItem { Text = T(analyzerSelector.Name).Text, Value = analyzerSelector.Name })
},
Prefix: Prefix);
});
}
protected override DriverResult Editor(LuceneSettingsPart part, IUpdateModel updater, dynamic shapeHelper) {
var viewModel = new LuceneSettingsPartEditViewModel();
if (updater.TryUpdateModel(viewModel, Prefix, null, null)) {
_notifier.Warning(T("Don't forget to rebuild your index in case you have changed its analyzer."));
part.LuceneAnalyzerSelectorMappings = viewModel.LuceneAnalyzerSelectorMappings;
MaintainMappings(part);
}
return Editor(part, shapeHelper);
}
private void MaintainMappings(LuceneSettingsPart part) {
var analyzerProviderNames = _analyzerSelectors.Select(analyzerProvider => analyzerProvider.Name);
var indexNames = _indexManager.GetSearchIndexProvider().List();
var maintainedMappings = part.LuceneAnalyzerSelectorMappings.ToList();
// Removing mappings which contain a removed/invalid index or analyzer provider.
maintainedMappings.RemoveAll(mapping => !indexNames.Contains(mapping.IndexName) || !analyzerProviderNames.Contains(mapping.AnalyzerName));
// Adding new mappings for the new indexes.
foreach (var indexName in indexNames) {
if (!maintainedMappings.Any(mapping => mapping.IndexName == indexName)) {
maintainedMappings.Add(new LuceneAnalyzerSelectorMapping { IndexName = indexName, AnalyzerName = "Default" });
}
}
part.LuceneAnalyzerSelectorMappings = maintainedMappings;
}
}
}

View File

@@ -0,0 +1,39 @@
using Lucene.Models;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Handlers;
using Orchard.Localization;
using Orchard.Services;
using System.Collections.Generic;
namespace Lucene.Handlers {
public class LuceneSettingsPartHandler : ContentHandler {
public Localizer T { get; set; }
public LuceneSettingsPartHandler(IJsonConverter jsonConverter) {
T = NullLocalizer.Instance;
Filters.Add(new ActivatingFilter<LuceneSettingsPart>("Site"));
OnActivated<LuceneSettingsPart>((context, part) => {
part.LuceneAnalyzerSelectorMappingsField.Loader(() => {
return string.IsNullOrEmpty(part.LuceneAnalyzerSelectorMappingsSerialized)
? new List<LuceneAnalyzerSelectorMapping>()
: jsonConverter.Deserialize<List<LuceneAnalyzerSelectorMapping>>(part.LuceneAnalyzerSelectorMappingsSerialized);
});
part.LuceneAnalyzerSelectorMappingsField.Setter((value) => {
part.LuceneAnalyzerSelectorMappingsSerialized = value == null ? "[]" : jsonConverter.Serialize(value);
return value;
});
});
}
protected override void GetItemMetadata(GetContentItemMetadataContext context) {
if (context.ContentItem.ContentType != "Site") return;
base.GetItemMetadata(context);
context.Metadata.EditorGroupInfo.Add(new GroupInfo(T("Lucene Settings")) { Id = "LuceneSettings" });
}
}
}

View File

@@ -38,6 +38,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -47,6 +48,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="ICSharpCode.SharpZipLib, Version=0.86.0.518, Culture=neutral, PublicKeyToken=1b03e6acf1164f73, processorArchitecture=MSIL">
@@ -97,8 +99,12 @@
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<ItemGroup>
<Compile Include="Drivers\LuceneSettingsPartDriver.cs" />
<Compile Include="Handlers\LuceneSettingsPartHandler.cs" />
<Compile Include="Models\LuceneAnalyzerSelectorMapping.cs" />
<Compile Include="Models\LuceneDocumentIndex.cs" />
<Compile Include="Models\LuceneSearchHit.cs" />
<Compile Include="Models\LuceneSettingsPart.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Services\DefaultLuceneAnalyzerSelector.cs" />
<Compile Include="Services\DefaultLuceneAnalyzerProvider.cs" />
@@ -108,6 +114,7 @@
<Compile Include="Services\LuceneIndexProvider.cs" />
<Compile Include="Services\LuceneSearchBuilder.cs" />
<Compile Include="Services\SearchBits.cs" />
<Compile Include="ViewModels\LuceneSettingsPartEditViewModel.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Module.txt" />
@@ -127,6 +134,13 @@
<ItemGroup>
<Content Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Content Include="Placement.info" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\EditorTemplates\Parts.LuceneSettings.cshtml" />
</ItemGroup>
<ItemGroup />
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>

View File

@@ -0,0 +1,6 @@
namespace Lucene.Models {
public class LuceneAnalyzerSelectorMapping {
public string IndexName { get; set; }
public string AnalyzerName { get; set; }
}
}

View File

@@ -0,0 +1,21 @@
using Lucene.Models;
using Orchard.ContentManagement;
using Orchard.ContentManagement.Utilities;
using System.Collections.Generic;
namespace Lucene.Models {
public class LuceneSettingsPart : ContentPart {
public string LuceneAnalyzerSelectorMappingsSerialized {
get { return this.Retrieve(x => x.LuceneAnalyzerSelectorMappingsSerialized); }
set { this.Store(x => x.LuceneAnalyzerSelectorMappingsSerialized, value); }
}
private readonly LazyField<IEnumerable<LuceneAnalyzerSelectorMapping>> _luceneAnalyzerSelectorMappings = new LazyField<IEnumerable<LuceneAnalyzerSelectorMapping>>();
internal LazyField<IEnumerable<LuceneAnalyzerSelectorMapping>> LuceneAnalyzerSelectorMappingsField { get { return _luceneAnalyzerSelectorMappings; }
}
public IEnumerable<LuceneAnalyzerSelectorMapping> LuceneAnalyzerSelectorMappings {
get { return _luceneAnalyzerSelectorMappings.Value; }
set { _luceneAnalyzerSelectorMappings.Value = value; }
}
}
}

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The Lucene module enables the site to be indexed using Lucene.NET. The index generated by this module can then be used by the search module to provide an integrated full-text search experience to a web site.
FeatureDescription: Lucene indexing services.

View File

@@ -0,0 +1,5 @@
<Placement>
<Match ContentType="Site">
<Place Parts_LuceneSettings_Edit="Content: 1@LuceneSettings" />
</Match>
</Placement>

View File

@@ -30,6 +30,6 @@ using System.Security;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.10.1")]
[assembly: AssemblyFileVersion("1.10.1")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]

View File

@@ -1,34 +1,46 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Lucene.Models;
using Lucene.Net.Analysis;
using Lucene.Net.Analysis.Standard;
using Orchard;
using Orchard.ContentManagement;
using System.Collections.Generic;
using System.Linq;
namespace Lucene.Services {
public class DefaultLuceneAnalyzerProvider : ILuceneAnalyzerProvider {
private readonly IWorkContextAccessor _wca;
private IEnumerable<ILuceneAnalyzerSelector> _analyzerSelectors;
public DefaultLuceneAnalyzerProvider(IEnumerable<ILuceneAnalyzerSelector> analyzerSelectors) {
public DefaultLuceneAnalyzerProvider(IEnumerable<ILuceneAnalyzerSelector> analyzerSelectors, IWorkContextAccessor wca) {
_analyzerSelectors = analyzerSelectors;
_wca = wca;
}
public Analyzer GetAnalyzer(string indexName) {
var luceneSettingsPart = _wca
.GetContext()
.CurrentSite
.As<LuceneSettingsPart>();
if (luceneSettingsPart == null) {
return new StandardAnalyzer(LuceneIndexProvider.LuceneVersion);
}
var currentIndexMapping = luceneSettingsPart
.LuceneAnalyzerSelectorMappings
.FirstOrDefault(mapping => mapping.IndexName == indexName);
if (currentIndexMapping == null) {
return new StandardAnalyzer(LuceneIndexProvider.LuceneVersion);
}
var analyzer = _analyzerSelectors
.Where(x => x.Name == currentIndexMapping.AnalyzerName)
.Select(x => x.GetLuceneAnalyzer(indexName))
.Where(x => x != null)
.OrderByDescending(x => x.Priority)
.Select(x => x.Analyzer)
.FirstOrDefault();
if (analyzer != null) {
return analyzer;
}
return new StandardAnalyzer(LuceneIndexProvider.LuceneVersion);
return analyzer != null ? analyzer : new StandardAnalyzer(LuceneIndexProvider.LuceneVersion);
}
}
}

View File

@@ -12,5 +12,7 @@ namespace Lucene.Services {
Analyzer = new StandardAnalyzer(LuceneIndexProvider.LuceneVersion)
};
}
public string Name { get { return "Default"; } }
}
}

View File

@@ -1,11 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Orchard;
using Orchard;
namespace Lucene.Services {
public interface ILuceneAnalyzerSelector : IDependency {
LuceneAnalyzerSelectorResult GetLuceneAnalyzer(string indexName);
string Name { get; }
}
}

View File

@@ -168,7 +168,7 @@ namespace Lucene.Services {
writer.DeleteDocuments(query);
}
catch (Exception ex) {
Logger.Error(ex, "An unexpected error occured while removing the documents [{0}] from the index [{1}].", String.Join(", ", documentIds), indexName);
Logger.Error(ex, "An unexpected error occurred while removing the documents [{0}] from the index [{1}].", String.Join(", ", documentIds), indexName);
}
}
}

View File

@@ -0,0 +1,14 @@
using Lucene.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace Lucene.ViewModels {
public class LuceneSettingsPartEditViewModel {
public LuceneAnalyzerSelectorMapping[] LuceneAnalyzerSelectorMappings { get; set; }
public IEnumerable<SelectListItem> LuceneAnalyzerSelectors { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
@model Lucene.ViewModels.LuceneSettingsPartEditViewModel
@using System.Linq
<fieldset>
<legend>@T("Lucene Settings")</legend>
@if (!Model.LuceneAnalyzerSelectorMappings.Any()) {
@T("There is currently no mapping. Create an index first.")
}
else {
<ul>
@for (int i = 0; i < Model.LuceneAnalyzerSelectorMappings.Length; i++) {
<li>
@Html.HiddenFor(m => Model.LuceneAnalyzerSelectorMappings[i].IndexName)
@Html.LabelFor(m => Model.LuceneAnalyzerSelectorMappings[i].AnalyzerName, T("Analyzer name for the \"{0}\" index", Model.LuceneAnalyzerSelectorMappings[i].IndexName))
@Html.DropDownListFor(m => Model.LuceneAnalyzerSelectorMappings[i].AnalyzerName, new SelectList(
Model.LuceneAnalyzerSelectors,
"Text",
"Value",
Model.LuceneAnalyzerSelectorMappings[i].AnalyzerName
))
</li>
}
</ul>
}
</fieldset>

View File

@@ -37,6 +37,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -47,6 +48,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="MarkdownSharp, Version=1.5.1.0, Culture=neutral, processorArchitecture=MSIL">

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The Markdown module enables rich text contents to be created using the Markdown syntax.
FeatureDescription: Markdown editor.

View File

@@ -26,6 +26,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.10.1")]
[assembly: AssemblyFileVersion("1.10.1")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]

View File

@@ -172,8 +172,8 @@ namespace Orchard.Alias.Controllers {
}
catch (Exception ex) {
Services.TransactionManager.Cancel();
Services.Notifier.Error(T("An error occured while creating the alias {0}: {1}. Please check the values are correct.", aliasPath, ex.Message));
Logger.Error(ex, T("An error occured while creating the alias {0}", aliasPath).Text);
Services.Notifier.Error(T("An error occurred while creating the alias {0}: {1}. Please check the values are correct.", aliasPath, ex.Message));
Logger.Error(ex, T("An error occurred while creating the alias {0}", aliasPath).Text);
ViewBag.Path = aliasPath;
ViewBag.Route = routePath;
@@ -236,8 +236,8 @@ namespace Orchard.Alias.Controllers {
}
catch (Exception ex) {
Services.TransactionManager.Cancel();
Services.Notifier.Error(T("An error occured while editing the alias '{0}': {1}. Please check the values are correct.", aliasPath, ex.Message));
Logger.Error(ex, T("An error occured while creating the alias '{0}'", aliasPath).Text);
Services.Notifier.Error(T("An error occurred while editing the alias '{0}': {1}. Please check the values are correct.", aliasPath, ex.Message));
Logger.Error(ex, T("An error occurred while creating the alias '{0}'", aliasPath).Text);
ViewBag.Path = aliasPath;
ViewBag.Route = routePath;

View File

@@ -3,14 +3,26 @@ using System.Collections.Generic;
using System.Linq;
using System.Collections.Concurrent;
using Orchard.Alias.Implementation.Map;
using Orchard.Alias.Implementation.Updater;
namespace Orchard.Alias.Implementation.Holder {
public class AliasHolder : IAliasHolder {
public AliasHolder() {
private readonly Lazy<IAliasHolderUpdater> _aliasHolderUpdater;
private readonly ConcurrentDictionary<string, AliasMap> _aliasMaps;
public AliasHolder(Lazy<IAliasHolderUpdater> aliasHolderUpdater) {
_aliasHolderUpdater = aliasHolderUpdater;
_aliasMaps = new ConcurrentDictionary<string, AliasMap>(StringComparer.OrdinalIgnoreCase);
}
private readonly ConcurrentDictionary<string, AliasMap> _aliasMaps;
private ConcurrentDictionary<string, AliasMap> GetOrRefreshAliasMaps() {
lock (_aliasMaps) {
if (_aliasMaps.Count == 0)
_aliasHolderUpdater.Value.Refresh();
}
return _aliasMaps;
}
public void SetAliases(IEnumerable<AliasInfo> aliases) {
var grouped = aliases.GroupBy(alias => alias.Area ?? String.Empty, StringComparer.InvariantCultureIgnoreCase);
@@ -25,7 +37,7 @@ namespace Orchard.Alias.Implementation.Holder {
}
public void SetAlias(AliasInfo alias) {
foreach (var map in _aliasMaps.Values) {
foreach (var map in GetOrRefreshAliasMaps().Values) {
map.Remove(alias);
}
@@ -33,11 +45,11 @@ namespace Orchard.Alias.Implementation.Holder {
}
public IEnumerable<AliasMap> GetMaps() {
return _aliasMaps.Values;
return GetOrRefreshAliasMaps().Values;
}
public AliasMap GetMap(string areaName) {
return _aliasMaps.GetOrAdd(areaName ?? String.Empty, key => new AliasMap(key));
return GetOrRefreshAliasMaps().GetOrAdd(areaName ?? String.Empty, key => new AliasMap(key));
}
public void RemoveAlias(AliasInfo aliasInfo) {

View File

@@ -2,7 +2,7 @@ Name: Alias
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: Maps friendly urls to specific module actions.
FeatureDescription: Maps friendly urls to specific module actions.

View File

@@ -41,14 +41,14 @@ namespace Orchard.Alias.Navigation {
var urlLevel = endsWithSlash ? requestUrl.Count(l => l == '/') - 1 : requestUrl.Count(l => l == '/');
var menuLevel = menuPosition.Count(l => l == '.');
// Checking menu item if it's the leaf element or it's an intermediate element
// Checking the menu item whether it's the leaf element or it's an intermediate element
// or it's an unneccessary element according to the url.
RouteValueDictionary contentRoute;
if (menuLevel == urlLevel) {
contentRoute = request.RequestContext.RouteData.Values;
}
else {
// If menuLevel doesn't equal with urlLevel it can mean that this menu item is
// If menuLevel doesn't equal to urlLevel it can mean that this menu item is
// an intermediate element (the difference is a positive value) or this menu
// item is lower in the navigation hierarchy according to the url (negative
// value). If the value is negative, removing the menu item, if the value

View File

@@ -37,6 +37,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -47,6 +48,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />

View File

@@ -30,6 +30,6 @@ using System.Security;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.10.1")]
[assembly: AssemblyFileVersion("1.10.1")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]

View File

@@ -44,7 +44,6 @@
<tr>
<th scope="col">@T("Alias")</th>
<th scope="col">@T("Route")</th>
<th scope="col">&nbsp;</th>
</tr>
</thead>
@foreach (var aliasEntry in Model.AliasEntries) {

View File

@@ -2,7 +2,7 @@ Name: AntiSpam
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: Provides anti-spam services to protect your content from malicious submissions.
Features:

View File

@@ -37,6 +37,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -47,6 +48,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />

View File

@@ -29,6 +29,6 @@ using System.Runtime.InteropServices;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.10.1")]
[assembly: AssemblyFileVersion("1.10.1")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]

View File

@@ -36,7 +36,7 @@ namespace Orchard.AntiSpam.Services {
return SpamStatus.Ham;
}
catch(Exception e) {
Logger.Error(e, "An error occured while checking for spam");
Logger.Error(e, "An error occurred while checking for spam");
return SpamStatus.Spam;
}
}
@@ -46,7 +46,7 @@ namespace Orchard.AntiSpam.Services {
var result = ExecuteValidateRequest(context, "submit-spam");
}
catch (Exception e) {
Logger.Error(e, "An error occured while reporting spam");
Logger.Error(e, "An error occurred while reporting spam");
}
}
@@ -55,7 +55,7 @@ namespace Orchard.AntiSpam.Services {
var result = ExecuteValidateRequest(context, "submit-ham");
}
catch (Exception e) {
Logger.Error(e, "An error occured while reporting ham");
Logger.Error(e, "An error occurred while reporting ham");
}
}

View File

@@ -3,7 +3,7 @@ Path: ArchiveLater
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: The ArchiveLater module introduces scheduled archiving functionality.
FeatureDescription: Scheduled archiving.

View File

@@ -38,6 +38,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -47,6 +48,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />

View File

@@ -30,6 +30,6 @@ using System.Security;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.10.1")]
[assembly: AssemblyFileVersion("1.10.1")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]

View File

@@ -2,21 +2,63 @@
using Orchard.Data.Conventions;
namespace Orchard.AuditTrail.Models {
/// <summary>
/// Audit Trail Event Record in the database.
/// </summary>
public class AuditTrailEventRecord {
public virtual int Id { get; set; }
/// <summary>
/// The time when the event occurred.
/// </summary>
public virtual DateTime CreatedUtc { get; set; }
/// <summary>
/// The user name of the user who caused the event to occur.
/// </summary>
public virtual string UserName { get; set; }
/// <summary>
/// The name of the event.
/// </summary>
public virtual string EventName { get; set; }
/// <summary>
/// The full name of the event.
/// </summary>
public virtual string FullEventName { get; set; }
/// <summary>
/// The category the event belongs to.
/// </summary>
public virtual string Category { get; set; }
/// <summary>
/// The data of the event.
/// </summary>
[StringLengthMax]
public virtual string EventData { get; set; }
/// <summary>
/// The filter key of the event.
/// </summary>
public virtual string EventFilterKey { get; set; }
/// <summary>
/// The filter data of the event.
/// </summary>
public virtual string EventFilterData { get; set; }
/// <summary>
/// The comment of the event.
/// </summary>
[StringLengthMax]
public virtual string Comment { get; set; }
/// <summary>
/// The IP address of the user who caused the event to occur.
/// </summary>
public virtual string ClientIpAddress { get; set; }
}
}

View File

@@ -1,6 +1,18 @@
namespace Orchard.AuditTrail.Models {
/// <summary>
/// The created audit trail event result
/// </summary>
public class AuditTrailEventRecordResult {
/// <summary>
/// The created <see cref="AuditTrailEventRecord"/>
/// </summary>
public AuditTrailEventRecord Record { get; set; }
/// <summary>
/// Determines whether AuditTrailEventRecordResult is disabled for <see cref="AuditTrailEventRecord"/> .
/// </summary>
public bool IsDisabled { get; set; }
}
}

View File

@@ -2,7 +2,7 @@
AntiForgery: enabled
Author: The Orchard Team
Website: http://orchardproject.net
Version: 1.10.1
Version: 1.10.2
OrchardVersion: 1.9
Description: Provides a log for recording and viewing back-end changes.
Features:

View File

@@ -36,6 +36,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>..\..\..\OrchardBasicCorrectness.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
@@ -46,6 +47,7 @@
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
<LangVersion>5</LangVersion>
</PropertyGroup>
<ItemGroup>
<Reference Include="Iesi.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=aa95f207798dfdb4, processorArchitecture=MSIL">

View File

@@ -32,6 +32,6 @@ using System.Security;
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.10.1")]
[assembly: AssemblyFileVersion("1.10.1")]
[assembly: AssemblyVersion("1.10.2")]
[assembly: AssemblyFileVersion("1.10.2")]

View File

@@ -16,6 +16,10 @@ using Orchard.Services;
using Orchard.Settings;
namespace Orchard.AuditTrail.Services {
/// <summary>
/// Manage the audit trail.
/// </summary>
public class AuditTrailManager : Component, IAuditTrailManager {
private readonly IRepository<AuditTrailEventRecord> _auditTrailRepository;
private readonly IAuditTrailEventProvider _providers;
@@ -52,6 +56,14 @@ namespace Orchard.AuditTrail.Services {
_clientHostAddressAccessor = clientHostAddressAccessor;
}
/// <summary>
/// Gets a page of event records from the audit trail.
/// </summary>
/// <param name="page">The page number to get records from.</param>
/// <param name="pageSize">The number of records to get.</param>
/// <param name="orderBy">The value to order by.</param>
/// <param name="filters">Optional. An object to filter the records on.</param>
/// <returns>A page of event records.</returns>
public IPageOfItems<AuditTrailEventRecord> GetRecords(
int page,
int pageSize,
@@ -102,10 +114,20 @@ namespace Orchard.AuditTrail.Services {
};
}
/// <summary>
/// Gets a single event record from the audit trail by ID.
/// </summary>
/// <param name="id">The event record ID.</param>
/// <returns>A single event record.</returns>
public AuditTrailEventRecord GetRecord(int id) {
return _auditTrailRepository.Get(id);
}
/// <summary>
/// Builds a shape tree of filter displays.
/// </summary>
/// <param name="filters">Input for each filter builder.</param>
/// <returns>A tree of shapes.</returns>
public dynamic BuildFilterDisplay(Filters filters) {
var filterDisplay = (dynamic)_shapeFactory.Create("AuditTrailFilter");
var filterDisplayContext = new DisplayFilterContext(_shapeFactory, filters, filterDisplay);
@@ -123,6 +145,17 @@ namespace Orchard.AuditTrail.Services {
return filterDisplay;
}
/// <summary>
/// Records an audit trail event.
/// </summary>
/// <typeparam name="T">The audit trail event provider type to determine the scope of the event name.</typeparam>
/// <param name="eventName">The shorthand name of the event</param>
/// <param name="user">The user to associate with the event. This is typically the currently loggedin user.</param>
/// <param name="properties">A property bag of custom event data that could be useful for <see cref="IAuditTrailEventHandler"/> implementations. These values aren't stored. Use the eventData parameter to persist additional data with the event.</param>
/// <param name="eventData">A property bag of custom event data that will be stored with the event record.</param>
/// <param name="eventFilterKey">The name of a custom key to use when filtering events.</param>
/// <param name="eventFilterData">The value of a custom filter key to filter on.</param>
/// <returns>The created audit trail event record if the specified event was not disabled.</returns>
public AuditTrailEventRecordResult CreateRecord<T>(string eventName, IUser user, IDictionary<string, object> properties = null, IDictionary<string, object> eventData = null, string eventFilterKey = null, string eventFilterData = null) where T : IAuditTrailEventProvider {
var eventDescriptor = DescribeEvent<T>(eventName);
if (!IsEventEnabled(eventDescriptor))
@@ -165,26 +198,49 @@ namespace Orchard.AuditTrail.Services {
};
}
/// <summary>
/// Describes all audit trail events provided by the system.
/// </summary>
/// <returns>A list of audit trail category descriptors.</returns>
public IEnumerable<AuditTrailCategoryDescriptor> DescribeCategories() {
var context = DescribeProviders();
return context.Describe();
}
/// <summary>
/// Describes all audit trail event providers.
/// </summary>
public DescribeContext DescribeProviders() {
var context = new DescribeContext();
_providers.Describe(context);
return context;
}
/// <summary>
/// Describes a single audit trail event.
/// </summary>
/// <param name="record">The audit trail event record for which to find its descriptor.</param>
/// <returns>A single audit trail event descriptor.</returns>
public AuditTrailEventDescriptor DescribeEvent(AuditTrailEventRecord record) {
return DescribeEvent(record.FullEventName) ?? AuditTrailEventDescriptor.Basic(record);
}
/// <summary>
/// Describes a single audit trail event.
/// </summary>
/// <typeparam name="T">The scope of the specified event name.</typeparam>
/// <param name="eventName">The shorthand name of the event.</param>
/// <returns>A single audit trail event descriptor.</returns>
public AuditTrailEventDescriptor DescribeEvent<T>(string eventName) where T : IAuditTrailEventProvider {
var fullyQualifiedEventName = EventNameExtensions.GetFullyQualifiedEventName<T>(eventName);
return DescribeEvent(fullyQualifiedEventName);
}
/// <summary>
/// Describes a single audit trail event.
/// </summary>
/// <param name="fullyQualifiedEventName">The fully qualified event name to describe.</param>
/// <returns>A single audit trail event descriptor.</returns>
public AuditTrailEventDescriptor DescribeEvent(string fullyQualifiedEventName) {
var categoryDescriptors = DescribeCategories();
var eventDescriptorQuery =

View File

@@ -5,7 +5,17 @@ using Newtonsoft.Json;
using Orchard.Logging;
namespace Orchard.AuditTrail.Services {
/// <summary>
/// A service responsible for serializing and deserializing audit trail event data.
/// </summary>
public class EventDataSerializer : Component, IEventDataSerializer {
/// <summary>
/// Serialize event data.
/// </summary>
/// <param name="eventData">eventData to be serialized.</param>
/// <returns>The serialized data.</returns>
public string Serialize(IDictionary<string, object> eventData) {
try {
var json = JsonConvert.SerializeObject(eventData, Formatting.None);
@@ -18,6 +28,11 @@ namespace Orchard.AuditTrail.Services {
return null;
}
/// <summary>
/// Deserialize event data.
/// </summary>
/// <param name="eventData">eventData to be deserialized.</param>
/// <returns>The deserialized generic dictionary</returns>
public IDictionary<string, object> Deserialize(string eventData) {
if (String.IsNullOrWhiteSpace(eventData))
return new Dictionary<string, object>();

View File

@@ -6,7 +6,12 @@ using Orchard.Collections;
using Orchard.Security;
namespace Orchard.AuditTrail.Services {
/// <summary>
/// Manage the audit trail.
/// </summary>
public interface IAuditTrailManager : IDependency {
/// <summary>
/// Gets a page of event records from the audit trail.
/// </summary>

View File

@@ -1,8 +1,24 @@
using System.Collections.Generic;
namespace Orchard.AuditTrail.Services {
/// <summary>
/// A service responsible for serializing and deserializing audit trail event data.
/// </summary>
public interface IEventDataSerializer : IDependency {
/// <summary>
/// Serialize event data.
/// </summary>
/// <param name="eventData">eventData to be serialized.</param>
/// <returns>The serialized data.</returns>
string Serialize(IDictionary<string, object> eventData);
/// <summary>
/// Deserialize event data.
/// </summary>
/// <param name="eventData">eventData to be deserialized.</param>
/// <returns>The deserialized generic dictionary</returns>
IDictionary<string, object> Deserialize(string eventData);
}
}

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