Fixes nationalities deletion.
[platal.git] / modules / xnet.php
index 7edb674..136382c 100644 (file)
@@ -33,6 +33,8 @@ class XnetModule extends PLModule
             'plan'        => $this->make_hook('plan',      AUTH_PUBLIC),
             'photo'       => $this->make_hook('photo',     AUTH_MDP),
             'autologin'   => $this->make_hook('autologin', AUTH_MDP),
+
+            'Xnet'        => $this->make_wiki_hook(),
         );
     }
 
@@ -43,7 +45,7 @@ class XnetModule extends PLModule
         }
 
         // Retrieve the photo and its mime type.
-        $photo = $profile->getPhoto(true);
+        $photo = $profile->getPhoto(true, true);
 
         // Display the photo, or a default one when not available.
         $photo->send();
@@ -115,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.');
             }