DO NOT DOWNLOAD. DOWNLOAD LATEST STABLE FROM RELEASE TAB
Fixes deleting from recycle bins. [TFS Changeset #58548]
This commit is contained in:
@@ -204,7 +204,7 @@ namespace umbraco.cms.businesslogic.media
|
||||
new public void delete()
|
||||
{
|
||||
// Check for recyle bin
|
||||
if (!Path.Contains("," + RecycleBin.RecycleBinType.Media.ToString() + ","))
|
||||
if (!Path.Contains("," + ((int)RecycleBin.RecycleBinType.Media).ToString() + ","))
|
||||
{
|
||||
MoveToTrashEventArgs e = new MoveToTrashEventArgs();
|
||||
FireBeforeMoveToTrash(e);
|
||||
@@ -227,7 +227,8 @@ namespace umbraco.cms.businesslogic.media
|
||||
|
||||
if (!e.Cancel)
|
||||
{
|
||||
foreach (Media d in this.Children)
|
||||
var children = this.Children;
|
||||
foreach (Media d in children)
|
||||
{
|
||||
d.delete();
|
||||
}
|
||||
|
||||
@@ -874,8 +874,8 @@ namespace umbraco.cms.businesslogic.web
|
||||
public new void delete()
|
||||
{
|
||||
// Check for recyle bin
|
||||
if (!Path.Contains(",-20,")) {
|
||||
|
||||
if (!Path.Contains("," + ((int)RecycleBin.RecycleBinType.Content).ToString() + ","))
|
||||
{
|
||||
MoveToTrashEventArgs e = new MoveToTrashEventArgs();
|
||||
FireBeforeMoveToTrash(e);
|
||||
|
||||
|
||||
@@ -1496,6 +1496,7 @@
|
||||
<Content Include="umbraco\css\permissionsEditor.css" />
|
||||
<Content Include="umbraco\dialogs\ExportCode.aspx" />
|
||||
<Content Include="umbraco\images\editor\spellchecker.gif" />
|
||||
<Content Include="umbraco\webservices\MediaPickerService.asmx" />
|
||||
<Content Include="umbraco_client\Application\JQuery\jquery.cookie.js" />
|
||||
<Content Include="umbraco_client\imagecropper\Jcrop.gif" />
|
||||
<Content Include="umbraco_client\tablesorting\img\bg.gif" />
|
||||
@@ -3483,4 +3484,4 @@
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>xcopy "$(ProjectDir)..\..\foreign dlls\*.dll" "$(TargetDir)*.dll" /Y</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -182,12 +182,12 @@ function openContent(id) {
|
||||
|
||||
OnRenderNode(ref node, dd);
|
||||
|
||||
base.OnBeforeNodeRender(ref Tree, ref node, EventArgs.Empty);
|
||||
OnBeforeNodeRender(ref Tree, ref node, EventArgs.Empty);
|
||||
if (node != null)
|
||||
{
|
||||
Tree.Add(node);
|
||||
}
|
||||
base.OnAfterNodeRender(ref Tree, ref node, EventArgs.Empty);
|
||||
OnAfterNodeRender(ref Tree, ref node, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,12 +137,12 @@ function openMedia(id) {
|
||||
xNode.OpenIcon = dd.ContentType.IconUrl;
|
||||
}
|
||||
|
||||
base.OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty);
|
||||
OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty);
|
||||
if (xNode != null)
|
||||
{
|
||||
tree.Add(xNode);
|
||||
}
|
||||
base.OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty);
|
||||
OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,24 @@ namespace umbraco.cms.presentation.Trees
|
||||
public class ContentRecycleBin : BaseContentTree
|
||||
{
|
||||
|
||||
public ContentRecycleBin(string application) : base(application) { }
|
||||
public ContentRecycleBin(string application) : base(application) { }
|
||||
|
||||
private string m_treeAlias;
|
||||
/// <summary>
|
||||
/// Change the tree alias so that it is the same as the content tree
|
||||
/// </summary>
|
||||
public override string TreeAlias
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(m_treeAlias))
|
||||
{
|
||||
TreeDefinition treeDef = TreeDefinitionCollection.Instance.FindTree<loadContent>();
|
||||
m_treeAlias = (treeDef != null ? treeDef.Tree.Alias : "content");
|
||||
}
|
||||
return m_treeAlias;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void CreateRootNodeActions(ref List<IAction> actions)
|
||||
{
|
||||
|
||||
@@ -35,6 +35,23 @@ namespace umbraco.cms.presentation.Trees
|
||||
|
||||
}
|
||||
|
||||
private string m_treeAlias;
|
||||
/// <summary>
|
||||
/// Change the tree alias so that it is the same as the media tree
|
||||
/// </summary>
|
||||
public override string TreeAlias
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(m_treeAlias))
|
||||
{
|
||||
TreeDefinition treeDef = TreeDefinitionCollection.Instance.FindTree<loadMedia>();
|
||||
m_treeAlias = (treeDef != null ? treeDef.Tree.Alias : "media");
|
||||
}
|
||||
return m_treeAlias;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void CreateRootNodeActions(ref List<IAction> actions)
|
||||
{
|
||||
actions.Clear();
|
||||
|
||||
@@ -78,12 +78,12 @@ function openMacro(id) {
|
||||
xNode.Action = "javascript:openMacro(" + macros.GetInt("id") + ");";
|
||||
xNode.Icon = "developerMacro.gif";
|
||||
xNode.OpenIcon = "developerMacro.gif";
|
||||
base.OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty);
|
||||
OnBeforeNodeRender(ref tree, ref xNode, EventArgs.Empty);
|
||||
if (xNode != null)
|
||||
{
|
||||
tree.Add(xNode);
|
||||
}
|
||||
base.OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty);
|
||||
OnAfterNodeRender(ref tree, ref xNode, EventArgs.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user