Changeset 3107


Ignore:
Timestamp:
10/19/11 17:19:07 (19 months ago)
Author:
benjamin
Message:

Adding the ability for users to choose the url of their mailman lists from a list of 4 : http(s)?:(paneldom|listdom)/cgi-bin/mailman/

Location:
alternc-mailman/trunk
Files:
6 added
5 edited

Legend:

Unmodified
Added
Removed
  • alternc-mailman/trunk/bureau/admin/mman_list.php

    r2902 r3107  
    8989                ?> 
    9090                <tr class="lst<?php echo $col; ?>"> 
    91                    <td align="center"><?php if ($val["list"]!="mailman") { ?><input type="checkbox" class="inc" name="d[]" value="<?php echo $val["id"]; ?>" id="d_<?php echo $val["id"]; ?>" /><?php } ?></td> 
    92                    <td><label for="d_<?php echo $val["id"]; ?>"><?php echo $val["list"]."@".$val["domain"] ?></label></td> 
     91                   <td align="center" rowspan="2"><?php if ($val["list"]!="mailman") { ?><input type="checkbox" class="inc" name="d[]" value="<?php echo $val["id"]; ?>" id="d_<?php echo $val["id"]; ?>" /><?php } ?></td> 
     92                   <td rowspan="2"><label for="d_<?php echo $val["id"]; ?>"><?php echo $val["list"]."@".$val["domain"] ?></label></td> 
    9393                        <td><div class="ina"><a href="http://<?php echo $L_FQDN; ?>/cgi-bin/mailman/listinfo/<?php echo $val["name"] ?>"><?php __("Public page"); ?></a></div></td> 
    9494                        <td><div class="ina"><a href="http://<?php echo $L_FQDN; ?>/cgi-bin/mailman/admin/<?php echo $val["name"] ?>"><?php __("List admin"); ?></a></div></td> 
    9595                        <td><div class="ina"><a href="http://<?php echo $L_FQDN; ?>/cgi-bin/mailman/admindb/<?php echo $val["name"] ?>"><?php __("Pending messages"); ?></a></div></td> 
     96</tr><tr class="lst<?php echo $col; ?>"> 
    9697                        <td><div class="ina"><a href="mman_passwd.php?id=<?php echo $val["id"] ?>"><?php __("Change password"); ?></a></div></td> 
     98                        <td><div class="ina"><a href="mman_url.php?id=<?php echo $val["id"] ?>"><?php __("Change url"); ?></a></div></td> 
    9799                        <td><div class="ina"><a href="mman_members.php?id=<?php echo $val["id"] ?>"><?php __("List Members"); ?></a></div></td> 
    98100                </tr> 
  • alternc-mailman/trunk/bureau/class/m_mailman.php

    r2745 r3107  
    338338 
    339339  /* ----------------------------------------------------------------- */ 
     340  /** 
     341   * Returns the current url for $list administration 
     342   * @param $list integer the list for which we want the url 
     343   * @return string the url (starting by http or https) or false if an error occured 
     344   */ 
     345  function get_list_url($list) { 
     346    global $db,$err,$cuid; 
     347    $q = "SELECT * FROM mailman WHERE uid = '" . $cuid . "' && id = '" . intval($list) . "'"; 
     348    $db->query($q); 
     349    $db->next_record(); 
     350    if (!$db->f("id")) { 
     351      $err->raise("mailman",9); 
     352      return false; 
     353    } 
     354    $list=$db->Record["name"]; 
     355    unset($out); 
     356    $exec="/usr/lib/alternc/mailman.geturl ".escapeshellarg($list); 
     357    exec($exec,$out,$ret); 
     358    if ($ret) return false; 
     359    if ($out[0])  
     360      return $out[0];  
     361    else  
     362      return false; 
     363  } 
     364 
     365 
     366  /* ----------------------------------------------------------------- */ 
     367  /** 
     368   * Set the management url for $list  
     369   * @param $list integer the list for which we want to change the url 
     370   * @param $url string the url, MUST be either http:// or https:// + domain + /cgi-bin/mailman/ 
     371   * @return boolean TRUE if the url has been changes 
     372   */ 
     373  function set_list_url($list,$newurl) { 
     374    global $db,$err,$cuid; 
     375    $q = "SELECT * FROM mailman WHERE uid = '" . $cuid . "' && id = '" . intval($list) . "'"; 
     376    $db->query($q); 
     377    $db->next_record(); 
     378    if (!$db->f("id")) { 
     379      $err->raise("mailman",9); 
     380      return false; 
     381    } 
     382    $list=$db->Record["name"]; 
     383    unset($out); 
     384    $exec="/usr/lib/alternc/mailman.seturl ".escapeshellarg($list)." ".escapeshellarg($newurl); 
     385    exec($exec,$out,$ret); 
     386    if ($ret) return false; 
     387    return true; 
     388  } 
     389 
     390 
     391  /* ----------------------------------------------------------------- */ 
    340392  /** This function is a hook who is called each time a domain is uninstalled 
    341393   * in an account (or when we select "gesmx = no" in the domain panel.) 
  • alternc-mailman/trunk/bureau/locales/fr_FR/LC_MESSAGES/mailman.po

    r3033 r3107  
    141141msgid "Change the password." 
    142142msgstr "Modifier le mot de passe." 
     143 
     144msgid "The mailing list management url has been successfully changed." 
     145msgstr "L'adresse URL de gestion de la liste a été modifiée avec succès." 
     146 
     147msgid "This is the current url to access administration and public pages for this list. If you want to change it, select another url in the list and submit this form. <br />If you don't know what you are doing, don't change anything here." 
     148msgstr "Voici l'adresse actuelle d'administration de votre liste, et des pages publiques. Si vous souhaitez la changer, choisissez une autre adresse dans la liste ci-dessous et validez. <br />Si vous ne savez pas de quoi il s'agit, ne touchez à rien." 
     149 
     150msgid "Changing management url of list %s" 
     151msgstr "Modification de l'adresse de gestion de la liste %s" 
     152 
     153msgid "Current list url" 
     154msgstr "Adresse actuelle" 
     155 
     156msgid "New list management url" 
     157msgstr "Nouvelle adresse de la liste" 
     158 
     159msgid "Change the url." 
     160msgstr "Modifier l'adresse." 
     161 
     162msgid "Change url" 
     163msgstr "Changer l'adresse" 
  • alternc-mailman/trunk/debian/changelog

    r3031 r3107  
     1alternc-mailman (2.1) stable; urgency=low 
     2 
     3  * ADD the ability to choose the URL of the web pages for mailman lists 
     4 
     5 -- Benjamin Sonntag <benjamin@alternc.org>  Wed, 19 Oct 2011 17:12:00 +0200 
     6 
    17alternc-mailman (2.0) stable; urgency=low 
    28 
  • alternc-mailman/trunk/debian/rules

    r2561 r3107  
    3535        install -m 0644 mm_cfg.py \ 
    3636                debian/alternc-mailman/etc/alternc/templates/mailman/ 
     37        install -m 0644 -o root -g root src/get_url_alternc.py src/set_url_alternc.py \ 
     38                debian/alternc-mailman/var/lib/mailman/bin/ 
    3739        install -m 0644 alternc-mailman.conf debian/alternc-mailman/etc/apache/conf.d/ 
    3840        install -m 0644 alternc-mailman.conf debian/alternc-mailman/etc/apache-ssl/conf.d/ 
     
    4143                src/mailman.create src/mailman.delete src/mailman.list src/mailman.passwd \ 
    4244                src/mailman.sub src/mailman.unsub \ 
    43                 debian/alternc-mailman/usr/lib/alternc/ 
     45                debian/alternc-mailman/usr/lib/alternc/ \ 
     46                src/mailman.seturl src/mailman.geturl 
    4447        install -m 0644 mailman.sql \ 
    4548                debian/alternc-mailman/usr/share/alternc/install/ 
Note: See TracChangeset for help on using the changeset viewer.