Changeset 3116 in products for quintagroup.plonecomments/trunk/quintagroup/plonecomments/utils.py
- Timestamp:
- Apr 14, 2011 5:26:23 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.plonecomments/trunk/quintagroup/plonecomments/utils.py
r3115 r3116 83 83 email = obj.getProperty('email', None) 84 84 if email is None: 85 creators = hasattr(obj, 'listCreators') and obj.listCreators() or [obj.Creator(),] 85 creators = hasattr(obj, 'listCreators') and obj.listCreators() or \ 86 [obj.Creator(), ] 86 87 userid = creators and creators[0] or "" 87 88 creator = getToolByName(context, 'portal_membership').getMemberById(userid) … … 126 127 if user_email: 127 128 template = 'notify_comment_template' 128 args ={'mto': user_email,129 'mfrom': admin_email,130 'obj': reply_parent,131 'organization_name': organization_name,132 'name': creator_name}129 args = {'mto': user_email, 130 'mfrom': admin_email, 131 'obj': reply_parent, 132 'organization_name': organization_name, 133 'name': creator_name} 133 134 else: 134 135 args = {} … … 141 142 if user_email: 142 143 template = 'rejected_comment_template' 143 args ={'mto': user_email,144 'mfrom': admin_email,145 'obj': reply_parent,146 'organization_name': organization_name,147 'name': creator_name}144 args = {'mto': user_email, 145 'mfrom': admin_email, 146 'obj': reply_parent, 147 'organization_name': organization_name, 148 'name': creator_name} 148 149 else: 149 150 args = {} … … 159 160 user_email = getEmail(di_parrent, context) 160 161 if user_email: 161 args ={'mto': user_email,162 'mfrom': admin_email,163 'obj': reply_parent,164 'organization_name': organization_name,165 'name': di_parrent.getOwnerTuple()[1]}162 args = {'mto': user_email, 163 'mfrom': admin_email, 164 'obj': reply_parent, 165 'organization_name': organization_name, 166 'name': di_parrent.getOwnerTuple()[1]} 166 167 else: 167 168 args = {} … … 173 174 user_email = getParentOwnerEmail(reply, context) 174 175 if user_email: 175 args ={'mto':user_email,176 'mfrom':admin_email,177 'obj':reply_parent,178 'organization_name':organization_name}176 args = {'mto': user_email, 177 'mfrom': admin_email, 178 'obj': reply_parent, 179 'organization_name': organization_name} 179 180 subject = translate(_(u"published_notification_subject", 180 181 default=u"[${organization_name}] New comment added", … … 188 189 user_email = getProp(context, "email_discussion_manager", None) 189 190 if user_email: 190 args ={'mto':user_email,191 'mfrom':admin_email,192 'obj':reply_parent,193 'organization_name':organization_name}191 args = {'mto': user_email, 192 'mfrom': admin_email, 193 'obj': reply_parent, 194 'organization_name': organization_name} 194 195 subject = translate(_(u"approve_notification_subject", 195 196 default=u"[${organization_name}] New comment awaits moderation",
Note: See TracChangeset
for help on using the changeset viewer.