public static string Move(int ID, int target) { int _currentMember = HttpContext.Current.User.Identity.IsAuthenticated ? (int)Membership.GetUser().ProviderUserKey : 0; if (Xslt.IsMemberInGroup("admin", _currentMember) || Xslt.IsMemberInGroup("wiki editor", _currentMember)) { Document d = new Document(ID); Document t = new Document(target); if (t.ContentType.Alias == "WikiPage") { Document o = new Document(d.Parent.Id); d.Move(t.Id); d.Save(); d.Publish(new umbraco.BusinessLogic.User(0)); t.Publish(new umbraco.BusinessLogic.User(0)); o.Publish(new umbraco.BusinessLogic.User(0)); umbraco.library.UpdateDocumentCache(d.Id); umbraco.library.UpdateDocumentCache(t.Id); umbraco.library.UpdateDocumentCache(o.Id); umbraco.library.RefreshContent(); return(umbraco.library.NiceUrl(d.Id)); } } return(""); }
public static string VerifyFile(int ID) { int _currentMember = HttpContext.Current.User.Identity.IsAuthenticated ? (int)Membership.GetUser().ProviderUserKey : 0; if (Xslt.IsMemberInGroup("admin", _currentMember)) { WikiFile wf = new WikiFile(ID); wf.Verified = true; wf.Save(); } return(""); }
public static string Delete(int ID) { int _currentMember = HttpContext.Current.User.Identity.IsAuthenticated ? (int)Membership.GetUser().ProviderUserKey : 0; if (Xslt.IsMemberInGroup("admin", _currentMember) || Xslt.IsMemberInGroup("wiki editor", _currentMember)) { Document d = new Document(ID); if (d != null) { umbraco.library.UnPublishSingleNode(d.Id); d.delete(); } } return(""); }
public static XPathNodeIterator GetContentVersion(int id, string guid) { return(Xslt.GetXmlNodeFromVersion(id, guid, false)); }