From: Wichert A. <svn...@pl...> - 2008-01-28 14:47:16
|
Author: wichert Date: Mon Jan 28 14:47:20 2008 New Revision: 19117 Modified: plone.app.portlets/trunk/docs/HISTORY.txt plone.app.portlets/trunk/plone/app/portlets/portlets/language.py Log: Fix missing variable on the language portlet renderer. This fixes NuPlone which relies on the language selector portlet. Modified: plone.app.portlets/trunk/docs/HISTORY.txt ============================================================================== --- plone.app.portlets/trunk/docs/HISTORY.txt (original) +++ plone.app.portlets/trunk/docs/HISTORY.txt Mon Jan 28 14:47:20 2008 @@ -5,6 +5,10 @@ plone.app.portlets UNRELEASED + - Fix missing variable on the language portlet renderer. This fixes + NuPlone which relies on the language selector portlet. + [wichert] + - Fixed undefined variable name introduced in the last change. [hannosch] Modified: plone.app.portlets/trunk/plone/app/portlets/portlets/language.py ============================================================================== --- plone.app.portlets/trunk/plone/app/portlets/portlets/language.py (original) +++ plone.app.portlets/trunk/plone/app/portlets/portlets/language.py Mon Jan 28 14:47:20 2008 @@ -1,4 +1,5 @@ from zope.interface import implements +from zope.component import getMultiAdapter from plone.portlets.interfaces import IPortletDataProvider from plone.app.portlets.portlets import base from plone.app.i18n.locales.browser.selector import LanguageSelector @@ -23,6 +24,8 @@ base.Renderer.__init__(self, context, request, view, manager, data) self.selector=LanguageSelector(context, request, None, None) self.languages=self.selector.languages() + portal_state = getMultiAdapter((context, request), name=u'plone_portal_state') + self.portal_url = portal_state.portal_url() def show(self): return self.selector.available() and self.languages |