~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to MoinMoin/wikisync.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mto: This revision was merged to the branch mainline in revision 18.
  • Revision ID: james.westby@ubuntu.com-20080622211713-inlv5k4eifxckelr
ImportĀ upstreamĀ versionĀ 1.7.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
from MoinMoin.Page import Page
16
16
from MoinMoin.PageEditor import PageEditor
17
17
from MoinMoin.packages import unpackLine, packLine
 
18
from MoinMoin.support.multicall import MultiCall
18
19
 
19
20
 
20
21
MIMETYPE_MOIN = "text/wiki"
248
249
 
249
250
    def create_multicall_object(self):
250
251
        """ Generates an object that can be used like a MultiCall instance. """
251
 
        return xmlrpclib.MultiCall(self.connection)
 
252
        return MultiCall(self.connection)
252
253
 
253
254
    def prepare_multicall(self):
254
255
        """ Can be used to return initial calls that e.g. authenticate the user.
280
281
                   "pagelist": self.pagelist,
281
282
                   "mark_deleted": True}
282
283
        if self.token:
283
 
            m = xmlrpclib.MultiCall(self.connection)
 
284
            m = MultiCall(self.connection)
284
285
            m.applyAuthToken(self.token)
285
286
            m.getAllPagesEx(options)
286
287
            tokres, pages = m()
310
311
 
311
312
    def getGroupItems(self, group_list):
312
313
        """ Returns all page names that are listed on the page group_list. """
 
314
        from MoinMoin.wikidicts import Group
313
315
        pages = []
314
316
        for group_pagename in group_list:
315
 
            pages.extend(request.groups.get(group_pagename, []))
 
317
            pages.extend(Group(self.request, group_pagename).members())
316
318
        return [self.createSyncPage(x) for x in pages]
317
319
 
318
320
    def createSyncPage(self, page_name):