Changeset 2530


Ignore:
Timestamp:
06/16/09 15:02:40 (4 years ago)
Author:
benjamin
Message:

mailman patch correction typo

Location:
alternc-mailman/branches/benjamin-bureaubleu
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • alternc-mailman/branches/benjamin-bureaubleu/bureau/class/m_mailman.php

    r2529 r2530  
    3131class m_mailman { 
    3232 
    33   /* ----------------------------------------------------------------- */ 
    34   function m_mailman() { 
    35   } 
    3633 
    3734  /* ----------------------------------------------------------------- */ 
     
    4340  } 
    4441 
    45   /*****************************************************************************/ 
    46   /** Return the mailing-lists managed by this member : */ 
     42 
     43  /* ----------------------------------------------------------------- */ 
     44  /** 
     45   * Return the mailing-lists managed by this member : 
     46   * @param $domain string The domain's list we want (or null to prevent filtering on a specific domain) 
     47   * @param $order_by array how do we sort the lists (default is domain then listname) 
     48   * @return array an ordered array of associative arrays with all the members lists 
     49   */ 
    4750  function enum_ml($domain = null, $order_by = array('domain', 'list')) { 
    4851    global $err,$db,$cuid; 
     
    5053    $order_by = array_map("addslashes", $order_by); 
    5154    $order = 'ORDER BY `' . join('`,`', $order_by) . '`'; 
    52 $query = "SELECT * FROM mailman WHERE uid=$cuid". 
    53         (is_null($domain) ? "" : " AND domain='" . addslashes($domain) ."'" ) . 
    54               " $order;"; 
     55    $query = "SELECT * FROM mailman WHERE uid=$cuid". 
     56      (is_null($domain) ? "" : " AND domain='" . addslashes($domain) ."'" ) . 
     57      " $order;"; 
    5558    $db->query($query); 
    5659    if (!$db->num_rows()) { 
     
    6467    return $mls; 
    6568  } 
    66  
    67   /*****************************************************************************/ 
     69   
     70 
     71  /* ----------------------------------------------------------------- */ 
     72  /** 
     73   * Return the list of domains that may be used by mailman for the current account 
     74   * @return array an array of domain names  
     75   */ 
    6876  function prefix_list() { 
    6977    global $db,$err,$cuid; 
     
    7583    return $r; 
    7684  } 
    77   /*****************************************************************************/ 
     85 
     86 
     87  /* ----------------------------------------------------------------- */ 
     88  /** 
     89   * Echoes a select list options of the list of domains that may be used  
     90   * by mailman for the current account.  
     91   * @param $current string the item that will be selected in the list 
     92   * @return array an array of domain names  
     93   */ 
    7894  function select_prefix_list($current) { 
    7995    global $db,$err; 
     
    87103  } 
    88104 
    89   /*****************************************************************************/ 
    90   /** Get list informations */ 
     105 
     106  /* ----------------------------------------------------------------- */ 
     107  /** 
     108   * Get all th informations for a list 
     109   * @param $id integer is the list id in alternc's database. 
     110   * @return array an associative array with all the list informations 
     111   * or false if an error occured. 
     112   */ 
    91113  function get_lst($id) 
    92114  { 
     
    106128  } 
    107129   
    108   /*****************************************************************************/ 
    109   /** Create a new list for this member : */ 
     130 
     131 
     132  /* ----------------------------------------------------------------- */ 
     133  /** 
     134   * Create a new list for this member : 
     135   * @param $domain string the domain name on which the list will be attached 
     136   * @param $login string the left part of the @ for the list email  
     137   * @param $owner the email address of the list administrator (required) 
     138   * @param $password the initial list password (required) 
     139   * @return boolean TRUE if the list has been created, or FALSE if an error occured 
     140   */ 
    110141  function add_lst($domain,$login,$owner,$password) { 
    111142    global $db,$err,$quota,$mail,$cuid; 
     
    142173        return false; 
    143174    } 
    144     // Prefixe OK, on verifie la non-existence des mails que l'on va créer... 
     175    // Prefix OK, let's check that all emails wrapper we will create are unused 
    145176    if (!$mail->available($login."@".$domain) || 
    146177        !$mail->available($login."-request@".$domain) || 
     
    157188      return false; 
    158189    } 
    159     // Le compte n'existe pas, on vérifie le quota et on le créé. 
     190    // Check the quota 
    160191    if ($quota->cancreate("mailman")) { 
    161       // Creation de la liste : 1. recherche du nom de la liste 
    162       // CA NE MARCHE PAS ! 
     192      // List creation : 1. insert into the DB 
    163193      $db->query("INSERT INTO mailman (uid,list,domain,name) VALUES ('$cuid','$login','$domain','$name');"); 
    164194      if (!$mail->add_wrapper($login,$domain,"/var/lib/mailman/mail/mailman post $name","mailman") || 
     
    173203          !$mail->add_wrapper($login."-unsubscribe",$domain,"/var/lib/mailman/mail/mailman unsubscribe $name","mailman") 
    174204          ) { 
     205        // didn't work : rollback 
    175206        $mail->del_wrapper($login,$domain);             $mail->del_wrapper($login."-request",$domain); 
    176207        $mail->del_wrapper($login."-owner",$domain);    $mail->del_wrapper($login."-admin",$domain); 
     
    194225 
    195226 
    196   /*****************************************************************************/ 
     227  /* ----------------------------------------------------------------- */ 
     228  /** 
     229   * Delete a mailing-list 
     230   * @param $id integer the id number of the mailing list in alternc's database 
     231   * @return boolean TRUE if the list has been deleted or FALSE if an error occured 
     232   */ 
    197233  function delete_lst($id) { 
    198234    global $db,$err,$mail,$cuid; 
    199235    $err->log("mailman","delete_lst",$id); 
    200  
     236    // We delete lists only in the current member's account. 
    201237    $db->query("SELECT * FROM mailman WHERE id=$id and uid='$cuid';"); 
    202238    $db->next_record(); 
     
    213249      exec("/usr/lib/alternc/mailman.delete ".escapeshellarg($login), &$output, &$return); 
    214250    } 
    215  
    216251 
    217252    if ($return) { 
     
    230265 
    231266  /* ----------------------------------------------------------------- */ 
    232   /** Returns the list's members as a text file, one subscriber per 
    233    *   line. 
     267  /** Echoes the list's members as a text file, one subscriber per 
     268   *  line. 
     269   * @param $id integer The list whose members we want to dump 
     270   * @return void : this function ECHOES the result ! 
    234271   */ 
    235272 function members($id) { 
     
    246283 
    247284 
    248   /*****************************************************************************/ 
     285  /* ----------------------------------------------------------------- */ 
     286  /** Change the mailman administrator password of a list 
     287   * @param $id integer The list number in alternc's database 
     288   * @param $pass string The new password 
     289   * @param $pass2 string The new password (confirmation) 
     290   * @return boolean TRUE if the password has been changed or FALSE if an error occured. 
     291   */ 
    249292 function passwd($id,$pass,$pass2) { 
    250293   global $db,$err,$mail,$cuid; 
     
    274317 
    275318  /* ----------------------------------------------------------------- */ 
    276   /** Fonction appellée par domaines lorsqu'un domaine est effacé. 
    277    * Cette fonction efface tous les comptes mails du domaine concerné. 
    278    * @param string $dom Domaine à effacer 
    279    * @return boolean TRUE si le domaine a bien été effacé, FALSE si une erreur s'est produite. 
     319  /** This function is a hook who is called each time a domain is uninstalled 
     320   * in an account (or when we select "gesmx = no" in the domain panel.) 
     321   * @param string $dom Domaine to delete 
     322   * @return boolean TRUE if the domain has been deleted from mailman 
    280323   * @access private 
    281324   */ 
     
    284327    $err->log("mailman","del_dom",$dom); 
    285328 
    286     // Suppression des listes du domaine 
    287329    $listes=$this->enum_ml($dom); 
    288330    while (list($key,$val)=each($listes)) { 
     
    292334  } 
    293335 
    294   /* ----------------------------------------------------------------- */ 
     336 
     337  /* ----------------------------------------------------------------- */ 
     338  /** Returns the quota for the current account as an array 
     339   * @param $name string The quota name we get (should always be "mailman" for this class 
     340   * @return array an array with used (key 'u') and totally available (key 't') quota for the current account. 
     341   * or FALSE if an error occured 
     342   * @access private 
     343   */  
    295344  function alternc_get_quota($name) { 
    296345    global $err,$cuid,$db; 
     
    302351  } 
    303352 
     353 
     354 
    304355} /* Class m_mailman */ 
    305356 
  • alternc-mailman/branches/benjamin-bureaubleu/bureau/locales/en_US/LC_MESSAGES/mailman.po

    r2529 r2530  
    135135 
    136136#: admin/mman_passwd.php:59 
    137 msgid "Change the password". 
     137msgid "Change the password." 
    138138msgstr "Change the password." 
    139139 
  • alternc-mailman/branches/benjamin-bureaubleu/bureau/locales/pt_BR/LC_MESSAGES/mailman.po

    r2529 r2530  
    126126 
    127127#: admin/mman_passwd.php:52 
    128 #, fuzzy 
    129128msgid "New list password" 
    130 msgstr "Senha inicial da lista" 
     129msgstr "Senha da lista" 
    131130 
    132131#: admin/mman_passwd.php:55 
     
    138137msgstr "" 
    139138 
    140 #~ msgid "quota_mailman" 
    141 #~ msgstr "Enviando listas (mailman)" 
    142  
    143 # ################################################################# 
    144 # m_mailman 
    145 #~ msgid "err_mailman_1" 
    146 #~ msgstr "A lista não definida ainda" 
    147  
    148 #~ msgid "err_mailman_2" 
    149 #~ msgstr "O login (parte esquerda do @) é obrigatório" 
    150  
    151 #~ msgid "err_mailman_3" 
    152 #~ msgstr "O email do dono e a senha são obrigatórios" 
    153  
    154 #~ msgid "err_mailman_4" 
    155 #~ msgstr "Este email está incorreto" 
    156  
    157 #~ msgid "err_mailman_5" 
    158 #~ msgstr "Este domínio não  existe." 
    159  
    160 #~ msgid "err_mailman_6" 
    161 #~ msgstr "" 
    162 #~ "Este endereço de email (ou um da lista assinadas, lista não assinadas " 
    163 #~ "etc.) já  foi usado." 
    164  
    165 #~ msgid "err_mailman_7" 
    166 #~ msgstr "" 
    167 #~ "Sua cota de listas de envio acabou, você não pode criar mais listas." 
    168  
    169 #~ msgid "err_mailman_9" 
    170 #~ msgstr "Esta lista nãoo existe" 
    171  
    172 #~ msgid "err_mailman_10" 
    173 #~ msgstr "" 
    174 #~ "Uma lista com o mesmo nome já  existe no servidor. Por favor escolha um " 
    175 #~ "outro nome." 
  • alternc-mailman/branches/benjamin-bureaubleu/debian/NEWS

    r2245 r2530  
     1alternc-mailman (1.8) stable; urgency=low 
     2 
     3    This version changes the following :  
     4    * The blue desktop is alternc's default as for 0.9.10. alternc-mailman 1.8 is using  
     5      this blue desktop as a default too, and the code in the admin/ folder is now compliant 
     6      with this frameless way of showing the panel pages. 
     7    * Users are now able to change a list password from AlternC (useful when a user forgot his  
     8      list's password). A new perl binary has been added to call /var/lib/mailman/bin/change_pw  
     9      accordingly 
     10    * The code has been reworked to include only clean, javadoc-compliant, english written comments 
     11 
     12 -- Benjamin Sonntag <benjamin@sonntag.fr>  Mon, 15 Jun 2009 07:20:00 +0200 
     13 
    114alternc-mailman (1.7) stable; urgency=low 
    215 
  • alternc-mailman/branches/benjamin-bureaubleu/debian/changelog

    r2529 r2530  
    11alternc-mailman (1.8) stable; urgency=low 
    22 
     3  * reformatting of the class comments in the code (all comments are in english now) 
    34  * changing desktop color to blue :)  
    45  * misc security sanitizing patchs from alternc 0.9.10pre 
Note: See TracChangeset for help on using the changeset viewer.