[Patch] Wiki delete page or version XML-RPC method
|Reported by:||Odd Simon Simonsen||Owned by:||Alec Thomas|
Needed this for myself, but really I think it belongs in the base XML-RPC funtionality as it is also directly supported in the Trac wiki model.
Here is the essential extract of the code I am using:
... class WikiRPC(Component): ... def xmlrpc_methods(self): ... yield ('WIKI_DELETE', ((bool, str),(bool, str, int)), self.deletePage) ... # Internal methods / handlers ... def deletePage(self, req, name, version=None): """ Delete a Wiki page (all versions) or a specific version by including an optional version number. Attachments will also be deleted if page no longer exists. Returns True for success. """ try: wp = WikiPage(self.env, name, version) wp.delete(version) return True except: return False ...