1.1 --- a/imipweb/resource.py Thu Sep 24 19:37:37 2015 +0200
1.2 +++ b/imipweb/resource.py Thu Sep 24 19:40:03 2015 +0200
1.3 @@ -79,18 +79,16 @@
1.4 self.new_page(title="Redirect")
1.5 self.page.p("Redirecting to: %s" % url)
1.6
1.7 - def link_to(self, uid, recurrenceid=None, section=None):
1.8 + def link_to(self, uid, recurrenceid=None):
1.9
1.10 """
1.11 - Return a link to an object with the given 'uid', 'recurrenceid' and
1.12 - 'section'. See get_identifiers for the decoding of such links.
1.13 + Return a link to an object with the given 'uid' and 'recurrenceid'.
1.14 + See get_identifiers for the decoding of such links.
1.15 """
1.16
1.17 path = [uid]
1.18 if recurrenceid:
1.19 path.append(recurrenceid)
1.20 - if section:
1.21 - path.append(section)
1.22 return self.env.new_url("/".join(path))
1.23
1.24 # Control naming helpers.
1.25 @@ -118,20 +116,12 @@
1.26 # UID only.
1.27
1.28 if len(parts) == 1:
1.29 - return parts[0], None, None
1.30 -
1.31 - # UID and RECURRENCE-ID or UID and section.
1.32 + return parts[0], None
1.33
1.34 - elif len(parts) == 2:
1.35 - if parts[1] == "counter":
1.36 - return parts[0], None, "counters"
1.37 - else:
1.38 - return parts[0], parts[1], parts[2] == "counter" and "counters" or None
1.39 -
1.40 - # UID, RECURRENCE-ID and section.
1.41 + # UID and RECURRENCE-ID.
1.42
1.43 else:
1.44 - return parts[:3]
1.45 + return parts[:2]
1.46
1.47 def _get_object(self, uid, recurrenceid=None, section=None):
1.48 if self.objects.has_key((uid, recurrenceid, section)):