Changeset 2530
- Timestamp:
- 06/16/09 15:02:40 (4 years ago)
- Location:
- alternc-mailman/branches/benjamin-bureaubleu
- Files:
-
- 1 added
- 5 edited
-
bureau/class/m_mailman.php (modified) (18 diffs)
-
bureau/locales/en_US/LC_MESSAGES/mailman.po (modified) (1 diff)
-
bureau/locales/pt_BR/LC_MESSAGES/mailman.po (modified) (2 diffs)
-
bureau/locales/pt_BR/LC_MESSAGES/mailman_manual.po (added)
-
debian/NEWS (modified) (1 diff)
-
debian/changelog (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
alternc-mailman/branches/benjamin-bureaubleu/bureau/class/m_mailman.php
r2529 r2530 31 31 class m_mailman { 32 32 33 /* ----------------------------------------------------------------- */34 function m_mailman() {35 }36 33 37 34 /* ----------------------------------------------------------------- */ … … 43 40 } 44 41 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 */ 47 50 function enum_ml($domain = null, $order_by = array('domain', 'list')) { 48 51 global $err,$db,$cuid; … … 50 53 $order_by = array_map("addslashes", $order_by); 51 54 $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;"; 55 58 $db->query($query); 56 59 if (!$db->num_rows()) { … … 64 67 return $mls; 65 68 } 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 */ 68 76 function prefix_list() { 69 77 global $db,$err,$cuid; … … 75 83 return $r; 76 84 } 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 */ 78 94 function select_prefix_list($current) { 79 95 global $db,$err; … … 87 103 } 88 104 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 */ 91 113 function get_lst($id) 92 114 { … … 106 128 } 107 129 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 */ 110 141 function add_lst($domain,$login,$owner,$password) { 111 142 global $db,$err,$quota,$mail,$cuid; … … 142 173 return false; 143 174 } 144 // Prefix e 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 145 176 if (!$mail->available($login."@".$domain) || 146 177 !$mail->available($login."-request@".$domain) || … … 157 188 return false; 158 189 } 159 // Le compte n'existe pas, on vérifie le quota et on le créé.190 // Check the quota 160 191 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 163 193 $db->query("INSERT INTO mailman (uid,list,domain,name) VALUES ('$cuid','$login','$domain','$name');"); 164 194 if (!$mail->add_wrapper($login,$domain,"/var/lib/mailman/mail/mailman post $name","mailman") || … … 173 203 !$mail->add_wrapper($login."-unsubscribe",$domain,"/var/lib/mailman/mail/mailman unsubscribe $name","mailman") 174 204 ) { 205 // didn't work : rollback 175 206 $mail->del_wrapper($login,$domain); $mail->del_wrapper($login."-request",$domain); 176 207 $mail->del_wrapper($login."-owner",$domain); $mail->del_wrapper($login."-admin",$domain); … … 194 225 195 226 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 */ 197 233 function delete_lst($id) { 198 234 global $db,$err,$mail,$cuid; 199 235 $err->log("mailman","delete_lst",$id); 200 236 // We delete lists only in the current member's account. 201 237 $db->query("SELECT * FROM mailman WHERE id=$id and uid='$cuid';"); 202 238 $db->next_record(); … … 213 249 exec("/usr/lib/alternc/mailman.delete ".escapeshellarg($login), &$output, &$return); 214 250 } 215 216 251 217 252 if ($return) { … … 230 265 231 266 /* ----------------------------------------------------------------- */ 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 ! 234 271 */ 235 272 function members($id) { … … 246 283 247 284 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 */ 249 292 function passwd($id,$pass,$pass2) { 250 293 global $db,$err,$mail,$cuid; … … 274 317 275 318 /* ----------------------------------------------------------------- */ 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 à effacer279 * @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 280 323 * @access private 281 324 */ … … 284 327 $err->log("mailman","del_dom",$dom); 285 328 286 // Suppression des listes du domaine287 329 $listes=$this->enum_ml($dom); 288 330 while (list($key,$val)=each($listes)) { … … 292 334 } 293 335 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 */ 295 344 function alternc_get_quota($name) { 296 345 global $err,$cuid,$db; … … 302 351 } 303 352 353 354 304 355 } /* Class m_mailman */ 305 356 -
alternc-mailman/branches/benjamin-bureaubleu/bureau/locales/en_US/LC_MESSAGES/mailman.po
r2529 r2530 135 135 136 136 #: admin/mman_passwd.php:59 137 msgid "Change the password ".137 msgid "Change the password." 138 138 msgstr "Change the password." 139 139 -
alternc-mailman/branches/benjamin-bureaubleu/bureau/locales/pt_BR/LC_MESSAGES/mailman.po
r2529 r2530 126 126 127 127 #: admin/mman_passwd.php:52 128 #, fuzzy129 128 msgid "New list password" 130 msgstr "Senha inicialda lista"129 msgstr "Senha da lista" 131 130 132 131 #: admin/mman_passwd.php:55 … … 138 137 msgstr "" 139 138 140 #~ msgid "quota_mailman"141 #~ msgstr "Enviando listas (mailman)"142 143 # #################################################################144 # m_mailman145 #~ 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 1 alternc-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 1 14 alternc-mailman (1.7) stable; urgency=low 2 15 -
alternc-mailman/branches/benjamin-bureaubleu/debian/changelog
r2529 r2530 1 1 alternc-mailman (1.8) stable; urgency=low 2 2 3 * reformatting of the class comments in the code (all comments are in english now) 3 4 * changing desktop color to blue :) 4 5 * misc security sanitizing patchs from alternc 0.9.10pre
Note: See TracChangeset
for help on using the changeset viewer.
