mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-14 10:54:50 +08:00
The Gallery Feeds get their title from the feed
--HG-- branch : dev
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Configuration;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.ServiceModel.Syndication;
|
||||
@@ -14,7 +15,8 @@ namespace PackageIndexReferenceImplementation.Services {
|
||||
var formatter = new Atom10FeedFormatter<SyndicationFeed>();
|
||||
var feedPath = HostingEnvironment.MapPath("~/App_Data/Feed.xml");
|
||||
if (!File.Exists(feedPath)) {
|
||||
return new SyndicationFeed();
|
||||
string title = ConfigurationManager.AppSettings["Title"];
|
||||
return new SyndicationFeed() { Title = new TextSyndicationContent(title)};
|
||||
}
|
||||
using (var reader = XmlReader.Create(feedPath)) {
|
||||
formatter.ReadFrom(reader);
|
||||
|
@@ -12,9 +12,11 @@
|
||||
providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
|
||||
<appSettings>
|
||||
<add key="Title" value="Orchard Modules Gallery"/>
|
||||
</appSettings>
|
||||
<system.web>
|
||||
|
||||
|
||||
<compilation debug="true" targetFramework="4.0">
|
||||
<assemblies>
|
||||
<add assembly="System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
|
Reference in New Issue
Block a user