umbraco/Umbraco-CMS — pull request #137 by sniffdk (2013-09-13 08:46:11+00:00)
Title: Fixed U4-2842 Umb 6.1.5 - moving a media item from recycle bin v2

I'm still not that strong in Git, so, I ended up making a new pr, sorry :)

Given the comments from the last pr, I've changed the logic and added some unit tests to back me up.
My logic says, that when we call Move(), the move to recycle bin is already handled. So if we continue in that method, we know that the move is either from content to content or from trash to content.

This means, that if our media item is trashed at this point, we know something is up and we change the trash state accordingly. We then apply the same logic to descendants later on. According to the comments from Morten, we only change the trashed state if we need to.

I still think we should ToList() the GetChildren() calls, but I have left them out for now, maybe in another pr at another time :)