From 714957310877536412ced26d26bcb98af8b57a59 Mon Sep 17 00:00:00 2001 From: anurse Date: Fri, 2 Nov 2012 09:36:57 -0700 Subject: [PATCH] Fixed Share buttons to use Package-specific URL instead of Version-specific URLs. --- Website/UrlExtensions.cs | 10 ---------- Website/Views/Packages/DisplayPackage.cshtml | 7 ++++--- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/Website/UrlExtensions.cs b/Website/UrlExtensions.cs index 5c3606aeaa..8a46aa6164 100644 --- a/Website/UrlExtensions.cs +++ b/Website/UrlExtensions.cs @@ -11,16 +11,6 @@ public static string Current(this UrlHelper url) return url.RequestContext.HttpContext.Request.RawUrl; } - /// - /// Gets the "canonical" (as in fully-qualified, without "www") version of the current URL - /// - /// A UrlHelper object - /// The canonical URL - public static string CanonicalCurrent(this UrlHelper url) - { - return GetCanonicalUrl(url).Uri.AbsoluteUri; - } - public static string Absolute(this UrlHelper url, string path) { UriBuilder builder = GetCanonicalUrl(url); diff --git a/Website/Views/Packages/DisplayPackage.cshtml b/Website/Views/Packages/DisplayPackage.cshtml index 69c2c5d986..157fe859ba 100644 --- a/Website/Views/Packages/DisplayPackage.cshtml +++ b/Website/Views/Packages/DisplayPackage.cshtml @@ -4,6 +4,7 @@ ViewBag.Title = Model.Title + " " + Model.Version; ViewBag.Tab = "Packages"; Layout = "~/Views/Shared/TwoColumnLayout.cshtml"; + var absolutePackageUrl = Url.Absolute(Url.Package(Model.Id)); } @section OpenGraph { @if(!String.IsNullOrWhiteSpace(ViewBag.FacebookAppID)) { @@ -11,7 +12,7 @@ } - + @@ -133,8 +134,8 @@ }

-
-
+
+
@if (!String.IsNullOrWhiteSpace(Model.ReleaseNotes)) {