Ticket #336: tracblog-rss-0.3.patch
| File tracblog-rss-0.3.patch, 1.6 kB (added by kindlund@mitre.org, 2 years ago) |
|---|
-
web_ui.py
old new 255 255 macro_bl = self.env.config.get('blog', 'macro_blacklist', '').split(',') 256 256 macro_bl = [name.strip() for name in macro_bl if name.strip()] 257 257 macro_bl.append('BlogShow') 258 259 # Get the email addresses of all known users 260 email_map = {} 261 for username, name, email in self.env.get_known_users(): 262 if email: 263 email_map[username] = email 258 264 259 265 num_posts = self._choose_value('num_posts', req, kwargs, convert=int) 260 266 if num_posts and default_times: … … 331 337 # For RSS, author must be an email address 332 338 if author.find('@') != -1: 333 339 data['author.email'] = author 334 elif self._user2email(author) is not None:335 data['author.email'] = self._user2email(author)340 elif email_map.has_key(author): 341 data['author.email'] = email_map[author] 336 342 337 343 if (modified != post_time) and mark_updated: 338 344 data['modified'] = 1 … … 356 362 req.hdf['blog.hidecal'] = hidecal 357 363 pass 358 364 359 def _user2email(self, user):360 for username, name, email in self.env.get_known_users():361 if email:362 return email363 return None364 365 365 def _generate_calendar(self, req, tallies): 366 366 """Generate data necessary for the calendar 367 367
