def initialize(self): self.notices = []
- # TODO: FIXME - this is almost certainly not what we want.
- self._add_subscription_notice()
-
- def _add_subscription_notice(self):
- """Add the appropriate notice after posting the subscription form."""
- if self.user and self.request.method == 'POST':
- newsub = self.request.form.get('subscribe', None)
- if newsub == 'Subscribe':
- self.context.subscribe(self.user, self.user)
- self.notices.append("You have subscribed to this branch.")
- elif newsub == 'Unsubscribe':
- self.context.unsubscribe(self.user, self.user)
- self.notices.append("You have unsubscribed from this
branch.")
def user_is_subscribed(self):
"""Is the current user subscribed to this branch?"""
On Fri, 28 May 2010 13:58:22 you wrote: code/browser/ branch. py' code/browser/ branch. py 2010-05-20 04:01:34 +0000 code/browser/ branch. py 2010-05-27 04:47:25 +0000 subscription_ notice( )
> Review: Needs Information release-critical
>
> > === modified file 'lib/lp/
> > --- lib/lp/
> > +++ lib/lp/
> > @@ -354,6 +354,7 @@
> >
> > def initialize(self):
> > self.notices = []
> >
> > + # TODO: FIXME - this is almost certainly not what we want.
> >
> > self._add_
>
> What do you want to do here?
Looks like it isn't used:
=== modified file 'lib/lp/ code/browser/ branch. py' code/browser/ branch. py 2010-05-25 03:13:25 +0000 code/browser/ branch. py 2010-05-28 09:43:31 +0000
--- lib/lp/
+++ lib/lp/
@@ -354,19 +354,6 @@
def initialize(self):
self. notices = [] subscription_ notice( ) on_notice( self): form.get( 'subscribe' , None) subscribe( self.user, self.user) append( "You have subscribed to this branch.") unsubscribe( self.user, self.user) append( "You have unsubscribed from this
- # TODO: FIXME - this is almost certainly not what we want.
- self._add_
-
- def _add_subscripti
- """Add the appropriate notice after posting the subscription form."""
- if self.user and self.request.method == 'POST':
- newsub = self.request.
- if newsub == 'Subscribe':
- self.context.
- self.notices.
- elif newsub == 'Unsubscribe':
- self.context.
- self.notices.
branch.")
def user_is_ subscribed( self):
"""Is the current user subscribed to this branch?"""