ó
Aü½cc           @   s¥  d  Z  d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l	 m
 Z
 d d l	 m Z d d l	 m Z d d l	 m Z d d l	 m Z d d	 l	 m Z d d
 l Td d l m Z d d l m Z d Z d Z d Z e j d e j ƒ Z e j a e j e
 j ƒ d „  Z y e e  f Wn e! k
 r^d Z d Z  n Xd „  Z" d d „ Z# d „  Z$ d „  Z% d „  Z& d „  Z' d „  Z( d S(   s&   Produce and handle the member options.iÿÿÿÿN(   t   ListType(   t   mm_cfg(   t   Utils(   t   MailList(   t   Errors(   t   MemberAdaptor(   t   i18n(   t   *(   t   syslog(   t
   csrf_checkt   |t   /s6   <!--Start-Digests-Delete-->.*<!--End-Digests-Delete-->c         C   s   |  S(   N(    (   t   s(    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyt   D_0   s    i   i    c    B   
   C   s²  t  ƒ  }  |  j t j ƒ t j ƒ  } | j ƒ  d€ k rª t d ƒ } |  j | ƒ |  j	 t
 d | ƒ ƒ |  j t d ƒ ƒ |  j	 d ƒ |  j	 t ƒ  ƒ d GH|  j ƒ  GHd  St j ƒ  } | oÅ t | ƒ } | sÛ | d k  rIt d ƒ } |  j | ƒ |  j	 t
 d | ƒ ƒ |  j t d	 ƒ ƒ |  j	 d ƒ |  j	 t ƒ  ƒ |  j ƒ  GHd  S| d
 j ƒ  } y t j | d d
 ƒ} Wn¨ t j k
 r} t j | ƒ } t d ƒ } |  j | ƒ |  j	 t
 d | ƒ ƒ |  j t d ƒ ƒ |  j	 d ƒ |  j	 t ƒ  ƒ d GH|  j ƒ  GHt d d | | ƒ d  SXt j d d ƒ }	 d d d d d d d d d g	 }
 y |	 j ƒ  } WnW t k
 r¹|  j	 t
 d t d ƒ ƒ ƒ |  j	 t t d	 ƒ ƒ ƒ d GH|  j ƒ  GHd  SX|	 j d ƒ } t j | ƒ sä| j } n  t j | ƒ |  j | ƒ | d k  r|	 j d d ƒ j ƒ  } | sµ|	 j d ƒ sU|	 j d ƒ sU|	 j d ƒ rk|  j t d ƒ ƒ n  t | |  d  | ƒ |  j ƒ  GHd  Sn% t j! t j" t# j$ | d ƒ ƒ ƒ } t% | t& ƒ sÓt% | t' ƒ rt | ƒ d
 k rîd } q| d j ƒ  } n  t j | ƒ } y t j( | ƒ WnF t j) k
 ri|  j t d ƒ ƒ t | |  d  | ƒ |  j ƒ  GHd  SX| j* | ƒ sÀ| j+ d
 k r¼|  j t d  ƒ ƒ t | |  d  | ƒ |  j ƒ  GHn  d  St, | ƒ t, |
 ƒ rt- | |	 j d! ƒ t j" t. j/ | ƒ ƒ ƒ } n t0 } |	 j d ƒ r1d t1 j2 d" <t0 } n  | j ƒ  } y | j3 | ƒ } Wn t j4 k
 rld  } n X| | k r‚d  } n  |	 j d ƒ } t j | ƒ s²| j5 | ƒ } n  |  j | ƒ t j | ƒ t d# ƒ } t d$ ƒ } t d% ƒ } |	 j6 d ƒ rp| j* | ƒ rçzÈ y  | j7 ƒ  | j8 rJ| j9 | ƒ |  j | d& d ƒn\ t1 j2 j: d' t1 j2 j: d( t1 j2 j: d) d* ƒ ƒ ƒ } | j; | | d+ | ƒ|  j | d& d ƒ| j< ƒ  Wn! t j= k
 rÔ|  j | ƒ n XWd  | j> ƒ  Xng | j+ d
 k r|  j t d  ƒ ƒ nB t d, d- | ƒ | j8 r;|  j | d& d ƒn |  j | d& d ƒt | |  | | ƒ |  j ƒ  GHd  St d. ƒ } |	 j6 d ƒ r'| j* | ƒ r½| j? | ƒ |  j | d& d ƒnH | j+ d
 k râ|  j t d  ƒ ƒ n# t d, d/ | ƒ |  j | d& d ƒt | |  | | ƒ |  j ƒ  GHd  S|	 j d d ƒ j ƒ  } t j@ r]t jA t jB f } n t jA f } | jC | | | ƒ } | rg	| jC t jD t jB f | | ƒ rg	|	 j6 d ƒ rE	|  j t d0 ƒ ƒ t1 j2 j: d' t1 j2 j: d( t1 j2 j: d) d* ƒ ƒ ƒ } t d1 d2 | | | ƒ | j+ d
 k r=	t d, d3 | | ƒ d  } n  d4 GHn  t | |  | | ƒ |  j ƒ  GHd  S| j* | ƒ s˜	t | |  | | ƒ |  j ƒ  GHd  S| tE k rÜ	|  j t d5 ƒ ƒ tF | |  | | | ƒ |  j ƒ  GHd  Sd  } |	 j6 d ƒ r
