WORK IN PROGRESS, GET THE STABLE SOURCE FROM THE DOWNLOADS TAB

Fixes 26236

[TFS Changeset #64052]
This commit is contained in:
hartvig
2010-02-18 07:19:14 +00:00
parent 58ed09675b
commit 067bcf3c1b
5 changed files with 7 additions and 5 deletions

View File

@@ -235,7 +235,7 @@ namespace umbraco.BusinessLogic
HttpCookie cookie = context.Request.Cookies[key];
if (cookie == null) {
// Check for session
if (context.Session[key] != null)
if (context.Session != null && context.Session[key] != null)
if (context.Session[key].ToString() != "0")
tempValue = context.Session[key].ToString();
}

View File

@@ -21,13 +21,14 @@ namespace umbraco.presentation.dialogs
protected void Page_Load(object sender, EventArgs e)
{
Document d = new Document(int.Parse(helper.Request("id")));
bool includeChildren = !String.IsNullOrEmpty(UmbracoContext.Current.Request["children"]) ? true : false;
bool includeChildren = true; // !String.IsNullOrEmpty(UmbracoContext.Current.Request["children"]) ? true : false;
PreviewContent pc = new PreviewContent(Guid.NewGuid());
pc.PrepareDocument(base.getUser(), d, includeChildren);
pc.SavePreviewSet();
docLit.Text = d.Text;
changeSetUrl.Text = pc.PreviewsetPath;
StateHelper.SetCookieValue("PreviewSet", pc.PreviewSet.ToString());
Response.Redirect("../../" + d.Id.ToString() + ".aspx", true);
}
}
}

View File

@@ -353,7 +353,7 @@ namespace umbraco.cms.presentation
tp.Menu.InsertSplitter(2);
uicontrols.MenuIconI menuItem = tp.Menu.NewIcon(3);
menuItem.AltText = ui.Text("buttons", "showPage", this.getUser());
menuItem.OnClickCommand = "window.open('../" + Request["id"] + ".aspx?umbVersion=" + _document.Version.ToString() + "','umbPreview')";
menuItem.OnClickCommand = "window.open('dialogs/preview.aspx?id=" + Request["id"] + "','umbPreview')";
menuItem.ImageURL = SystemDirectories.Umbraco + "/images/editor/vis.gif";
// tp.Menu.InsertSplitter(4);
}

View File

@@ -36,7 +36,8 @@ namespace umbraco.presentation.preview
XmlContent = (XmlDocument) content.Instance.XmlContent.Clone();
// inject current document xml
content.AppendDocumentXml(documentObject.Id, documentObject.Level, documentObject.Parent.Id, documentObject.ToPreviewXml(XmlContent), XmlContent);
int parentId = documentObject.Level == 1 ? -1 : documentObject.Parent.Id;
content.AppendDocumentXml(documentObject.Id, documentObject.Level, parentId, documentObject.ToPreviewXml(XmlContent), XmlContent);
if (includeSubs)
{

View File

@@ -8,7 +8,7 @@
</xsl:template>
<xsl:template match="/configuration/appSettings/add[@key='umbracoConfigurationStatus']/@value">
<xsl:attribute name="value">4.1.0.beta</xsl:attribute>
<xsl:attribute name="value"></xsl:attribute>
</xsl:template>
<!-- Default templates to match anything else -->