- Documentation now use Wiki -Car
* Profile :
- - User can now accept synchronisatio from AX by admin. -Car
+ - User can now accept synchronisation from AX by admin. -Car
- Address will try to display as the country standard. -Car
* Xnet :
- Groups can be non subscribable. -Car
- - Most Wanted Feature : directories syncrhonization with lists. -MC
+ - Most Wanted Feature : directories synchronization with lists. -MC
- Various bug fixes in events management. -Car
+ - Groups can now synchronize MLs and the directory. -MC
Bug/Wish :
$page->assign('not_in_group_ext', $not_in_group_ext);
$page->assign('not_in_group_x', $not_in_group_x);
+$page->assign('lists', $lists);
$page->run();
?>
--- /dev/null
+<?php
+
+require_once 'xnet.inc.php';
+require_once 'lists.inc.php';
+require_once 'xnet/mail.inc.php';
+
+if (!Env::has('liste')) {
+ header('Location: annuaire-admin.php');
+}
+$liste = Env::get('liste');
+
+new_groupadmin_page('xnet/groupe/listes-sync.tpl');
+
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+
+if (Env::has('add')) {
+ $client->mass_subscribe($liste, array_keys(Env::getMixed('add')));
+}
+
+list(,$members) = $client->get_members($liste);
+$mails = array_map(create_function('$arr', 'return $arr[1];'), $members);
+$subscribers = array_unique(array_merge($subscribers, $mails));
+
+$not_in_group_x = array();
+$not_in_group_ext = array();
+
+$ann = $globals->xdb->iterator(
+ "SELECT IF(m.origine='X',IF(u.nom_usage<>'', u.nom_usage, u.nom) ,m.nom) AS nom,
+ IF(m.origine='X',u.prenom,m.prenom) AS prenom,
+ IF(m.origine='X',u.promo,'extérieur') AS promo,
+ IF(m.origine='X',CONCAT(a.alias, '@polytechnique.org'),m.email) AS email,
+ IF(m.origine='X',FIND_IN_SET('femme', u.flags),0) AS femme,
+ m.perms='admin' AS admin,
+ m.origine='X' AS x
+ FROM groupex.membres AS m
+ LEFT JOIN auth_user_md5 AS u ON ( u.user_id = m.uid )
+ LEFT JOIN aliases AS a ON ( a.id = m.uid AND a.type='a_vie' )
+ WHERE m.asso_id = {?}", $globals->asso('id'));
+
+$not_in_list = array();
+
+while ($tmp = $ann->next()) {
+ if (!in_array($tmp['email'], $subscribers)) {
+ $not_in_list[] = $tmp;
+ }
+}
+
+$page->assign('not_in_list', $not_in_list);
+$page->run();
+
+?>
$sub = array();
$sub['modifier l\'accueil'] = "$dim/edit.php";
if ($globals->asso('mail_domain')) {
- $sub['synchro. annuaire'] = "$dim/annuaire-admin.php";
$sub['envoyer un mail'] = "$dim/mail.php";
$sub['créer une liste'] = "$dim/listes-create.php";
$sub['créer un alias'] = "$dim/alias-create.php";
</td>
</tr>
{/if}
+ {if $it_is_xnet}
+ <tr>
+ <td><strong>Synchroniser</strong></td>
+ {if $on neq sync}
+ <td>[<a href="listes-sync.php?liste={$smarty.get.liste}">Synchroniser avec l'annuaire</a>]</td>
+ {else}
+ <td>[Synchroniser avec l'annuaire]</td>
+ {/if}
+ </tr>
+ {/if}
</table>
{/foreach}
</ul>
+<h2>Comparer une liste et l'annuaire</h2>
+
+<table cellspacing="2" cellpadding="0" class="tiny">
+ <tr>
+ <th>Liste</th>
+ <th>Description</th>
+ <th></th>
+ </tr>
+ {foreach from=$lists item=l}
+ <tr>
+ <td>{$l.list}</td>
+ <td>{$l.desc}</td>
+ <td><a href="listes-sync.php?liste={$l.list}">synchro</a></td>
+ </tr>
+ {/foreach}
+</table>
+
{* vim:set et sw=2 sts=2 sws=2: *}
--- /dev/null
+{**************************************************************************}
+{* *}
+{* Copyright (C) 2003-2004 Polytechnique.org *}
+{* http://opensource.polytechnique.org/ *}
+{* *}
+{* This program is free software; you can redistribute it and/or modify *}
+{* it under the terms of the GNU General Public License as published by *}
+{* the Free Software Foundation; either version 2 of the License, or *}
+{* (at your option) any later version. *}
+{* *}
+{* This program is distributed in the hope that it will be useful, *}
+{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
+{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
+{* GNU General Public License for more details. *}
+{* *}
+{* You should have received a copy of the GNU General Public License *}
+{* along with this program; if not, write to the Free Software *}
+{* Foundation, Inc., *}
+{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
+{* *}
+{**************************************************************************}
+
+{include file='listes/header_listes.tpl' on='sync'}
+<h1>Non abonnés à la liste {$smarty.request.liste}@{$asso.mail_domain}</h1>
+
+<form action="{$smarty.server.REQUEST_URI}" method="post">
+
+ <table cellspacing="2" cellpadding="0" class="tiny">
+ <tr>
+ <th>Membre</th>
+ <th></th>
+ </tr>
+ {foreach from=$not_in_list item=u}
+ <tr>
+ <td>{$u.prenom} {$u.nom}</td>
+ <td><input type="checkbox" name="add[{$u.email}]" /></td>
+ </tr>
+ {/foreach}
+ <tr>
+ <td colspan='2' class="center">
+ <input type='submit' value='forcer inscription' />
+ </td>
+ </tr>
+ </table>
+
+</form>
+
+{* vim:set et sw=2 sts=2 sws=2: *}