Remove All Comments

Last modified by Vincent Massol on 2021/03/18 11:28

cogRemove all comments from all pages in the current wiki
TypeSnippet
Category
Developed by

Vincent Massol, Sergiu Dumitriu

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Table of contents

Description

{{velocity}}
#if ($request.confirm == "1")
  #foreach($d in $xwiki.wrapDocs($xwiki.searchDocuments(", BaseObject obj where obj.name = doc.fullName and obj.className = 'XWiki.XWikiComments'")))
    #if($d.removeObjects('XWiki.XWikiComments'))
     $d.save()
     * Removed comments from [$d]
   #end
 #end
#else
  [[Remove Comments>>?confirm=1]]
#end
{{/velocity}}
     

Get Connected