|	 d jG } n\ t1 j2 j: d6 ƒ r]
t jH t1 j2 d6 ƒ j: d ƒ } | r]
tI | ƒ tJ jK k r]
| d
 } q]
n  | r·
x d7 | k r„
t. jL | ƒ } qf
WtM jN d8 d | ƒ } tO | |  | | | | ƒ d  S|	 j6 d9 ƒ rü
| jP t jA | ƒ GHt | |  | | ƒ |  j ƒ  GHd  S|	 j6 d: ƒ rF| j? | ƒ tF | |  | | | t d; ƒ ƒ |  j ƒ  GHd  S|	 j6 d< ƒ r| sœ|  j t d= ƒ t d> ƒ ƒ tF | |  | | | ƒ |  j ƒ  GHd  S| jQ } t d? ƒ } |  j | ƒ |  j	 t
 d | ƒ ƒ |  j	 t d@ ƒ ƒ g  } xÆ tR | | ƒ | g D]® }  d }! |  jS | ƒ }" tT |" |  jU ƒ }# |  jV | ƒ tW jX k r`|! dA t dB ƒ 7}! n  | |  jY ƒ  k r‰|! dA t dC ƒ 7}! n  tZ |# d
 ƒ |! }# | j[ |  jU |# f ƒ qW| j\ ƒ  t] g  | D] \ }$ }# |# ^ qÊŒ  }% |  j	 |% ƒ |  j ƒ  GHd  S|	 j6 dD ƒ r«|	 j dE ƒ }& t j^ |& | ƒ }& |	 j dF ƒ }' |	 j dG ƒ }( | j_ | ƒ }) d
 }* }+ |	 j dH ƒ }, |, r©| r©|  j t dI ƒ t d> ƒ ƒ tE }, n  |& rÄ|& |) k rÄd }+ n  |& rÚ|) rÚd }+ n  d } |' rÚ|( rÚ|' |( k r&tF | |  | | | t dJ ƒ ƒ |  j ƒ  GHd  S|' | k r`tF | |  | | | t dK ƒ ƒ |  j ƒ  GHd  S| j* |' ƒ rÑt j |' ƒ }- |, r | jU } | t dL ƒ 7} qÑtF | |  | | | t dM ƒ ƒ |  j ƒ  GHd  Sn  d }* nA |' sæ|( r|+ rtF | |  | | | t dN ƒ ƒ |  j ƒ  GHd  S| dO „ }. t` j` t` ja |. ƒ |* r1| d  k rU| } n  | t dP ƒ 7} | j7 ƒ  y3 z! | jb | |' |, ƒ | j< ƒ  Wd  | j> ƒ  XWq1t jc k
 rÄt dQ ƒ } q1t jd k
 rãt dR ƒ } q1t je k
 rt dS ƒ } q1t jf k
 r-| jg ƒ  }/ t dT ƒ } q1Xn  |+ rƒ| j7 ƒ  z! | jh | |& |, ƒ | j< ƒ  Wd  | j> ƒ  X| t dU ƒ 7} n  tF | |  | | | | ƒ |  j ƒ  GHd  S|	 j6 dV ƒ rv| pÆt ji s|  j t dW ƒ ƒ tF | |  | | | ƒ |  j ƒ  GHd  S|	 j dX d ƒ j ƒ  }0 |	 j dY d ƒ j ƒ  }1 |0 s?|1 rmtF | |  | | | t dZ ƒ ƒ |  j ƒ  GHd  S|0 |1 k r§tF | |  | | | t d[ ƒ ƒ |  j ƒ  GHd  S|	 j d\ ƒ }2 |2 rè| rè|  j t d] ƒ t d> ƒ ƒ tE }2 n  | g }3 |2 r|3 jj tR | | ƒ ƒ n  x! |3 D] }  tk |  | |0 |1 ƒ qW| jl t jA | ƒ GHtF | |  | | | t d^ ƒ ƒ |  j ƒ  GHd  S|	 j6 d_ ƒ r|	 j d` ƒ sÂtF | |  | | | t da ƒ ƒ |  j ƒ  GHd  S| db „ }. t` j` t` ja |. ƒ | j7 ƒ  tE }4 zd tm a y  | jn | t dc ƒ dd d ƒWn- t jo k
 r6t0 }4 n t j4 k
 rIn X| j< ƒ  Wd  t j a | j> ƒ  X| jp ƒ  }5 | jg ƒ  }/ | jq de df d ƒ}" t dg ƒ } |  j | ƒ |  j	 t
 d | ƒ ƒ |4 rä|  j	 t dh ƒ ƒ n |  j	 t di ƒ ƒ |  j	 | jr ƒ  ƒ |  j ƒ  GHd  S|	 j6 dj ƒ rhd
 }6 d
 }7 d
 }8 g  }9 x™dC t js f dk t jt f dl t ju f dm t jv f dn t jw f do t jx f dp t jy f dq t jz f dr t j{ f f	 D]%\ }: }; y t| |	 j |: ƒ ƒ }< Wn t t} f k
 r÷d  }< n X|< d  k r
q³n… |; t jw k rq| jV | ƒ }= |< rJ|= tW jX k rJtW jX }< q|< r³|= tW jX k r³tW j~ }< qq³n |< | j | |; ƒ k rq³n  |; t js k rÅ|< d
 k rÅ| j | |; ƒ rÅd }6 n  |9 j[ |; |< f ƒ q³W| | j€ ƒ  k r|9 j[ t | j f ƒ n |9 j[ t | f ƒ |	 j‚ ds ƒ }> |> rot% |> tK ƒ sJ|> g }> n  g  |> D] }? t. jL |? ƒ ^ qQ}> n  | dt „ }. | j7 ƒ  zÖ t` j` t` ja |. ƒ x¢ |9 D]š \ }; }< |; t k rÍ| jƒ | |< ƒ q¢|; t jw k rï| j„ | |< ƒ q¢y | j… | |; |< ƒ Wq¢t j† k
 r"d }7 q¢t j‡ k
 r;d }8 q¢Xq¢W| jˆ | |> ƒ | j< ƒ  Wd  | j> ƒ  Xdu d dv „  ƒ  Y}@ |@ ƒ  }A |	 j dw ƒ rÊx3 |9 D]( \ }; }< |; t jw k r›|< |A _‰ Pq›q›Wn  |	 j dx ƒ rx3 |9 D]( \ }; }< |; t jy k rà|< |A _Š PqàqàWn  |	 j dy ƒ rTx3 |9 D]( \ }; }< |; t j{ k r%|< |A _‹ Pq%q%Wn  |	 j dz ƒ r™x3 |9 D]( \ }; }< |; t jt k rj|< |A _Œ PqjqjWn  |A rñ| sÄ|  j t d{ ƒ t d> ƒ ƒ qñx* tR | | ƒ D] }  t |  | |A ƒ qÔWn  |7 rt d| ƒ } n! |8 rt d} ƒ } n t d~ ƒ } |6 r@| t d ƒ 7} n  tF | |  | | | | ƒ |  j ƒ  GHd  S| j* | ƒ rtF | |  | | | ƒ n t | |  | | ƒ |  j ƒ  GHd  S(‚   Nt   gett   posts   CGI script errori   s"   Invalid request method: %(method)ss   <hr>s   Status: 405 Method Not Allowedi   s   Invalid options to CGI script.i    t   locks&   No such list <em>%(safelistname)s</em>s   Status: 404 Not Foundt   errors   options: No such list "%s": %s
t   keep_blank_valuess   displang-buttont   languaget   emailt   passwordt   logins   login-unsubs   login-remindt   VARHELPt   UserOptionst   Errors   Status: 400 Bad Requestt    s   No address giveniÿÿÿÿs   Illegal Email Addresss   No such member: %(safeuser)s.t
   csrf_tokent   HTTP_COOKIEs=   If you are a list member, a confirmation email has been sent.s4   You already have a subscription pending confirmations}   If you are a list member, your unsubscription request has been
             forwarded to the list administrator for approval.t   tagt   HTTP_FORWARDED_FORt   HTTP_X_FORWARDED_FORt   REMOTE_ADDRs   unidentified origint   remotet   mischiefs2   Unsub attempt of non-member w/ private rosters: %ssL   If you are a list member,
            your password has been emailed to you.s5   Reminder attempt of non-member w/ private rosters: %ss   Authentication failed.t   securitys;   Authorization failed (options): user=%s: list=%s: remote=%ss.   Login failure with private rosters: %s from %ss   Status: 401 Unauthorizeds6   The form lifetime has expired. (request forgery check)t   QUERY_STRINGt   %s   <.*t   logoutt   emailpws4   A reminder of your password has been emailed to you.t	   othersubssV   The list administrator may not view the other
            subscriptions for this user.s   Note: s3   List subscriptions for %(safeuser)s on %(hostname)ssR   Click on a link to visit your options page for the
        requested mailing list.s   , t   nomailt   digests   change-of-addresst   fullnames   new-addresss   confirm-addresss   changeaddr-globallys¼   The list administrator may not change the names
            or addresses for this user's other subscriptions.  However, the
            subscription for this mailing list has been changed.s   Addresses did not match!s(   You are already using that email addresssü   The new address you requested %(newaddr)s is already a member of the
%(listname)s mailing list, however you have also requested a global change of
address.  Upon confirmation, any other mailing list containing the address
%(safeuser)s will be changed. s0   The new address is already a member: %(newaddr)ss   Addresses may not be blankc         S   s   | j  ƒ  t j d ƒ d  S(   Ni    (   t   Unlockt   syst   exit(   t   signumt   framet   mlist(    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyt   sigterm_handlerà  s    
s5   A confirmation message has been sent to %(newaddr)s. s   Bad email address provideds   Illegal email address provideds,   %(newaddr)s is already a member of the list.s¯   %(newaddr)s is banned from this list.  If you
                      think this restriction is erroneous, please contact
                      the list owners at %(owneraddr)s.s"   Member name successfully changed. t   changepwsR   The list administrator may not change the
                    password for a user.t   newpwt   confpws   Passwords may not be blanks   Passwords did not match!s   pw-globallys®   The list administrator may not change the
            password for this user's other subscriptions.  However, the
            password for this mailing list has been changed.s   Password successfully changed.t   unsubt   unsubconfirms¯   You must confirm your unsubscription request by turning
                on the checkbox below the <em>Unsubscribe</em> button.  You
                have not been unsubscribed!c         S   s   | j  ƒ  t j d ƒ d  S(   Ni    (   R,   R-   R.   (   R/   R0   R1   (    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyR2   E  s    
s   via the member options paget   userackt   listinfot   absolutes   Unsubscription resultssÙ   Your unsubscription request has been received and
            forwarded on to the list moderators for approval.  You will
            receive notification once the list moderators have made their
            decision.s-  You have been successfully unsubscribed from the
            mailing list %(fqdn_listname)s.  If you were receiving digest
            deliveries you may get one more digest.  If you have any questions
            about your unsubscription, please contact the list owners at
            %(owneraddr)s.s   options-submitt   mimet   dontreceivet   ackpostst   disablemailt   concealt   remindt   rcvtopict   nodupest	   usertopicc         S   s   | j  ƒ  t j d ƒ d  S(   Ni    (   R,   R-   R.   (   R/   R0   R1   (    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyR2   ½  s    
t   Globalc           B   s)   e  Z d Z d Z d Z d Z d  „  Z RS(   c         S   s   t  |  j j ƒ  ƒ d k S(   Ni    (   t   lent   __dict__t   keys(   t   self(    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyt   __nonzero__à  s    N(   t   __name__t
   __module__t   Nonet   enableR@   RB   R;   RI   (    (    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyRD   Û  s
   s   deliver-globallys   remind-globallys   nodupes-globallys   mime-globallysÐ   The list administrator may not change the
                options for this user's other subscriptions.  However the
                options for this mailing list subscription has been
                changed.s¼   The list administrator has disabled digest delivery for
            this list, so your delivery option has not been set.  However your
            other options have been set successfully.sÀ   The list administrator has disabled non-digest delivery
            for this list, so your delivery option has not been set.  However
            your other options have been set successfully.s'   You have successfully set your options.s   You may get one last digest.(   R   R   (    (Ž   t   Documentt   set_languageR   t   DEFAULT_SERVER_LANGUAGER   t   GetRequestMethodt   lowert   _t   SetTitlet   AddItemt   Headert   addErrort   MailmanLogot   Formatt   GetPathPiecesRE   R   R   t   MMListErrort   websafeR   t   cgit   FieldStorageRG   t	   TypeErrort   Boldt   getfirstt
   IsLanguaget   preferred_languageR   t   stript	   loginpageRL   t   LCDomaint   UnobscureEmailt   SLASHt   joint
   isinstancet   listt   tuplet   ValidateEmailt   EmailAddressErrort   isMembert   private_rostert   setR	   t   urllibt   unquotet   Truet   ost   environt   getMemberCPAddresst   NotAMemberErrort   getMemberLanguaget   has_keyt   Lockt   unsubscribe_policyt   HoldUnsubscriptionR   t   ConfirmUnsubscriptiont   Savet   MMAlreadyPendingR,   t   MailUserPasswordt   ALLOW_SITE_ADMIN_COOKIESt   AuthUsert   AuthSiteAdmint   WebAuthenticatet   AuthListAdmint   Falset   options_paget   valuet   parse_qst   typet   typesR    t   unquote_plust   ret   subt   topic_detailst	   ZapCookiet	   host_namet   lists_of_membert   GetOptionsURLt   Linkt	   real_namet   getDeliveryStatusR   t   ENABLEDt   getDigestMemberKeyst   HTMLFormatObjectt   appendt   sortt   OrderedListt   canonstrt   getMemberNamet   signalt   SIGTERMt   ChangeMemberAddresst   MMBadEmailErrort   MMHostileAddresst   MMAlreadyAMembert   MembershipIsBannedt   GetOwnerEmailt   ChangeMemberNamet"   OWNERS_CAN_CHANGE_MEMBER_PASSWORDSt   extendt   change_passwordt
   MakeCookieR   t   DeleteMembert   MMNeedApprovalt   GetListEmailt   GetScriptURLt   GetMailmanFootert   Digestst   DisableMimet   DontReceiveOwnPostst   AcknowledgePostst   DisableDeliveryt   ConcealSubscriptiont   SuppressPasswordRemindert   ReceiveNonmatchingTopicst   DontReceiveDuplicatest   intt
   ValueErrort   BYUSERt   getMemberOptiont   GetAvailableLanguagest   SETLANGUAGEt   getvaluet   setMemberLanguaget   setDeliveryStatust   setMemberOptiont   CantDigestErrort   MustDigestErrort   setMemberTopicsRM   R@   RB   R;   t   global_options(B   t   doct   methodt   titlet   partst   lenpartst   listnameR1   t   et   safelistnamet   cgidatat   safe_paramst   paramsR   t   usert   safeusert   csrf_checkedt   lcusert   cpusert   userlangt   msgct   msgbt   msgat   ipt   msgR   t   user_or_siteadmin_contextt   is_user_or_siteadminR!   t   varhelpt   qst   hostnamet   onlistst   gmlistt   extrat   urlt   linkt   namet   itemst
   membernamet   newaddrt   confirmaddrt   oldnamet   set_addresst   set_membernamet   globallyt   safenewaddrR2   t	   owneraddrR4   t	   confirmpwt   pw_globallyt   mlistst   needapprovalt   fqdn_listnamet
   digestwarnt
   cantdigestt
   mustdigestt   newvalst   itemt   flagt   newvalt   statust
   topicnamest   nRD   t
   globalopts(    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyt   main:   sâ   	%		
		 
					
					

%
							

		
			

				

	%
							R   c      	   C   sù  d | _  |  j rN t j | d d ƒ} | d  k	 rT t j | d d ƒ} qT n | } t j |  j | ƒ | ƒ } | r | d t j | ƒ 7} n  |  j | ƒ } t	 t
 d | ƒ ƒ j ƒ  | d <|  j t j d | ƒ | d <|  j t j d | ƒ | d <|  j t j d | ƒ | d	 <|  j t j d | ƒ | d
 <t d d d d ƒj ƒ  | d <|  j t j d | ƒ | d <|  j t j d | ƒ | d <|  j | ƒ | d <|  j t j d | ƒ | d <|  j t j d | ƒ | d <|  j t j d | ƒ | d <|  j t j d | ƒ | d <|  j t j d | ƒ | d <|  j t j d | ƒ | d <|  j t j d | ƒ | d <|  j t j d | ƒ | d <|  j t j d | ƒ | d <|  j t j d | ƒ | d <|  j d t d ƒ ƒ d t d d d d ƒj ƒ  t d ƒ | d  <|  j d! ƒ | d" <|  j d# ƒ | d$ <|  j d% t d& ƒ ƒ | d' <|  j d( t d) ƒ ƒ | d* <|  j d+ | d, |  d- t j g d. | ƒ| d/ <| | d0 <| | d1 <|  j d2 t d3 ƒ ƒ | d4 <|  j | t d5 ƒ ƒ | d6 <|  j d7 t d8 ƒ ƒ | d9 <|  j d: t d; ƒ ƒ | d< <t d= d d d ƒj ƒ  | d> <t d? d d d ƒj ƒ  | d@ <t dA d d d ƒj ƒ  | dB <t dC d d d ƒj ƒ  | dD <t t j t j  d ƒ ƒ }	 |	 d k rµt dE ƒ }
 n t dF ƒ }
 t dG ƒ | dH <|  j! dI ƒ | dJ <|  j! dK ƒ | dL <|  j dM t dN ƒ ƒ | dO <t dP d d d ƒj ƒ  | dQ <|  j! dR dS | ƒ| dT <|  j" | ƒ } |  j# r)t$ dU dV ƒ } x¥ |  j# D]š \ } } } } | ršq|n  t% j& | ƒ } t' |  j( d+ ƒ dW | | f dX ƒ } | | k räd } n d } | j) t dY | d | ƒ| | j ƒ  g ƒ q|W| j ƒ  } n t dZ ƒ } | | d[ <|  j t j* d | ƒ | d\ <|  j t j* d | ƒ | d] <| d  k	 r–t d^ ƒ | d_ <n
 d` | d_ <|  j+ da | | ƒ } |  j, pÐ|  j- | t j ƒ sèt. j/ d` | ƒ } n  | j0 | ƒ d  S(b   Ni   t   for_texts   , %ss   +1s   <mm-results>s   <mm-digest-radio-button>i    s   <mm-undigest-radio-button>s   <mm-plain-digests-button>s   <mm-mime-digests-button>s   mime-globallyt   checkeds   <mm-global-mime-button>s   <mm-delivery-enable-button>s   <mm-delivery-disable-button>s   <mm-disabled-notice>s   <mm-dont-ack-posts-button>s   <mm-ack-posts-button>s   <mm-receive-own-mail-button>s!   <mm-dont-receive-own-mail-button>s&   <mm-dont-get-password-reminder-button>s!   <mm-get-password-reminder-button>s   <mm-public-subscription-button>s   <mm-hide-subscription-button>s#   <mm-dont-receive-duplicates-button>s   <mm-receive-duplicates-button>R6   t   Unsubscribes   <br>R7   s*   <em>Yes, I really want to unsubscribe</em>s   <mm-unsubscribe-button>R4   s   <mm-new-pass-box>R5   s   <mm-confirm-pass-box>R3   s   Change My Passwords   <mm-change-pass-button>R(   s   List my other subscriptionss   <mm-other-subscriptions-submit>t   optionsR1   t   contextsRÔ   s   <mm-form-start>s	   <mm-user>s   <mm-presentable-user>R'   s   Email My Password To Mes   <mm-email-my-pw>R   s   <mm-umbrella-notice>R&   s   Log outs   <mm-logout-button>s   options-submits   Submit My Changess   <mm-options-submit-button>s   pw-globallys   <mm-global-pw-changes-button>s   deliver-globallys   <mm-global-deliver-button>s   remind-globallys   <mm-global-remind-button>s   nodupes-globallys   <mm-global-nodupes-button>t   dayst   days   %(days)d %(units)ss   <mm-pending-days>s   new-addresss   <mm-new-address-box>s   confirm-addresss   <mm-confirm-address-box>s   change-of-addresss   Change My Address and Names   <mm-change-address-button>s   changeaddr-globallys   <mm-global-change-of-address>R+   R‰   s   <mm-fullname-box>t   bordert   0s   /%s/?VARHELP=%ss
    (Details)RC   s   <em>No topics defined</em>s   <mm-topics>s    <mm-suppress-nonmatching-topics>s   <mm-receive-nonmatching-topics>sU   
You are subscribed to this list with the case-preserved address
<em>%(cpuser)s</em>.s   <mm-case-preserved-user>R   s   options.html(1   t   suppress_headt   obscure_addressesR   t   ObscureEmailRL   t
   uncanonstrRŸ   R\   t   GetStandardReplacementsR`   t   FontSizeRY   t   FormatOptionButtonR   R²   R³   t   CheckBoxR¶   t   FormatDisabledNoticeRµ   R´   R¸   R·   Rº   t   FormatButtonRS   t   FormatSecureBoxt   FormatFormStartRƒ   t   FormatUmbrellaNoticeR»   t   PENDING_REQUEST_LIFER
  t	   FormatBoxt   getMemberTopicst   topicst   TableRr   t
   quote_plusR•   R°   t   AddRowR¹   t	   ParseTagst
   digestableR¾   t   DIGRER   RU   (   R1   RÉ   RÔ   RØ   RÙ   t   messaget   presentable_userR+   t   replacementsR
  t   unitst
   usertopicst   tableRé   t   patternt   descriptiont	   emptyflagt
   quotednamet   detailsR  t   topicsfieldt	   page_text(    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyRˆ   (  sÌ    		2	

			

c      	   C   sô  |  j  } |  j d ƒ } | d  k r? t d ƒ } t d ƒ } n0 t j | ƒ } t d ƒ } t j | ƒ }	 d } | j | ƒ t d d d d	 d
 d d d ƒ }
 |
 j	 t
 t d | ƒ ƒ g ƒ |
 j |
 j ƒ  d	 d t j ƒt |  j ƒ  ƒ d k rit | ƒ } | j t d t d ƒ ƒ ƒ | j |  j | ƒ ƒ | rP| j t d | ƒ ƒ n  |
 j	 t
 | ƒ g ƒ n  | j |
 ƒ t | ƒ } | j t d | ƒ ƒ t d d d d	 d
 d d d ƒ }
 |
 j	 t d ƒ g ƒ t d d d d	 d
 d d d ƒ } | d  k r*| j	 t t d ƒ ƒ t d d d ƒg ƒ n | j	 t d | ƒ g ƒ | j	 t t d ƒ ƒ t d d d ƒg ƒ | j	 t
 t d t d ƒ ƒ ƒ g ƒ | j | j ƒ  d	 d d ƒ|
 j	 t
 | ƒ g ƒ |
 j	 t
 t d t d ƒ ƒ ƒ g ƒ |
 j |
 j ƒ  d	 d t j ƒ|
 j	 t d  ƒ g ƒ |
 j	 t
 t d! t d ƒ ƒ ƒ g ƒ |
 j	 t
 t d t d" ƒ ƒ ƒ g ƒ |
 j |
 j ƒ  d	 d t j ƒ|
 j	 t d# ƒ g ƒ |
 j	 t
 t d$ t d% ƒ ƒ ƒ g ƒ | j |
 ƒ | j | ƒ | j |  j ƒ  ƒ d  S(&   NR  s,   %(realname)s list: member options login pages   email address and s7   %(realname)s list: member options for user %(safeuser)sR   t   widths   100%R  i    t   cellspacingi   t   cellpaddingi   i   t   bgcolori   s   displang-buttons   View this page inR   R   s?  In order to change your membership option, you must
    first log in by giving your %(extra)smembership password in the section
    below.  If you don't remember your membership password, you can have it
    emailed to you by clicking on the button below.  If you just want to
    unsubscribe from this list, click on the <em>Unsubscribe</em> button and a
    confirmation message will be sent to you.

    <p><strong><em>Important:</em></strong> From this point on, you must have
    cookies enabled in your browser, otherwise none of your changes will take
    effect.
    s   50%s   Email address:t   sizei   s	   Password:R   R   s   Log int   colspanR  s  By clicking on the <em>Unsubscribe</em> button, a
    confirmation message will be emailed to you.  This message will have a
    link that you should click on to complete the removal process (you can
    also confirm by email; see the instructions in the confirmation
    message).s   login-unsubs   Password remindersT   By clicking on the <em>Remind</em> button, your
    password will be emailed to you.s   login-remindt   Remind(   R–   R°   RL   RS   R   R\   R  RT   R  R!  t   CenterRV   t   AddCellInfot   GetCurrentRowIndexR   t   WEB_HEADER_COLORRE   R¿   t   FormRU   t   SubmitButtont   GetLangSelectBoxt   Hiddent   Labelt   TextBoxt   PasswordBoxR±   (   R1   RÉ   RÔ   t   langt   realnamet	   actionurlRË   Ræ   RÕ   t   obuserR*  t   langformt   formt   ptable(    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyRe   º  sj    	!
!	
!%%
	%%
	%c         C   sŽ   |  j  } g  } xx t j ƒ  D]j } | |  j ƒ  k r: q n  t j | d d ƒ} | j  | k rd q n  | j | ƒ sy q n  | j | ƒ q W| S(   NR   i    (   R’   R   t
   list_namest   internal_nameR   Ro   R›   (   R1   RÔ   Rã   Rä   RÎ   t   glist(    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyR“     s    	c         C   sY   |  d „ } |  j  ƒ  z1 t j t j | ƒ |  j | | ƒ |  j ƒ  Wd  |  j ƒ  Xd  S(   Nc         S   s   | j  ƒ  t j d ƒ d  S(   Ni    (   R,   R-   R.   (   R/   R0   R1   (    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyR2   $  s    
(   R{   R    R¡   t   setMemberPasswordR   R,   (   R1   RÔ   R4   Rô   R2   (    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyR«      s    	
c         C   s8  xF t  | ƒ D]4 } | j d ƒ r( q n  t | | ƒ d  k	 r Pq q Wd  S|  d „ } |  j ƒ  zÇ t j t j | ƒ | j d  k	 rš |  j | | j ƒ n  | j	 d  k	 rÅ |  j
 | t j | j	 ƒ n  | j d  k	 rð |  j
 | t j | j ƒ n  | j d  k	 r|  j
 | t j | j ƒ n  |  j ƒ  Wd  |  j ƒ  Xd  S(   NRS   c         S   s   | j  ƒ  t j d ƒ d  S(   Ni    (   R,   R-   R.   (   R/   R0   R1   (    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyR2   E  s    
(   t   dirt
   startswitht   getattrRL   R{   R    R¡   RM   RÃ   R@   RÄ   R   R¸   RB   Rº   R;   R³   R   R,   (   R1   RÔ   R  t   attrR2   (    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyRÈ   ;  s,    	
c         C   s  | j  d ƒ } d  } t d ƒ } t | ƒ d k r t j | d ƒ } x6 |  j D]" \ } }	 }
 } | | k rP PqP qP Wd  } n  | s³ t |  | | | | t d ƒ ƒ | j ƒ  GHd  St	 d d d d	 ƒ } | j
 t t t d
 ƒ ƒ ƒ g ƒ | j | j ƒ  d d d d t j ƒ| j
 t t t d ƒ ƒ ƒ t j | ƒ g ƒ | j
 t t t d ƒ ƒ ƒ d t j t j |	 j ƒ  ƒ ƒ d g ƒ | j
 t t t d ƒ ƒ ƒ t j |
 ƒ g ƒ x0 t d d ƒ D] } | j | d d t j ƒqÀWt |  | | | | | j ƒ  ƒ | j ƒ  GHd  S(   NR   s	   <missing>i   i    s+   Requested topic is not valid: %(topicname)sR  i   R2  s   100%s   Topic filter detailsR7  i   R5  s   Name:s   Pattern (as regexp):s   <pre>s   </pre>s   Description:i   (   t   splitRL   RS   RE   Rr   R   R  Rˆ   RY   R  R!  R9  R`   R:  R;  R   t   WEB_SUBHEADER_COLORRA  R   R\   t   ORRi   t
   splitlinest   ranget   WEB_ADMINITEM_COLOR(   R1   RÉ   RÔ   RØ   RÙ   Rá   t   reflistRé   t	   topicnameR+  R,  R-  R*  t   row(    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyR   g  s8    	"
*()   t   __doc__RŽ   R-   Ru   R]   R    Rr   RŒ   R    t   MailmanR   R   R   R   R   R   t   Mailman.htmlformatt   Mailman.Logging.SyslogR   t   Mailman.CSRFcheckR	   RU  Rh   RÀ   t   compilet   DOTALLR$  RS   RO   RP   R   Rt   R‡   t	   NameErrorR  Rˆ   Re   R“   R«   RÈ   R   (    (    (    s2   /export/web/mailman/mailman/Mailman/Cgi/options.pyt   <module>   sN   
		
	ÿ ÿ ð’	U			,