reverts removing cook computing dll and ensures we still ship with it, removes publish.aspx

This commit is contained in:
Shannon
2017-07-20 16:44:28 +10:00
parent e9e2a86e2e
commit 69fc7c4b7c
4 changed files with 4 additions and 243 deletions

View File

@@ -124,6 +124,9 @@
<HintPath>..\packages\ClientDependency-Mvc5.1.8.0.0\lib\net45\ClientDependency.Core.Mvc.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="CookComputing.XmlRpcV2, Version=2.5.0.0, Culture=neutral, PublicKeyToken=a7d6e17aa302004d, processorArchitecture=MSIL">
<HintPath>..\packages\xmlrpcnet.2.5.0\lib\net20\CookComputing.XmlRpcV2.dll</HintPath>
</Reference>
<Reference Include="dotless.Core, Version=1.5.2.0, Culture=neutral, PublicKeyToken=96b446c9e63eae34, processorArchitecture=MSIL">
<HintPath>..\packages\dotless.1.5.2\lib\dotless.Core.dll</HintPath>
</Reference>

View File

@@ -38,4 +38,5 @@
<package id="System.Collections.Immutable" version="1.1.36" targetFramework="net45" />
<package id="System.Reflection.Metadata" version="1.0.21" targetFramework="net45" />
<package id="Umbraco.ModelsBuilder" version="3.0.7" targetFramework="net45" />
<package id="xmlrpcnet" version="2.5.0" targetFramework="net45" />
</packages>

View File

@@ -1148,9 +1148,6 @@
<Compile Include="umbraco.presentation\umbraco\dialogs\sort.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\dialogs\publish.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="umbraco.presentation\umbraco\macroResultWrapper.aspx.cs">
<SubType>ASPXCodeBehind</SubType>
</Compile>

View File

@@ -1,240 +0,0 @@
using System;
using System.Collections.Generic;
using System.Collections.Generic;
using System.Web.UI;
using System.Web.UI.WebControls;
using Umbraco.Core.Logging;
using umbraco.cms.businesslogic.web;
using umbraco.BusinessLogic;
using Umbraco.Core.Logging;
using umbraco.BasePages;
namespace umbraco.dialogs
{
/// <summary>
/// Summary description for publish.
/// </summary>
[Obsolete("This is no longer used whatsoever and will be removed from the codebase")]
public partial class publish : UmbracoEnsuredPage
{
protected Literal total;
private int _nodeId;
private int _nodesPublished = 0;
private readonly List<cms.businesslogic.web.Document> _documents = new List<cms.businesslogic.web.Document>();
public static string pageName = "";
public publish()
{
CurrentApp = DefaultApps.content.ToString();
}
protected void Page_Load(object sender, EventArgs e)
{
_nodeId = int.Parse(helper.Request("id"));
var d = new cms.businesslogic.web.Document(_nodeId);
pageName = d.Text;
if (d.Level > 1 && d.PathPublished == false)
{
TheForm.Visible = false;
theEnd.Visible = true;
feedbackMsg.type = uicontrols.Feedback.feedbacktype.notice;
feedbackMsg.Text = ui.Text("publish", "contentPublishedFailedByParent", d.Text, getUser()) + "</p><p><a href='#' onClick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
return;
}
// add control prefix to variable for support with masterpages
var prefix = PublishUnpublishedItems.ClientID.Replace(PublishUnpublishedItems.ID, "");
masterPagePrefix.Text = prefix;
// by default we only count the published ones
var totalNodesToPublish = cms.businesslogic.web.Document.CountSubs(_nodeId, true);
try
{
Application.Lock();
// We add both all nodes and only published nodes to the application variables so we can ajax query depending on checkboxes
Application["publishTotalAll" + _nodeId.ToString()] = cms.businesslogic.CMSNode.CountSubs(_nodeId).ToString();
Application["publishTotal" + _nodeId.ToString()] = totalNodesToPublish.ToString();
Application["publishDone" + _nodeId.ToString()] = "0";
}
finally
{
Application.UnLock();
}
total.Text = totalNodesToPublish.ToString();
// Put user code to initialize the page here
if (!IsPostBack)
{
// Add caption to checkbox
PublishAll.Text = ui.Text("publish", "publishAll", d.Text, getUser());
ok.Text = ui.Text("content", "publish", getUser());
ok.Attributes.Add("style", "width: 60px");
ok.Attributes.Add("onClick", "startPublication();");
// Add checkbox event, so the publish unpublished childs gets enabled
PublishUnpublishedItems.LabelAttributes.Add("disabled", "true");
PublishUnpublishedItems.LabelAttributes.Add("id", "publishUnpublishedItemsLabel");
PublishUnpublishedItems.InputAttributes.Add("disabled", "true");
PublishAll.InputAttributes.Add("onclick", "togglePublishingModes(this)");
}
else
{
if (PublishAll.Checked)
{
_nodesPublished = 0;
DoPublishSubs(d);
Application.Lock();
Application["publishTotal" + _nodeId.ToString()] = 0;
Application.UnLock();
feedbackMsg.type = uicontrols.Feedback.feedbacktype.success;
feedbackMsg.Text = ui.Text("publish", "nodePublishAll", d.Text, getUser()) + "</p><p><a href='#' onclick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
ClientTools.ReloadActionNode(true, true);
Application.Lock();
Application["publishTotal" + _nodeId.ToString()] = null;
Application["publishDone" + _nodeId.ToString()] = null;
Application.UnLock();
}
else
{
if (d.PublishWithResult(getUser()))
{
feedbackMsg.type = uicontrols.Feedback.feedbacktype.success;
feedbackMsg.Text = ui.Text("publish", "nodePublish", d.Text, getUser()) + "</p><p><a href='#' onclick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
}
else {
feedbackMsg.type = uicontrols.Feedback.feedbacktype.notice;
feedbackMsg.Text = ui.Text("publish", "contentPublishedFailedByEvent", d.Text, getUser()) + "</p><p><a href='#' onClick='" + ClientTools.Scripts.CloseModalWindow() + "'>" + ui.Text("closeThisWindow") + "</a>";
}
ClientTools.ReloadActionNode(true, false);
}
TheForm.Visible = false;
theEnd.Visible = true;
}
}
private void DoPublishSubs(cms.businesslogic.web.Document d)
{
if (d.Published || PublishUnpublishedItems.Checked)
{
if (d.PublishWithResult(UmbracoUser))
{
_nodesPublished++;
Application.Lock();
Application["publishDone" + _nodeId.ToString()] = _nodesPublished.ToString();
Application.UnLock();
foreach (var dc in d.Children)
{
DoPublishSubs(dc);
}
}
else
{
LogHelper.Warn<publish>("Publishing failed due to event cancelling the publishing for document " + d.Id);
}
}
}
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/publication.asmx"));
ScriptManager.GetCurrent(Page).Services.Add(new ServiceReference("../webservices/legacyAjaxCalls.asmx"));
}
/// <summary>
/// masterPagePrefix control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Literal masterPagePrefix;
/// <summary>
/// JsInclude1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::ClientDependency.Core.Controls.JsInclude JsInclude1;
/// <summary>
/// TheForm control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel TheForm;
/// <summary>
/// PublishAll control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox PublishAll;
/// <summary>
/// PublishUnpublishedItems control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.CheckBox PublishUnpublishedItems;
/// <summary>
/// ok control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button ok;
/// <summary>
/// ProgBar1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.ProgressBar ProgBar1;
/// <summary>
/// theEnd control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Panel theEnd;
/// <summary>
/// feedbackMsg control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::umbraco.uicontrols.Feedback feedbackMsg;
}
}