--HG--
branch : 1.x
This commit is contained in:
Renaud Paquay
2011-01-11 16:43:09 -08:00
15 changed files with 194 additions and 181 deletions

View File

@@ -1,4 +1,4 @@
<parameters>
<parameters>
<!-- Prompts where to copy the content files and takes a web site path (such as "contoso.com/app") -->
<parameter name="Application Path" description="Full site path where you would like to install your application (i.e., Default Web Site/orchard)" defaultValue="Default Web Site/orchard" tags="iisapp">
<parameterEntry type="ProviderPath" scope="iisapp" match="Orchard" />
@@ -46,24 +46,18 @@
<parameter name="Database Administrator Password" description="Password for the database administrator account." tags="New, Password, SQL, dbAdminPassword">
</parameter>
<!-- This is the hidden admin connection string used to run the database scripts -->
<parameter name="Connection String" description="Automatically sets the connection string for the connection request." defaultValue="Server={Database Server};Database={Database Name};uid={Database Administrator};Pwd={Database Administrator Password};" tags="Hidden, SQL">
<parameter name="Admin Connection String SqlServer"
tags="SQLConnectionString, AdminConnectionString, Hidden, Validate" description="Automatically sets the connection string for the connection request."
defaultValue="Data Source={Database Server};Initial Catalog={Database Name};User Id={Database Administrator};Password={Database Administrator Password}">
<parameterEntry type="ProviderPath" scope="dbfullsql" match="install.sql" />
</parameter>
<parameter name="Settings Data Provider for SQL" description="Orchard SQL Data Provider Setting" defaultValue="DataProvider: SqlServer" tags="Hidden, SQL">
<parameterEntry kind="TextFile" scope="\\Settings\.txt$" match="DataProvider\s*:[^\r\n]*" />
<parameter name="Non-Admin Connection String SqlServer"
tags="SQLConnectionString, UserConnectionString, Hidden" description="Automatically sets the connection string for the connection request."
defaultValue="Data Source={Database Server};Initial Catalog={Database Name};User Id={Database Username};Password={Database Password}">
</parameter>
<parameter name="Settings Data Connection String for SQL" description="Orchard SQL Data Connection String Setting" defaultValue="DataConnectionString: Server={Database Server};Database={Database Name};uid={Database Administrator};Pwd={Database Administrator Password};" tags="Hidden, SQL">
<parameterEntry kind="TextFile" scope="\\Settings\.txt$" match="DataConnectionString\s*:[^\r\n]*" />
</parameter>
<parameter name="Settings Data Provider for SQLCE" description="Orchard SQLCE Data Provider Setting" defaultValue="DataProvider: SqlCe" tags="Hidden, SQLCE, NoStore">
<parameterEntry kind="TextFile" scope="\\Settings\.txt$" match="DataProvider\s*:[^\r\n]*" />
</parameter>
<parameter name="Settings Data Connection String for SQLCE" description="Orchard SQLCE Data Connection String Setting" defaultValue="DataConnectionString: " tags="Hidden, SQLCE, NoStore">
<parameterEntry kind="TextFile" scope="\\Settings\.txt$" match="DataConnectionString\s*:[^\r\n]*" />
<parameter name="Orchard Connection String" friendlyName="Orchard Connection String" description="Orchard SQL Data Connection String Setting" defaultValue="" tags="Sql, SqlCE, SingleLineConnectionString, Hidden">
<parameterEntry kind="TextFile" scope="\\Settings\.txt$" match="(?&lt;=\s*DataConnectionString:\s+)[^\s].*[^\r\n]" />
</parameter>
</parameters>

View File

@@ -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");

View File

@@ -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) {

View File

@@ -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);
}

View File

@@ -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>

View File

@@ -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")]

View File

@@ -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>

View File

@@ -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>

View File

@@ -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; }

View File

@@ -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,

View File

@@ -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>&nbsp;&#124;&nbsp;@T("Author: {0}", !string.IsNullOrEmpty(item.Authors) ? item.Authors : T("Unknown").ToString())</li>
<li>&nbsp;&#124;&nbsp;@T("Rating: {0}", item.Rating)</li>
<li>&nbsp;&#124;&nbsp;@T("Ratings Count: {0}", item.RatingsCount)</li>
<li>&nbsp;&#124;&nbsp;@T("Website: ")
@if (!string.IsNullOrEmpty(item.ProjectUrl)) { <a href="@item.ProjectUrl">@item.ProjectUrl</a> } else { @T("Unknown").ToString() }
</li>
</ul>
</div>
</div>

View File

@@ -38,7 +38,13 @@
<div class="@extensionClass">
<div class="extensionDetails column">
<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">

View File

@@ -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;
}
}
}
}

View File

@@ -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);

View File

@@ -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;
}