mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 19:04:51 +08:00
Merge
--HG-- branch : 1.x
This commit is contained in:
@@ -231,14 +231,14 @@ namespace Orchard.Tests.Modules.Indexing {
|
||||
_provider.Store("default", _provider.New(2).Add("body", "Renaud is also in the kitchen.").Analyze().Add("title", "A love affair").Analyze());
|
||||
_provider.Store("default", _provider.New(3).Add("body", "Bertrand is a little bit jealous.").Analyze().Add("title", "Soap opera").Analyze());
|
||||
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body" }, "kitchen").Count(), Is.EqualTo(2));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body" }, "kitchen bertrand").Count(), Is.EqualTo(3));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body" }, "kitchen +bertrand").Count(), Is.EqualTo(1));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body" }, "+kitchen +bertrand").Count(), Is.EqualTo(0));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body" }, "kit").Count(), Is.EqualTo(0));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body" }, "kit*").Count(), Is.EqualTo(2));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body", "title" }, "bradley love^3 soap").Count(), Is.EqualTo(3));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body", "title" }, "bradley love^3 soap").Search().First().ContentItemId, Is.EqualTo(2));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body" }, "kitchen", false).Count(), Is.EqualTo(2));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body" }, "kitchen bertrand", false).Count(), Is.EqualTo(3));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body" }, "kitchen +bertrand", false).Count(), Is.EqualTo(1));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body" }, "+kitchen +bertrand", false).Count(), Is.EqualTo(0));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body" }, "kit", false).Count(), Is.EqualTo(0));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body" }, "kit*", false).Count(), Is.EqualTo(2));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body", "title" }, "bradley love^3 soap", false).Count(), Is.EqualTo(3));
|
||||
Assert.That(_searchBuilder.Parse(new[] { "body", "title" }, "bradley love^3 soap", false).Search().First().ContentItemId, Is.EqualTo(2));
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -308,6 +308,14 @@ namespace Orchard.Tests.Modules.Indexing {
|
||||
Assert.That(_searchBuilder.Parse("title", "home").WithField("culture", 1033).AsFilter().Count(), Is.EqualTo(1));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ParsedTextShouldBeEscapedByDefault() {
|
||||
_provider.CreateIndex("default");
|
||||
_provider.Store("default", _provider.New(1).Add("body", "foo.bar").Analyze());
|
||||
|
||||
Assert.That(_searchBuilder.Parse("body", "*@!woo*@!").Count(), Is.EqualTo(0));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void FieldsCanContainMultipleValue() {
|
||||
_provider.CreateIndex("default");
|
||||
|
@@ -203,7 +203,7 @@ namespace Lucene.Services {
|
||||
}
|
||||
|
||||
public ISearchBuilder CreateSearchBuilder(string indexName) {
|
||||
return new LuceneSearchBuilder(GetDirectory(indexName));
|
||||
return new LuceneSearchBuilder(GetDirectory(indexName)) { Logger = Logger };
|
||||
}
|
||||
|
||||
private string GetSettingsFileName(string indexName) {
|
||||
|
@@ -48,11 +48,11 @@ namespace Lucene.Services {
|
||||
InitPendingClause();
|
||||
}
|
||||
|
||||
public ISearchBuilder Parse(string defaultField, string query) {
|
||||
return Parse(new[] {defaultField}, query);
|
||||
public ISearchBuilder Parse(string defaultField, string query, bool escape, bool mandatory) {
|
||||
return Parse(new[] {defaultField}, query, escape, mandatory);
|
||||
}
|
||||
|
||||
public ISearchBuilder Parse(string[] defaultFields, string query) {
|
||||
public ISearchBuilder Parse(string[] defaultFields, string query, bool escape, bool mandatory) {
|
||||
if ( defaultFields.Length == 0 ) {
|
||||
throw new ArgumentException("Default field can't be empty");
|
||||
}
|
||||
@@ -61,9 +61,13 @@ namespace Lucene.Services {
|
||||
throw new ArgumentException("Query can't be empty");
|
||||
}
|
||||
|
||||
if (escape) {
|
||||
query = QueryParser.Escape(query);
|
||||
}
|
||||
|
||||
var analyzer = LuceneIndexProvider.CreateAnalyzer();
|
||||
foreach ( var defaultField in defaultFields ) {
|
||||
var clause = new BooleanClause(new QueryParser(LuceneIndexProvider.LuceneVersion, defaultField, analyzer).Parse(query), BooleanClause.Occur.SHOULD);
|
||||
var clause = new BooleanClause(new QueryParser(LuceneIndexProvider.LuceneVersion, defaultField, analyzer).Parse(query), mandatory ? BooleanClause.Occur.MUST : BooleanClause.Occur.SHOULD);
|
||||
_clauses.Add(clause);
|
||||
}
|
||||
|
||||
|
@@ -1,26 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<compilation targetFramework="4.0">
|
||||
<assemblies>
|
||||
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
|
||||
</assemblies>
|
||||
</compilation>
|
||||
|
||||
<pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc"/>
|
||||
<add namespace="System.Web.Mvc.Ajax"/>
|
||||
<add namespace="System.Web.Mvc.Html"/>
|
||||
<add namespace="System.Web.Routing"/>
|
||||
<add namespace="System.Linq"/>
|
||||
<add namespace="System.Collections.Generic"/>
|
||||
<add namespace="Orchard.Mvc.Html"/>
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web>
|
||||
<system.web.extensions/>
|
||||
</configuration>
|
@@ -9,7 +9,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Original file name:
|
||||
// Generation date: 12/16/2010 1:21:46 AM
|
||||
// Generation date: 1/10/2011 10:36:55 PM
|
||||
namespace Orchard.Packaging.GalleryServer
|
||||
{
|
||||
|
||||
@@ -128,17 +128,17 @@ namespace Orchard.Packaging.GalleryServer
|
||||
/// <param name="price">Initial value of Price.</param>
|
||||
/// <param name="requireLicenseAcceptance">Initial value of RequireLicenseAcceptance.</param>
|
||||
/// <param name="isLatestVersion">Initial value of IsLatestVersion.</param>
|
||||
/// <param name="rating">Initial value of Rating.</param>
|
||||
/// <param name="ratingsCount">Initial value of RatingsCount.</param>
|
||||
/// <param name="downloadCount">Initial value of DownloadCount.</param>
|
||||
/// <param name="versionRating">Initial value of VersionRating.</param>
|
||||
/// <param name="versionRatingsCount">Initial value of VersionRatingsCount.</param>
|
||||
/// <param name="versionDownloadCount">Initial value of VersionDownloadCount.</param>
|
||||
/// <param name="created">Initial value of Created.</param>
|
||||
/// <param name="lastUpdated">Initial value of LastUpdated.</param>
|
||||
/// <param name="published">Initial value of Published.</param>
|
||||
/// <param name="rating">Initial value of Rating.</param>
|
||||
/// <param name="ratingsCount">Initial value of RatingsCount.</param>
|
||||
/// <param name="downloadCount">Initial value of DownloadCount.</param>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
public static PublishedPackage CreatePublishedPackage(string ID, string version, long packageSize, decimal price, bool requireLicenseAcceptance, bool isLatestVersion, double rating, int ratingsCount, int downloadCount, double versionRating, int versionRatingsCount, int versionDownloadCount, global::System.DateTime created, global::System.DateTime lastUpdated, global::System.DateTime published)
|
||||
public static PublishedPackage CreatePublishedPackage(string ID, string version, long packageSize, decimal price, bool requireLicenseAcceptance, bool isLatestVersion, double versionRating, int versionRatingsCount, int versionDownloadCount, global::System.DateTime created, global::System.DateTime lastUpdated, global::System.DateTime published, double rating, int ratingsCount, int downloadCount)
|
||||
{
|
||||
PublishedPackage publishedPackage = new PublishedPackage();
|
||||
publishedPackage.Id = ID;
|
||||
@@ -147,15 +147,15 @@ namespace Orchard.Packaging.GalleryServer
|
||||
publishedPackage.Price = price;
|
||||
publishedPackage.RequireLicenseAcceptance = requireLicenseAcceptance;
|
||||
publishedPackage.IsLatestVersion = isLatestVersion;
|
||||
publishedPackage.Rating = rating;
|
||||
publishedPackage.RatingsCount = ratingsCount;
|
||||
publishedPackage.DownloadCount = downloadCount;
|
||||
publishedPackage.VersionRating = versionRating;
|
||||
publishedPackage.VersionRatingsCount = versionRatingsCount;
|
||||
publishedPackage.VersionDownloadCount = versionDownloadCount;
|
||||
publishedPackage.Created = created;
|
||||
publishedPackage.LastUpdated = lastUpdated;
|
||||
publishedPackage.Published = published;
|
||||
publishedPackage.Rating = rating;
|
||||
publishedPackage.RatingsCount = ratingsCount;
|
||||
publishedPackage.DownloadCount = downloadCount;
|
||||
return publishedPackage;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -453,69 +453,6 @@ namespace Orchard.Packaging.GalleryServer
|
||||
partial void OnIsLatestVersionChanging(bool value);
|
||||
partial void OnIsLatestVersionChanged();
|
||||
/// <summary>
|
||||
/// There are no comments for Property Rating in the schema.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
public double Rating
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Rating;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.OnRatingChanging(value);
|
||||
this._Rating = value;
|
||||
this.OnRatingChanged();
|
||||
}
|
||||
}
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
private double _Rating;
|
||||
partial void OnRatingChanging(double value);
|
||||
partial void OnRatingChanged();
|
||||
/// <summary>
|
||||
/// There are no comments for Property RatingsCount in the schema.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
public int RatingsCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._RatingsCount;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.OnRatingsCountChanging(value);
|
||||
this._RatingsCount = value;
|
||||
this.OnRatingsCountChanged();
|
||||
}
|
||||
}
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
private int _RatingsCount;
|
||||
partial void OnRatingsCountChanging(int value);
|
||||
partial void OnRatingsCountChanged();
|
||||
/// <summary>
|
||||
/// There are no comments for Property DownloadCount in the schema.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
public int DownloadCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._DownloadCount;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.OnDownloadCountChanging(value);
|
||||
this._DownloadCount = value;
|
||||
this.OnDownloadCountChanged();
|
||||
}
|
||||
}
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
private int _DownloadCount;
|
||||
partial void OnDownloadCountChanging(int value);
|
||||
partial void OnDownloadCountChanged();
|
||||
/// <summary>
|
||||
/// There are no comments for Property VersionRating in the schema.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
@@ -726,26 +663,68 @@ namespace Orchard.Packaging.GalleryServer
|
||||
partial void OnIconUrlChanging(string value);
|
||||
partial void OnIconUrlChanged();
|
||||
/// <summary>
|
||||
/// There are no comments for Property ReportAbuseUrl in the schema.
|
||||
/// There are no comments for Property Rating in the schema.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
public string ReportAbuseUrl
|
||||
public double Rating
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ReportAbuseUrl;
|
||||
return this._Rating;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.OnReportAbuseUrlChanging(value);
|
||||
this._ReportAbuseUrl = value;
|
||||
this.OnReportAbuseUrlChanged();
|
||||
this.OnRatingChanging(value);
|
||||
this._Rating = value;
|
||||
this.OnRatingChanged();
|
||||
}
|
||||
}
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
private string _ReportAbuseUrl;
|
||||
partial void OnReportAbuseUrlChanging(string value);
|
||||
partial void OnReportAbuseUrlChanged();
|
||||
private double _Rating;
|
||||
partial void OnRatingChanging(double value);
|
||||
partial void OnRatingChanged();
|
||||
/// <summary>
|
||||
/// There are no comments for Property RatingsCount in the schema.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
public int RatingsCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._RatingsCount;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.OnRatingsCountChanging(value);
|
||||
this._RatingsCount = value;
|
||||
this.OnRatingsCountChanged();
|
||||
}
|
||||
}
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
private int _RatingsCount;
|
||||
partial void OnRatingsCountChanging(int value);
|
||||
partial void OnRatingsCountChanged();
|
||||
/// <summary>
|
||||
/// There are no comments for Property DownloadCount in the schema.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
public int DownloadCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._DownloadCount;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.OnDownloadCountChanging(value);
|
||||
this._DownloadCount = value;
|
||||
this.OnDownloadCountChanged();
|
||||
}
|
||||
}
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
private int _DownloadCount;
|
||||
partial void OnDownloadCountChanging(int value);
|
||||
partial void OnDownloadCountChanged();
|
||||
/// <summary>
|
||||
/// There are no comments for Property Categories in the schema.
|
||||
/// </summary>
|
||||
@@ -810,6 +789,48 @@ namespace Orchard.Packaging.GalleryServer
|
||||
partial void OnDependenciesChanging(string value);
|
||||
partial void OnDependenciesChanged();
|
||||
/// <summary>
|
||||
/// There are no comments for Property ReportAbuseUrl in the schema.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
public string ReportAbuseUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ReportAbuseUrl;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.OnReportAbuseUrlChanging(value);
|
||||
this._ReportAbuseUrl = value;
|
||||
this.OnReportAbuseUrlChanged();
|
||||
}
|
||||
}
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
private string _ReportAbuseUrl;
|
||||
partial void OnReportAbuseUrlChanging(string value);
|
||||
partial void OnReportAbuseUrlChanged();
|
||||
/// <summary>
|
||||
/// There are no comments for Property GalleryDetailsUrl in the schema.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
public string GalleryDetailsUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._GalleryDetailsUrl;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.OnGalleryDetailsUrlChanging(value);
|
||||
this._GalleryDetailsUrl = value;
|
||||
this.OnGalleryDetailsUrlChanged();
|
||||
}
|
||||
}
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
private string _GalleryDetailsUrl;
|
||||
partial void OnGalleryDetailsUrlChanging(string value);
|
||||
partial void OnGalleryDetailsUrlChanged();
|
||||
/// <summary>
|
||||
/// There are no comments for Screenshots in the schema.
|
||||
/// </summary>
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Services.Design", "1.0.0")]
|
||||
|
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="bf634e7d-1d71-45cd-b4d8-f06f74cb7bc7" xmlns="urn:schemas-microsoft-com:xml-dataservicemap">
|
||||
<ReferenceGroup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ID="680b6c18-74a9-42fd-978e-d9d9c1c396d2" xmlns="urn:schemas-microsoft-com:xml-dataservicemap">
|
||||
<MetadataSources>
|
||||
<MetadataSource Address="http://orchardproject.net:777/GalleryServer/FeedService.svc/" Protocol="http" SourceId="1" />
|
||||
<MetadataSource Address="http://orchardproject.net/gallery/server/FeedService.svc" Protocol="http" SourceId="1" />
|
||||
</MetadataSources>
|
||||
<Metadata>
|
||||
<MetadataFile FileName="service.edmx" MetadataType="Edmx" ID="ed52956e-0709-4cc7-a9ba-74cca2274614" SourceId="1" SourceUrl="http://orchardproject.net:777/GalleryServer/FeedService.svc/" />
|
||||
<MetadataFile FileName="service.edmx" MetadataType="Edmx" ID="0ee65dc8-3919-409c-a84e-c78cc88d0597" SourceId="1" SourceUrl="http://orchardproject.net/gallery/server/FeedService.svc" />
|
||||
</Metadata>
|
||||
<Extensions />
|
||||
</ReferenceGroup>
|
@@ -8,10 +8,10 @@
|
||||
</Key>
|
||||
<Property Name="Id" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Version" Type="Edm.String" Nullable="false" />
|
||||
<Property Name="Title" Type="Edm.String" Nullable="true" m:FC_TargetPath="SyndicationTitle" m:FC_ContentKind="text" m:FC_KeepInContent="true" />
|
||||
<Property Name="Authors" Type="Edm.String" Nullable="true" m:FC_TargetPath="SyndicationAuthorName" m:FC_ContentKind="text" m:FC_KeepInContent="true" />
|
||||
<Property Name="Title" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="Authors" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="PackageType" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="Summary" Type="Edm.String" Nullable="true" m:FC_TargetPath="SyndicationSummary" m:FC_ContentKind="text" m:FC_KeepInContent="true" />
|
||||
<Property Name="Summary" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="Description" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="Copyright" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="PackageHashAlgorithm" Type="Edm.String" Nullable="true" />
|
||||
@@ -20,24 +20,25 @@
|
||||
<Property Name="Price" Type="Edm.Decimal" Nullable="false" />
|
||||
<Property Name="RequireLicenseAcceptance" Type="Edm.Boolean" Nullable="false" />
|
||||
<Property Name="IsLatestVersion" Type="Edm.Boolean" Nullable="false" />
|
||||
<Property Name="Rating" Type="Edm.Double" Nullable="false" />
|
||||
<Property Name="RatingsCount" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="DownloadCount" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="VersionRating" Type="Edm.Double" Nullable="false" />
|
||||
<Property Name="VersionRatingsCount" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="VersionDownloadCount" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="Created" Type="Edm.DateTime" Nullable="false" />
|
||||
<Property Name="LastUpdated" Type="Edm.DateTime" Nullable="false" m:FC_TargetPath="SyndicationUpdated" m:FC_ContentKind="text" m:FC_KeepInContent="true" />
|
||||
<Property Name="LastUpdated" Type="Edm.DateTime" Nullable="false" />
|
||||
<Property Name="Published" Type="Edm.DateTime" Nullable="false" />
|
||||
<Property Name="ExternalPackageUrl" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="ProjectUrl" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="LicenseUrl" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="IconUrl" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="ReportAbuseUrl" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="Rating" Type="Edm.Double" Nullable="false" />
|
||||
<Property Name="RatingsCount" Type="Edm.Int32" Nullable="false" />
|
||||
<Property Name="DownloadCount" Type="Edm.Int32" Nullable="false" />
|
||||
<NavigationProperty Name="Screenshots" Relationship="Gallery.Infrastructure.FeedModels.PublishedPackage_Screenshots" FromRole="PublishedPackage" ToRole="Screenshots" />
|
||||
<Property Name="Categories" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="Tags" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="Dependencies" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="ReportAbuseUrl" Type="Edm.String" Nullable="true" />
|
||||
<Property Name="GalleryDetailsUrl" Type="Edm.String" Nullable="true" />
|
||||
</EntityType>
|
||||
<EntityType Name="PublishedScreenshot">
|
||||
<Key>
|
||||
|
@@ -9,6 +9,7 @@ namespace Orchard.Packaging.Services {
|
||||
public string Version { get; set; }
|
||||
public string PackageStreamUri { get; set; }
|
||||
public string ProjectUrl { get; set; }
|
||||
public string GalleryDetailsUrl { get; set; }
|
||||
public DateTime LastUpdated { get; set; }
|
||||
public string Authors { get; set; }
|
||||
public string Description { get; set; }
|
||||
|
@@ -83,6 +83,7 @@ namespace Orchard.Packaging.Services {
|
||||
PackageId = package.Id,
|
||||
PackageStreamUri = downloadUri.ToString(),
|
||||
ProjectUrl = package.ProjectUrl,
|
||||
GalleryDetailsUrl = package.GalleryDetailsUrl,
|
||||
Source = source,
|
||||
Version = package.Version ?? string.Empty,
|
||||
Description = package.Description,
|
||||
|
@@ -31,7 +31,32 @@
|
||||
|
||||
<div class="iconThumbnail">
|
||||
<div class="extensionDetails column">
|
||||
<div class="extensionName">
|
||||
<div class="extensionName">
|
||||
@if (!string.IsNullOrWhiteSpace(item.GalleryDetailsUrl)) {
|
||||
<a href="@item.GalleryDetailsUrl">
|
||||
<h2>@item.Title<span> - @T("Version: {0}", item.Version)</span></h2>
|
||||
</a>
|
||||
} else {
|
||||
<h2>@item.Title<span> - @T("Version: {0}", item.Version)</span></h2>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="related">
|
||||
@Html.ActionLink(T("Install").ToString(), "Install", new RouteValueDictionary { { "packageId", item.PackageId }, { "version", item.Version }, { "sourceId", item.Source.Id }, { "redirectTo", "Modules" } })@T(" | ")
|
||||
<a href="@item.PackageStreamUri">@T("Download")</a>
|
||||
</div>
|
||||
|
||||
<div class="properties">
|
||||
<p>@(item.Description == null ? T("(No description").Text : item.Description)</p>
|
||||
<ul class="pageStatus">
|
||||
<li>@T("Last Updated: {0}", DateTime.Now.ToLocalTime())</li>
|
||||
<li> | @T("Author: {0}", !string.IsNullOrEmpty(item.Authors) ? item.Authors : T("Unknown").ToString())</li>
|
||||
<li> | @T("Rating: {0}", item.Rating)</li>
|
||||
<li> | @T("Ratings Count: {0}", item.RatingsCount)</li>
|
||||
<li> | @T("Website: ")
|
||||
@if (!string.IsNullOrEmpty(item.ProjectUrl)) { <a href="@item.ProjectUrl">@item.ProjectUrl</a> } else { @T("Unknown").ToString() }
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@@ -38,7 +38,13 @@
|
||||
<div class="@extensionClass">
|
||||
<div class="extensionDetails column">
|
||||
<div class="extensionName">
|
||||
<h2>@item.Title<span> - @T("Version: {0}", item.Version)</span></h2>
|
||||
@if (!string.IsNullOrWhiteSpace(item.GalleryDetailsUrl)) {
|
||||
<a href="@item.GalleryDetailsUrl">
|
||||
<h2>@item.Title<span> - @T("Version: {0}", item.Version)</span></h2>
|
||||
</a>
|
||||
} else {
|
||||
<h2>@item.Title<span> - @T("Version: {0}", item.Version)</span></h2>
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="related">
|
||||
|
@@ -27,14 +27,6 @@ namespace Orchard.Setup.Controllers {
|
||||
public Localizer T { get; set; }
|
||||
|
||||
private ActionResult IndexViewResult(SetupViewModel model) {
|
||||
string message;
|
||||
if (!CanWriteToAppDataFolder(out message)) {
|
||||
_notifier.Error(
|
||||
T(
|
||||
"Hey, it looks like I can't write to the App_Data folder in the root of this application and that's where I need to save some of the information you're about to enter.\r\n\r\nPlease give me (the machine account this application is running under) write access to App_Data so I can get this app all set up for you.\r\n\r\nThanks!\r\n\r\n----\r\n{0}",
|
||||
message));
|
||||
}
|
||||
|
||||
return View(model);
|
||||
}
|
||||
|
||||
@@ -105,19 +97,5 @@ namespace Orchard.Setup.Controllers {
|
||||
return IndexViewResult(model);
|
||||
}
|
||||
}
|
||||
|
||||
bool CanWriteToAppDataFolder(out string message) {
|
||||
try {
|
||||
_appDataFolder.CreateFile("_systemcheck.txt", "Communicator check one two one two");
|
||||
_appDataFolder.DeleteFile("_systemcheck.txt");
|
||||
|
||||
message = "";
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex) {
|
||||
message = ex.Message.Replace("_systemcheck.txt", "");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -3,8 +3,8 @@ using System.Collections.Generic;
|
||||
|
||||
namespace Orchard.Indexing {
|
||||
public interface ISearchBuilder {
|
||||
ISearchBuilder Parse(string defaultField, string query);
|
||||
ISearchBuilder Parse(string[] defaultFields, string query);
|
||||
ISearchBuilder Parse(string defaultField, string query, bool escape = true, bool mandatory = false);
|
||||
ISearchBuilder Parse(string[] defaultFields, string query, bool escape = true, bool mandatory = false);
|
||||
|
||||
ISearchBuilder WithField(string field, bool value);
|
||||
ISearchBuilder WithField(string field, DateTime value);
|
||||
|
@@ -4,11 +4,11 @@ using System.Linq;
|
||||
|
||||
namespace Orchard.Indexing {
|
||||
public class NullSearchBuilder : ISearchBuilder {
|
||||
public ISearchBuilder Parse(string defaultField, string query) {
|
||||
public ISearchBuilder Parse(string defaultField, string query, bool escape, bool mandatory) {
|
||||
return this;
|
||||
}
|
||||
|
||||
public ISearchBuilder Parse(string[] defaultFields, string query) {
|
||||
public ISearchBuilder Parse(string[] defaultFields, string query, bool escape, bool mandatory) {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user