Remove All Comments

Last modified by Vincent Massol on 2014/11/27 14:54

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

Vincent Massol, Sergiu Dumitriu

Rating
Rate!
0 Votes
LicenseGNU Lesser General Public License 2.1

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}}

Prerequisites & Installation Instructions

Copy the code snippet to a page and save it.

Created by Sergiu Dumitriu on 2009/06/04 18:07
     

Get Connected