--HG--
branch : dev
This commit is contained in:
mibach
2010-03-12 00:10:38 -08:00
3 changed files with 10 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
using System.Web.Mvc;
using Orchard.Blogs.Models;
using Orchard.Mvc.Extensions;
namespace Orchard.Blogs.Extensions {
public static class UrlHelperExtensions {
@@ -16,11 +17,11 @@ namespace Orchard.Blogs.Extensions {
}
public static string BlogLiveWriterManifest(this UrlHelper urlHelper, string blogSlug) {
return urlHelper.Action("LiveWriterManifest", "Blog", new { blogSlug, area = "Orchard.Blogs" });
return urlHelper.AbsoluteAction(() => urlHelper.Action("LiveWriterManifest", "Blog", new { blogSlug, area = "Orchard.Blogs" }));
}
public static string BlogRsd(this UrlHelper urlHelper, string blogSlug) {
return urlHelper.Action("Rsd", "Blog", new { blogSlug, area = "Orchard.Blogs" });
return urlHelper.AbsoluteAction(() => urlHelper.Action("Rsd", "Blog", new { blogSlug, area = "Orchard.Blogs" }));
}
public static string BlogArchiveYear(this UrlHelper urlHelper, string blogSlug, int year) {

View File

@@ -42,11 +42,15 @@ namespace Orchard.Mvc.ViewModels {
public TProperty Value {
get {
if (_value == null && _builder != null) {
_value = _original.Eval(_expression) as TProperty;
if (_value == null)
object temp;
if (_original.TryGetValue(_expression, out temp) &&
temp is TProperty) {
SetValue(temp as TProperty);
}
else {
SetValue(_builder());
}
}
return _value;
}
set { SetValue(value); }

View File

@@ -118,7 +118,6 @@ namespace Orchard.UI.Resources {
if (!string.IsNullOrEmpty(link.Href)) {
sb
.Append(@" href=""")
.Append(@"http://localhost:30320")
.Append(html.AttributeEncode(link.Href))
.Append(@"""");
}