Changeset 3248 in products


Ignore:
Timestamp:
Jul 5, 2011 12:20:47 PM (13 years ago)
Author:
enkidu
Message:

fix login_action problem for plone4

Location:
quintagroup.plonecomments/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.plonecomments/trunk/docs/HISTORY.txt

    r3070 r3248  
    11Changelog 
    22========= 
     3 
     44.1.7 (unreleased) 
     5------------------ 
     6- fix problem with no "login_action" in plone 4 [enkidu] 
     7 
    38 
    494.1.6 (2011-02-18) 
  • quintagroup.plonecomments/trunk/quintagroup/plonecomments/browser/comments.py

    r3126 r3248  
    2222    """ 
    2323    render = ViewPageTemplateFile('comments.pt') 
     24 
     25    def __init__(self, *args): 
     26        super(CommentsViewlet, self).__init__(*args) 
     27        if hasattr(self,'login_url') and not hasattr(self,'login_action'): 
     28            # In plone 4.0 in plone.app.layout.viewlets.comments function login_ action 
     29            # was renamed to login_url 
     30            self.login_action = self.login_url 
    2431 
    2532    def is_moderation_enabled(self): 
Note: See TracChangeset for help on using the changeset viewer.