all list module (except main page) has been backported
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Mon, 18 Apr 2005 14:03:55 +0000 (14:03 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:28:39 +0000 (23:28 +0200)
git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-569

15 files changed:
htdocs.net/groupe/listes-admin.php
htdocs.net/groupe/listes-check.php [new file with mode: 0644]
htdocs.net/groupe/listes-delete.php [new file with mode: 0644]
htdocs.net/groupe/listes-members.php [new file with mode: 0644]
htdocs.net/groupe/listes-moderate.php [new file with mode: 0644]
htdocs.net/groupe/listes-options.php
htdocs.net/groupe/listes-soptions.php [new file with mode: 0644]
htdocs/listes/check.php
htdocs/listes/delete.php
htdocs/listes/members.php
htdocs/listes/moderate.php
htdocs/listes/soptions.php
include/xnet.inc.php
templates/listes/delete.tpl
templates/listes/header_listes.tpl

index 4172c83..f9d6c17 100644 (file)
@@ -26,7 +26,6 @@ $liste = strtolower(Env::get('liste'));
 new_skinned_page('listes/admin.tpl', AUTH_MDP);
 $page->setType($globals->asso('cat'));
 $page->useMenu();
-$page->assign('ml_index', 'listes.php');
 
 require_once('lists.inc.php');
 $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
diff --git a/htdocs.net/groupe/listes-check.php b/htdocs.net/groupe/listes-check.php
new file mode 100644 (file)
index 0000000..b06adaf
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+/***************************************************************************
+ *  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                *
+ ***************************************************************************/
+
+require_once 'xnet.inc.php';
+if (!Env::has('liste')) header('Location: index.php');
+$liste = strtolower(Env::get('liste'));
+
+new_admin_page('listes/check.tpl');
+require_once('lists.inc.php');
+
+require_once('lists.inc.php');
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+require(dirname(dirname(dirname(__FILE__))).'/htdocs/listes/check.php');
+
+?>
diff --git a/htdocs.net/groupe/listes-delete.php b/htdocs.net/groupe/listes-delete.php
new file mode 100644 (file)
index 0000000..83ff0b5
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+/***************************************************************************
+ *  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                *
+ ***************************************************************************/
+
+require_once 'xnet.inc.php';
+if (!Env::has('liste')) header('Location: listes.php');
+$liste = strtolower(Env::get('liste'));
+
+new_skinned_page('listes/delete.tpl', AUTH_MDP);
+$page->setType($globals->asso('cat'));
+$page->useMenu();
+
+require_once('lists.inc.php');
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+require(dirname(dirname(dirname(__FILE__))).'/htdocs/listes/delete.php');
+
+?>
diff --git a/htdocs.net/groupe/listes-members.php b/htdocs.net/groupe/listes-members.php
new file mode 100644 (file)
index 0000000..19f587c
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+/***************************************************************************
+ *  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                *
+ ***************************************************************************/
+
+require_once 'xnet.inc.php';
+if (!Env::has('liste')) header('Location: listes.php');
+$liste = strtolower(Env::get('liste'));
+
+new_skinned_page('listes/members.tpl', AUTH_MDP);
+$page->setType($globals->asso('cat'));
+$page->useMenu();
+
+require_once('lists.inc.php');
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+require(dirname(dirname(dirname(__FILE__))).'/htdocs/listes/members.php');
+
+?>
diff --git a/htdocs.net/groupe/listes-moderate.php b/htdocs.net/groupe/listes-moderate.php
new file mode 100644 (file)
index 0000000..2f604d9
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/***************************************************************************
+ *  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                *
+ ***************************************************************************/
+
+require_once 'xnet.inc.php';
+if (!Env::has('liste')) header('Location: listes.php');
+$liste = strtolower(Env::get('liste'));
+
+if (preg_match("!(?:[a-z0-9]+\\.)?{".$globals->asso('mail_domain')."}_(.*)!", $liste, $matches)) {
+    header("Location: {$_SERVER['PHP_SELF']}?liste={$matches[1]}");
+}
+
+new_skinned_page('listes/moderate.tpl', AUTH_MDP);
+$page->setType($globals->asso('cat'));
+$page->useMenu();
+
+require_once('lists.inc.php');
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+require(dirname(dirname(dirname(__FILE__))).'/htdocs/listes/moderate.php');
+
+?>
index d1e4496..68ebce7 100644 (file)
@@ -26,7 +26,6 @@ $liste = strtolower(Env::get('liste'));
 new_skinned_page('listes/options.tpl', AUTH_MDP);
 $page->setType($globals->asso('cat'));
 $page->useMenu();
-$page->assign('ml_index', 'listes.php');
 
 require_once('lists.inc.php');
 $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
diff --git a/htdocs.net/groupe/listes-soptions.php b/htdocs.net/groupe/listes-soptions.php
new file mode 100644 (file)
index 0000000..a61d5b9
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+/***************************************************************************
+ *  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                *
+ ***************************************************************************/
+
+require_once 'xnet.inc.php';
+if (!Env::has('liste')) header('Location: listes.php');
+$liste = strtolower(Env::get('liste'));
+
+new_admin_page('listes/soptions.tpl');
+$page->setType($globals->asso('cat'));
+$page->useMenu();
+
+require_once('lists.inc.php');
+$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
+require(dirname(dirname(dirname(__FILE__))).'/htdocs/listes/soptions.php');
+
+?>
index 06b6092..4cd27ba 100644 (file)
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once("xorg.inc.php");
-if (!Env::has('liste')) header('Location: index.php');
-$liste = strtolower(Env::get('liste'));
+if (!$page) {
+    require_once("xorg.inc.php");
+    if (!Env::has('liste')) header('Location: index.php');
+    $liste = strtolower(Env::get('liste'));
 
-new_admin_page('listes/check.tpl');
-require_once('lists.inc.php');
+    new_admin_page('listes/check.tpl');
+    require_once('lists.inc.php');
 
-$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+    $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+}
 
 if(Post::has('correct')) {
     $client->check_options($liste, true);
index 2d0cc21..bc0d04d 100644 (file)
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once("xorg.inc.php");
-if (!Env::has('liste')) header('Location: index.php');
-$liste = strtolower(Env::get('liste'));
+if (!$page) {
+    require_once("xorg.inc.php");
+    if (!Env::has('liste')) header('Location: index.php');
+    $liste = strtolower(Env::get('liste'));
 
-new_skinned_page('listes/delete.tpl', AUTH_MDP);
-require_once('lists.inc.php');
-
-$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+    new_skinned_page('listes/delete.tpl', AUTH_MDP);
+    require_once('lists.inc.php');
 
+    $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+}
 
 if ( Post::get('valid') == 'OUI' && $client->delete_list($liste, Post::getBool('del_archive')) ) {
     $page->assign('deleted', true);
index 1b4cb75..0d51416 100644 (file)
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once("xorg.inc.php");
-if (!Env::has('liste')) header('Location: index.php');
-$liste = strtolower(Env::get('liste'));
+if (!$page) {
+    require_once("xorg.inc.php");
+    if (!Env::has('liste')) header('Location: index.php');
+    $liste = strtolower(Env::get('liste'));
 
-new_skinned_page('listes/members.tpl', AUTH_COOKIE);
-require_once('lists.inc.php');
+    new_skinned_page('listes/members.tpl', AUTH_COOKIE);
+    require_once('lists.inc.php');
 
-$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+    $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+}
 
 if(Get::has('del')) {
     $client->unsubscribe($liste);
index ad7c0dc..5b50977 100644 (file)
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once("xorg.inc.php");
-if (!Env::has('liste')) header('Location: index.php');
-$liste = strtolower(Env::get('liste'));
+if (!$page) {
+    require_once("xorg.inc.php");
+    if (!Env::has('liste')) header('Location: index.php');
+    $liste = strtolower(Env::get('liste'));
 
-if (preg_match("!(?:[a-z0-9]+\\.)?{$globals->mail->domain}_(.*)!", $liste, $matches)) {
-    header("Location: {$_SERVER['PHP_SELF']}?liste={$matches[1]}");
-}
+    if (preg_match("!(?:[a-z0-9]+\\.)?{$globals->mail->domain}_(.*)!", $liste, $matches)) {
+        header("Location: {$_SERVER['PHP_SELF']}?liste={$matches[1]}");
+    }
 
-new_skinned_page('listes/moderate.tpl', AUTH_MDP);
-require_once('lists.inc.php');
+    new_skinned_page('listes/moderate.tpl', AUTH_MDP);
+    require_once('lists.inc.php');
+
+    $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+}
 
-$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
 $page->register_modifier('qpd','quoted_printable_decode');
 
 if(Env::has('sadd')) {
index 2645f95..5952da7 100644 (file)
  *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
  ***************************************************************************/
 
-require_once("xorg.inc.php");
-if (!Env::has('liste')) header('Location: index.php');
-$liste = strtolower(Env::get('liste'));
+if (!$page) {
+    require_once("xorg.inc.php");
+    if (!Env::has('liste')) header('Location: index.php');
+    $liste = strtolower(Env::get('liste'));
 
-new_admin_page('listes/soptions.tpl');
-require_once('lists.inc.php');
+    new_admin_page('listes/soptions.tpl');
+    require_once('lists.inc.php');
 
-$client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+    $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'));
+}
 
 if(Post::has('submit')) {
     $values = $_POST;
index f86bbd9..2cca4f0 100644 (file)
@@ -54,5 +54,13 @@ function new_skinned_page($tpl_name, $min_auth)
 }
 
 // }}}
+// {{{ function new_admin_page()
+
+function new_admin_page($tpl_name)
+{
+    _new_page(SKINNED, $tpl_name, AUTH_MDP, true);
+}
+
+// }}}
 // vim:set et sw=4 sts=4 sws=4 foldmethod=marker:
 ?>
index aa8f3ea..e798e46 100644 (file)
@@ -23,7 +23,7 @@
 
 {if $deleted}
 
-<p>[<a href='index.php'>Voir toutes les listes</a>]</p>
+<p>[<a href='{if $it_is_xnet}listes.php{else}index.php{/if}'>Voir toutes les listes</a>]</p>
 <p class="erreur">La liste a été détruite !</p>
 
 {else}
index 682672c..7a24775 100644 (file)
       {else}
       [liste des membres]
       {/if}
+      {if !$it_is_xnet}
       {if $on neq trombi}
       [<a href='{$prefix}trombi.php?liste={$smarty.request.liste}'>trombinoscope</a>]
       {else}
       [trombinoscope]
       {/if}
+      {/if}
       {if $on neq archives}
       [<a href='{$prefix}archives.php?liste={$smarty.request.liste}'>archives</a>]
       {else}