Skip to content
Browse files

Fix infinite recursion error in SolgemaFullcalendarEventJS's __init__…

… method.
  • Loading branch information...
1 parent cf2f266 commit 5132580aae509837de264d0c27515942f63afb56 @pbauer pbauer committed Mar 21, 2012
Showing with 8 additions and 8 deletions.
  1. +3 −0 CHANGES.txt
  2. +5 −8 Solgema/fullcalendar/browser/views.py
View
3 CHANGES.txt
@@ -4,6 +4,9 @@ Changelog
2.0.3 (unreleased)
------------------
+- Fix infinite recursion error in SolgemaFullcalendarEventJS's __init__ method.
+ [pbauer]
+
- Fixed ical export on collection with plone.app.event installed.
[vincentfretin]
View
13 Solgema/fullcalendar/browser/views.py
@@ -200,15 +200,10 @@ class SolgemaFullcalendarEventJS(BrowserView):
def __init__(self, context, request):
self.context = context
self.request = request
- self.portal = getToolByName(self.context, 'portal_url').getPortalObject()
+ portal_state = getMultiAdapter((context, request), name=u'plone_portal_state')
+ self.portal = portal_state.portal()
self._ts = getToolByName(context, 'translation_service')
- self.portal_language = self.getPortalLanguage()
-
- def getPortalLanguage(self):
- ltool = getToolByName(self.context, 'portal_languages')
- lang = ltool.getPreferredLanguage()
- lang = lang[:2]
- return lang
+ self.portal_language = portal_state.language()
def getFirstDay(self):
return 1
@@ -331,6 +326,8 @@ class SolgemaFullcalendarTopicJS(SolgemaFullcalendarEventJS):
"""Solgema Fullcalendar Javascript variables"""
implements(interfaces.ISolgemaFullcalendarJS)
+
+
def __init__(self, context, request):
super(SolgemaFullcalendarTopicJS, self).__init__(context, request)

0 comments on commit 5132580

Please sign in to comment.
Something went wrong with that request. Please try again.