1.1 --- a/actions/SharedUpdates.py Tue May 14 00:53:38 2013 +0200
1.2 +++ b/actions/SharedUpdates.py Tue May 14 01:37:22 2013 +0200
1.3 @@ -9,7 +9,7 @@
1.4 from MoinMoin.action import ActionBase
1.5 from MoinMoin.Page import Page
1.6 from MoinMoin import wikiutil
1.7 -from MoinShare import getUpdatedTime, getUpdateFragmentsFromPage
1.8 +from MoinShare import getUpdatedTime, getUpdatesFromPage
1.9 from MoinSupport import escattr, get_form, getMetadata, getPathInfo, \
1.10 writeHeaders, ActionSupport
1.11
1.12 @@ -117,27 +117,26 @@
1.13 <updated>%(updated)s</updated>\r
1.14 ''' % d)
1.15
1.16 - for fragment, summary, preferred, content, updated in \
1.17 - getUpdateFragmentsFromPage(page, request):
1.18 + for update in getUpdatesFromPage(page, request):
1.19
1.20 # Get the URL that yields only the fragment.
1.21
1.22 - fragment_link = "%s?action=SharedUpdate&fragment=%s" % (link, fragment)
1.23 + fragment_link = "%s?action=SharedUpdate&fragment=%s" % (update.link, update.fragment)
1.24
1.25 download_links = []
1.26
1.27 - for mimetype in preferred:
1.28 + for mimetype in update.preferred:
1.29 specific_link = "%s&type=%s&doit=1" % (fragment_link, mimetype)
1.30
1.31 download_links.append('<link rel="alternate" type="%s" href="%s"/>' % (
1.32 escattr(mimetype), escattr(specific_link)))
1.33
1.34 d = {
1.35 - "title" : escape(summary),
1.36 + "title" : escape(update.title),
1.37 "fragment_link" : escape(fragment_link),
1.38 "download_links" : "\r\n".join(download_links),
1.39 - "content" : content and ('<content type="html">%s</content>' % escape(content)) or "",
1.40 - "updated" : escape(updated),
1.41 + "content" : update.content and ('<content type="html">%s</content>' % escape(update.content)) or "",
1.42 + "updated" : escape(update.updated),
1.43 }
1.44
1.45 # Write the entry output.