Ticket #1131: variable_url_mailman.patch

File variable_url_mailman.patch, 2.8 kB (added by anonyme, 1 week ago)
  • debian/postrm

    old new  
    1919    if [ -e "$CONFIGFILE" -a -x "/usr/bin/mysql" ]; then 
    2020        . "$CONFIGFILE" 
    2121        mysql -f --defaults-file=/etc/alternc/my.cnf -e "DROP TABLE IF EXISTS mailman" 
     22        mysql -f --defaults-file=/etc/alternc/my.cnf -e "DELETE FROM variable WHERE name = 'mailman_url'" 
    2223    fi 
    2324    ;; 
    2425esac 
  • bureau/admin/mman_list.php

    old new  
    7777                <tr class="lst<?php echo $col; ?>"> 
    7878                        <td align="center"><input type="checkbox" class="inc" name="d[]" value="<?php echo $val["id"]; ?>"></td> 
    7979                        <td><?php echo $val["list"]."@".$val["domain"] ?></td> 
    80                 <?php   // Use the URL of the webmail in case of IP redirection on the domain. There is probably a best way to fix this  ?> 
    81                         <td>&nbsp;<a href="https://mail.<?php echo $val["domain"]; ?>/cgi-bin/mailman/listinfo/<?php echo $val["name"] ?>"><?php __("Public page"); ?></a>&nbsp;</td> 
    82                         <td>&nbsp;<a href="https://mail.<?php echo $val["domain"]; ?>/cgi-bin/mailman/admin/<?php echo $val["name"] ?>"><?php __("List admin"); ?></a>&nbsp;</td> 
    83                         <td>&nbsp;<a href="https://mail.<?php echo $val["domain"]; ?>/cgi-bin/mailman/admindb/<?php echo $val["name"] ?>"><?php __("Pending messages"); ?></a>&nbsp;</td> 
     80                <?php   // Use the URL of the webmail in case of IP redirection on the domain. There is probably a best way to fix this 
     81    $mailman_url = variable_get('mailman_url'); 
     82    if (!empty($mailman_url)) $domaine = $mailman_url; else $domaine = $val["domain"]; 
     83    ?> 
     84                        <td>&nbsp;<a href="https://<?php echo $domaine; ?>/cgi-bin/mailman/listinfo/<?php echo $val["name"] ?>"><?php __("Public page"); ?></a>&nbsp;</td> 
     85                        <td>&nbsp;<a href="https://<?php echo $domaine; ?>/cgi-bin/mailman/admin/<?php echo $val["name"] ?>"><?php __("List admin"); ?></a>&nbsp;</td> 
     86                        <td>&nbsp;<a href="https://<?php echo $domaine; ?>/cgi-bin/mailman/admindb/<?php echo $val["name"] ?>"><?php __("Pending messages"); ?></a>&nbsp;</td> 
    8487                        <td>&nbsp;<a href="mman_members.php?id=<?php echo $val["id"] ?>"><?php __("List Members"); ?></a>&nbsp;</td> 
    8588                </tr> 
    8689                <?php 
  • mailman.sql

    old new  
    88  PRIMARY KEY  (`id`) 
    99) TYPE=MyISAM COMMENT='Mailman mailing lists'; 
    1010 
     11INSERT IGNORE INTO `variable` (name, value, comment) VALUES ('mailman_url', 0, 
     12' This is the domaine name that will be use to construct mailman\'s interface links. Set this to 0 or a "false" string to ignore and keep the default behavior (hosted domain in the URL).');