Fixes group edition and creation.
authorStéphane Jacob <sj@m4x.org>
Tue, 1 Jun 2010 20:03:01 +0000 (22:03 +0200)
committerStéphane Jacob <sj@m4x.org>
Tue, 1 Jun 2010 20:03:01 +0000 (22:03 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
modules/xnet.php
modules/xnetgrp.php

index 3da7b6a..136382c 100644 (file)
@@ -117,7 +117,7 @@ class XnetModule extends PLModule
                 XDB::execute('INSERT INTO  groups (id, diminutif)
                                    VALUES  (NULL, {?})',
                              Post::v('diminutif'));
-                pl_redirect('../' . Post::v('diminutif') . '/edit');
+                pl_redirect(Post::v('diminutif') . '/edit');
             } else {
                 $page->trigError('Le diminutif demandé est déjà pris.');
             }
index 0e1af54..fa6c111 100644 (file)
@@ -164,10 +164,6 @@ class XnetGrpModule extends PLModule
                 $site = "";
             }
             if (S::admin()) {
-                $dom = XDB::iterator('SELECT  *
-                                        FROM  group_dom
-                                    ORDER BY  nom');
-                $page->assign('dom', $dom);
                 $page->assign('super', true);
 
                 if (Post::v('mail_domain') && (strstr(Post::v('mail_domain'), '.') === false)) {
@@ -226,7 +222,15 @@ class XnetGrpModule extends PLModule
                 }
             }
 
-            pl_redirect('../'.Post::v('diminutif', $globals->asso('diminutif')).'/edit');
+            pl_redirect('../' . Post::v('diminutif', $globals->asso('diminutif')) . '/edit');
+        }
+
+        if (S::admin()) {
+            $dom = XDB::iterator('SELECT  *
+                                    FROM  group_dom
+                                ORDER BY  nom');
+            $page->assign('dom', $dom);
+            $page->assign('super', true);
         }
     }