Skip to content

Instantly share code, notes, and snippets.

@soen
Last active July 6, 2016 16:22
Show Gist options
  • Save soen/8ade01a8301a2f52688c2736eeb4ec81 to your computer and use it in GitHub Desktop.
Save soen/8ade01a8301a2f52688c2736eeb4ec81 to your computer and use it in GitHub Desktop.
// Decompiled with JetBrains decompiler
// Type: Sitecore.Web.WebEditUtil
// Assembly: Sitecore.Kernel, Version=8.1.0.0, Culture=neutral, PublicKeyToken=null
//
// NOTE: This is not the complete implementation, only fractions of the important parts related to the date and time.
//
namespace Sitecore.Web
{
public static class WebEditUtil
{
public static string SiteName
{
get
{
SiteRequest request = Context.Request;
Assert.IsNotNull((object) request, "Site request not found.");
// This is the part where things are not being resolved correct, since the 'sc_pagesite' is not the correct query param name
return Assert.ResultNotNull<string>(string.IsNullOrEmpty(request.QueryString["sc_pagesite"]) ? Settings.Preview.DefaultSite : request.QueryString["sc_pagesite"]);
}
}
// code omitted...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment