1.1 --- a/MoinSupport.py Sat Sep 29 16:58:57 2012 +0200
1.2 +++ b/MoinSupport.py Sun Oct 21 18:43:22 2012 +0200
1.3 @@ -412,6 +412,21 @@
1.4
1.5 return value in input_values and 'selected="selected"' or ''
1.6
1.7 + def get_option_list(self, value, values):
1.8 +
1.9 + """
1.10 + Return a list of HTML element definitions for options describing the
1.11 + given 'values', selecting the option with the specified 'value' if
1.12 + present.
1.13 + """
1.14 +
1.15 + options = []
1.16 + for available_value in values:
1.17 + selected = self._get_selected(available_value, value)
1.18 + options.append('<option value="%s" %s>%s</option>' % (
1.19 + escattr(available_value), selected, wikiutil.escape(available_value)))
1.20 + return options
1.21 +
1.22 def _get_input(self, form, name, default=None):
1.23
1.24 """
1.25 @@ -817,6 +832,10 @@
1.26 # Get the initial revision of the page.
1.27
1.28 revisions = page.getRevList()
1.29 +
1.30 + if not revisions:
1.31 + return {}
1.32 +
1.33 event_page_initial = Page(request, page.page_name, rev=revisions[-1])
1.34
1.35 # Get the created and last modified times.