backport
authorPierre Habouzit (MadCoder <pierre.habouzit@m4x.org>
Thu, 2 Jun 2005 18:33:57 +0000 (18:33 +0000)
committerFlorent Bruneau <florent.bruneau@polytechnique.org>
Thu, 26 Jun 2008 21:29:06 +0000 (23:29 +0200)
Patches applied:

 * opensource@polytechnique.org--2005/platal--release--0.9.6--patch-32
   fix lists perms problem

git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-676

htdocs.net/groupe/listes-admin.php
htdocs.net/groupe/listes-archives.php
htdocs.net/groupe/listes-check.php
htdocs.net/groupe/listes-create.php
htdocs.net/groupe/listes-delete.php
htdocs.net/groupe/listes-members.php
htdocs.net/groupe/listes-moderate.php
htdocs.net/groupe/listes-options.php
htdocs.net/groupe/listes-soptions.php
templates/listes/header_listes.tpl

index c63934d..86478bd 100644 (file)
@@ -25,6 +25,7 @@ $liste  = strtolower(Env::get('liste'));
 $domain = $globals->asso('mail_domain');
 
 new_group_page('listes/admin.tpl');
+$page->assign('force_list_super', may_update());
 
 require_once('lists.inc.php');
 $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
index 2bc1a40..e7fab8f 100644 (file)
@@ -25,6 +25,7 @@ $liste  = strtolower(Env::get('liste'));
 $domain = $globals->asso('mail_domain');
 
 new_group_page('listes/archives.tpl');
+$page->assign('force_list_super', may_update());
 
 require_once('lists.inc.php');
 $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
index 57bb6bc..e44827c 100644 (file)
@@ -23,7 +23,8 @@ require_once 'xnet.inc.php';
 if (!Env::has('liste')) header('Location: index.php');
 $liste = strtolower(Env::get('liste'));
 
-new_admin_page('listes/check.tpl');
+new_groupadmin_page('listes/check.tpl');
+$page->assign('force_list_super', may_update());
 
 require_once('lists.inc.php');
 $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
index 572f3d7..a49805c 100644 (file)
@@ -2,6 +2,7 @@
 require 'xnet.inc.php';
 
 new_groupadmin_page('xnet/groupe/listes-create.tpl');
+$page->assign('force_list_super', may_update());
 
 if (Post::has('submit')) {
     if (!Post::has('liste')) {
index afbe451..aed95c7 100644 (file)
@@ -24,6 +24,7 @@ if (!Env::has('liste')) header('Location: listes.php');
 $liste = strtolower(Env::get('liste'));
 
 new_group_page('listes/delete.tpl');
+$page->assign('force_list_super', may_update());
 
 require_once('lists.inc.php');
 $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
index d16c508..562ca36 100644 (file)
@@ -24,6 +24,7 @@ if (!Env::has('liste')) header('Location: listes.php');
 $liste = strtolower(Env::get('liste'));
 
 new_group_page('listes/members.tpl');
+$page->assign('force_list_super', may_update());
 
 require_once('lists.inc.php');
 $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
index 286aca0..a5b2ff3 100644 (file)
@@ -29,6 +29,7 @@ if (preg_match("!(?:[a-z0-9]+\\.)?{".$globals->asso('mail_domain')."}_(.*)!", $l
 }
 
 new_group_page('listes/moderate.tpl');
+$page->assign('force_list_super', may_update());
 
 require_once('lists.inc.php');
 $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
index 3667754..5214f69 100644 (file)
@@ -24,6 +24,7 @@ if (!Env::has('liste')) header('Location: listes.php');
 $liste = strtolower(Env::get('liste'));
 
 new_group_page('listes/options.tpl');
+$page->assign('force_list_super', may_update());
 
 require_once('lists.inc.php');
 $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
index cea1523..cb150b9 100644 (file)
@@ -23,7 +23,8 @@ require_once 'xnet.inc.php';
 if (!Env::has('liste')) header('Location: listes.php');
 $liste = strtolower(Env::get('liste'));
 
-new_admin_page('listes/soptions.tpl');
+new_groupadmin_page('listes/soptions.tpl');
+$page->assign('force_list_super', may_update());
 
 require_once('lists.inc.php');
 $client =& lists_xmlrpc(Session::getInt('uid'), Session::get('password'), $globals->asso('mail_domain'));
index f0880e5..eff6d9d 100644 (file)
@@ -83,7 +83,7 @@
     </td>
   </tr>
   {/if}
-  {perms level=admin}
+  {if $smarty.session.perms eq admin || $force_list_super}
   <tr>
     <td><strong>Administrer (avancĂ©) :</strong></td>
     <td>
@@ -99,7 +99,7 @@
       {/if}
     </td>
   </tr>
-  {/perms}
+  {/if}
 </table>