comparison MoinMoin/theme/__init__.py @ 3058:f48d46b39364

fix MoinMoinBugs/SubscribeAndUnsubscribeShareSameUrl (thanks to Federico Lorenzi) (ported from 1.6)
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 21 Feb 2008 20:37:32 +0100
parents d2e9afd64276
children 036fc4dce2ee
comparison
equal deleted inserted replaced
3057:9c58f31af69e 3058:f48d46b39364
1228 if not (self.cfg.mail_enabled or self.cfg.jabber_enabled and self.request.user.valid): 1228 if not (self.cfg.mail_enabled or self.cfg.jabber_enabled and self.request.user.valid):
1229 return '' 1229 return ''
1230 1230
1231 _ = self.request.getText 1231 _ = self.request.getText
1232 if self.request.user.isSubscribedTo([page.page_name]): 1232 if self.request.user.isSubscribedTo([page.page_name]):
1233 text = _("Unsubscribe", formatted=False) 1233 action, text = 'unsubscribe', _("Unsubscribe", formatted=False)
1234 else: 1234 else:
1235 text = _("Subscribe", formatted=False) 1235 action, text = 'subscribe', _("Subscribe", formatted=False)
1236 return page.link_to(self.request, text=text, querystr={'action': 'subscribe'}, css_class='nbsubscribe', rel='nofollow') 1236 return page.link_to(self.request, text=text, querystr={'action': action}, css_class='nbsubscribe', rel='nofollow')
1237 1237
1238 def quicklinkLink(self, page): 1238 def quicklinkLink(self, page):
1239 """ Return add/remove quicklink link 1239 """ Return add/remove quicklink link
1240 1240
1241 @rtype: unicode 1241 @rtype: unicode