Skip to content
This repository has been archived by the owner on Oct 18, 2018. It is now read-only.

Commit

Permalink
Fixed a couple of host injection bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
haacked committed Jun 5, 2011
1 parent 3225725 commit d26681c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Subtext.Framework/Web/SubtextPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public AdminUrlHelper AdminUrl
{
get
{
if(_adminUrlHelper == null)
if (_adminUrlHelper == null)
{
_adminUrlHelper = new AdminUrlHelper(Url);
}
Expand Down
8 changes: 7 additions & 1 deletion src/Subtext.Web/UI/Controls/Aggregate/AggregatePage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#endregion

using System;
using Ninject;
using Subtext.Framework;
using Subtext.Framework.Web.Handlers;
Expand All @@ -23,8 +24,13 @@ namespace Subtext.Web.UI.Controls
{
public class AggregatePage : SubtextPage
{
public HostInfo HostInfo
{
get { return Host.Value; }
}

[Inject]
public HostInfo HostInfo { get; set; }
public Lazy<HostInfo> Host { get; set; }

public int? GetGroupIdFromQueryString()
{
Expand Down
2 changes: 1 addition & 1 deletion src/Subtext.Web/Web.config
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
<add key="ProxyUsername" value="" />
<add key="ProxyPassword" value="" />
<!-- Aggregate Blog Stuff -->
<add key="AggregateEnabled" value="true" />
<add key="AggregateEnabled" value="false" />
<add key="AggregateTitle" value="A Subtext Community" />
<add key="AggregateUrl" value="http://localhost:2732/" />
<add key="AggregateDescription" value=".NET by Subtext" />
Expand Down
2 changes: 1 addition & 1 deletion src/Subtext.Web/aspx/AggDefault.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private void SetStyle()
//TODO: This is hard-coded to look in the simple skin for aggregate blogs. We should change this later.
string aggregateSkin = HostInfo.GetAggregateSkin().TemplateFolder;
Style.Text = string.Format(style, apppath, "Skins/" + aggregateSkin + "/Style.css") + Environment.NewLine +
string.Format(style, apppath, "Scripts/jquery.lightbox-0.5.css");
string.Format(style, apppath, "css/lightbox.css");
}
}
}
11 changes: 10 additions & 1 deletion src/Subtext.Web/aspx/Install/Step03_CreateBlog.aspx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,17 @@ public IEntryPublisher EntryPublisher
set;
}

[Inject]

protected HostInfo HostInfo
{
get
{
return Host.Value;
}
}

[Inject]
public Lazy<HostInfo> Host
{
get;
set;
Expand Down

0 comments on commit d26681c

Please sign in to comment.