User::canEdit takes user permissions into account.
[platal.git] / modules / xnet.php
index 9ad297a..dbaa8a3 100644 (file)
@@ -45,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();
@@ -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.');
             }
@@ -187,7 +187,7 @@ class XnetModule extends PLModule
         $page->assign('cat', $cat);
         $page->assign('dom', $dom);
 
-        $res  = XDB::query("SELECT  id,nom 
+        $res  = XDB::query("SELECT  id,nom
                               FROM  group_dom
                              WHERE  FIND_IN_SET({?}, cat)
                           ORDER BY  nom", $cat);